summaryrefslogtreecommitdiff
path: root/qt
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@redhat.com>2005-12-01 00:07:20 +0000
committerJohn (J5) Palmieri <johnp@redhat.com>2005-12-01 00:07:20 +0000
commitb99a1f364535194536eeff70751a9102b7e6ba33 (patch)
tree85024ddeb6c15fe7ea3909b5807e3760e7e08432 /qt
parente5118f163d2f6eb70375e6394156b23eb1835d2d (diff)
* test/qt/Makefile.am: build from srcdirdbus-0.60
* qt/qtconnection.cpp (requestName): Changed PROHIBIT_REPLACE to ALLOW_REPLACE Note - this code is wrong and needs to be fixed by the Qt binding developers. The flags should be treated as bitfields and not enums. * qt/qtconnection.h: Change ProhibitReplace to AllowReplace * dbus/dbus-list.c (link_after): remove #ifdef DBUS_BUILD_TESTS
Diffstat (limited to 'qt')
-rw-r--r--qt/qdbusconnection.cpp7
-rw-r--r--qt/qdbusconnection.h2
2 files changed, 5 insertions, 4 deletions
diff --git a/qt/qdbusconnection.cpp b/qt/qdbusconnection.cpp
index 49acc247..f5e1bf37 100644
--- a/qt/qdbusconnection.cpp
+++ b/qt/qdbusconnection.cpp
@@ -307,10 +307,11 @@ QString QDBusConnection::baseService() const
bool QDBusConnection::requestName(const QString &name, NameRequestMode mode)
{
- static const int DBusModes[] = { 0, DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT,
+ //FIXME: DBUS_NAME_FLAGS_* are bit fields not enumeration
+ static const int DBusModes[] = { 0, DBUS_NAME_FLAG_ALLOW_REPLACEMENT,
DBUS_NAME_FLAG_REPLACE_EXISTING };
- Q_ASSERT(mode == 0 || mode == DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT ||
- mode == DBUS_NAME_FLAG_REPLACE_EXISTING);
+ Q_ASSERT(mode == 0 || mode == AllowReplace ||
+ mode == ReplaceExisting );
DBusError error;
dbus_error_init (&error);
diff --git a/qt/qdbusconnection.h b/qt/qdbusconnection.h
index eccc7d19..bbab0ec6 100644
--- a/qt/qdbusconnection.h
+++ b/qt/qdbusconnection.h
@@ -46,7 +46,7 @@ public:
bool isConnected() const;
QDBusError lastError() const;
- enum NameRequestMode { NoReplace = 0, ProhibitReplace = 1, ReplaceExisting = 2 };
+ enum NameRequestMode { NoReplace = 0, AllowReplace = 1, ReplaceExisting = 2 };
bool requestName(const QString &name, NameRequestMode mode = NoReplace);
QString baseService() const;