Commit 2413dce0 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use std::chrono_literals

parent cd996bed
Pipeline #76759 passed with stage
in 15 minutes and 32 seconds
......@@ -18,13 +18,16 @@
#include <AkonadiCore/ServerManager>
#include <QDir>
#include <QStandardPaths>
#include <chrono>
using namespace std::chrono_literals;
using namespace Akonadi::Search::PIM;
Index::Index(QObject *parent)
: QObject(parent)
{
m_indexedItems = new IndexedItems(this);
m_commitTimer.setInterval(1000);
m_commitTimer.setInterval(1s);
m_commitTimer.setSingleShot(true);
connect(&m_commitTimer, &QTimer::timeout, this, &Index::commit);
}
......
......@@ -17,6 +17,9 @@
#include <KConfigGroup>
#include <KLocalizedString>
#include <QTimer>
#include <chrono>
using namespace std::chrono_literals;
JobFactory::~JobFactory()
{
......@@ -41,7 +44,7 @@ Scheduler::Scheduler(Index &index, const KSharedConfigPtr &config, const QShared
m_jobFactory = QSharedPointer<JobFactory>(new JobFactory);
}
m_processTimer.setSingleShot(true);
m_processTimer.setInterval(100);
m_processTimer.setInterval(100ms);
connect(&m_processTimer, &QTimer::timeout, this, &Scheduler::processNext);
KConfigGroup cfg = m_config->group("General");
......
......@@ -19,7 +19,9 @@
#include <Item>
#include <ItemFetchJob>
#include <ItemFetchScope>
#include <chrono>
using namespace std::chrono_literals;
class App : public QApplication
{
Q_OBJECT
......@@ -61,7 +63,7 @@ App::App(int &argc, char **argv, int flags)
void App::main()
{
m_commitTimer.setInterval(1000);
m_commitTimer.setInterval(1s);
connect(&m_commitTimer, &QTimer::timeout, this, &App::slotCommitTimerElapsed);
m_commitTimer.start();
......
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