Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Disks
Commits
30abbd96
Commit
30abbd96
authored
Dec 16, 2020
by
Harald Sitter
🏳️🌈
Browse files
use std::chrono for durations
somewhat nicer on the eyes
parent
9ba7806f
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
30abbd96
...
...
@@ -12,6 +12,9 @@ set(KF5_MIN_VERSION "5.74")
find_package
(
ECM
${
KF5_MIN_VERSION
}
REQUIRED NO_MODULE
)
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
(
KDECMakeSettings
)
include
(
KDECompilerSettings NO_POLICY_SCOPE
)
...
...
src/helper.cpp
View file @
30abbd96
...
...
@@ -7,6 +7,8 @@
#include
<QProcess>
#include
<QFileInfo>
#include
<chrono>
#include
<sys/types.h>
#include
<sys/stat.h>
#include
<fcntl.h>
...
...
@@ -76,7 +78,8 @@ ActionReply SMARTHelper::smartctl(const QVariantMap &args)
// apparently is 60 seconds and internal smartctl timeouts also largely
// appear to be in that range but there may be more than one :|
// 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
;
reply
.
addData
(
QStringLiteral
(
"exitCode"
),
p
.
exitCode
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment