Commit 74dbcfe9 authored by Laurent Montel's avatar Laurent Montel
Browse files

Don't use Q_SLOTS when not necessary. Add missing Q_REQUIRED_RESULT

parent 8276fff0
Pipeline #231665 failed with stage
in 10 minutes and 21 seconds
......@@ -19,10 +19,8 @@ public:
void doStart() override;
private Q_SLOTS:
void collectionCreateJobDone(KJob *);
private:
void collectionCreateJobDone(KJob *);
void createNextLevelOfCollections();
void createReadyItems();
......
......@@ -37,12 +37,10 @@ public:
void doStart() override;
private Q_SLOTS:
private:
void collectionsReceived(const Akonadi::Collection::List &);
void collectionsFetched(KJob *);
void itemsUpdated(KJob *);
private:
void processCollection();
const QStringList mMimeTypeFilter;
Akonadi::Collection::List mCollections;
......@@ -61,10 +59,8 @@ public:
void doStart() override;
void slotResult(KJob *job) override;
private Q_SLOTS:
void itemsReceived(const Akonadi::Item::List &items);
private:
void itemsReceived(const Akonadi::Item::List &items);
bool processNext();
const Akonadi::Collection mCollection;
......
......@@ -27,7 +27,7 @@ int main(int argc, char **argv)
QStringLiteral("0.1"),
i18n("Migration of Akonadi Items to support GID"),
KAboutLicense::LGPL,
i18n("(c) 2013-2020 the Akonadi developers"),
i18n("(c) 2013-2022 the Akonadi developers"),
QStringLiteral("https://community.kde.org/KDE_PIM/Akonadi"));
aboutData.setProductName(QByteArrayLiteral("Akonadi/Migration"));
aboutData.addAuthor(i18n("Christian Mollekopf"), i18n("Author"), QStringLiteral("mollekopf@kolabsys.com"));
......
......@@ -66,10 +66,8 @@ Q_SIGNALS:
protected Q_SLOTS:
virtual void migrate() = 0;
private Q_SLOTS:
void logMessage(KMigratorBase::MessageType type, const QString &msg);
private:
void logMessage(KMigratorBase::MessageType type, const QString &msg);
QFile *m_logFile = nullptr;
QEventLoopLocker eventLoopLocker;
};
......@@ -24,10 +24,10 @@ public:
const QUrl &resultUri() const;
void start() override;
QString getAuthHeader();
Q_REQUIRED_RESULT QString getAuthHeader();
private:
QByteArray buildAuthResponse(const QMap<QString, QString> &params);
Q_REQUIRED_RESULT QByteArray buildAuthResponse(const QMap<QString, QString> &params);
void sendAuthRequest(const QByteArray &respToken, const QUrl &submitUrl, const QString &context);
void authRequestFinished();
......
......@@ -25,6 +25,7 @@
EwsMtaConfigDialog::EwsMtaConfigDialog(EwsMtaResource *parentResource, WId wId)
: QDialog()
, mParentResource(parentResource)
, mButtonBox(new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this))
{
if (wId) {
setAttribute(Qt::WA_NativeWindow, true);
......@@ -33,7 +34,6 @@ EwsMtaConfigDialog::EwsMtaConfigDialog(EwsMtaResource *parentResource, WId wId)
auto mainWidget = new QWidget(this);
auto mainLayout = new QVBoxLayout(this);
mButtonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
mainLayout->addWidget(mainWidget);
QPushButton *okButton = mButtonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
......
......@@ -28,7 +28,7 @@ private Q_SLOTS:
void save();
private:
QDialogButtonBox *mButtonBox = nullptr;
QDialogButtonBox *const mButtonBox;
EwsMtaResource *const mParentResource;
Ui::SetupServerView *mUi = nullptr;
};
......@@ -26,11 +26,10 @@ protected Q_SLOTS:
void retrieveCollections() override;
void retrieveItems(const Akonadi::Collection &collection) override;
bool retrieveItems(const Akonadi::Item::List &items, const QSet<QByteArray> &parts) override;
private Q_SLOTS:
void messageSent(const QString &id, const QString &error);
private:
bool connectEws();
void messageSent(const QString &id, const QString &error);
Q_REQUIRED_RESULT bool connectEws();
OrgKdeAkonadiEwsResourceInterface *mEwsResource = nullptr;
QHash<QString, Akonadi::Item> mItemHash;
......
......@@ -32,10 +32,9 @@ public:
void collectionAdded(const Akonadi::Collection &collection, const Akonadi::Collection &parent) override;
void collectionChanged(const Akonadi::Collection &collection) override;
void collectionRemoved(const Akonadi::Collection &collection) override;
private Q_SLOTS:
void slotItemsRetrieved(KGAPI2::Job *job);
private:
void slotItemsRetrieved(KGAPI2::Job *job);
void setupCollection(Akonadi::Collection &collection, const KGAPI2::CalendarPtr &group);
};
......
......@@ -33,12 +33,11 @@ public:
void collectionAdded(const Akonadi::Collection &collection, const Akonadi::Collection &parent) override;
void collectionChanged(const Akonadi::Collection &collection) override;
void collectionRemoved(const Akonadi::Collection &collection) override;
private Q_SLOTS:
private:
void slotItemsRetrieved(KGAPI2::Job *job);
void slotUpdatePhotosItemsRetrieved(KJob *job);
void retrieveContactsPhotos(const QVariant &arguments);
private:
QString myContactsRemoteId() const;
void setupCollection(Akonadi::Collection &collection, const KGAPI2::ContactsGroupPtr &group);
QMap<QString, Akonadi::Collection> m_collections;
......
......@@ -51,10 +51,9 @@ public:
Q_SIGNALS:
void accountReady(bool ready);
void accountChanged();
private Q_SLOTS:
void slotWalletOpened(bool success);
private:
void slotWalletOpened(bool success);
WId m_winId = 0;
QString m_resourceId;
bool m_isReady = false;
......
......@@ -33,14 +33,14 @@ protected:
void accountChanged();
private:
GoogleResource *const m_resource;
GoogleSettings *const m_settings;
Ui::GoogleSettingsDialog *const m_ui;
KGAPI2::AccountPtr m_account;
private Q_SLOTS:
void slotConfigure();
void slotAuthJobFinished(KGAPI2::Job *job);
void slotSaveSettings();
void slotReloadCalendars();
void slotReloadTaskLists();
GoogleResource *const m_resource;
GoogleSettings *const m_settings;
Ui::GoogleSettingsDialog *const m_ui;
KGAPI2::AccountPtr m_account;
};
......@@ -29,10 +29,9 @@ public:
void collectionAdded(const Akonadi::Collection &collection, const Akonadi::Collection &parent) override;
void collectionChanged(const Akonadi::Collection &collection) override;
void collectionRemoved(const Akonadi::Collection &collection) override;
private Q_SLOTS:
void slotItemsRetrieved(KGAPI2::Job *job);
private:
void slotItemsRetrieved(KGAPI2::Job *job);
void setupCollection(Akonadi::Collection &collection, const KGAPI2::TaskListPtr &taskList);
void doRemoveTasks(const Akonadi::Item::List &items);
};
Supports Markdown
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