Commit 6bd05c73 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use std::chrono_literals

parent abc8c8f7
Pipeline #66885 passed with stage
in 9 minutes and 21 seconds
......@@ -19,6 +19,9 @@
#include <QDateTime>
#include <QDir>
#include <QStandardPaths>
#include <chrono>
using namespace std::chrono_literals;
class Akregator::Backend::StorageMK4Impl::StorageMK4ImplPrivate
{
......@@ -260,7 +263,7 @@ void Akregator::Backend::StorageMK4Impl::markDirty()
if (!d->modified) {
d->modified = true;
// commit changes after 3 seconds
QTimer::singleShot(3000, this, &StorageMK4Impl::slotCommit);
QTimer::singleShot(3s, this, &StorageMK4Impl::slotCommit);
}
}
......
......@@ -20,6 +20,9 @@
#include <vector>
#include <cassert>
#include <chrono>
using namespace std::chrono_literals;
using namespace Akregator;
......@@ -42,7 +45,7 @@ void ArticleDeleteJob::appendArticleId(const ArticleId &id)
void ArticleDeleteJob::start()
{
QTimer::singleShot(20, this, &ArticleDeleteJob::doStart);
QTimer::singleShot(20ms, this, &ArticleDeleteJob::doStart);
}
void ArticleDeleteJob::doStart()
......@@ -93,7 +96,7 @@ void ArticleModifyJob::setKeep(const ArticleId &id, bool keep)
void ArticleModifyJob::start()
{
QTimer::singleShot(20, this, &ArticleModifyJob::doStart);
QTimer::singleShot(20ms, this, &ArticleModifyJob::doStart);
}
void ArticleModifyJob::doStart()
......@@ -169,7 +172,7 @@ ArticleListJob::ArticleListJob(TreeNode *p)
void ArticleListJob::start()
{
QTimer::singleShot(20, this, &ArticleListJob::doList);
QTimer::singleShot(20ms, this, &ArticleListJob::doList);
}
void ArticleListJob::doList()
......
......@@ -16,6 +16,9 @@
#include <QDebug>
#include <QTimer>
#include <chrono>
using namespace std::chrono_literals;
using namespace Akregator;
......@@ -41,7 +44,7 @@ void MoveSubscriptionJob::setDestination(uint folder, uint afterChild)
void MoveSubscriptionJob::start()
{
QTimer::singleShot(20, this, &MoveSubscriptionJob::doMove);
QTimer::singleShot(20ms, this, &MoveSubscriptionJob::doMove);
}
void MoveSubscriptionJob::doMove()
......@@ -99,7 +102,7 @@ void RenameSubscriptionJob::setName(const QString &name)
void RenameSubscriptionJob::start()
{
QTimer::singleShot(20, this, &RenameSubscriptionJob::doRename);
QTimer::singleShot(20ms, this, &RenameSubscriptionJob::doRename);
}
void RenameSubscriptionJob::doRename()
......@@ -127,7 +130,7 @@ void DeleteSubscriptionJob::setSubscriptionId(uint id)
void DeleteSubscriptionJob::start()
{
QTimer::singleShot(20, this, &DeleteSubscriptionJob::doDelete);
QTimer::singleShot(20ms, this, &DeleteSubscriptionJob::doDelete);
}
void DeleteSubscriptionJob::doDelete()
......
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