diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2009-12-07 15:34:47 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2009-12-07 15:34:47 +0000 |
commit | c427e8a93a6faf1107601c91fcca2df3b216ec26 (patch) | |
tree | d9d2e09297aa3e961d9f6bb46ed279843af711ee /kde-base | |
parent | Add patch to fix plasma crash on kde4. Bug #296003 (diff) | |
download | historical-c427e8a93a6faf1107601c91fcca2df3b216ec26.tar.gz historical-c427e8a93a6faf1107601c91fcca2df3b216ec26.tar.bz2 historical-c427e8a93a6faf1107601c91fcca2df3b216ec26.zip |
Fix crash in Solid::Control::PowerManager::brightness wrt #295600, thanks to Magnus Kessler.
Package-Manager: portage-2.2_rc56/cvs/Linux x86_64
Diffstat (limited to 'kde-base')
-rw-r--r-- | kde-base/solid/ChangeLog | 9 | ||||
-rw-r--r-- | kde-base/solid/Manifest | 4 | ||||
-rw-r--r-- | kde-base/solid/files/solid-4.3.4-hal.patch | 115 | ||||
-rw-r--r-- | kde-base/solid/solid-4.3.4-r1.ebuild | 40 |
4 files changed, 166 insertions, 2 deletions
diff --git a/kde-base/solid/ChangeLog b/kde-base/solid/ChangeLog index ebed7811a4d3..aeb617c8afdf 100644 --- a/kde-base/solid/ChangeLog +++ b/kde-base/solid/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for kde-base/solid # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/kde-base/solid/ChangeLog,v 1.47 2009/12/01 11:32:45 wired Exp $ +# $Header: /var/cvsroot/gentoo-x86/kde-base/solid/ChangeLog,v 1.48 2009/12/07 15:34:47 ssuominen Exp $ + +*solid-4.3.4-r1 (07 Dec 2009) + + 07 Dec 2009; Samuli Suominen <ssuominen@gentoo.org> + +solid-4.3.4-r1.ebuild, +files/solid-4.3.4-hal.patch: + Fix crash in Solid::Control::PowerManager::brightness wrt #295600, thanks + to Magnus Kessler. *solid-4.3.4 (01 Dec 2009) diff --git a/kde-base/solid/Manifest b/kde-base/solid/Manifest index f1f160d7f324..990d88af55dc 100644 --- a/kde-base/solid/Manifest +++ b/kde-base/solid/Manifest @@ -1,8 +1,10 @@ +AUX solid-4.3.4-hal.patch 6148 RMD160 aab42b138aa0ac3b8a316552139a3cfbdb1850bf SHA1 922856946c5ce109fc8bde5b0e76f035bfff6190 SHA256 bb0f656e42d349a9f6aabb7ac716f688c0307839e3480ac9bc67ee031ccceb8f DIST kdebase-workspace-4.3.1.tar.bz2 62286316 RMD160 1db4e5428a497efff6910b5e1442eaffd2d0bad0 SHA1 c21a6e8028aa993878cccccb26b2611b3337eac9 SHA256 4c4b184615aab07134abbf05ec306f9ef37eb4f02f1e4eb9d4a16e44f859d6ed DIST kdebase-workspace-4.3.3.tar.bz2 62496238 RMD160 48ab90a519c7811e9fe4aa4e77f06134d2dc4afa SHA1 2839e913cecef8ead0685bd50e9515ccd8bc0a9d SHA256 b66b4e3eefe88edfd9ddd0501b2b6eece39b85fd78f2320967b937f2529c6d3b DIST kdebase-workspace-4.3.4.tar.bz2 62517195 RMD160 665b49b9dd03408ef9ec50e7bd5eb50b993d6138 SHA1 5b43447139d22247d5bc2deee8e3a944447f0bbf SHA256 ea12e04eb402f1257b483b541df5d77b885407bd02992bcb496ccd3335b203c3 EBUILD solid-4.3.1.ebuild 1159 RMD160 56daf4b619fd97ca01dbcedb77298080553a27e6 SHA1 1dc145618fdb638e90427cd2f0d2a4747a2e9156 SHA256 d030c76a781720ba3107bca432b3f072fe1a0b95df08ef3c754bc74431744e9c EBUILD solid-4.3.3.ebuild 1165 RMD160 1f0f27a0b40d62132ac6102261872ad330811284 SHA1 8e368528ff32c97e07632569582edcac587eb9c5 SHA256 2d11f0a360cc9b3abab70dee7619e555333bedfb5a016e442cf60e70eeaa9a2a +EBUILD solid-4.3.4-r1.ebuild 1059 RMD160 f35037fe9f42e514cca12d63838092cec6a3d953 SHA1 44211d77d3a8d2ca7e82c05216c89e5458526cf1 SHA256 43677489803d7636c751823200e714857210321d15e1db69d80ccae573e43d15 EBUILD solid-4.3.4.ebuild 1010 RMD160 8467b421a151cb03b4240c01e8c13410522eaf14 SHA1 c81262fa1ff11dc368926c3e695717fd3f90b04d SHA256 77fb7dc125fac882049af190180dd7f30badfdfdf89ceda47754b536aae726e9 -MISC ChangeLog 5863 RMD160 0868eab1c71b522f68ba5465195231cc9a7bc7c6 SHA1 a086334380a914ad50e1bedbd41ecbff2f8797fb SHA256 4b0815717b90b672e6aea34236382e4641fc521c757436839fca684a85d986e1 +MISC ChangeLog 6106 RMD160 863b8354c4c97da31f307fc77890211e2a6d8386 SHA1 0b609cc754d37751e7746076a9de48839334d06f SHA256 4c0cc0acc753999e34ac36efb760e7f57627e878afe015b50933449da1bd480c MISC metadata.xml 243 RMD160 04fc0be8d2565b1a1b4e4d42041a9d9ec98cf76d SHA1 7f5c2d00f44a48f3d4b96cb9c6af36a31ea401d2 SHA256 04f8169f3dc4ab49f95e390f9202644647d58a5af1af3128a72155d42765c8c3 diff --git a/kde-base/solid/files/solid-4.3.4-hal.patch b/kde-base/solid/files/solid-4.3.4-hal.patch new file mode 100644 index 000000000000..1bc66eabf1e9 --- /dev/null +++ b/kde-base/solid/files/solid-4.3.4-hal.patch @@ -0,0 +1,115 @@ +http://bugs.gentoo.org/show_bug.cgi?id=295600 + +http://websvn.kde.org/trunk/KDE/kdebase/workspace/solid/hal/halpower.cpp?r1=929945&r2=1035622&pathrev=1057980 +http://websvn.kde.org/trunk/KDE/kdebase/workspace/solid/hal/halpower.cpp?r1=1035622&r2=1057980&pathrev=1057980 + +diff -ur kdebase-workspace-4.3.4.orig/solid/hal/halpower.cpp kdebase-workspace-4.3.4/solid/hal/halpower.cpp +--- kdebase-workspace-4.3.4.orig/solid/hal/halpower.cpp 2009-02-26 11:12:20.000000000 +0200 ++++ kdebase-workspace-4.3.4/solid/hal/halpower.cpp 2009-12-07 17:28:24.000000000 +0200 +@@ -361,13 +361,21 @@ + Solid::Control::PowerManager::BrightnessControlsList HalPower::brightnessControlsAvailable() + { + Solid::Control::PowerManager::BrightnessControlsList deviceList; +- foreach(const QString &name, m_halManager.call("FindDeviceByCapability", "laptop_panel").arguments().at(0).toStringList()) ++ QDBusReply<QStringList> reply = m_halManager.call("FindDeviceByCapability", "laptop_panel"); ++ if (reply.isValid()) + { +- deviceList.insert(name, Solid::Control::PowerManager::Screen); ++ foreach(const QString &name, reply.value()) ++ { ++ deviceList.insert(name, Solid::Control::PowerManager::Screen); ++ } + } +- foreach(const QString &name, m_halManager.call("FindDeviceByCapability", "keyboard_backlight").arguments().at(0).toStringList()) ++ reply = m_halManager.call("FindDeviceByCapability", "keyboard_backlight"); ++ if (reply.isValid()) + { +- deviceList.insert(name, Solid::Control::PowerManager::Keyboard); ++ foreach(const QString &name, reply.value()) ++ { ++ deviceList.insert(name, Solid::Control::PowerManager::Keyboard); ++ } + } + return deviceList; + } +@@ -375,42 +383,53 @@ + float HalPower::brightness(const QString &device) + { + float brightness; +- if(m_halManager.call("FindDeviceByCapability", "laptop_panel").arguments().at(0).toStringList().contains(device)) ++ QDBusReply<QStringList> reply = m_halManager.call("FindDeviceByCapability", "laptop_panel"); ++ if(reply.isValid() && reply.value().contains(device)) + { + QDBusInterface deviceInterface("org.freedesktop.Hal", device, "org.freedesktop.Hal.Device.LaptopPanel", QDBusConnection::systemBus()); +- brightness = deviceInterface.call("GetBrightness").arguments().at(0).toDouble(); +- if(deviceInterface.lastError().isValid()) ++ QDBusReply<double> brightnessReply = deviceInterface.call("GetBrightness"); ++ if(!brightnessReply.isValid()) + { +- return 0; ++ return 0.0; + } +- else ++ brightness = brightnessReply; ++ ++ QDBusInterface propertyInterface("org.freedesktop.Hal", device, "org.freedesktop.Hal.Device", QDBusConnection::systemBus()); ++ QDBusReply<int> levelsReply = propertyInterface.call("GetProperty", "laptop_panel.num_levels"); ++ if (levelsReply.isValid()) + { +- QDBusInterface propertyInterface("org.freedesktop.Hal", device, "org.freedesktop.Hal.Device", QDBusConnection::systemBus()); +- int levels = propertyInterface.call("GetProperty", "laptop_panel.num_levels").arguments().at(0).toInt(); ++ int levels = levelsReply; + return (float)(100*(brightness/(levels-1))); + } + } +- if(m_halManager.call("FindDeviceByCapability", "keyboard_backlight").arguments().at(0).toStringList().contains(device)) ++ ++ reply = m_halManager.call("FindDeviceByCapability", "keyboard_backlight"); ++ if(reply.isValid() && reply.value().contains(device)) + { + QDBusInterface deviceInterface("org.freedesktop.Hal", device, "org.freedesktop.Hal.Device.KeyboardBacklight", QDBusConnection::systemBus()); //TODO - I do not have a backlight enabled keyboard, so I'm guessing a bit here. Could someone please check this. +- brightness = deviceInterface.call("GetBrightness").arguments().at(0).toDouble(); +- if(deviceInterface.lastError().isValid()) ++ ++ QDBusReply<double> brightnessReply = deviceInterface.call("GetBrightness"); ++ if(!brightnessReply.isValid()) + { +- return 0; ++ return 0.0; + } +- else ++ brightness = brightnessReply; ++ ++ QDBusInterface propertyInterface("org.freedesktop.Hal", device, "org.freedesktop.Hal.Device", QDBusConnection::systemBus()); ++ QDBusReply<int> levelsReply = propertyInterface.call("GetProperty", "keyboard_backlight.num_levels"); ++ if (levelsReply.isValid()) + { +- QDBusInterface propertyInterface("org.freedesktop.Hal", device, "org.freedesktop.Hal.Device", QDBusConnection::systemBus()); +- int levels = propertyInterface.call("GetProperty", "keyboard_backlight.num_levels").arguments().at(0).toInt(); ++ int levels = levelsReply; + return (float)(100*(brightness/(levels-1))); + } + } +- return 0; ++ return 0.0; + } + + bool HalPower::setBrightness(float brightness, const QString &device) + { +- if(m_halManager.call("FindDeviceByCapability", "laptop_panel").arguments().at(0).toStringList().contains(device)) ++ QDBusReply<QStringList> reply = m_halManager.call("FindDeviceByCapability", "laptop_panel"); ++ if(reply.isValid() && reply.value().contains(device)) + { + QDBusInterface propertyInterface("org.freedesktop.Hal", device, "org.freedesktop.Hal.Device", QDBusConnection::systemBus()); + int levels = propertyInterface.call("GetProperty", "laptop_panel.num_levels").arguments().at(0).toInt(); +@@ -422,7 +441,9 @@ + return true; + } + } +- if(m_halManager.call("FindDeviceByCapability", "keyboard_backlight").arguments().at(0).toStringList().contains(device)) ++ ++ reply = m_halManager.call("FindDeviceByCapability", "keyboard_backlight"); ++ if(reply.isValid() && reply.value().contains(device)) + { + QDBusInterface propertyInterface("org.freedesktop.Hal", device, "org.freedesktop.Hal.Device", QDBusConnection::systemBus()); + int levels = propertyInterface.call("GetProperty", "keyboard_backlight.num_levels").arguments().at(0).toInt(); diff --git a/kde-base/solid/solid-4.3.4-r1.ebuild b/kde-base/solid/solid-4.3.4-r1.ebuild new file mode 100644 index 000000000000..df7021c15280 --- /dev/null +++ b/kde-base/solid/solid-4.3.4-r1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/kde-base/solid/solid-4.3.4-r1.ebuild,v 1.1 2009/12/07 15:34:47 ssuominen Exp $ + +EAPI="2" + +KMNAME="kdebase-workspace" +CPPUNIT_REQUIRED="test" +inherit kde4-meta + +DESCRIPTION="Solid: the KDE hardware library" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="bluetooth debug networkmanager wicd" + +# solid/CMakeLists.txt has an add_subdirectory statement that depends on +# networkmanager-0.7, referring to a non-existant directory, restricted to =0.6* +# for now. +DEPEND=" + >=sys-apps/hal-0.5.9 + bluetooth? ( net-wireless/bluez ) + networkmanager? ( >=net-misc/networkmanager-0.7 ) + wicd? ( net-misc/wicd ) +" +RDEPEND="${DEPEND}" + +KMEXTRA=" + libs/solid/ +" + +PATCHES=( "${FILESDIR}/${P}-hal.patch" ) + +src_configure() { + mycmakeargs="${mycmakeargs} + $(cmake-utils_use_with bluetooth BlueZ) + $(cmake-utils_use_with networkmanager NetworkManager) + $(cmake-utils_use_build wicd) + " + + kde4-meta_src_configure +} |