Changeset 846 for trunk/src/dbus
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 62 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/dbus/dbus.pro
r561 r846 4 4 xml 5 5 CONFIG += link_pkgconfig 6 DEFINES += Q DBUS_MAKEDLL\6 DEFINES += QT_BUILD_DBUS_LIB \ 7 7 DBUS_API_SUBJECT_TO_CHANGE 8 8 QMAKE_CXXFLAGS += $$QT_CFLAGS_DBUS … … 21 21 } 22 22 win32 { 23 LIBS_PRIVATE += -lws2_32 \ 23 wince*:LIBS_PRIVATE += -lws2 24 else:LIBS_PRIVATE += -lws2_32 \ 24 25 -ladvapi32 \ 25 26 -lnetapi32 \ -
trunk/src/dbus/qdbus_symbols.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 44 44 #include <QtCore/qmutex.h> 45 45 #include <private/qmutexpool_p.h> 46 47 #ifndef QT_NO_DBUS 46 48 47 49 QT_BEGIN_NAMESPACE … … 110 112 Q_DESTRUCTOR_FUNCTION(qdbus_unloadLibDBus) 111 113 114 #endif // QT_LINKED_LIBDBUS 115 112 116 QT_END_NAMESPACE 113 117 114 #endif 118 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbus_symbols_p.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 57 57 #include <QtCore/qglobal.h> 58 58 #include <dbus/dbus.h> 59 60 #ifndef QT_NO_DBUS 59 61 60 62 QT_BEGIN_NAMESPACE … … 196 198 /* dbus-message.h */ 197 199 DEFINEFUNC(DBusMessage* , dbus_message_copy, (const DBusMessage *message), 200 (message), return) 201 DEFINEFUNC(dbus_bool_t , dbus_message_get_auto_start, (DBusMessage *message), 198 202 (message), return) 199 203 DEFINEFUNC(const char* , dbus_message_get_error_name, (DBusMessage *message), … … 269 273 DEFINEFUNC(DBusMessage* , dbus_message_ref, (DBusMessage *message), 270 274 (message), return) 275 DEFINEFUNC(void , dbus_message_set_auto_start, (DBusMessage *message, 276 dbus_bool_t auto_start), 277 (message, auto_start), return) 271 278 DEFINEFUNC(dbus_bool_t , dbus_message_set_destination, (DBusMessage *message, 272 279 const char *destination), … … 363 370 QT_END_NAMESPACE 364 371 365 #endif 372 #endif // QT_NO_DBUS 373 #endif // QDBUS_SYMBOLS_P_H -
trunk/src/dbus/qdbusabstractadaptor.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 53 53 #include "qdbusabstractadaptor_p.h" 54 54 #include "qdbusmetatype_p.h" 55 56 #ifndef QT_NO_DBUS 55 57 56 58 QT_BEGIN_NAMESPACE … … 379 381 380 382 QT_END_NAMESPACE 383 384 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbusabstractadaptor.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 46 46 #include <QtDBus/qdbusmacros.h> 47 47 48 #ifndef QT_NO_DBUS 49 48 50 QT_BEGIN_HEADER 49 51 … … 53 55 54 56 class QDBusAbstractAdaptorPrivate; 55 class Q DBUS_EXPORT QDBusAbstractAdaptor: public QObject57 class Q_DBUS_EXPORT QDBusAbstractAdaptor: public QObject 56 58 { 57 59 Q_OBJECT … … 74 76 QT_END_HEADER 75 77 78 #endif // QT_NO_DBUS 79 76 80 #endif -
trunk/src/dbus/qdbusabstractadaptor_p.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 68 68 #define QCLASSINFO_DBUS_INTROSPECTION "D-Bus Introspection" 69 69 70 #ifndef QT_NO_DBUS 71 70 72 QT_BEGIN_NAMESPACE 71 73 … … 133 135 QT_END_NAMESPACE 134 136 137 #endif // QT_NO_DBUS 135 138 #endif // QDBUSABSTRACTADAPTORPRIVATE_H -
trunk/src/dbus/qdbusabstractinterface.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 43 43 #include "qdbusabstractinterface_p.h" 44 44 45 #include <qthread.h> 46 45 47 #include "qdbusargument.h" 46 48 #include "qdbuspendingcall.h" … … 51 53 52 54 #include <qdebug.h> 55 56 #ifndef QT_NO_DBUS 53 57 54 58 QT_BEGIN_NAMESPACE … … 439 443 440 444 QDBusMessage reply = d->connection.call(msg, mode); 441 d->lastError = reply; // will clear if reply isn't an error 445 if (thread() == QThread::currentThread()) 446 d->lastError = reply; // will clear if reply isn't an error 442 447 443 448 // ensure that there is at least one element … … 556 561 return; 557 562 558 // we end up recursing here, so optimi se away563 // we end up recursing here, so optimize away 559 564 if (qstrcmp(signal + 1, "destroyed(QObject*)") == 0) 560 565 return; … … 766 771 QT_END_NAMESPACE 767 772 773 #endif // QT_NO_DBUS 774 768 775 #include "moc_qdbusabstractinterface.cpp" -
trunk/src/dbus/qdbusabstractinterface.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 52 52 #include <QtDBus/qdbusconnection.h> 53 53 54 #ifndef QT_NO_DBUS 55 54 56 QT_BEGIN_HEADER 55 57 … … 63 65 class QDBusAbstractInterfacePrivate; 64 66 65 class Q DBUS_EXPORT QDBusAbstractInterfaceBase: public QObject67 class Q_DBUS_EXPORT QDBusAbstractInterfaceBase: public QObject 66 68 { 67 69 public: … … 73 75 }; 74 76 75 class Q DBUS_EXPORT QDBusAbstractInterface:77 class Q_DBUS_EXPORT QDBusAbstractInterface: 76 78 #ifdef Q_QDOC 77 79 public QObject … … 160 162 QT_END_HEADER 161 163 164 #endif // QT_NO_DBUS 162 165 #endif -
trunk/src/dbus/qdbusabstractinterface_p.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 63 63 #define ANNOTATION_NO_WAIT "org.freedesktop.DBus.Method.NoReply" 64 64 65 #ifndef QT_NO_DBUS 66 65 67 QT_BEGIN_NAMESPACE 66 68 … … 99 101 QT_END_NAMESPACE 100 102 103 #endif // QT_NO_DBUS 101 104 #endif -
trunk/src/dbus/qdbusargument.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 57 57 #include "qdbusutil_p.h" 58 58 59 #ifndef QT_NO_DBUS 60 59 61 QT_BEGIN_NAMESPACE 60 62 … … 824 826 825 827 If the type you want to marshall is a QList, QVector or any of the 826 Qt's \l { Generic Containers} that take one template parameter,828 Qt's \l {Container Classes} that take one template parameter, 827 829 you need not declare an \c{operator<<} function for it, since 828 830 QtDBus provides generic templates to do the job of marshalling … … 951 953 952 954 If the type you want to demarshall is a QList, QVector or any of the 953 Qt's \l { Generic Containers} that take one template parameter, you955 Qt's \l {Container Classes} that take one template parameter, you 954 956 need not declare an \c{operator>>} function for it, since QtDBus 955 957 provides generic templates to do the job of demarshalling the data. … … 1329 1331 1330 1332 QT_END_NAMESPACE 1333 1334 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbusargument.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 54 54 #include <QtDBus/qdbusmacros.h> 55 55 56 #ifndef QT_NO_DBUS 57 56 58 QT_BEGIN_HEADER 57 59 … … 63 65 class QDBusDemarshaller; 64 66 class QDBusMarshaller; 65 class Q DBUS_EXPORT QDBusArgument67 class Q_DBUS_EXPORT QDBusArgument 66 68 { 67 69 public: … … 171 173 } 172 174 173 // speciali se for QVariant, allowing it to be used in place of QDBusVariant175 // specialize for QVariant, allowing it to be used in place of QDBusVariant 174 176 template<> inline QVariant qdbus_cast<QVariant>(const QDBusArgument &arg, QVariant *) 175 177 { … … 183 185 } 184 186 185 Q DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QVariant &v);187 Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QVariant &v); 186 188 187 189 // QVariant types 188 190 #ifndef QDBUS_NO_SPECIALTYPES 189 191 190 Q DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QDate &date);191 Q DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QDate &date);192 193 Q DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QTime &time);194 Q DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QTime &time);195 196 Q DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QDateTime &dt);197 Q DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QDateTime &dt);198 199 Q DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QRect &rect);200 Q DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QRect &rect);201 202 Q DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QRectF &rect);203 Q DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QRectF &rect);204 205 Q DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QSize &size);206 Q DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QSize &size);207 208 Q DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QSizeF &size);209 Q DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QSizeF &size);210 211 Q DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QPoint &pt);212 Q DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QPoint &pt);213 214 Q DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QPointF &pt);215 Q DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QPointF &pt);216 217 Q DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QLine &line);218 Q DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QLine &line);219 220 Q DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QLineF &line);221 Q DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QLineF &line);192 Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QDate &date); 193 Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QDate &date); 194 195 Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QTime &time); 196 Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QTime &time); 197 198 Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QDateTime &dt); 199 Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QDateTime &dt); 200 201 Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QRect &rect); 202 Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QRect &rect); 203 204 Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QRectF &rect); 205 Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QRectF &rect); 206 207 Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QSize &size); 208 Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QSize &size); 209 210 Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QSizeF &size); 211 Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QSizeF &size); 212 213 Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QPoint &pt); 214 Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QPoint &pt); 215 216 Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QPointF &pt); 217 Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QPointF &pt); 218 219 Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QLine &line); 220 Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QLine &line); 221 222 Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QLineF &line); 223 Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QLineF &line); 222 224 #endif 223 225 … … 381 383 QT_END_HEADER 382 384 385 #endif // QT_NO_DBUS 383 386 #endif -
trunk/src/dbus/qdbusargument_p.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 56 56 #include <qdbusargument.h> 57 57 #include "qdbus_symbols_p.h" 58 59 #ifndef QT_NO_DBUS 58 60 59 61 QT_BEGIN_NAMESPACE … … 207 209 QT_END_NAMESPACE 208 210 211 #endif // QT_NO_DBUS 209 212 #endif -
trunk/src/dbus/qdbusconnection.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 55 55 #include "qdbusthreaddebug_p.h" 56 56 57 #ifndef QT_NO_DBUS 58 57 59 QT_BEGIN_NAMESPACE 58 60 … … 124 126 } 125 127 126 Q DBUS_EXPORT void qDBusBindToApplication();128 Q_DBUS_EXPORT void qDBusBindToApplication(); 127 129 void qDBusBindToApplication() 128 130 { … … 139 141 \relates QDBusConnection 140 142 141 Returns a QDBusConnection object opened with the session bus. The object reference returned142 by this function is valid until the QCoreApplication's destructor is run, when the143 connection will be closed and the object,deleted.143 Returns a QDBusConnection object opened with the session bus. The object 144 reference returned by this function is valid until the application terminates, 145 at which point the connection will be closed and the object deleted. 144 146 */ 145 147 /*! … … 172 174 function. 173 175 176 Once disconnected, calling connectToBus() will not reestablish a 177 connection, you must create a new QDBusConnection instance. 178 174 179 As a convenience for the two most common connection types, the 175 180 sessionBus() and systemBus() functions return open connections to … … 208 213 \value ExportScriptableSignals export this object's scriptable signals 209 214 \value ExportScriptableProperties export this object's scriptable properties 215 \value ExportScriptableInvokables export this object's scriptable invokables 210 216 \value ExportScriptableContents shorthand form for ExportScriptableSlots | 211 217 ExportScriptableSignals | … … 215 221 \value ExportNonScriptableSignals export this object's non-scriptable signals 216 222 \value ExportNonScriptableProperties export this object's non-scriptable properties 223 \value ExportNonScriptableInvokables export this object's non-scriptable invokables 217 224 \value ExportNonScriptableContents shorthand form for ExportNonScriptableSlots | 218 225 ExportNonScriptableSignals | … … 222 229 \value ExportAllSignals export all of this object's signals 223 230 \value ExportAllProperties export all of this object's properties 231 \value ExportAllInvokables export all of this object's invokables 224 232 \value ExportAllContents export all of this object's contents 225 226 233 \value ExportChildObjects export this object's child objects 227 234 … … 852 859 /*! 853 860 Returns true if this QDBusConnection object is connected. 854 855 If it isn't connected, calling connectToBus() on the same856 connection name will not make be connected. You need to call the857 QDBusConnection constructor again.858 861 */ 859 862 bool QDBusConnection::isConnected() const … … 915 918 /*! 916 919 Attempts to register the \a serviceName on the D-Bus server and 917 returns true if the registration succe ded. The registration will920 returns true if the registration succeeded. The registration will 918 921 fail if the name is already registered by another application. 919 922 … … 997 1000 { 998 1001 _q_manager()->setSender(s); 999 }1000 1001 /*!1002 \internal1003 */1004 void QDBusConnectionPrivate::setConnection(const QString &name, QDBusConnectionPrivate *c)1005 {1006 _q_manager()->setConnection(name, c);1007 1002 } 1008 1003 … … 1049 1044 1050 1045 QT_END_NAMESPACE 1046 1047 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbusconnection.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 46 46 #include <QtCore/qstring.h> 47 47 48 #ifndef QT_NO_DBUS 49 48 50 QT_BEGIN_HEADER 49 51 … … 71 73 72 74 class QDBusConnectionPrivate; 73 class Q DBUS_EXPORT QDBusConnection75 class Q_DBUS_EXPORT QDBusConnection 74 76 { 75 77 Q_GADGET … … 84 86 ExportScriptableSignals = 0x20, 85 87 ExportScriptableProperties = 0x40, 88 ExportScriptableInvokables = 0x80, 86 89 ExportScriptableContents = 0xf0, 87 90 … … 89 92 ExportNonScriptableSignals = 0x200, 90 93 ExportNonScriptableProperties = 0x400, 94 ExportNonScriptableInvokables = 0x800, 91 95 ExportNonScriptableContents = 0xf00, 92 96 … … 94 98 ExportAllSignals = ExportScriptableSignals|ExportNonScriptableSignals, 95 99 ExportAllProperties = ExportScriptableProperties|ExportNonScriptableProperties, 100 ExportAllInvokables = ExportScriptableInvokables|ExportNonScriptableInvokables, 96 101 ExportAllContents = ExportScriptableContents|ExportNonScriptableContents, 97 102 … … 182 187 QT_END_HEADER 183 188 189 #endif // QT_NO_DBUS 184 190 #endif -
trunk/src/dbus/qdbusconnection_p.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 71 71 72 72 #include <qdbusmessage.h> 73 74 #ifndef QT_NO_DBUS 73 75 74 76 QT_BEGIN_NAMESPACE … … 159 161 struct WatchedServiceData { 160 162 WatchedServiceData() : refcount(0) {} 163 WatchedServiceData(const QString &owner, int refcount = 0) 164 : owner(owner), refcount(refcount) 165 {} 161 166 QString owner; 162 167 int refcount; … … 199 204 const QString &path, const QString &interface, 200 205 QDBusAbstractInterface *receiver, const char *signal); 206 void registerService(const QString &serviceName); 207 void unregisterService(const QString &serviceName); 201 208 202 209 bool handleMessage(const QDBusMessage &msg); … … 243 250 void objectDestroyed(QObject *o); 244 251 void relaySignal(QObject *obj, const QMetaObject *, int signalId, const QVariantList &args); 245 void _q_serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner); 246 void registerService(const QString &serviceName); 247 void unregisterService(const QString &serviceName); 252 253 private slots: 254 void serviceOwnerChangedNoLock(const QString &name, const QString &oldOwner, const QString &newOwner); 255 void registerServiceNoLock(const QString &serviceName); 256 void unregisterServiceNoLock(const QString &serviceName); 248 257 249 258 signals: … … 299 308 bool buildSignature); 300 309 static DBusHandlerResult messageFilter(DBusConnection *, DBusMessage *, void *); 310 static bool checkReplyForDelivery(QDBusConnectionPrivate *target, QObject *object, 311 int idx, const QList<int> &metaTypes, 312 const QDBusMessage &msg); 301 313 static QDBusCallDeliveryEvent *prepareReply(QDBusConnectionPrivate *target, QObject *object, 302 314 int idx, const QList<int> &metaTypes, … … 308 320 309 321 static void setSender(const QDBusConnectionPrivate *s); 310 static void setConnection(const QString &name, QDBusConnectionPrivate *c);311 322 312 323 friend class QDBusActivateObjectEvent; … … 332 343 QT_END_NAMESPACE 333 344 345 #endif // QT_NO_DBUS 334 346 #endif -
trunk/src/dbus/qdbusconnectioninterface.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 51 51 52 52 #include "qdbus_symbols_p.h" // for the DBUS_* constants 53 54 #ifndef QT_NO_DBUS 53 55 54 56 QT_BEGIN_NAMESPACE … … 414 416 415 417 QT_END_NAMESPACE 418 419 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbusconnectioninterface.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 48 48 #include <QtDBus/qdbusreply.h> 49 49 50 #ifndef QT_NO_DBUS 51 50 52 QT_BEGIN_HEADER 51 53 … … 61 63 * Proxy class for interface org.freedesktop.DBus 62 64 */ 63 class Q DBUS_EXPORT QDBusConnectionInterface: public QDBusAbstractInterface65 class Q_DBUS_EXPORT QDBusConnectionInterface: public QDBusAbstractInterface 64 66 { 65 67 Q_OBJECT … … 127 129 QT_END_HEADER 128 130 131 #endif // QT_NO_DBUS 129 132 #endif -
trunk/src/dbus/qdbuscontext.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 47 47 #include "qdbuscontext_p.h" 48 48 49 #ifndef QT_NO_DBUS 50 49 51 QT_BEGIN_NAMESPACE 50 52 … … 203 205 204 206 QT_END_NAMESPACE 207 208 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbuscontext.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 46 46 #include <QtDBus/qdbuserror.h> 47 47 48 #ifndef QT_NO_DBUS 49 48 50 QT_BEGIN_HEADER 49 51 … … 56 58 57 59 class QDBusContextPrivate; 58 class Q DBUS_EXPORT QDBusContext60 class Q_DBUS_EXPORT QDBusContext 59 61 { 60 62 public: … … 82 84 QT_END_HEADER 83 85 86 #endif // QT_NO_DBUS 84 87 #endif -
trunk/src/dbus/qdbuscontext_p.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 55 55 #define QDBUSCONTEXT_P_H 56 56 57 #include <QtCore/qglobal.h> 58 59 #ifndef QT_NO_DBUS 60 57 61 QT_BEGIN_NAMESPACE 58 62 … … 75 79 QT_END_NAMESPACE 76 80 81 #endif // QT_NO_DBUS 77 82 #endif 78 83 -
trunk/src/dbus/qdbusdemarshaller.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/src/dbus/qdbuserror.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 48 48 #include "qdbusmessage.h" 49 49 #include "qdbusmessage_p.h" 50 51 #ifndef QT_NO_DBUS 50 52 51 53 QT_BEGIN_NAMESPACE … … 364 366 QT_END_NAMESPACE 365 367 366 368 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbuserror.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 46 46 #include <QtCore/qstring.h> 47 47 48 #ifndef QT_NO_DBUS 49 48 50 QT_BEGIN_HEADER 49 51 … … 56 58 class QDBusMessage; 57 59 58 class Q DBUS_EXPORT QDBusError60 class Q_DBUS_EXPORT QDBusError 59 61 { 60 62 public: … … 114 116 115 117 #ifndef QT_NO_DEBUG_STREAM 116 Q DBUS_EXPORT QDebug operator<<(QDebug, const QDBusError &);118 Q_DBUS_EXPORT QDebug operator<<(QDebug, const QDBusError &); 117 119 #endif 118 120 … … 121 123 QT_END_HEADER 122 124 125 #endif // QT_NO_DBUS 123 126 #endif -
trunk/src/dbus/qdbusextratypes.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 43 43 #include "qdbusutil_p.h" 44 44 45 #ifndef QT_NO_DBUS 46 45 47 QT_BEGIN_NAMESPACE 46 48 … … 238 240 QT_END_NAMESPACE 239 241 242 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbusextratypes.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 49 49 #include <QtDBus/qdbusmacros.h> 50 50 51 #ifndef QT_NO_DBUS 52 51 53 QT_BEGIN_HEADER 52 54 … … 58 60 Q_CORE_EXPORT uint qHash(const QString &key); 59 61 60 class Q DBUS_EXPORT QDBusObjectPath : private QString62 class Q_DBUS_EXPORT QDBusObjectPath : private QString 61 63 { 62 64 public: … … 108 110 109 111 110 class Q DBUS_EXPORT QDBusSignature : private QString112 class Q_DBUS_EXPORT QDBusSignature : private QString 111 113 { 112 114 public: … … 188 190 QT_END_HEADER 189 191 192 #endif // QT_NO_DBUS 190 193 #endif -
trunk/src/dbus/qdbusintegrator.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 65 65 #include "qdbusthreaddebug_p.h" 66 66 67 #ifndef QT_NO_DBUS 68 67 69 QT_BEGIN_NAMESPACE 68 70 69 71 static bool isDebugging; 70 72 #define qDBusDebug if (!::isDebugging); else qDebug 73 74 Q_GLOBAL_STATIC_WITH_ARGS(const QString, orgFreedesktopDBusString, (QLatin1String(DBUS_SERVICE_DBUS))) 75 76 static inline QString dbusServiceString() 77 { return *orgFreedesktopDBusString(); } 78 static inline QString dbusInterfaceString() 79 { 80 // it's the same string, but just be sure 81 Q_ASSERT(*orgFreedesktopDBusString() == QLatin1String(DBUS_INTERFACE_DBUS)); 82 return *orgFreedesktopDBusString(); 83 } 71 84 72 85 static inline QDebug operator<<(QDebug dbg, const QThread *th) … … 507 520 } 508 521 509 extern Q DBUS_EXPORT void qDBusAddSpyHook(QDBusSpyHook);522 extern Q_DBUS_EXPORT void qDBusAddSpyHook(QDBusSpyHook); 510 523 void qDBusAddSpyHook(QDBusSpyHook hook) 511 524 { … … 539 552 (*(*list)[i])(amsg); 540 553 } 554 555 if (!ref) 556 return false; 541 557 542 558 switch (amsg.type()) { … … 550 566 case QDBusMessage::ReplyMessage: 551 567 case QDBusMessage::ErrorMessage: 568 case QDBusMessage::InvalidMessage: 552 569 return false; // we don't handle those here 553 case QDBusMessage::InvalidMessage:554 Q_ASSERT_X(false, "QDBusConnection", "Invalid message found when processing");555 break;556 570 } 557 571 … … 617 631 618 632 // check type: 619 if (mm.methodType() != QMetaMethod::Slot )633 if (mm.methodType() != QMetaMethod::Slot && mm.methodType() != QMetaMethod::Method) 620 634 continue; 621 635 … … 681 695 continue; 682 696 683 if (isScriptable && (flags & QDBusConnection::ExportScriptableSlots) == 0) 684 continue; // not exported 685 if (!isScriptable && (flags & QDBusConnection::ExportNonScriptableSlots) == 0) 686 continue; // not exported 697 if (mm.methodType() == QMetaMethod::Slot) { 698 if (isScriptable && (flags & QDBusConnection::ExportScriptableSlots) == 0) 699 continue; // scriptable slots not exported 700 if (!isScriptable && (flags & QDBusConnection::ExportNonScriptableSlots) == 0) 701 continue; // non-scriptable slots not exported 702 } else { 703 if (isScriptable && (flags & QDBusConnection::ExportScriptableInvokables) == 0) 704 continue; // scriptable invokables not exported 705 if (!isScriptable && (flags & QDBusConnection::ExportNonScriptableInvokables) == 0) 706 continue; // non-scriptable invokables not exported 707 } 687 708 688 709 // if we got here, this slot matched … … 693 714 return -1; 694 715 } 716 717 static QDBusCallDeliveryEvent * const DIRECT_DELIVERY = (QDBusCallDeliveryEvent *)1; 695 718 696 719 QDBusCallDeliveryEvent* QDBusConnectionPrivate::prepareReply(QDBusConnectionPrivate *target, … … 705 728 if (metaTypes[n] == QDBusMetaTypeId::message) 706 729 --n; 730 731 if (msg.arguments().count() < n) 732 return 0; // too few arguments 707 733 708 734 // check that types match … … 714 740 // we can deliver 715 741 // prepare for the call 742 if (target == object) 743 return DIRECT_DELIVERY; 716 744 return new QDBusCallDeliveryEvent(QDBusConnection(target), idx, target, msg, metaTypes); 717 745 } … … 728 756 // Slots receive read-only copies of the message (i.e., pass by value or by const-ref) 729 757 QDBusCallDeliveryEvent *call = prepareReply(this, hook.obj, hook.midx, hook.params, msg); 758 if (call == DIRECT_DELIVERY) { 759 // short-circuit delivery 760 Q_ASSERT(this == hook.obj); 761 deliverCall(this, 0, msg, hook.params, hook.midx); 762 return; 763 } 730 764 if (call) 731 765 postEventToThread(ActivateSignalAction, hook.obj, call); … … 759 793 return false; 760 794 795 #ifndef QT_NO_PROPERTIES 761 796 Q_ASSERT_X(QThread::currentThread() == object->thread(), 762 797 "QDBusConnection: internal threading error", … … 778 813 if (cacheIt == slotCache.hash.constEnd() || cacheIt.key() != cacheKey) 779 814 { 780 // not cached, analy se the meta object815 // not cached, analyze the meta object 781 816 const QMetaObject *mo = object->metaObject(); 782 817 QByteArray memberName = msg.member().toUtf8(); … … 817 852 return true; 818 853 } 854 #endif // QT_NO_PROPERTIES 855 return false; 819 856 } 820 857 … … 948 985 949 986 rootNode.flags = 0; 987 988 // prepopulate watchedServices: 989 // we know that the owner of org.freedesktop.DBus is itself 990 watchedServices.insert(dbusServiceString(), WatchedServiceData(dbusServiceString(), 1)); 991 992 // prepopulate matchRefCounts: 993 // we know that org.freedesktop.DBus will never change owners 994 matchRefCounts.insert("type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0='org.freedesktop.DBus'", 1); 950 995 } 951 996 … … 1174 1219 } 1175 1220 1176 void QDBusConnectionPrivate:: _q_serviceOwnerChanged(const QString &name,1177 const QString &oldOwner, const QString &newOwner)1221 void QDBusConnectionPrivate::serviceOwnerChangedNoLock(const QString &name, 1222 const QString &oldOwner, const QString &newOwner) 1178 1223 { 1179 1224 Q_UNUSED(oldOwner); 1180 QDBusWriteLocker locker(UpdateSignalHookOwnerAction, this);1225 // QDBusWriteLocker locker(UpdateSignalHookOwnerAction, this); 1181 1226 WatchedServicesHash::Iterator it = watchedServices.find(name); 1182 1227 if (it == watchedServices.end()) … … 1375 1420 1376 1421 // try the object itself: 1377 if (node.flags & (QDBusConnection::ExportScriptableSlots|QDBusConnection::ExportNonScriptableSlots)) { 1422 if (node.flags & (QDBusConnection::ExportScriptableSlots|QDBusConnection::ExportNonScriptableSlots) || 1423 node.flags & (QDBusConnection::ExportScriptableInvokables|QDBusConnection::ExportNonScriptableInvokables)) { 1378 1424 bool interfaceFound = true; 1379 1425 if (!msg.interface().isEmpty()) … … 1631 1677 mode = ClientMode; 1632 1678 1679 const char *service = q_dbus_bus_get_unique_name(connection); 1680 Q_ASSERT(service); 1681 baseService = QString::fromUtf8(service); 1682 1633 1683 q_dbus_connection_set_exit_on_disconnect(connection, false); 1634 1684 q_dbus_connection_set_watch_functions(connection, qDBusAddWatch, qDBusRemoveWatch, … … 1637 1687 qDBusToggleTimeout, this, 0); 1638 1688 q_dbus_connection_set_dispatch_status_function(connection, qDBusUpdateDispatchStatus, this, 0); 1639 1640 // Initialize the match rules1641 // We want all messages that have us as destination1642 // signals don't have destinations, but connectSignal() takes care of them1643 const char *service = q_dbus_bus_get_unique_name(connection);1644 if (service) {1645 QVarLengthArray<char, 56> filter;1646 filter.append("destination='", 13);1647 filter.append(service, qstrlen(service));1648 filter.append("\'\0", 2);1649 1650 QDBusErrorInternal error;1651 q_dbus_bus_add_match(connection, filter.constData(), error);1652 if (handleError(error)) {1653 closeConnection();1654 return;1655 }1656 1657 baseService = QString::fromUtf8(service);1658 } else {1659 qWarning("QDBusConnectionPrivate::setConnection: Unable to get base service");1660 }1661 1662 QString busService = QLatin1String(DBUS_SERVICE_DBUS);1663 connectSignal(busService, QString(), QString(), QLatin1String("NameAcquired"), QStringList(), QString(),1664 this, SLOT(registerService(QString)));1665 connectSignal(busService, QString(), QString(), QLatin1String("NameLost"), QStringList(), QString(),1666 this, SLOT(unregisterService(QString)));1667 1668 1669 1689 q_dbus_connection_add_filter(connection, qDBusSignalFilter, this, 0); 1690 1691 // Initialize the hooks for the NameAcquired and NameLost signals 1692 // we don't use connectSignal here because we don't need the rules to be sent to the bus 1693 // the bus will always send us these two signals 1694 SignalHook hook; 1695 hook.service = dbusServiceString(); 1696 hook.path.clear(); // no matching 1697 hook.obj = this; 1698 hook.params << QMetaType::Void << QVariant::String; // both functions take a QString as parameter and return void 1699 1700 hook.midx = staticMetaObject.indexOfSlot("registerServiceNoLock(QString)"); 1701 Q_ASSERT(hook.midx != -1); 1702 signalHooks.insert(QLatin1String("NameAcquired:" DBUS_INTERFACE_DBUS), hook); 1703 1704 hook.midx = staticMetaObject.indexOfSlot("unregisterServiceNoLock(QString)"); 1705 Q_ASSERT(hook.midx != -1); 1706 signalHooks.insert(QLatin1String("NameLost:" DBUS_INTERFACE_DBUS), hook); 1670 1707 1671 1708 qDBusDebug() << this << ": connected successfully"; … … 2054 2091 if (++data.refcount == 1) { 2055 2092 // we need to watch for this service changing 2056 QString dbusServerService = QLatin1String(DBUS_SERVICE_DBUS); 2057 connectSignal(dbusServerService, QString(), QLatin1String(DBUS_INTERFACE_DBUS), 2093 connectSignal(dbusServiceString(), QString(), dbusInterfaceString(), 2058 2094 QLatin1String("NameOwnerChanged"), QStringList() << hook.service, QString(), 2059 this, SLOT( _q_serviceOwnerChanged(QString,QString,QString)));2095 this, SLOT(serviceOwnerChangedNoLock(QString,QString,QString))); 2060 2096 data.owner = getNameOwnerNoCache(hook.service); 2061 2097 qDBusDebug() << this << "Watching service" << hook.service << "for owner changes (current owner:" … … 2134 2170 if (--sit.value().refcount == 0) { 2135 2171 watchedServices.erase(sit); 2136 QString dbusServerService = QLatin1String(DBUS_SERVICE_DBUS); 2137 disconnectSignal(dbusServerService, QString(), QLatin1String(DBUS_INTERFACE_DBUS), 2172 disconnectSignal(dbusServiceString(), QString(), dbusInterfaceString(), 2138 2173 QLatin1String("NameOwnerChanged"), QStringList() << hook.service, QString(), 2139 2174 this, SLOT(_q_serviceOwnerChanged(QString,QString,QString))); … … 2257 2292 QString QDBusConnectionPrivate::getNameOwnerNoCache(const QString &serviceName) 2258 2293 { 2259 QDBusMessage msg = QDBusMessage::createMethodCall( QLatin1String(DBUS_SERVICE_DBUS),2260 QLatin1String(DBUS_PATH_DBUS), QLatin1String(DBUS_INTERFACE_DBUS),2294 QDBusMessage msg = QDBusMessage::createMethodCall(dbusServiceString(), 2295 QLatin1String(DBUS_PATH_DBUS), dbusInterfaceString(), 2261 2296 QLatin1String("GetNameOwner")); 2262 2297 QDBusMessagePrivate::setParametersValidated(msg, true); … … 2319 2354 { 2320 2355 QDBusWriteLocker locker(RegisterServiceAction, this); 2356 registerServiceNoLock(serviceName); 2357 } 2358 2359 void QDBusConnectionPrivate::registerServiceNoLock(const QString &serviceName) 2360 { 2321 2361 serviceNames.append(serviceName); 2322 2362 } … … 2325 2365 { 2326 2366 QDBusWriteLocker locker(UnregisterServiceAction, this); 2367 unregisterServiceNoLock(serviceName); 2368 } 2369 2370 void QDBusConnectionPrivate::unregisterServiceNoLock(const QString &serviceName) 2371 { 2327 2372 serviceNames.removeAll(serviceName); 2328 2373 } … … 2344 2389 2345 2390 QT_END_NAMESPACE 2391 2392 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbusintegrator_p.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 69 69 #include "qdbusmessage.h" 70 70 #include "qdbusconnection_p.h" 71 72 #ifndef QT_NO_DBUS 71 73 72 74 QT_BEGIN_NAMESPACE … … 158 160 Q_DECLARE_METATYPE(QDBusSlotCache) 159 161 162 #endif // QT_NO_DBUS 160 163 #endif -
trunk/src/dbus/qdbusinterface.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 50 50 #include "qdbusconnection_p.h" 51 51 52 #ifndef QT_NO_DBUS 53 52 54 QT_BEGIN_NAMESPACE 53 55 … … 276 278 QMetaObject::activate(q, metaObject, id, argv); 277 279 278 } else if (mm.methodType() == QMetaMethod::Slot ) {280 } else if (mm.methodType() == QMetaMethod::Slot || mm.methodType() == QMetaMethod::Method) { 279 281 // method call relay from Qt world to D-Bus world 280 282 // get D-Bus equivalent signature … … 323 325 324 326 QT_END_NAMESPACE 327 328 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbusinterface.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 46 46 #include <QtDBus/qdbusconnection.h> 47 47 48 #ifndef QT_NO_DBUS 49 48 50 QT_BEGIN_HEADER 49 51 … … 53 55 54 56 class QDBusInterfacePrivate; 55 class Q DBUS_EXPORT QDBusInterface: public QDBusAbstractInterface57 class Q_DBUS_EXPORT QDBusInterface: public QDBusAbstractInterface 56 58 { 57 59 friend class QDBusConnection; … … 77 79 QT_END_HEADER 78 80 81 #endif // QT_NO_DBUS 79 82 #endif -
trunk/src/dbus/qdbusinterface_p.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 59 59 #include <qdbusinterface.h> 60 60 61 #ifndef QT_NO_DBUS 62 61 63 QT_BEGIN_NAMESPACE 62 64 … … 77 79 QT_END_NAMESPACE 78 80 81 #endif // QT_NO_DBUS 79 82 #endif -
trunk/src/dbus/qdbusinternalfilters.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 57 57 #include "qdbusmessage_p.h" 58 58 #include "qdbusutil_p.h" 59 60 #ifndef QT_NO_DBUS 59 61 60 62 QT_BEGIN_NAMESPACE … … 86 88 " <arg name=\"interface_name\" type=\"s\" direction=\"in\"/>\n" 87 89 " <arg name=\"values\" type=\"a{sv}\" direction=\"out\"/>\n" 88 " <annotation name=\"com.trolltech.QtDBus.QtTypeName.Out0\" value=\"QVariantMap\"/> "90 " <annotation name=\"com.trolltech.QtDBus.QtTypeName.Out0\" value=\"QVariantMap\"/>\n" 89 91 " </method>\n" 90 92 " </interface>\n"; … … 498 500 499 501 QT_END_NAMESPACE 502 503 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbusintrospection.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 42 42 #include "qdbusintrospection_p.h" 43 43 #include "qdbusxmlparser_p.h" 44 45 #ifndef QT_NO_DBUS 44 46 45 47 QT_BEGIN_NAMESPACE … … 424 426 425 427 QT_END_NAMESPACE 428 429 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbusintrospection_p.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 64 64 QT_BEGIN_NAMESPACE 65 65 66 class Q DBUS_EXPORT QDBusIntrospection66 class Q_DBUS_EXPORT QDBusIntrospection 67 67 { 68 68 public: -
trunk/src/dbus/qdbusmacros.h
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 47 47 #include <QtCore/qvariant.h> 48 48 49 #if defined(QDBUS_MAKEDLL)50 # define QDBUS_EXPORT Q_DECL_EXPORT51 #elif defined(QT_SHARED)52 # define QDBUS_EXPORT Q_DECL_IMPORT53 #else54 # define QDBUS_EXPORT55 #endif56 57 49 #ifndef Q_MOC_RUN 58 50 # define Q_NOREPLY … … 67 59 68 60 // prevent syncqt complaints 61 #ifndef QT_NO_DBUS 62 69 63 QT_BEGIN_HEADER 70 64 QT_BEGIN_NAMESPACE … … 73 67 QT_END_HEADER 74 68 69 #endif // QT_NO_DBUS 75 70 #endif -
trunk/src/dbus/qdbusmarshaller.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 43 43 #include "qdbusmetatype_p.h" 44 44 #include "qdbusutil_p.h" 45 46 #ifndef QT_NO_DBUS 45 47 46 48 QT_BEGIN_NAMESPACE … … 506 508 int element = q_dbus_message_iter_get_element_type(&demarshaller->iterator); 507 509 if (q_dbus_type_is_fixed(element)) { 508 // another optimi sation: fixed size arrays510 // another optimization: fixed size arrays 509 511 // code is exactly like QDBusDemarshaller::toByteArray 510 512 DBusMessageIter sub; … … 515 517 q_dbus_message_iter_get_fixed_array(&sub,&data,&len); 516 518 517 char signature[2] = { element, 0 };519 char signature[2] = { char(element), 0 }; 518 520 q_dbus_message_iter_open_container(&iterator, DBUS_TYPE_ARRAY, signature, &sub); 519 521 q_dbus_message_iter_append_fixed_array(&sub, element, &data, len); … … 549 551 550 552 QT_END_NAMESPACE 553 554 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbusmessage.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 54 54 #include "qdbusutil_p.h" 55 55 56 #ifndef QT_NO_DBUS 57 56 58 QT_BEGIN_NAMESPACE 57 59 … … 64 66 : msg(0), reply(0), type(DBUS_MESSAGE_TYPE_INVALID), 65 67 timeout(-1), localReply(0), ref(1), delayedReply(false), localMessage(false), 66 parametersValidated(false) 68 parametersValidated(false), autoStartService(true) 67 69 { 68 70 } … … 130 132 msg = q_dbus_message_new_method_call(data(d_ptr->service.toUtf8()), d_ptr->path.toUtf8(), 131 133 data(d_ptr->interface.toUtf8()), d_ptr->name.toUtf8()); 134 q_dbus_message_set_auto_start( msg, d_ptr->autoStartService ); 132 135 break; 133 136 case DBUS_MESSAGE_TYPE_METHOD_RETURN: … … 290 293 291 294 // no complex types seen 292 // optimi se by using the variant list itself295 // optimize by using the variant list itself 293 296 QDBusMessage retval; 294 297 QDBusMessagePrivate *d = retval.d_ptr; … … 450 453 } 451 454 452 // the reply must have a msg or be a local-loop optimi sation455 // the reply must have a msg or be a local-loop optimization 453 456 Q_ASSERT(reply.d_ptr->reply || reply.d_ptr->localMessage); 454 457 return reply; … … 469 472 } 470 473 471 // the reply must have a msg or be a local-loop optimi sation474 // the reply must have a msg or be a local-loop optimization 472 475 Q_ASSERT(reply.d_ptr->reply || reply.d_ptr->localMessage); 473 476 return reply; … … 642 645 { 643 646 return d_ptr->delayedReply; 647 } 648 649 /*! 650 Sets the auto start flag to \a enable. This flag only makes sense 651 for method call messages, where it tells the D-Bus server to 652 either auto start the service responsible for the service name, or 653 not to auto start it. 654 655 By default this flag is true, i.e. a service is autostarted. 656 This means: 657 658 When the service that this method call is sent to is already 659 running, the method call is sent to it. If the service is not 660 running yet, the D-Bus daemon is requested to autostart the 661 service that is assigned to this service name. This is 662 handled by .service files that are placed in a directory known 663 to the D-Bus server. These files then each contain a service 664 name and the path to a program that should be executed when 665 this service name is requested. 666 667 \since 4.7 668 */ 669 void QDBusMessage::setAutoStartService(bool enable) 670 { 671 d_ptr->autoStartService = enable; 672 } 673 674 /*! 675 Returns the auto start flag, as set by setAutoStartService(). By default, this 676 flag is true, which means QtDBus will auto start a service, if it is 677 not running already. 678 679 \sa setAutoStartService() 680 681 \since 4.7 682 */ 683 bool QDBusMessage::autoStartService() const 684 { 685 return d_ptr->autoStartService; 644 686 } 645 687 … … 760 802 QT_END_NAMESPACE 761 803 804 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbusmessage.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 48 48 #include <QtCore/qvariant.h> 49 49 50 #ifndef QT_NO_DBUS 51 50 52 QT_BEGIN_HEADER 51 53 … … 55 57 56 58 class QDBusMessagePrivate; 57 class Q DBUS_EXPORT QDBusMessage59 class Q_DBUS_EXPORT QDBusMessage 58 60 { 59 61 public: … … 105 107 bool isDelayedReply() const; 106 108 109 void setAutoStartService(bool enable); 110 bool autoStartService() const; 111 107 112 void setArguments(const QList<QVariant> &arguments); 108 113 QList<QVariant> arguments() const; … … 116 121 117 122 #ifndef QT_NO_DEBUG_STREAM 118 Q DBUS_EXPORT QDebug operator<<(QDebug, const QDBusMessage &);123 Q_DBUS_EXPORT QDebug operator<<(QDebug, const QDBusMessage &); 119 124 #endif 120 125 … … 123 128 QT_END_HEADER 124 129 130 #endif // QT_NO_DBUS 125 131 #endif 126 132 -
trunk/src/dbus/qdbusmessage_p.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 60 60 struct DBusMessage; 61 61 62 #ifndef QT_NO_DBUS 63 62 64 QT_BEGIN_NAMESPACE 63 65 … … 86 88 uint localMessage : 1; 87 89 mutable uint parametersValidated : 1; 90 uint autoStartService : 1; 88 91 89 92 static void setParametersValidated(QDBusMessage &msg, bool enable) … … 102 105 QT_END_NAMESPACE 103 106 107 #endif // QT_NO_DBUS 104 108 #endif -
trunk/src/dbus/qdbusmetaobject.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 53 53 #include "qdbusintrospection_p.h" 54 54 #include "qdbusabstractinterface_p.h" 55 56 #ifndef QT_NO_DBUS 55 57 56 58 QT_BEGIN_NAMESPACE … … 678 680 QT_END_NAMESPACE 679 681 682 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbusmetaobject_p.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 63 63 64 64 struct QDBusMetaObjectPrivate; 65 struct Q DBUS_EXPORT QDBusMetaObject: public QMetaObject65 struct Q_DBUS_EXPORT QDBusMetaObject: public QMetaObject 66 66 { 67 67 bool cached; -
trunk/src/dbus/qdbusmetatype.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 54 54 #include "qdbusmetatype_p.h" 55 55 #include "qdbusargument_p.h" 56 57 #ifndef QT_NO_DBUS 56 58 57 59 Q_DECLARE_METATYPE(QList<bool>) … … 241 243 QVector<QDBusCustomTypeInfo> *ct = customTypes(); 242 244 if (id >= ct->size()) 243 return false; // non-exist ant245 return false; // non-existent 244 246 245 247 const QDBusCustomTypeInfo &info = (*ct).at(id); … … 270 272 QVector<QDBusCustomTypeInfo> *ct = customTypes(); 271 273 if (id >= ct->size()) 272 return false; // non-exist ant274 return false; // non-existent 273 275 274 276 const QDBusCustomTypeInfo &info = (*ct).at(id); … … 463 465 464 466 QT_END_NAMESPACE 467 468 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbusmetatype.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 46 46 #include <QtDBus/qdbusargument.h> 47 47 48 #ifndef QT_NO_DBUS 49 48 50 QT_BEGIN_HEADER 49 51 … … 52 54 QT_MODULE(DBus) 53 55 54 class Q DBUS_EXPORT QDBusMetaType56 class Q_DBUS_EXPORT QDBusMetaType 55 57 { 56 58 public: … … 95 97 QT_END_HEADER 96 98 99 #endif // QT_NO_DBUS 97 100 #endif -
trunk/src/dbus/qdbusmetatype_p.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/src/dbus/qdbusmisc.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 50 50 #include "qdbusmetatype_p.h" 51 51 #include "qdbusabstractadaptor_p.h" // for QCLASSINFO_DBUS_* 52 53 #ifndef QT_NO_DBUS 52 54 53 55 QT_BEGIN_NAMESPACE … … 196 198 197 199 QT_END_NAMESPACE 200 201 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbuspendingcall.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 48 48 #include "qcoreevent.h" 49 49 #include <private/qobject_p.h> 50 51 #ifndef QT_NO_DBUS 50 52 51 53 QT_BEGIN_NAMESPACE … … 533 535 QT_END_NAMESPACE 534 536 537 #endif // QT_NO_DBUS 538 535 539 #include "moc_qdbuspendingcall.cpp" -
trunk/src/dbus/qdbuspendingcall.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 50 50 #include <QtDBus/qdbusmessage.h> 51 51 52 #ifndef QT_NO_DBUS 53 52 54 QT_BEGIN_HEADER 53 55 … … 61 63 62 64 class QDBusPendingCallPrivate; 63 class Q DBUS_EXPORT QDBusPendingCall65 class Q_DBUS_EXPORT QDBusPendingCall 64 66 { 65 67 public: … … 95 97 96 98 class QDBusPendingCallWatcherPrivate; 97 class Q DBUS_EXPORT QDBusPendingCallWatcher: public QObject, public QDBusPendingCall99 class Q_DBUS_EXPORT QDBusPendingCallWatcher: public QObject, public QDBusPendingCall 98 100 { 99 101 Q_OBJECT … … 120 122 QT_END_HEADER 121 123 124 #endif // QT_NO_DBUS 122 125 #endif -
trunk/src/dbus/qdbuspendingcall_p.h
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 63 63 #include "qdbusmessage.h" 64 64 #include "qdbus_symbols_p.h" 65 66 #ifndef QT_NO_DBUS 65 67 66 68 QT_BEGIN_NAMESPACE … … 136 138 QT_END_NAMESPACE 137 139 140 #endif // QT_NO_DBUS 138 141 #endif -
trunk/src/dbus/qdbuspendingreply.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 44 44 #include "qdbusmetatype.h" 45 45 46 #ifndef QT_NO_DBUS 47 46 48 /*! 47 49 \class QDBusPendingReply … … 277 279 } 278 280 281 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbuspendingreply.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 48 48 #include <QtDBus/qdbuspendingcall.h> 49 49 50 #ifndef QT_NO_DBUS 51 50 52 QT_BEGIN_HEADER 51 53 … … 54 56 QT_MODULE(DBus) 55 57 56 class Q DBUS_EXPORT QDBusPendingReplyData: public QDBusPendingCall58 class Q_DBUS_EXPORT QDBusPendingReplyData: public QDBusPendingCall 57 59 { 58 60 protected: … … 84 86 template<typename T1> inline int metaTypeFor(T1 * = 0) 85 87 { return qMetaTypeId<T1>(); } 86 // speciali se for QVariant, allowing it to be used in place of QDBusVariant88 // specialize for QVariant, allowing it to be used in place of QDBusVariant 87 89 template<> inline int metaTypeFor<QVariant>(QVariant *) 88 90 { return qMetaTypeId<QDBusVariant>(); } … … 212 214 QT_END_HEADER 213 215 214 #endif 216 #endif // QT_NO_DBUS 217 #endif -
trunk/src/dbus/qdbusreply.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 44 44 #include "qdbusmetatype_p.h" 45 45 #include <QDebug> 46 47 #ifndef QT_NO_DBUS 46 48 47 49 QT_BEGIN_NAMESPACE … … 243 245 244 246 QT_END_NAMESPACE 247 248 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbusreply.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 52 52 #include <QtDBus/qdbuspendingreply.h> 53 53 54 #ifndef QT_NO_DBUS 55 54 56 QT_BEGIN_HEADER 55 57 … … 58 60 QT_MODULE(DBus) 59 61 60 Q DBUS_EXPORT void qDBusReplyFill(const QDBusMessage &reply, QDBusError &error, QVariant &data);62 Q_DBUS_EXPORT void qDBusReplyFill(const QDBusMessage &reply, QDBusError &error, QVariant &data); 61 63 62 64 template<typename T> … … 194 196 QT_END_HEADER 195 197 198 #endif // QT_NO_DBUS 196 199 #endif -
trunk/src/dbus/qdbusserver.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 43 43 #include "qdbusconnection_p.h" 44 44 45 #ifndef QT_NO_DBUS 46 45 47 QT_BEGIN_NAMESPACE 46 48 … … 48 50 \class QDBusServer 49 51 \inmodule QtDBus 50 \ since 4.252 \internal 51 53 52 54 \brief The QDBusServer class provides peer-to-peer communication … … 99 101 100 102 /*! 101 Returns the address this server is asso siated with.103 Returns the address this server is associated with. 102 104 */ 103 105 QString QDBusServer::address() const … … 120 122 121 123 QT_END_NAMESPACE 124 125 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbusserver.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 46 46 #include <QtDBus/qdbusmacros.h> 47 47 48 #ifndef QT_NO_DBUS 49 48 50 QT_BEGIN_HEADER 49 51 … … 56 58 class QDBusConnection; 57 59 58 class Q DBUS_EXPORT QDBusServer: public QObject60 class Q_DBUS_EXPORT QDBusServer: public QObject 59 61 { 60 62 Q_OBJECT … … 78 80 QT_END_HEADER 79 81 82 #endif // QT_NO_DBUS 80 83 #endif -
trunk/src/dbus/qdbusservicewatcher.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 48 48 #include <private/qobject_p.h> 49 49 50 #ifndef QT_NO_DBUS 51 50 52 QT_BEGIN_NAMESPACE 51 53 … … 375 377 QT_END_NAMESPACE 376 378 379 #endif // QT_NO_DBUS 380 377 381 #include "moc_qdbusservicewatcher.cpp" -
trunk/src/dbus/qdbusservicewatcher.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 46 46 #include <QtDBus/qdbusmacros.h> 47 47 48 #ifndef QT_NO_DBUS 49 48 50 QT_BEGIN_HEADER 49 51 … … 55 57 56 58 class QDBusServiceWatcherPrivate; 57 class Q DBUS_EXPORT QDBusServiceWatcher: public QObject59 class Q_DBUS_EXPORT QDBusServiceWatcher: public QObject 58 60 { 59 61 Q_OBJECT … … 101 103 QT_END_HEADER 102 104 105 #endif // QT_NO_DBUS 103 106 #endif // QDBUSSERVICEWATCHER_H -
trunk/src/dbus/qdbusthreaddebug_p.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 53 53 // 54 54 55 #include <QtCore/qglobal.h> 56 57 #ifndef QT_NO_DBUS 58 55 59 #if !defined(QDBUS_THREAD_DEBUG) && defined(QT_BUILD_INTERNAL) 56 60 # define QDBUS_THREAD_DEBUG 1 … … 60 64 QT_BEGIN_NAMESPACE 61 65 typedef void (*qdbusThreadDebugFunc)(int, int, QDBusConnectionPrivate *); 62 Q DBUS_EXPORT void qdbusDefaultThreadDebug(int, int, QDBusConnectionPrivate *);63 extern Q DBUS_EXPORT qdbusThreadDebugFunc qdbusThreadDebug;66 Q_DBUS_EXPORT void qdbusDefaultThreadDebug(int, int, QDBusConnectionPrivate *); 67 extern Q_DBUS_EXPORT qdbusThreadDebugFunc qdbusThreadDebug; 64 68 QT_END_NAMESPACE 65 69 #endif … … 228 232 #endif 229 233 230 #endif 234 #endif // QT_NO_DBUS 235 #endif -
trunk/src/dbus/qdbusutil.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 47 47 48 48 #include "qdbusargument.h" 49 50 #ifndef QT_NO_DBUS 49 51 50 52 QT_BEGIN_NAMESPACE … … 308 310 309 311 Unique connection names start with a colon (":") and are followed by a list of dot-separated 310 components composed of ASCII letters, digits, the hyp en or the underscore ("_") character.312 components composed of ASCII letters, digits, the hyphen or the underscore ("_") character. 311 313 */ 312 314 bool isValidUniqueConnectionName(const QString &connName) … … 467 469 468 470 QT_END_NAMESPACE 471 472 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbusutil_p.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 60 60 #include <QtDBus/qdbuserror.h> 61 61 62 #ifndef QT_NO_DBUS 63 62 64 QT_BEGIN_HEADER 63 65 … … 66 68 namespace QDBusUtil 67 69 { 68 Q DBUS_EXPORT bool isValidInterfaceName(const QString &ifaceName);70 Q_DBUS_EXPORT bool isValidInterfaceName(const QString &ifaceName); 69 71 70 Q DBUS_EXPORT bool isValidUniqueConnectionName(const QString &busName);72 Q_DBUS_EXPORT bool isValidUniqueConnectionName(const QString &busName); 71 73 72 Q DBUS_EXPORT bool isValidBusName(const QString &busName);74 Q_DBUS_EXPORT bool isValidBusName(const QString &busName); 73 75 74 Q DBUS_EXPORT bool isValidMemberName(const QString &memberName);76 Q_DBUS_EXPORT bool isValidMemberName(const QString &memberName); 75 77 76 Q DBUS_EXPORT bool isValidErrorName(const QString &errorName);78 Q_DBUS_EXPORT bool isValidErrorName(const QString &errorName); 77 79 78 Q DBUS_EXPORT bool isValidPartOfObjectPath(const QString &path);80 Q_DBUS_EXPORT bool isValidPartOfObjectPath(const QString &path); 79 81 80 Q DBUS_EXPORT bool isValidObjectPath(const QString &path);82 Q_DBUS_EXPORT bool isValidObjectPath(const QString &path); 81 83 82 Q DBUS_EXPORT bool isValidSignature(const QString &signature);84 Q_DBUS_EXPORT bool isValidSignature(const QString &signature); 83 85 84 Q DBUS_EXPORT bool isValidSingleSignature(const QString &signature);86 Q_DBUS_EXPORT bool isValidSingleSignature(const QString &signature); 85 87 86 Q DBUS_EXPORT QString argumentToString(const QVariant &variant);88 Q_DBUS_EXPORT QString argumentToString(const QVariant &variant); 87 89 88 90 enum AllowEmptyFlag { … … 158 160 QT_END_HEADER 159 161 162 #endif // QT_NO_DBUS 160 163 #endif -
trunk/src/dbus/qdbusxmlgenerator.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 50 50 #include "qdbusutil_p.h" 51 51 52 #ifndef QT_NO_DBUS 53 52 54 QT_BEGIN_NAMESPACE 53 55 54 extern Q DBUS_EXPORT QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo,56 extern Q_DBUS_EXPORT QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo, 55 57 const QMetaObject *base, int flags); 56 58 … … 132 134 // adding a signal 133 135 isSignal = true; 134 else if (mm. methodType() == QMetaMethod::Slot && mm.access() == QMetaMethod::Public)136 else if (mm.access() == QMetaMethod::Public && (mm.methodType() == QMetaMethod::Slot || mm.methodType() == QMetaMethod::Method)) 135 137 isSignal = false; 136 138 else … … 140 142 QDBusConnection::ExportNonScriptableSignals))) 141 143 continue; // we're not exporting any signals 142 if (!isSignal && !(flags & (QDBusConnection::ExportScriptableSlots |143 QDBusConnection::ExportNonScriptableSlots)))144 continue; // we're not exporting any slots 144 if (!isSignal && (!(flags & (QDBusConnection::ExportScriptableSlots | QDBusConnection::ExportNonScriptableSlots)) && 145 !(flags & (QDBusConnection::ExportScriptableInvokables | QDBusConnection::ExportNonScriptableInvokables)))) 146 continue; // we're not exporting any slots or invokables 145 147 146 148 QString xml = QString::fromLatin1(" <%1 name=\"%2\">\n") … … 159 161 if (QDBusMetaType::signatureToType(typeName) == QVariant::Invalid) 160 162 xml += QString::fromLatin1(" <annotation name=\"com.trolltech.QtDBus.QtTypeName.Out0\" value=\"%1\"/>\n") 161 .arg(typeNameToXml(mm.typeName()));163 .arg(typeNameToXml(QVariant::typeToName(QVariant::Type(typeId)))); 162 164 } else 163 165 continue; … … 303 305 304 306 QT_END_NAMESPACE 307 308 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbusxmlparser.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 50 50 #include <QtCore/qvariant.h> 51 51 #include <QtCore/qtextstream.h> 52 53 #ifndef QT_NO_DBUS 52 54 53 55 QT_BEGIN_NAMESPACE … … 368 370 369 371 QT_END_NAMESPACE 372 373 #endif // QT_NO_DBUS -
trunk/src/dbus/qdbusxmlparser_p.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 59 59 #include "qdbusintrospection_p.h" 60 60 61 #ifndef QT_NO_DBUS 62 61 63 QT_BEGIN_NAMESPACE 62 64 … … 83 85 QT_END_NAMESPACE 84 86 87 #endif // QT_NO_DBUS 85 88 #endif
Note:
See TracChangeset
for help on using the changeset viewer.