Fix some clazy warning

wilder
Laurent Montel 7 years ago
parent acc979361a
commit 8fa119be05
  1. 4
      src/autotests/displaymessageformatactionmenutest.cpp
  2. 6
      src/autotests/statusbarlabeltoggledstatetest.cpp
  3. 2
      src/editor/potentialphishingemail/autotests/potentialphishingemailjobtest.cpp
  4. 2
      src/kmmainwidget.cpp
  5. 2
      src/kmmainwidget.h

@ -47,7 +47,7 @@ void DisplayMessageFormatActionMenuTest::shouldEmitSignalWhenClickOnSubMenu()
{
DisplayMessageFormatActionMenu menu;
KToggleAction *prefereHtml = menu.findChild<KToggleAction *>(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::DisplayFormatMessage>(), 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);
}

@ -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);

@ -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\" <foo@kde.org>")));
job->start();
QCOMPARE(spy.count(), 1);

@ -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))
{

@ -97,7 +97,7 @@ class KMAIL_EXPORT KMMainWidget : public QWidget
public:
typedef QList<KMMainWidget *> 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();

Loading…
Cancel
Save