forked from pool/ktorrent
Accepting request 497775 from KDE:Extra
1 OBS-URL: https://build.opensuse.org/request/show/497775 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ktorrent?expand=0&rev=106
This commit is contained in:
parent
e14a26004e
commit
0ecceb3dc9
57
fix-crash-when-loading-bandwidth-scheduler-plugin.patch
Normal file
57
fix-crash-when-loading-bandwidth-scheduler-plugin.patch
Normal file
@ -0,0 +1,57 @@
|
||||
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());
|
||||
--
|
||||
cgit v0.11.2
|
||||
|
57
fix-crashes-in-bwscheduler-plugin.patch
Normal file
57
fix-crashes-in-bwscheduler-plugin.patch
Normal file
@ -0,0 +1,57 @@
|
||||
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
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
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)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 1 11:54:27 UTC 2017 - adam.majer@suse.de
|
||||
|
||||
|
@ -34,6 +34,10 @@ Patch1: suse-dht-warning.diff
|
||||
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 @@ for BitTorrent.
|
||||
%endif
|
||||
%patch2
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
|
||||
%build
|
||||
%cmake_kf5 -d build
|
||||
|
Loading…
x
Reference in New Issue
Block a user