diff --git a/src/autotests/displaymessageformatactionmenutest.cpp b/src/autotests/displaymessageformatactionmenutest.cpp index 535834bc1..5b1ba000a 100644 --- a/src/autotests/displaymessageformatactionmenutest.cpp +++ b/src/autotests/displaymessageformatactionmenutest.cpp @@ -47,7 +47,7 @@ void DisplayMessageFormatActionMenuTest::shouldEmitSignalWhenClickOnSubMenu() { DisplayMessageFormatActionMenu menu; KToggleAction *prefereHtml = menu.findChild(QStringLiteral("prefer-html-action")); - QSignalSpy spy(&menu, SIGNAL(changeDisplayMessageFormat(MessageViewer::Viewer::DisplayFormatMessage))); + QSignalSpy spy(&menu, &DisplayMessageFormatActionMenu::changeDisplayMessageFormat); prefereHtml->trigger(); QCOMPARE(spy.count(), 1); QCOMPARE(spy.at(0).at(0).value(), MessageViewer::Viewer::Html); @@ -69,7 +69,7 @@ void DisplayMessageFormatActionMenuTest::shouldSelectItemWhenChangeFormat() void DisplayMessageFormatActionMenuTest::shouldDontEmitSignalWhenChangeFormat() { DisplayMessageFormatActionMenu menu; - QSignalSpy spy(&menu, SIGNAL(changeDisplayMessageFormat(MessageViewer::Viewer::DisplayFormatMessage))); + QSignalSpy spy(&menu, &DisplayMessageFormatActionMenu::changeDisplayMessageFormat); menu.setDisplayMessageFormat(MessageViewer::Viewer::Text); QCOMPARE(spy.count(), 0); } diff --git a/src/autotests/statusbarlabeltoggledstatetest.cpp b/src/autotests/statusbarlabeltoggledstatetest.cpp index 8b4926ea0..b8e210276 100644 --- a/src/autotests/statusbarlabeltoggledstatetest.cpp +++ b/src/autotests/statusbarlabeltoggledstatetest.cpp @@ -56,7 +56,7 @@ void StatusBarLabelToggledStateTest::shouldEmitSignalWhenChangeState() { StatusBarLabelToggledState widget; widget.setStateString(QStringLiteral("toggle"), QStringLiteral("untoggle")); - QSignalSpy spy(&widget, SIGNAL(toggleModeChanged(bool))); + QSignalSpy spy(&widget, &StatusBarLabelToggledState::toggleModeChanged); widget.setToggleMode(true); QCOMPARE(spy.count(), 1); @@ -68,7 +68,7 @@ void StatusBarLabelToggledStateTest::shouldNotEmitSignalWhenWeDontChangeState() { StatusBarLabelToggledState widget; widget.setStateString(QStringLiteral("toggle"), QStringLiteral("untoggle")); - QSignalSpy spy(&widget, SIGNAL(toggleModeChanged(bool))); + QSignalSpy spy(&widget, &StatusBarLabelToggledState::toggleModeChanged); widget.setToggleMode(false); QCOMPARE(spy.count(), 0); @@ -83,7 +83,7 @@ void StatusBarLabelToggledStateTest::shouldEmitSignalWhenClickOnLabel() { StatusBarLabelToggledState widget; widget.setStateString(QStringLiteral("toggle"), QStringLiteral("untoggle")); - QSignalSpy spy(&widget, SIGNAL(toggleModeChanged(bool))); + QSignalSpy spy(&widget, &StatusBarLabelToggledState::toggleModeChanged); widget.show(); QVERIFY(QTest::qWaitForWindowExposed(&widget)); QTest::mouseClick(&widget, Qt::LeftButton); diff --git a/src/editor/potentialphishingemail/autotests/potentialphishingemailjobtest.cpp b/src/editor/potentialphishingemail/autotests/potentialphishingemailjobtest.cpp index cefe75d98..259018400 100644 --- a/src/editor/potentialphishingemail/autotests/potentialphishingemailjobtest.cpp +++ b/src/editor/potentialphishingemail/autotests/potentialphishingemailjobtest.cpp @@ -86,7 +86,7 @@ void PotentialPhishingEmailJobTest::shouldReturnPotentialPhishingEmails() void PotentialPhishingEmailJobTest::shouldEmitSignal() { PotentialPhishingEmailJob *job = new PotentialPhishingEmailJob; - QSignalSpy spy(job, SIGNAL(potentialPhishingEmailsFound(QStringList))); + QSignalSpy spy(job, &PotentialPhishingEmailJob::potentialPhishingEmailsFound); job->setPotentialPhishingEmails((QStringList() << QStringLiteral("\"bla@kde.org\" "))); job->start(); QCOMPARE(spy.count(), 1); diff --git a/src/kmmainwidget.cpp b/src/kmmainwidget.cpp index 1dc043f63..69e80f111 100644 --- a/src/kmmainwidget.cpp +++ b/src/kmmainwidget.cpp @@ -204,7 +204,7 @@ using MessageViewer::AttachmentStrategy; Q_GLOBAL_STATIC(KMMainWidget::PtrList, theMainWidgetList) //----------------------------------------------------------------------------- -KMMainWidget::KMMainWidget(QWidget *parent, KXMLGUIClient *aGUIClient, KActionCollection *actionCollection, KSharedConfig::Ptr config) +KMMainWidget::KMMainWidget(QWidget *parent, KXMLGUIClient *aGUIClient, KActionCollection *actionCollection, const KSharedConfig::Ptr &config) : QWidget(parent) , mManageShowCollectionProperties(new ManageShowCollectionProperties(this, this)) { diff --git a/src/kmmainwidget.h b/src/kmmainwidget.h index b7f8bb3fa..b044c67a3 100644 --- a/src/kmmainwidget.h +++ b/src/kmmainwidget.h @@ -97,7 +97,7 @@ class KMAIL_EXPORT KMMainWidget : public QWidget public: typedef QList PtrList; - KMMainWidget(QWidget *parent, KXMLGUIClient *aGUIClient, KActionCollection *actionCollection, KSharedConfig::Ptr config = KMKernel::self()->config()); + KMMainWidget(QWidget *parent, KXMLGUIClient *aGUIClient, KActionCollection *actionCollection, const KSharedConfig::Ptr &config = KMKernel::self()->config()); ~KMMainWidget() override; void destruct();