Commit ebc39c53 authored by Shashwat Jolly's avatar Shashwat Jolly
Browse files

Add const to relevant variables

parent bbfadc71
Pipeline #38750 canceled with stage
......@@ -67,7 +67,7 @@ void EntriesFetchJob::fetchEntries()
qCDebug(ETESYNC_LOG) << "Type:" << type;
QString sToken = mCollection.remoteRevision();
bool done = 0;
bool done = false;
EtebaseCollectionManagerPtr collectionManager(etebase_account_get_collection_manager(account));
EtebaseItemManagerPtr itemManager(etebase_collection_manager_get_item_manager(collectionManager.get(), mEtesyncCollection.get()));
......
......@@ -159,12 +159,12 @@ void EteSyncResource::slotCollectionsRetrieved(KJob *job)
qCDebug(ETESYNC_LOG) << "slotCollectionsRetrieved()";
QString sToken = qobject_cast<JournalsFetchJob *>(job)->syncToken();
const QString sToken = qobject_cast<JournalsFetchJob *>(job)->syncToken();
mRootCollection.setRemoteRevision(sToken);
Collection::List collections = {mRootCollection};
collections.append(qobject_cast<JournalsFetchJob *>(job)->collections());
Collection::List removedCollections = qobject_cast<JournalsFetchJob *>(job)->removedCollections();
const Collection::List removedCollections = qobject_cast<JournalsFetchJob *>(job)->removedCollections();
collectionsRetrievedIncremental(collections, removedCollections);
......@@ -173,7 +173,7 @@ void EteSyncResource::slotCollectionsRetrieved(KJob *job)
qCDebug(ETESYNC_LOG) << "Collections retrieval done";
}
bool EteSyncResource::handleError(const int errorCode, QString errorMessage)
bool EteSyncResource::handleError(const int errorCode, const QString &errorMessage)
{
qCDebug(ETESYNC_LOG) << "handleError" << errorCode << errorMessage;
switch (errorCode) {
......
......@@ -51,7 +51,7 @@ protected:
QString baseDirectoryPath() const;
bool handleError();
bool handleError(const int errorCode, QString errorMessage);
bool handleError(const int errorCode, const QString &errorMessage);
bool credentialsRequired();
private Q_SLOTS:
......
......@@ -57,7 +57,7 @@ void JournalsFetchJob::fetchJournals()
}
mSyncToken = mResourceCollection.remoteRevision();
bool done = 0;
bool done = false;
EtebaseCollectionManagerPtr collectionManager(etebase_account_get_collection_manager(account));
while (!done) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment