Changeset View
Changeset View
Standalone View
Standalone View
kcms/dateandtime/helper.cpp
Show First 20 Lines • Show All 221 Lines • ▼ Show 20 Line(s) | 218 | #if !defined(USE_SOLARIS) // Do not update the System! | |||
---|---|---|---|---|---|
222 | setenv("TZ", "", 1); | 222 | setenv("TZ", "", 1); | ||
223 | tzset(); | 223 | tzset(); | ||
224 | #endif // !USE SOLARIS | 224 | #endif // !USE SOLARIS | ||
225 | return 0; | 225 | return 0; | ||
226 | } | 226 | } | ||
227 | 227 | | |||
228 | void ClockHelper::toHwclock() | 228 | void ClockHelper::toHwclock() | ||
229 | { | 229 | { | ||
230 | QString hwclock = KStandardDirs::findExe(QStringLiteral("hwclock"), exePath); | 230 | QString hwclock = QStandardPaths::findExecutable(QStringLiteral("hwclock"), exePath.split(QLatin1Char(':'))); | ||
231 | if (!hwclock.isEmpty()) { | 231 | if (!hwclock.isEmpty()) { | ||
232 | KProcess::execute(hwclock, QStringList() << QStringLiteral("--systohc")); | 232 | KProcess::execute(hwclock, QStringList() << QStringLiteral("--systohc")); | ||
233 | } | 233 | } | ||
234 | } | 234 | } | ||
235 | 235 | | |||
236 | ActionReply ClockHelper::save(const QVariantMap &args) | 236 | ActionReply ClockHelper::save(const QVariantMap &args) | ||
237 | { | 237 | { | ||
238 | bool _ntp = args.value(QStringLiteral("ntp")).toBool(); | 238 | bool _ntp = args.value(QStringLiteral("ntp")).toBool(); | ||
Show All 27 Lines |