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 - wbauer@tmo.at + +- 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" martin.sandsmark@kde.org 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());