[Kde-windows] kde4 dbus state ?
Peter Kümmel
syntheticpp at gmx.net
Thu May 11 17:54:12 BST 2006
Thiago Macieira wrote:
> Peter Kümmel wrote:
>> To compile with msvc until it breaks when linking qdbus
>> (because of static member functions, QDBusMetaObject::create...)
>> I've done this changes (here some pseudo diff output):
>
here some more changes for qdbus to compile and link with msvc:
The linker error was because the compiler couldn't instantiate
some templates - it didn't know the definition of
member template functen, e.g.:
template <typename T>
QSet<T> QList<T>::toSet() const
is defined in qset.h, but QSet is only forward declared in QList.
This is maybe a problem of Qt/msvc.
--What does this mean?
Index: qdbusconnection_p.h
===================================================================
RCS file: /cvs/dbus/dbus/qt/qdbusconnection_p.h,v
retrieving revision 1.9
diff -u -B -b -r1.9 qdbusconnection_p.h
--- qdbusconnection_p.h 29 Apr 2006 12:44:31 -0000 1.9
+++ qdbusconnection_p.h 11 May 2006 15:15:01 -0000
@@ -64,8 +64,10 @@
class QDBusAbstractInterface;
class QDBusBusService;
+#ifndef Q_CC_MSVC
typedef struct DBusConnection;
typedef struct DBusServer;
+#endif
class QDBusConnectionPrivate: public QObject
{
-- Same as yesterday
Index: qdbusinterface.h
===================================================================
RCS file: /cvs/dbus/dbus/qt/qdbusinterface.h,v
retrieving revision 1.5
diff -u -B -b -r1.5 qdbusinterface.h
--- qdbusinterface.h 29 Apr 2006 12:44:31 -0000 1.5
+++ qdbusinterface.h 11 May 2006 15:15:01 -0000
@@ -43,6 +43,7 @@
private:
Q_DECLARE_PRIVATE(QDBusInterface);
+ Q_DISABLE_COPY(QDBusInterface);
};
struct QDBUS_EXPORT QDBusInterfacePtr
-- brute force solution to fix the linker problem
-- qHash functions which it couldn't find
Index: qdbusmacros.h
===================================================================
RCS file: /cvs/dbus/dbus/qt/qdbusmacros.h,v
retrieving revision 1.5
diff -u -B -b -r1.5 qdbusmacros.h
--- qdbusmacros.h 28 Mar 2006 18:56:08 -0000 1.5
+++ qdbusmacros.h 11 May 2006 15:15:01 -0000
@@ -33,6 +33,14 @@
#include <QtCore/qmetatype.h>
#include <QtCore/qvariant.h>
+#ifdef Q_CC_MSVC
+#include <QtCore/QVector>
+#include <QtCore/QSet>
+inline uint qHash(const QVariant& key) { return uint(&key); }
+class QDBusType;
+inline uint qHash(const QDBusType& key) { return uint(&key); }
+#endif
+
#ifdef QT_NO_MEMBER_TEMPLATES
# error Sorry, you need a compiler with support for template member functions to compile QtDBus.
#endif
-- same name for two arguments
Index: qdbusmarshall.cpp
===================================================================
RCS file: /cvs/dbus/dbus/qt/qdbusmarshall.cpp,v
retrieving revision 1.6
diff -u -B -b -r1.6 qdbusmarshall.cpp
--- qdbusmarshall.cpp 7 May 2006 09:36:19 -0000 1.6
+++ qdbusmarshall.cpp 11 May 2006 15:15:02 -0000
@@ -331,7 +331,7 @@
const QDBusType &type);
static void qListToIterator(DBusMessageIter *it, const QList<QVariant> &list,
- const QDBusTypeList &list);
+ const QDBusTypeList &typelist);
template<typename T>
static void qIterAppend(DBusMessageIter *it, const QDBusType &type, T arg)
-- make forward declaration consistent with the definition
Index: qdbusmetaobject.cpp
===================================================================
RCS file: /cvs/dbus/dbus/qt/qdbusmetaobject.cpp,v
retrieving revision 1.2
diff -u -B -b -r1.2 qdbusmetaobject.cpp
--- qdbusmetaobject.cpp 23 Apr 2006 19:04:53 -0000 1.2
+++ qdbusmetaobject.cpp 11 May 2006 15:15:02 -0000
@@ -111,8 +111,9 @@
static const int intsPerMethod = 4;
// ### from kernel/qmetaobject.cpp (Qt 4.1.2):
-struct QDBusMetaObjectPrivate
+class QDBusMetaObjectPrivate
{
+public:
int revision;
int className;
int classInfoCount, classInfoData;
-- make forward declaration consistent with the definition
Index: qdbusmetaobject_p.h
===================================================================
RCS file: /cvs/dbus/dbus/qt/qdbusmetaobject_p.h,v
retrieving revision 1.2
diff -u -B -b -r1.2 qdbusmetaobject_p.h
--- qdbusmetaobject_p.h 23 Apr 2006 19:04:53 -0000 1.2
+++ qdbusmetaobject_p.h 11 May 2006 15:15:02 -0000
@@ -42,8 +42,9 @@
class QDBusError;
class QDBusMetaObjectPrivate;
-struct QDBUS_EXPORT QDBusMetaObject: public QMetaObject
+class QDBUS_EXPORT QDBusMetaObject: public QMetaObject
{
+public:
bool cached;
static QDBusMetaObject *createMetaObject(const QString &interface, const QString &xml,
More information about the kde-core-devel
mailing list