Commit 2dc0ae3c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use std::chrono_literals

parent d6781e8a
Pipeline #76644 passed with stage
in 42 minutes and 20 seconds
......@@ -9,6 +9,9 @@
#include <QSignalSpy>
#include <QTest>
#include <QTimer>
using namespace std::chrono_literals;
QTEST_MAIN(DKIMCheckSignatureJobTest)
//#define USE_EXTRA_CHECK 1
DKIMCheckSignatureJobTest::DKIMCheckSignatureJobTest(QObject *parent)
......@@ -107,7 +110,7 @@ void DKIMCheckSignatureJobTest::shouldTestMail()
pol.setSaveKey(false);
job->setPolicy(pol);
QSignalSpy dkimSignatureSpy(job, &MessageViewer::DKIMCheckSignatureJob::result);
QTimer::singleShot(10, job, &MessageViewer::DKIMCheckSignatureJob::start);
QTimer::singleShot(10ms, job, &MessageViewer::DKIMCheckSignatureJob::start);
QVERIFY(dkimSignatureSpy.wait());
QCOMPARE(dkimSignatureSpy.count(), 1);
const auto info = dkimSignatureSpy.at(0).at(0).value<MessageViewer::DKIMCheckSignatureJob::CheckSignatureResult>();
......
......@@ -149,7 +149,8 @@
#include "dkim-verify/dkimwidgetinfo.h"
#include "remote-content/remotecontentmenu.h"
#include <chrono>
using namespace std::chrono_literals;
using namespace boost;
using namespace MailTransport;
using namespace MessageViewer;
......@@ -2196,7 +2197,7 @@ void ViewerPrivate::slotPrintPreview()
return;
}
// Need to delay
QTimer::singleShot(1000, this, &ViewerPrivate::slotDelayPrintPreview); // 1 second
QTimer::singleShot(1s, this, &ViewerPrivate::slotDelayPrintPreview); // 1 second
}
void ViewerPrivate::slotDelayPrintPreview()
......
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