diff --git a/agents/archivemailagent/archivemailwidget.cpp b/agents/archivemailagent/archivemailwidget.cpp index 9523d0ead..07e8510ae 100644 --- a/agents/archivemailagent/archivemailwidget.cpp +++ b/agents/archivemailagent/archivemailwidget.cpp @@ -99,15 +99,15 @@ void ArchiveMailWidget::customContextMenuRequested(const QPoint &) { const QList listItems = mWidget->treeWidget->selectedItems(); QMenu menu; - menu.addAction(i18n("Add..."), this, SLOT(slotAddItem())); + menu.addAction(i18n("Add..."), this, &ArchiveMailWidget::slotAddItem); if (!listItems.isEmpty()) { if (listItems.count() == 1) { - menu.addAction(i18n("Open Containing Folder..."), this, SLOT(slotOpenFolder())); + menu.addAction(i18n("Open Containing Folder..."), this, &ArchiveMailWidget::slotOpenFolder); menu.addSeparator(); - menu.addAction(i18n("Archive now"), this, SLOT(slotArchiveNow())); + menu.addAction(i18n("Archive now"), this, &ArchiveMailWidget::slotArchiveNow); } menu.addSeparator(); - menu.addAction(QIcon::fromTheme(QStringLiteral("edit-delete")), i18n("Delete"), this, SLOT(slotRemoveItem())); + menu.addAction(QIcon::fromTheme(QStringLiteral("edit-delete")), i18n("Delete"), this, &ArchiveMailWidget::slotRemoveItem); } menu.exec(QCursor::pos()); } diff --git a/agents/archivemailagent/archivemailwidget.h b/agents/archivemailagent/archivemailwidget.h index f1310f9a2..cd03af7c8 100644 --- a/agents/archivemailagent/archivemailwidget.h +++ b/agents/archivemailagent/archivemailwidget.h @@ -65,7 +65,7 @@ private: bool verifyExistingArchive(ArchiveMailInfo *info) const; void updateDiffDate(ArchiveMailItem *item, ArchiveMailInfo *info); -private Q_SLOTS: +private: void slotRemoveItem(); void slotModifyItem(); void slotAddItem(); @@ -74,8 +74,6 @@ private Q_SLOTS: void customContextMenuRequested(const QPoint &); void slotArchiveNow(); void slotItemChanged(QTreeWidgetItem *item, int); - -private: bool mChanged; Ui::ArchiveMailWidget *mWidget; }; diff --git a/agents/archivemailagent/job/archivejob.h b/agents/archivemailagent/job/archivejob.h index 25d8c5f8d..a9079f8d9 100644 --- a/agents/archivemailagent/job/archivejob.h +++ b/agents/archivemailagent/job/archivejob.h @@ -36,10 +36,9 @@ public: void execute() Q_DECL_OVERRIDE; void kill() Q_DECL_OVERRIDE; -private Q_SLOTS: +private: void slotBackupDone(const QString &info); void slotError(const QString &error); -private: QPixmap mPixmap; ArchiveMailInfo *mInfo; ArchiveMailManager *mManager; diff --git a/agents/followupreminderagent/followupreminderinfowidget.h b/agents/followupreminderagent/followupreminderinfowidget.h index a92fc7967..4b0058cd2 100644 --- a/agents/followupreminderagent/followupreminderinfowidget.h +++ b/agents/followupreminderagent/followupreminderinfowidget.h @@ -61,10 +61,8 @@ public: QList listRemoveId() const; -private Q_SLOTS: - void customContextMenuRequested(const QPoint &pos); - private: + void customContextMenuRequested(const QPoint &pos); void createOrUpdateItem(FollowUpReminder::FollowUpReminderInfo *info, FollowUpReminderInfoItem *item = Q_NULLPTR); void removeItem(const QList &mailItem); void openShowMessage(Akonadi::Item::Id id); diff --git a/agents/followupreminderagent/followupremindermanager.h b/agents/followupreminderagent/followupremindermanager.h index 24abf269c..85dbfc0c1 100644 --- a/agents/followupreminderagent/followupremindermanager.h +++ b/agents/followupreminderagent/followupremindermanager.h @@ -40,13 +40,12 @@ public: void checkFollowUp(const Akonadi::Item &item, const Akonadi::Collection &col); QString printDebugInfo(); -private Q_SLOTS: +private: void slotCheckFollowUpFinished(const QString &messageId, Akonadi::Item::Id id); void slotFinishTaskDone(); void slotFinishTaskFailed(); void slotReparseConfiguration(); -private: void answerReceived(const QString &from); QString infoToStr(FollowUpReminder::FollowUpReminderInfo *info); diff --git a/agents/followupreminderagent/followupremindernoanswerdialog.h b/agents/followupreminderagent/followupremindernoanswerdialog.h index c630e1c2d..6afcdb0ed 100644 --- a/agents/followupreminderagent/followupremindernoanswerdialog.h +++ b/agents/followupreminderagent/followupremindernoanswerdialog.h @@ -38,10 +38,8 @@ public: Q_SIGNALS: void needToReparseConfiguration(); -private Q_SLOTS: - void slotSave(); - private: + void slotSave(); void readConfig(); void writeConfig(); FollowUpReminderInfoWidget *mWidget; diff --git a/agents/followupreminderagent/jobs/followupreminderfinishtaskjob.h b/agents/followupreminderagent/jobs/followupreminderfinishtaskjob.h index c24a1ff10..102d24a1e 100644 --- a/agents/followupreminderagent/jobs/followupreminderfinishtaskjob.h +++ b/agents/followupreminderagent/jobs/followupreminderfinishtaskjob.h @@ -36,11 +36,9 @@ Q_SIGNALS: void finishTaskDone(); void finishTaskFailed(); -private Q_SLOTS: +private: void slotItemFetchJobDone(KJob *job); void slotItemModifiedResult(KJob *job); - -private: void closeTodo(); Akonadi::Item::Id mTodoId; }; diff --git a/agents/followupreminderagent/jobs/followupreminderjob.h b/agents/followupreminderagent/jobs/followupreminderjob.h index 5147c37b0..77e52e20f 100644 --- a/agents/followupreminderagent/jobs/followupreminderjob.h +++ b/agents/followupreminderagent/jobs/followupreminderjob.h @@ -38,10 +38,8 @@ public: Q_SIGNALS: void finished(const QString &messageId, Akonadi::Item::Id id); -private Q_SLOTS: - void slotItemFetchJobDone(KJob *job); - private: + void slotItemFetchJobDone(KJob *job); Akonadi::Item mItem; }; diff --git a/agents/sendlateragent/sendlateragent.cpp b/agents/sendlateragent/sendlateragent.cpp index a3dfb06d1..d166dac7b 100644 --- a/agents/sendlateragent/sendlateragent.cpp +++ b/agents/sendlateragent/sendlateragent.cpp @@ -67,7 +67,7 @@ SendLaterAgent::SendLaterAgent(const QString &id) if (SendLaterAgentSettings::enabled()) { #ifdef DEBUG_SENDLATERAGENT - QTimer::singleShot(1000, this, SLOT(slotStartAgent())); + QTimer::singleShot(1000, this, &SendLaterAgent::slotStartAgent); #else QTimer::singleShot(1000 * 60 * 4, this, &SendLaterAgent::slotStartAgent); #endif @@ -75,7 +75,7 @@ SendLaterAgent::SendLaterAgent(const QString &id) // For extra safety, check list every hour, in case we didn't properly get // notified about the network going up or down. QTimer *reloadListTimer = new QTimer(this); - connect(reloadListTimer, SIGNAL(timeout()), this, SLOT(reload())); + connect(reloadListTimer, &QTimer::timeout, this, &SendLaterAgent::reload); reloadListTimer->start(1000 * 60 * 60); //1 hour } diff --git a/agents/sendlateragent/sendlateragent.h b/agents/sendlateragent/sendlateragent.h index 67669cc5d..72ff8c613 100644 --- a/agents/sendlateragent/sendlateragent.h +++ b/agents/sendlateragent/sendlateragent.h @@ -46,16 +46,14 @@ public Q_SLOTS: void reload(); void configure(WId windowId) Q_DECL_OVERRIDE; -private Q_SLOTS: - void slotSendNow(Akonadi::Item::Id id); - - void slotStartAgent(); protected: void itemsRemoved(const Akonadi::Item::List &item) Q_DECL_OVERRIDE; void itemsMoved(const Akonadi::Item::List &items, const Akonadi::Collection &sourceCollection, const Akonadi::Collection &destinationCollection) Q_DECL_OVERRIDE; void doSetOnline(bool online) Q_DECL_OVERRIDE; private: + void slotSendNow(Akonadi::Item::Id id); + void slotStartAgent(); bool mAgentInitialized; SendLaterManager *mManager; }; diff --git a/agents/sendlateragent/sendlaterconfiguredialog.h b/agents/sendlateragent/sendlaterconfiguredialog.h index dc1f491cc..7af237f3a 100644 --- a/agents/sendlateragent/sendlaterconfiguredialog.h +++ b/agents/sendlateragent/sendlaterconfiguredialog.h @@ -35,13 +35,11 @@ public: public Q_SLOTS: void slotNeedToReloadConfig(); -private Q_SLOTS: - void slotSave(); - Q_SIGNALS: void sendNow(Akonadi::Item::Id); private: + void slotSave(); void readConfig(); void writeConfig(); SendLaterWidget *mWidget; diff --git a/agents/sendlateragent/sendlaterconfigurewidget.cpp b/agents/sendlateragent/sendlaterconfigurewidget.cpp index 94da53981..8c35db649 100644 --- a/agents/sendlateragent/sendlaterconfigurewidget.cpp +++ b/agents/sendlateragent/sendlaterconfigurewidget.cpp @@ -107,10 +107,10 @@ void SendLaterWidget::customContextMenuRequested(const QPoint &) if (!listItems.isEmpty()) { QMenu menu; if (listItems.count() == 1) { - menu.addAction(i18n("Send now"), this, SLOT(slotSendNow())); + menu.addAction(i18n("Send now"), this, &SendLaterWidget::slotSendNow); } menu.addSeparator(); - menu.addAction(QIcon::fromTheme(QStringLiteral("edit-delete")), i18n("Delete"), this, SLOT(slotRemoveItem())); + menu.addAction(QIcon::fromTheme(QStringLiteral("edit-delete")), i18n("Delete"), this, &SendLaterWidget::slotRemoveItem); menu.exec(QCursor::pos()); } } diff --git a/agents/sendlateragent/sendlaterconfigurewidget.h b/agents/sendlateragent/sendlaterconfigurewidget.h index e06743ee5..0f774d301 100644 --- a/agents/sendlateragent/sendlaterconfigurewidget.h +++ b/agents/sendlateragent/sendlaterconfigurewidget.h @@ -65,17 +65,15 @@ public: void needToReload(); QList messagesToRemove() const; -private Q_SLOTS: +Q_SIGNALS: + void sendNow(Akonadi::Item::Id); + +private: void slotRemoveItem(); void slotModifyItem(); void updateButtons(); void customContextMenuRequested(const QPoint &); void slotSendNow(); - -Q_SIGNALS: - void sendNow(Akonadi::Item::Id); - -private: void createOrUpdateItem(SendLater::SendLaterInfo *info, SendLaterItem *item = Q_NULLPTR); void load(); QList mListMessagesToRemove;