[Kde-hardware-devel] [patch-v2] compile kdehw with D-BUS 0.61
Glenn ROLLAND
glenux at gmail.com
Fri Apr 21 16:48:03 CEST 2006
I'm sorry for the previous mail.
This time the patch was correctly joined :-/
--
(o_ -+- Glenn ROLLAND -+- | ICQ : 35030444
//\ Another One | Jabber: glenux at jabber.dk
V_/_ Debian GNU/Linux user. | WWW : http://glenux2.free.fr
-------------- next part --------------
Index: backends/hal/haldevice.cpp
===================================================================
--- backends/hal/haldevice.cpp (r?vision 532190)
+++ backends/hal/haldevice.cpp (copie de travail)
@@ -34,8 +34,8 @@
class HalDevicePrivate
{
public:
- HalDevicePrivate() : connection( QDBus::systemBus() ) { }
- QDBusConnection &connection;
+ HalDevicePrivate();
+ QDBusConnection connection;
QString udi;
QMap<Capability::Type,Capability*> ifaces;
@@ -43,6 +43,14 @@
const QList<QVariant> ¶meters = QList<QVariant>() ) const;
};
+HalDevicePrivate::HalDevicePrivate()
+{
+ connection = QDBusConnection::addConnection( QDBusConnection::SystemBus );
+ if (!connection.isConnected()) {
+ kDebug() << "Unable to connect to D-BUS!" << endl;
+ }
+}
+
HalDevice::HalDevice(const QString &udi)
: Device(), d( new HalDevicePrivate() )
{
Index: backends/hal/halmanager.cpp
===================================================================
--- backends/hal/halmanager.cpp (r?vision 532190)
+++ backends/hal/halmanager.cpp (copie de travail)
@@ -33,11 +33,19 @@
class HalManagerPrivate
{
public:
- HalManagerPrivate() : connection( QDBus::systemBus() ) { }
-
- QDBusConnection &connection;
+ HalManagerPrivate();
+
+ QDBusConnection connection ;
};
+HalManagerPrivate::HalManagerPrivate()
+{
+ connection = QDBusConnection::addConnection( QDBusConnection::SystemBus );
+ if (!connection.isConnected()) {
+ kDebug() << "Unable to connect to D-BUS!" << endl;
+ }
+}
+
HalManager::HalManager( QObject *parent, const char * /*name*/,
const QStringList & /*args*/)
: DeviceManager(parent), d( new HalManagerPrivate() )
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (r?vision 532190)
+++ CMakeLists.txt (copie de travail)
@@ -1,5 +1,7 @@
project(kdehw)
+set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
+
cmake_minimum_required(VERSION 2.3.4 FATAL_ERROR)
# search packages used by KDE
More information about the Kde-hardware-devel
mailing list