[SCM] KDE Development Platform Libraries module packaging branch, master, updated. debian/4.8.4-3-5-ge4e44f8

Lisandro Damián Nicanor Pérez lisandro at alioth.debian.org
Fri Sep 21 17:21:48 UTC 2012


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-sc/kde4libs.git;a=commitdiff;h=f7c288d

The following commit has been merged in the master branch:
commit f7c288d0f850c99e4fb19c6dfd7e9470de6d80f3
Author: Lisandro Damián Nicanor Pérez Meyer <perezmeyer at gmail.com>
Date:   Fri Sep 21 14:19:47 2012 -0300

    Remove 03_upstream_powermanager_fix_05f1a19291af5c16745b76c3e0944c5b80ef5870.diff.
    
    Taken from upstream.
---
 debian/changelog                                   |    1 +
 ...x_05f1a19291af5c16745b76c3e0944c5b80ef5870.diff |  164 --------------------
 debian/patches/series                              |    1 -
 3 files changed, 1 insertions(+), 165 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 9311cb4..6fd0f6d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ kde4libs (4:4.8.5-1) UNRELEASED; urgency=low
   * Remove:
     - 01_upstream_nepomuk_fix_76e0376d7582cfe5b898c56bf3779ca2279dace8.diff
     - 02_upstream_nepomuk_fix_bde5aad1e9f7bfb6f8d5c60197797de4a315158d.diff
