nixpkgs-suyu/pkgs/desktops/plasma-5/plasma-desktop/hwclock-path.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
969 B
Diff
Raw Normal View History

Index: plasma-desktop-5.8.5/kcms/dateandtime/helper.cpp
===================================================================
--- plasma-desktop-5.8.5.orig/kcms/dateandtime/helper.cpp
+++ plasma-desktop-5.8.5/kcms/dateandtime/helper.cpp
2016-04-21 18:01:22 +02:00
@@ -48,10 +48,6 @@
#include <sys/types.h>
2016-04-21 18:01:22 +02:00
#endif
2016-04-21 18:01:22 +02:00
-// 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 = QStringLiteral("/usr/sbin:/usr/bin:/sbin:/bin");
-
int ClockHelper::ntp(const QStringList &ntpServers, bool ntpEnabled)
2016-04-21 18:01:22 +02:00
{
int ret = 0;
@@ -227,7 +223,7 @@ int ClockHelper::tzreset()
void ClockHelper::toHwclock()
{
2020-04-06 23:49:47 +02:00
- QString hwclock = QStandardPaths::findExecutable(QStringLiteral("hwclock"), exePath.split(QLatin1Char(':')));
+ QString hwclock = QLatin1String(NIXPKGS_HWCLOCK);
2016-04-21 18:01:22 +02:00
if (!hwclock.isEmpty()) {
KProcess::execute(hwclock, QStringList() << QStringLiteral("--systohc"));
}