Commit 30abbd96 authored by Harald Sitter's avatar Harald Sitter 🌈
Browse files

use std::chrono for durations

somewhat nicer on the eyes
parent 9ba7806f
...@@ -12,6 +12,9 @@ set(KF5_MIN_VERSION "5.74") ...@@ -12,6 +12,9 @@ set(KF5_MIN_VERSION "5.74")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${ECM_MODULE_PATH}) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${ECM_MODULE_PATH})
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(KDEInstallDirs) include(KDEInstallDirs)
include(KDECMakeSettings) include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE) include(KDECompilerSettings NO_POLICY_SCOPE)
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
#include <QProcess> #include <QProcess>
#include <QFileInfo> #include <QFileInfo>
#include <chrono>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
...@@ -76,7 +78,8 @@ ActionReply SMARTHelper::smartctl(const QVariantMap &args) ...@@ -76,7 +78,8 @@ ActionReply SMARTHelper::smartctl(const QVariantMap &args)
// apparently is 60 seconds and internal smartctl timeouts also largely // apparently is 60 seconds and internal smartctl timeouts also largely
// appear to be in that range but there may be more than one :| // appear to be in that range but there may be more than one :|
// https://bugs.kde.org/show_bug.cgi?id=428844 // https://bugs.kde.org/show_bug.cgi?id=428844
p.waitForFinished(125000); using namespace std::chrono_literals;
p.waitForFinished(std::chrono::milliseconds(125s).count());
ActionReply reply; ActionReply reply;
reply.addData(QStringLiteral("exitCode"), p.exitCode()); reply.addData(QStringLiteral("exitCode"), p.exitCode());
......
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