Accepting request 55839 from KDE:Distro:Factory

Accepted submit request 55839 from user wstephenson

OBS-URL: https://build.opensuse.org/request/show/55839
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ktorrent?expand=0&rev=66
This commit is contained in:
Berthold Gunreben 2010-12-14 09:58:10 +00:00 committed by Git OBS Bridge
parent f96ee03c32
commit ae35bf2d7e
5 changed files with 231 additions and 13 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:462593cfad3e94cf831d6a82da3440df35d7a451ddc9b4dfa130b908460bcaa7
size 1104713

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f189892ba27c7cd632c240a20477df38d0c9b91bdbf2a51d810046dafc0cd360
size 1117029

View File

@ -1,3 +1,27 @@
-------------------------------------------------------------------
Thu Dec 9 12:59:58 UTC 2010 - tittiatcoke@gmail.com
- Included patch to build against the new powermanagement
(KDE 4.6)
-------------------------------------------------------------------
Tue Nov 30 20:23:20 UTC 2010 - davejplater@gmail.com
- Update to 4.0.4.60git20101130 to fix crash #(kde#258078)
- Upstream changes :
*Make homepage display properly with webkit
*Rename HomePage to WebView and remove HTMLPart
*Make search form in homepage work again
*Make sure that webkit requests to open new windows results in
new tabs being opened
*Saving links and images to disk now works
*Handle unsupported content by saving it to disk
*Make sure that the home page ends up in the browsing history of
a search.
*Update ChangeLog
*Merge branch 'webkit'
*SVN_SILENT made messages (.desktop file)
-------------------------------------------------------------------
Tue Nov 23 08:27:33 UTC 2010 - tittiatcoke@gmail.com

View File

@ -1,5 +1,5 @@
#
# spec file for package ktorrent (Version 4.0.4.60git20101122)
# spec file for package ktorrent (Version 4.0.4.60git20101130)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -24,38 +24,35 @@ Url: http://ktorrent.pwsp.net/
License: GPLv2+
Group: Productivity/Networking/File-Sharing
Summary: KDE BitTorrent Client
Version: 4.0.4.60git20101122
Version: 4.0.4.60git20101130
Release: 2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define rversion %version
Source: %{name}-git.tar.bz2
Source: %{name}-git20101130.tar.bz2
Source2: icons.tar.bz2
Patch1: remove-links.diff
Patch4: suse-dht-warning.diff
Patch5: initial-preference.diff
Patch6: new_kde_powermanagement.diff
Recommends: %{name}-lang
%kde4_runtime_requires
Requires: oxygen-icon-theme
%description
Torrent is a BitTorrent program for KDE. Its main features are: *
Download of torrent files
Torrent is a BitTorrent program for KDE. Its main features are:
* Download of torrent files
* Upload speed capping, seeing that most people cannot upload
infinite amounts of data
* Internet searching using the BitTorrent Web site's search engine
* UDP trackers
Authors:
--------
Jois Guisson <jrois.guisson@gmail.com>
%package devel
License: GPLv2+
Group: Productivity/Networking/File-Sharing
Group: Development/Libraries/C and C++
Summary: KDE BitTorrent Client Build Environment
Requires: ktorrent = %{version}
@ -76,6 +73,7 @@ Authors:
%patch4
%endif
%patch5
%patch6 -p1
tar xfj %{SOURCE2}
%build

View File

