Skip to content

Commit

Permalink
[qtcontacts-sqlite-extensions] removed unused static function. Contri…
Browse files Browse the repository at this point in the history
…butes to MER#1842

The maxModificationTimestamp() function is declared inside an unnamed
namespace, making it effectively a static function. It's also unused
since 6959456 (in 2014!), and it causes
a compilation warning in Ubuntu.
  • Loading branch information
mardy committed Nov 6, 2017
1 parent 6c56890 commit bd81d3a
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/extensions/twowaycontactsyncadapter_impl.h
Expand Up @@ -545,23 +545,6 @@ QPair<QList<QContactDetail>, QList<QContactDetail> > fallbackDelta(const QContac
return QPair<QList<QContactDetail>, QList<QContactDetail> >(pdets, cdets);
}

// search through the list of contacts, determine the most recent timestamp datetime.
QDateTime maxModificationTimestamp(const QList<QContact> &contacts)
{
QDateTime since;

for (int i = 0; i < contacts.size(); ++i) {
const QContactTimestamp &ts(contacts[i].detail<QContactTimestamp>());
if (ts.lastModified().isValid() && (ts.lastModified() > since || !since.isValid())) {
since = ts.lastModified();
} else if (ts.created().isValid() && (ts.created() > since || !since.isValid())) {
since = ts.created();
}
}

return since;
}

}

TwoWayContactSyncAdapterPrivate::TwoWayContactSyncAdapterPrivate(TwoWayContactSyncAdapter *q, const QString &syncTarget, const QMap<QString, QString> &params)
Expand Down

0 comments on commit bd81d3a

Please sign in to comment.