summary refs log tree commit diff
path: root/pkgs/desktops/plasma-5.2/plasma-desktop/plasma-desktop-hwclock.patch
blob: 53bd43d38e2c458c19401ff9dd73d05b3fa9af05 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
diff --git a/kcms/dateandtime/helper.cpp b/kcms/dateandtime/helper.cpp
index cec5ab8..fc4a6b9 100644
--- a/kcms/dateandtime/helper.cpp
+++ b/kcms/dateandtime/helper.cpp
@@ -48,10 +48,6 @@
 #include <sys/stat.h>
 #endif
 
-// We cannot rely on the $PATH environment variable, because D-Bus activation
-// clears it. So we have to use a reasonable default.
-static const QString exePath = QLatin1String("/usr/sbin:/usr/bin:/sbin:/bin");
-
 int ClockHelper::ntp( const QStringList& ntpServers, bool ntpEnabled )
 {
     int ret = 0;
@@ -227,7 +223,7 @@ int ClockHelper::tzreset()
 
 void ClockHelper::toHwclock()
 {
-    QString hwclock = KStandardDirs::findExe("hwclock", exePath);
+    QString hwclock = "@hwclock@";
     if (!hwclock.isEmpty()) {
         KProcess::execute(hwclock, QStringList() << "--systohc");
     }