Commit 14be152f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Modernize code

parent d9fbb286
Pipeline #36781 failed with stage
in 54 minutes and 4 seconds
......@@ -73,7 +73,7 @@ FolderArchiveSettingPage::FolderArchiveSettingPage(const QString &instanceName,
"@label:chooser for the folder that messages will be archived under",
"Archive into:"));
hbox->addWidget(lab);
mArchiveFolder = new Akonadi::CollectionRequester;
mArchiveFolder = new Akonadi::CollectionRequester(this);
mArchiveFolder->setMimeTypeFilter(QStringList() << KMime::Message::mimeType());
hbox->addWidget(mArchiveFolder);
lay->addLayout(hbox);
......
......@@ -15,8 +15,8 @@
TomboyCollectionsDownloadJob::TomboyCollectionsDownloadJob(const QString &collectionName, KIO::AccessManager *manager, int refreshInterval, QObject *parent)
: TomboyJobBase(manager, parent)
, mCollectionName(collectionName)
, mRefreshInterval(refreshInterval)
{
mRefreshInterval = refreshInterval;
}
Akonadi::Collection::List TomboyCollectionsDownloadJob::collections() const
......
......@@ -26,8 +26,8 @@ private:
// This will be called once the request is finished.
void onRequestFinished();
Akonadi::Collection::List mResultCollections;
QString mCollectionName;
int mRefreshInterval;
const QString mCollectionName;
const int mRefreshInterval;
};
#endif // TOMBOYCOLLECTIONSDOWNLOADJOB_H
......@@ -23,7 +23,7 @@ public:
void start() override;
private:
Akonadi::Collection::Id mCollectionId;
const Akonadi::Collection::Id mCollectionId;
// This will be called once the request is finished.
void onRequestFinished();
Akonadi::Item::List mResultItems;
......
......@@ -40,7 +40,7 @@ private:
Akonadi::Item mSourceItem;
KMime::Message::Ptr mNoteContent;
JobType mJobType;
const JobType mJobType;
int mRemoteRevision;
};
......
......@@ -10,7 +10,6 @@ TomboyJobBase::TomboyJobBase(KIO::AccessManager *manager, QObject *parent)
: KCompositeJob(parent)
, mManager(manager)
, mO1(new O1Tomboy(this))
, mReply(nullptr)
{
mRequestor = new O1Requestor(mManager, mO1, this);
}
......
......@@ -29,9 +29,9 @@ public:
void setAuthentication(const QString &token, const QString &secret);
protected:
KIO::Integration::AccessManager *mManager = nullptr;
KIO::Integration::AccessManager *const mManager;
O1Requestor *mRequestor = nullptr;
O1Tomboy *mO1 = nullptr;
O1Tomboy *const mO1;
QNetworkReply *mReply = nullptr;
QString mApiURL;
......
......@@ -35,7 +35,7 @@ private:
void onUserRequestFinished();
QString mUserURL;
QWebEngineView *mWebView = nullptr;
QWebEngineView *const mWebView;
};
#endif // TOMBOYSERVERAUTHENTICATEJOB_H
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