Commit e1ee42d6 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

USe std::chrono_literals

parent f3639838
Pipeline #66801 passed with stage
in 41 minutes and 4 seconds
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
#include <QSignalSpy> #include <QSignalSpy>
#include <QTest> #include <QTest>
#include <QTimer> #include <QTimer>
#include <chrono>
using namespace std::chrono_literals;
QTEST_MAIN(DKIMCheckAuthenticationStatusJobTest) QTEST_MAIN(DKIMCheckAuthenticationStatusJobTest)
...@@ -61,7 +64,7 @@ void DKIMCheckAuthenticationStatusJobTest::shouldTestMail() ...@@ -61,7 +64,7 @@ void DKIMCheckAuthenticationStatusJobTest::shouldTestMail()
job->setHeaderParser(mHeaderParser); job->setHeaderParser(mHeaderParser);
job->setUseRelaxedParsing(relaxedParsing); job->setUseRelaxedParsing(relaxedParsing);
QSignalSpy dkimSignatureSpy(job, &MessageViewer::DKIMCheckAuthenticationStatusJob::result); QSignalSpy dkimSignatureSpy(job, &MessageViewer::DKIMCheckAuthenticationStatusJob::result);
QTimer::singleShot(10, job, &MessageViewer::DKIMCheckAuthenticationStatusJob::start); QTimer::singleShot(10ms, job, &MessageViewer::DKIMCheckAuthenticationStatusJob::start);
QVERIFY(dkimSignatureSpy.wait()); QVERIFY(dkimSignatureSpy.wait());
delete msg; delete msg;
} }
...@@ -53,6 +53,9 @@ ...@@ -53,6 +53,9 @@
#include <algorithm> #include <algorithm>
#include <Libkleo/MessageBox> #include <Libkleo/MessageBox>
#include <chrono>
using namespace std::chrono_literals;
using std::find; using std::find;
using std::for_each; using std::for_each;
...@@ -871,7 +874,7 @@ bool KRunURLHandler::handleClick(const QUrl &url, ViewerPrivate *w) const ...@@ -871,7 +874,7 @@ bool KRunURLHandler::handleClick(const QUrl &url, ViewerPrivate *w) const
|| (scheme == QLatin1String("ftps")) || (scheme == QLatin1String("sftp")) || (scheme == QLatin1String("help")) || (scheme == QLatin1String("vnc")) || (scheme == QLatin1String("ftps")) || (scheme == QLatin1String("sftp")) || (scheme == QLatin1String("help")) || (scheme == QLatin1String("vnc"))
|| (scheme == QLatin1String("smb")) || (scheme == QLatin1String("fish")) || (scheme == QLatin1String("news")) || (scheme == QLatin1String("tel"))) { || (scheme == QLatin1String("smb")) || (scheme == QLatin1String("fish")) || (scheme == QLatin1String("news")) || (scheme == QLatin1String("tel"))) {
PimCommon::BroadcastStatus::instance()->setTransientStatusMsg(i18n("Opening URL...")); PimCommon::BroadcastStatus::instance()->setTransientStatusMsg(i18n("Opening URL..."));
QTimer::singleShot(2000, PimCommon::BroadcastStatus::instance(), &PimCommon::BroadcastStatus::reset); QTimer::singleShot(2s, PimCommon::BroadcastStatus::instance(), &PimCommon::BroadcastStatus::reset);
QMimeDatabase mimeDb; QMimeDatabase mimeDb;
auto mime = mimeDb.mimeTypeForUrl(url); auto mime = mimeDb.mimeTypeForUrl(url);
......
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