+    - 03_upstream_powermanager_fix_05f1a19291af5c16745b76c3e0944c5b80ef5870.diff
     which were taken from upstream.
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Fri, 21 Sep 2012 14:02:51 -0300
diff --git a/debian/patches/03_upstream_powermanager_fix_05f1a19291af5c16745b76c3e0944c5b80ef5870.diff b/debian/patches/03_upstream_powermanager_fix_05f1a19291af5c16745b76c3e0944c5b80ef5870.diff
deleted file mode 100644
index 0a28b4f..0000000
--- a/debian/patches/03_upstream_powermanager_fix_05f1a19291af5c16745b76c3e0944c5b80ef5870.diff
+++ /dev/null
@@ -1,164 +0,0 @@
-commit 05f1a19291af5c16745b76c3e0944c5b80ef5870
-Author: Daniel Nicoletti <dantt12 at gmail.com>
-Date:   Thu Jun 21 11:23:46 2012 -0300
-
-    Make sure we have valid values for powermanager, watch for unregistration to reset values
-    BUG: 300786
-
-diff --git a/solid/solid/powermanagement.cpp b/solid/solid/powermanagement.cpp
-index faadea4..b1fab65 100644
---- a/solid/solid/powermanagement.cpp
-+++ b/solid/solid/powermanagement.cpp
-@@ -39,14 +39,10 @@ Solid::PowerManagementPrivate::PowerManagementPrivate()
-                    QDBusConnection::sessionBus()),
-       serviceWatcher("org.kde.Solid.PowerManagement",
-                      QDBusConnection::sessionBus(),
--                     QDBusServiceWatcher::WatchForRegistration)
-+                     QDBusServiceWatcher::WatchForRegistration | QDBusServiceWatcher::WatchForUnregistration),
-+      powerSaveStatus(false)
- {
--    powerSaveStatus = managerIface.GetPowerSaveStatus();
--
--    if (managerIface.CanSuspend())
--        supportedSleepStates+= Solid::PowerManagement::SuspendState;
--    if (managerIface.CanHibernate())
--        supportedSleepStates+= Solid::PowerManagement::HibernateState;
-+    serviceWatcher.addWatchedService(QLatin1String("org.freedesktop.PowerManagement"));
- 
-     connect(&managerIface, SIGNAL(CanSuspendChanged(bool)),
-             this, SLOT(slotCanSuspendChanged(bool)));
-@@ -56,11 +52,16 @@ Solid::PowerManagementPrivate::PowerManagementPrivate()
-             this, SLOT(slotPowerSaveStatusChanged(bool)));
-     connect(&serviceWatcher, SIGNAL(serviceRegistered(QString)),
-             this, SLOT(slotServiceRegistered(QString)));
-+    connect(&serviceWatcher, SIGNAL(serviceUnregistered(QString)),
-+            this, SLOT(slotServiceUnregistered(QString)));
- 
-     // If the service is registered, trigger the connection immediately
-     if (QDBusConnection::sessionBus().interface()->isServiceRegistered("org.kde.Solid.PowerManagement")) {
-         slotServiceRegistered("org.kde.Solid.PowerManagement");
-     }
-+    if (QDBusConnection::sessionBus().interface()->isServiceRegistered(QLatin1String("org.freedesktop.PowerManagement"))) {
-+        slotServiceRegistered(QLatin1String("org.freedesktop.PowerManagement"));
-+    }
- }
- 
- Solid::PowerManagementPrivate::~PowerManagementPrivate()
-@@ -186,6 +187,10 @@ Solid::PowerManagement::Notifier *Solid::PowerManagement::notifier()
- 
- void Solid::PowerManagementPrivate::slotCanSuspendChanged(bool newState)
- {
-+    if (supportedSleepStates.contains(Solid::PowerManagement::SuspendState) == newState) {
-+        return;
-+    }
-+
-     if (newState) {
-         supportedSleepStates+= Solid::PowerManagement::SuspendState;
-     } else {
-@@ -195,6 +200,10 @@ void Solid::PowerManagementPrivate::slotCanSuspendChanged(bool newState)
- 
- void Solid::PowerManagementPrivate::slotCanHibernateChanged(bool newState)
- {
-+    if (supportedSleepStates.contains(Solid::PowerManagement::HibernateState) == newState) {
-+        return;
-+    }
-+
-     if (newState) {
-         supportedSleepStates+= Solid::PowerManagement::HibernateState;
-     } else {
-@@ -204,30 +213,65 @@ void Solid::PowerManagementPrivate::slotCanHibernateChanged(bool newState)
- 
- void Solid::PowerManagementPrivate::slotPowerSaveStatusChanged(bool newState)
- {
-+    if (powerSaveStatus == newState) {
-+        return;
-+    }
-+
-     powerSaveStatus = newState;
-     emit appShouldConserveResourcesChanged(powerSaveStatus);
- }
- 
- void Solid::PowerManagementPrivate::slotServiceRegistered(const QString &serviceName)
- {
--    Q_UNUSED(serviceName);
--
--    // Is the resume signal available?
--    QDBusMessage call = QDBusMessage::createMethodCall("org.kde.Solid.PowerManagement",
--                                                       "/org/kde/Solid/PowerManagement",
--                                                       "org.kde.Solid.PowerManagement",
--                                                       "backendCapabilities");
--    QDBusPendingReply< uint > reply = QDBusConnection::sessionBus().asyncCall(call);
--    reply.waitForFinished();
--
--    if (reply.isValid() && reply.value() > 0) {
--        // Connect the signal
--        QDBusConnection::sessionBus().connect("org.kde.Solid.PowerManagement",
--                                              "/org/kde/Solid/PowerManagement",
--                                              "org.kde.Solid.PowerManagement",
--                                              "resumingFromSuspend",
--                                              this,
--                                              SIGNAL(resumingFromSuspend()));
-+    if (serviceName == QLatin1String("org.freedesktop.PowerManagement")) {
-+        // Load all the properties
-+        QDBusPendingReply<bool> suspendReply = managerIface.CanSuspend();
-+        suspendReply.waitForFinished();
-+        slotCanSuspendChanged(suspendReply.isValid() ? suspendReply.value() : false);
-+
-+        QDBusPendingReply<bool> hibernateReply = managerIface.CanHibernate();
-+        hibernateReply.waitForFinished();
-+        slotCanHibernateChanged(hibernateReply.isValid() ? hibernateReply.value() : false);
-+
-+        QDBusPendingReply<bool> saveStatusReply = managerIface.GetPowerSaveStatus();
-+        saveStatusReply.waitForFinished();
-+        slotPowerSaveStatusChanged(saveStatusReply.isValid() ? saveStatusReply.value() : false);
-+    } else {
-+        // Is the resume signal available?
-+        QDBusMessage call = QDBusMessage::createMethodCall("org.kde.Solid.PowerManagement",
-+                                                           "/org/kde/Solid/PowerManagement",
-+                                                           "org.kde.Solid.PowerManagement",
-+                                                           "backendCapabilities");
-+        QDBusPendingReply< uint > reply = QDBusConnection::sessionBus().asyncCall(call);
-+        reply.waitForFinished();
-+
-+        if (reply.isValid() && reply.value() > 0) {
-+                // Connect the signal
-+                QDBusConnection::sessionBus().connect("org.kde.Solid.PowerManagement",
-+                                                      "/org/kde/Solid/PowerManagement",
-+                                                      "org.kde.Solid.PowerManagement",
-+                                                      "resumingFromSuspend",
-+                                                      this,
-+                                                      SIGNAL(resumingFromSuspend()));
-+        }
-+    }
-+}
-+
-+void Solid::PowerManagementPrivate::slotServiceUnregistered(const QString &serviceName)
-+{
-+    if (serviceName == QLatin1String("org.freedesktop.PowerManagement")) {
-+        // Reset the values
-+        slotCanSuspendChanged(false);
-+        slotCanHibernateChanged(false);
-+        slotPowerSaveStatusChanged(false);
-+    } else {
-+        // Disconnect the signal
-+        QDBusConnection::sessionBus().disconnect(QLatin1String("org.kde.Solid.PowerManagement"),
-+                                                 QLatin1String("/org/kde/Solid/PowerManagement"),
-+                                                 QLatin1String("org.kde.Solid.PowerManagement"),
-+                                                 QLatin1String("resumingFromSuspend"),
-+                                                 this,
-+                                                 SIGNAL(resumingFromSuspend()));
-     }
- }
- 
-diff --git a/solid/solid/powermanagement_p.h b/solid/solid/powermanagement_p.h
-index f39815d..02595db 100644
---- a/solid/solid/powermanagement_p.h
-+++ b/solid/solid/powermanagement_p.h
-@@ -50,6 +50,7 @@ namespace Solid
-         void slotCanHibernateChanged(bool newState);
-         void slotPowerSaveStatusChanged(bool newState);
-         void slotServiceRegistered(const QString &serviceName);
-+        void slotServiceUnregistered(const QString &serviceName);
- 
-     public:
-         OrgFreedesktopPowerManagementInterface managerIface;
diff --git a/debian/patches/series b/debian/patches/series
index d318a49..18d67be 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,3 @@
-03_upstream_powermanager_fix_05f1a19291af5c16745b76c3e0944c5b80ef5870.diff
 kconf_update_migrate_from_kde3_icon_theme.diff
 add_debian_build_type.diff
 disable_usr_lib_install_rpath.diff

-- 
KDE Development Platform Libraries module packaging



More information about the pkg-kde-commits mailing list