Hello community,

here is the log from the commit of package ktorrent for openSUSE:Factory 
checked in at 2017-06-01 16:23:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ktorrent (Old)
 and      /work/SRC/openSUSE:Factory/.ktorrent.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ktorrent"

Thu Jun  1 16:23:50 2017 rev:106 rq:497775 version:5.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/ktorrent/ktorrent.changes        2017-02-08 
10:46:57.740809865 +0100
+++ /work/SRC/openSUSE:Factory/.ktorrent.new/ktorrent.changes   2017-06-01 
16:24:25.141474329 +0200
@@ -1,0 +2,8 @@
+Tue May 23 10:55:02 UTC 2017 - [email protected]
+
+- Add fix-crash-when-loading-bandwidth-scheduler-plugin.patch and
+  fix-crashes-in-bwscheduler-plugin.patch from upstream to fix
+  ktorrent crashing when the bandwidth scheduler plugin is
+  activated/used (kde#361863, boo#1040379)
+
+-------------------------------------------------------------------

New:
----
  fix-crash-when-loading-bandwidth-scheduler-plugin.patch
  fix-crashes-in-bwscheduler-plugin.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ktorrent.spec ++++++
--- /var/tmp/diff_new_pack.rgbJTE/_old  2017-06-01 16:24:25.801381278 +0200
+++ /var/tmp/diff_new_pack.rgbJTE/_new  2017-06-01 16:24:25.805380714 +0200
@@ -34,6 +34,10 @@
 Patch2:         initial-preference.diff
 # PATCH-FIX-UPSTREAM fix-build-with-newer-kconfig.diff -- Fix build with newer 
KConfig
 Patch3:         fix-build-with-newer-kconfig.diff
+# PATCH-FIX-UPSTREAM fix-crash-when-loading-bandwidth-scheduler-plugin.patch
+Patch4:         fix-crash-when-loading-bandwidth-scheduler-plugin.patch
+# PATCH-FIX-UPSTREAM fix-crashes-in-bwscheduler-plugin.patch
+Patch5:         fix-crashes-in-bwscheduler-plugin.patch
 %if 0%{?suse_version} > 1325
 BuildRequires:  libboost_headers-devel
 %else
@@ -87,6 +91,8 @@
 %endif
 %patch2
 %patch3 -p1
+%patch4 -p1
+%patch5 -p1
 
 %build
 %cmake_kf5 -d build

++++++ fix-crash-when-loading-bandwidth-scheduler-plugin.patch ++++++
>From f0d807626ff412be8521ee4ec337501df9e328c3 Mon Sep 17 00:00:00 2001
From: "Martin T. H. Sandsmark" <[email protected]>
Date: Mon, 4 Jul 2016 02:25:30 +0200
Subject: Fix crash when loading bandwidth scheduler plugin

---
 ktorrent/main.cpp                 | 4 ++++
 plugins/bwscheduler/weekscene.cpp | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ktorrent/main.cpp b/ktorrent/main.cpp
index a340e9a..03aa646 100644
--- a/ktorrent/main.cpp
+++ b/ktorrent/main.cpp
@@ -36,6 +36,7 @@
 #include <QCommandLineOption>
 #include <kaboutdata.h>
 #include <klocalizedstring.h>
+#include <KLocale>
 #include <kdbusservice.h>
 #include <kstartupinfo.h>
 #include <kwindowsystem.h>
@@ -183,6 +184,9 @@ int main(int argc, char** argv)
     parser.process(app);
     about.processCommandLine(&parser);
 
+    // Ensure that this is set up before plugins call it
+    KLocale::global();
+
     const KDBusService dbusService(KDBusService::Unique);
 
 #if 0 //ndef Q_WS_WIN
diff --git a/plugins/bwscheduler/weekscene.cpp 
b/plugins/bwscheduler/weekscene.cpp
index de8a2f6..523e242 100644
--- a/plugins/bwscheduler/weekscene.cpp
+++ b/plugins/bwscheduler/weekscene.cpp
@@ -58,7 +58,7 @@ namespace kt
 
     qreal LongestDayWidth(const QFontMetricsF& fm)
     {
-        const KCalendarSystem* cal = KGlobal::locale()->calendar();
+        const KCalendarSystem* cal = KLocale::global()->calendar();
         qreal wd = 0;
         for (int i = 1; i <= 7; i++)
         {
@@ -93,7 +93,7 @@ namespace kt
 
     void WeekScene::addCalendar()
     {
-        const KCalendarSystem* cal = KGlobal::locale()->calendar();
+        const KCalendarSystem* cal = KLocale::global()->calendar();
 
         QGraphicsTextItem* tmp = addText("Dinges");
         QFontMetricsF fm(tmp->font());
-- 
cgit v0.11.2

++++++ fix-crashes-in-bwscheduler-plugin.patch ++++++
>From 9779820c422d6fe395c2aac5eaec49ed003577da Mon Sep 17 00:00:00 2001
From: "Martin T. H. Sandsmark" <[email protected]>
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


Reply via email to