Blame SOURCES/kde-workspace-4.10.x-bz#1001727.patch

652846
diff --git a/kcontrol/dateandtime/helper.h b/kcontrol/dateandtime/helper.h
652846
index 1cbf103..7a20496 100644
652846
--- a/kcontrol/dateandtime/helper.h
652846
+++ b/kcontrol/dateandtime/helper.h
652846
@@ -47,6 +47,8 @@ class ClockHelper : public QObject
652846
         int date(const QString& newdate, const QString& olddate);
652846
         int tz(const QString& selectedzone);
652846
         int tzreset();
652846
+
652846
+        void toHwclock();
652846
 };
652846
 
652846
 #endif // CLOCK_HELPER_H
652846
-- 
652846
1.8.3.1
652846
652846
From 80f2c60ba59db71d4fc40170cdc561f9136690cc Mon Sep 17 00:00:00 2001
652846
From: Martin Briza <mbriza@redhat.com>
652846
Date: Mon, 7 Oct 2013 14:53:00 +0200
652846
Subject: [PATCH] kcontrol/dateandtime: Propagate NTP clock to hwclock, too
652846
652846
---
652846
 kcontrol/dateandtime/helper.cpp | 15 +++++++++++----
652846
 kcontrol/dateandtime/helper.h   |  2 ++
652846
 2 files changed, 13 insertions(+), 4 deletions(-)
652846
652846
diff --git a/kcontrol/dateandtime/helper.cpp b/kcontrol/dateandtime/helper.cpp
652846
index 9168db3..d2473a5 100644
652846
--- a/kcontrol/dateandtime/helper.cpp
652846
+++ b/kcontrol/dateandtime/helper.cpp
652846
@@ -82,6 +82,8 @@ int ClockHelper::ntp( const QStringList& ntpServers, bool ntpEnabled,
652846
     proc << ntpUtility << timeServer;
652846
     if ( proc.execute() != 0 ) {
652846
       ret |= NTPError;
652846
+    } else {
652846
+      toHwclock();
652846
     }
652846
   } else if( ntpEnabled ) {
652846
     ret |= NTPError;
652846
@@ -100,10 +102,7 @@ int ClockHelper::date( const QString& newdate, const QString& olddate )
652846
         return DateError;
652846
     }
652846
 
652846
-    QString hwclock = KStandardDirs::findExe("hwclock", exePath);
652846
-    if (!hwclock.isEmpty()) {
652846
-        KProcess::execute(hwclock, QStringList() << "--systohc");
652846
-    }
652846
+    toHwclock();
652846
     return 0;
652846
 }
652846
 
652846
@@ -215,6 +214,14 @@ int ClockHelper::tzreset()
652846
     return 0;
652846
 }
652846
 
652846
+void ClockHelper::toHwclock()
652846
+{
652846
+  QString hwclock = KStandardDirs::findExe("hwclock", exePath);
652846
+  if (!hwclock.isEmpty()) {
652846
+    KProcess::execute(hwclock, QStringList() << "--systohc");
652846
+  }
652846
+}
652846
+
652846
 ActionReply ClockHelper::save(const QVariantMap &args)
652846
 {
652846
   bool _ntp = args.value("ntp").toBool();