File fix-crashes-in-bwscheduler-plugin.patch of Package ktorrent

From 9779820c422d6fe395c2aac5eaec49ed003577da Mon Sep 17 00:00:00 2001
From: "Martin T. H. Sandsmark" <martin.sandsmark@kde.org>
Date: Mon, 4 Jul 2016 02:32:52 +0200
Subject: Fix crashes in scheduler plugin

---
 plugins/bwscheduler/edititemdlg.cpp  | 4 ++--
 plugins/bwscheduler/weekdaymodel.cpp | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/plugins/bwscheduler/edititemdlg.cpp b/plugins/bwscheduler/edititemdlg.cpp
index 0e8baf3..fe9cd82 100644
--- a/plugins/bwscheduler/edititemdlg.cpp
+++ b/plugins/bwscheduler/edititemdlg.cpp
@@ -18,7 +18,7 @@
  *   Free Software Foundation, Inc.,                                       *
  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.          *
  ***************************************************************************/
-#include <kglobal.h>
+#include <KLocale>
 #include <klocalizedstring.h>
 #include <kcalendarsystem.h>
 #include "edititemdlg.h"
@@ -37,7 +37,7 @@ namespace kt
         connect(m_suspended, SIGNAL(toggled(bool)), this, SLOT(suspendedChanged(bool)));
         connect(m_screensaver_limits, SIGNAL(toggled(bool)), this, SLOT(screensaverLimitsToggled(bool)));
 
-        const KCalendarSystem* cal = KGlobal::locale()->calendar();
+        const KCalendarSystem* cal = KLocale::global()->calendar();
         for (int i = 1; i <= 7; i++)
         {
             m_start_day->addItem(cal->weekDayName(i));
diff --git a/plugins/bwscheduler/weekdaymodel.cpp b/plugins/bwscheduler/weekdaymodel.cpp
index 5df59e3..3299006 100644
--- a/plugins/bwscheduler/weekdaymodel.cpp
+++ b/plugins/bwscheduler/weekdaymodel.cpp
@@ -20,7 +20,7 @@
  ***************************************************************************/
 #include "weekdaymodel.h"
 
-#include <kglobal.h>
+#include <KLocale>
 #include <kcalendarsystem.h>
 
 namespace kt
@@ -54,7 +54,7 @@ namespace kt
 
         if (role == Qt::DisplayRole)
         {
-            const KCalendarSystem* cal = KGlobal::locale()->calendar();
+            const KCalendarSystem* cal = KLocale::global()->calendar();
             return cal->weekDayName(index.row() + 1);
         }
         else if (role == Qt::CheckStateRole)
-- 
cgit v0.11.2

openSUSE Build Service is sponsored by