@ -0,0 +1,196 @@
--- ktorrent/plugins/shutdown/CMakeLists.txt 2010-11-22 20:02:36.398000084 +0100
+++ ktorrent/plugins/shutdown/CMakeLists.txt 2010-12-09 12:24:55.081000011 +0100
@@ -18,7 +18,7 @@
ktshutdownplugin
ktcore
${LIBKTORRENT_LIBRARIES}
- solidcontrol
+ ${KDE4_SOLID_LIBS}
kworkspace
${KDE4_KPARTS_LIBS}
)
--- ktorrent/plugins/shutdown/shutdowndlg.cpp 2010-11-22 20:02:36.398000084 +0100
+++ ktorrent/plugins/shutdown/shutdowndlg.cpp 2010-12-09 13:40:06.532000009 +0100
@@ -17,7 +17,12 @@
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
+#include <kdeversion.h>
+#if KDE_IS_VERSION(4,5,82)
+#include <solid/powermanagement.h>
+#else
#include <solid/control/powermanager.h>
+#endif
#include "shutdowndlg.h"
#include "shutdowntorrentmodel.h"
@@ -31,16 +36,27 @@
m_action->addItem(KIcon("system-shutdown"),i18n("Shutdown"));
m_action->addItem(KIcon("system-lock-screen"),i18n("Lock"));
- Solid::Control::PowerManager::SuspendMethods spdMethods = Solid::Control::PowerManager::supportedSuspendMethods();
- if (spdMethods & Solid::Control::PowerManager::Standby)
+#if KDE_IS_VERSION(4,5,82)
+ QSet<Solid::PowerManagement::SleepState> spdMethods = Solid::PowerManagement::supportedSleepStates();
+ if (spdMethods.contains(Solid::PowerManagement::StandbyState))
m_action->addItem(KIcon("system-suspend"),i18n("Standby"));
- if (spdMethods & Solid::Control::PowerManager::ToRam)
+ if (spdMethods.contains(Solid::PowerManagement::SuspendState))
m_action->addItem(KIcon("system-suspend"),i18n("Sleep (suspend to RAM)"));
- if (spdMethods & Solid::Control::PowerManager::ToDisk)
+ if (spdMethods.contains(Solid::PowerManagement::HibernateState))
m_action->addItem(KIcon("system-suspend-hibernate"),i18n("Hibernate (suspend to disk)"));
-
+#else
+ Solid::Control::PowerManager::SuspendMethods spdMethods = Solid::Control::PowerManager::supportedSuspendMethods();
+ if (spdMethods & Solid::Control::PowerManager::Standby)
+ m_action->addItem(KIcon("system-suspend"),i18n("Standby"));
+
+ if (spdMethods & Solid::Control::PowerManager::ToRam)
+ m_action->addItem(KIcon("system-suspend"),i18n("Sleep (suspend to RAM)"));
+
+ if (spdMethods & Solid::Control::PowerManager::ToDisk)
+ m_action->addItem(KIcon("system-suspend-hibernate"),i18n("Hibernate (suspend to disk)"));
+#endif
m_time_to_execute->addItem(i18n("When all torrents finish downloading"));
m_time_to_execute->addItem(i18n("When all torrents finish seeding"));
m_time_to_execute->addItem(i18n("When the events below happen"));
@@ -104,16 +120,27 @@
int stand_by = -1;
int suspend_to_ram = -1;
int suspend_to_disk = -1;
- Solid::Control::PowerManager::SuspendMethods spdMethods = Solid::Control::PowerManager::supportedSuspendMethods();
- if (spdMethods & Solid::Control::PowerManager::Standby)
+#if KDE_IS_VERSION(4,5,82)
+ QSet<Solid::PowerManagement::SleepState> spdMethods = Solid::PowerManagement::supportedSleepStates();
+ if (spdMethods.contains(Solid::PowerManagement::StandbyState))
stand_by = next++;
- if (spdMethods & Solid::Control::PowerManager::ToRam)
+ if (spdMethods.contains(Solid::PowerManagement::SuspendState))
suspend_to_ram = next++;
- if (spdMethods & Solid::Control::PowerManager::ToDisk)
+ if (spdMethods.contains(Solid::PowerManagement::HibernateState))
suspend_to_disk = next++;
-
+#else
+ Solid::Control::PowerManager::SuspendMethods spdMethods = Solid::Control::PowerManager::supportedSuspendMethods();
+ if (spdMethods & Solid::Control::PowerManager::Standby)
+ stand_by = next++;
+
+ if (spdMethods & Solid::Control::PowerManager::ToRam)
+ suspend_to_ram = next++;
+
+ if (spdMethods & Solid::Control::PowerManager::ToDisk)
+ suspend_to_disk = next++;
+#endif
if (idx == 0)
return SHUTDOWN;
else if (idx == 1)
@@ -134,15 +161,27 @@
int stand_by = -1;
int suspend_to_ram = -1;
int suspend_to_disk = -1;
- Solid::Control::PowerManager::SuspendMethods spdMethods = Solid::Control::PowerManager::supportedSuspendMethods();
- if (spdMethods & Solid::Control::PowerManager::Standby)
+#if KDE_IS_VERSION(4,5,82)
+ QSet<Solid::PowerManagement::SleepState> spdMethods = Solid::PowerManagement::supportedSleepStates();
+ if (spdMethods.contains(Solid::PowerManagement::StandbyState))
stand_by = next++;
- if (spdMethods & Solid::Control::PowerManager::ToRam)
+ if (spdMethods.contains(Solid::PowerManagement::SuspendState))
suspend_to_ram = next++;
- if (spdMethods & Solid::Control::PowerManager::ToDisk)
+ if (spdMethods.contains(Solid::PowerManagement::HibernateState))
suspend_to_disk = next++;
+#else
+ Solid::Control::PowerManager::SuspendMethods spdMethods = Solid::Control::PowerManager::supportedSuspendMethods();
+ if (spdMethods & Solid::Control::PowerManager::Standby)
+ stand_by = next++;
+
+ if (spdMethods & Solid::Control::PowerManager::ToRam)
+ suspend_to_ram = next++;
+
+ if (spdMethods & Solid::Control::PowerManager::ToDisk)
+ suspend_to_disk = next++;
+#endif
switch (act)
{
--- ktorrent/plugins/shutdown/shutdownplugin.cpp 2010-11-22 20:02:36.398000084 +0100
+++ ktorrent/plugins/shutdown/shutdownplugin.cpp 2010-12-09 13:43:57.147000010 +0100
@@ -17,13 +17,18 @@
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
+#include <kdeversion.h>
#include <kjob.h>
#include <kgenericfactory.h>
#include <kworkspace.h>
#include <ktoggleaction.h>
#include <kactioncollection.h>
#include <kmessagebox.h>
+#if KDE_IS_VERSION(4,5,82)
+#include <solid/powermanagement.h>
+#else
#include <solid/control/powermanager.h>
+#endif
#include <util/log.h>
#include <interfaces/functions.h>
#include "shutdownplugin.h"
@@ -100,28 +105,41 @@
void ShutdownPlugin::suspendToDisk()
{
Out(SYS_GEN|LOG_NOTICE) << "Suspending to disk ..." << endl;
+#if KDE_IS_VERSION(4,5,82)
+ Solid::PowerManagement::requestSleep(Solid::PowerManagement::HibernateState,0,0);
+#else
Solid::Control::PowerManager::SuspendMethod spdMethod = Solid::Control::PowerManager::ToDisk;
KJob *job = Solid::Control::PowerManager::suspend(spdMethod);
if (job != 0)
- job->start();
+ job->start();
+#endif
}
void ShutdownPlugin::suspendToRam()
{
Out(SYS_GEN|LOG_NOTICE) << "Suspending to RAM ..." << endl;
- Solid::Control::PowerManager::SuspendMethod spdMethod = Solid::Control::PowerManager::ToRam;
- KJob *job = Solid::Control::PowerManager::suspend(spdMethod);
- if (job != 0)
- job->start();
+#if KDE_IS_VERSION(4,5,82)
+ Solid::PowerManagement::requestSleep(Solid::PowerManagement::SuspendState,0,0);
+#else
+ Solid::Control::PowerManager::SuspendMethod spdMethod = Solid::Control::PowerManager::ToRam;
+ KJob *job = Solid::Control::PowerManager::suspend(spdMethod);
+ if (job != 0)
+ job->start();
+#endif
}
void ShutdownPlugin::standby()
{
Out(SYS_GEN|LOG_NOTICE) << "Suspending to standby ..." << endl;
- Solid::Control::PowerManager::SuspendMethod spdMethod = Solid::Control::PowerManager::Standby;
- KJob *job = Solid::Control::PowerManager::suspend(spdMethod);
- if (job != 0)
- job->start();
+#if KDE_IS_VERSION(4,5,82)
+ Solid::PowerManagement::requestSleep(Solid::PowerManagement::StandbyState,0,0);
+#else
+ Solid::Control::PowerManager::SuspendMethod spdMethod = Solid::Control::PowerManager::Standby;
+ KJob *job = Solid::Control::PowerManager::suspend(spdMethod);
+ if (job != 0)
+ job->start();
+#endif
+
}
void ShutdownPlugin::shutdownToggled(bool on)