[patch] More qt build fixes

Sjoerd Simons sjoerd at luon.net
Tue Feb 28 02:38:35 PST 2006


Hi,

  The qt makefile needed another patch to really build successfully on my
  system, patch attached as makefile.patch 
  
  Futhermore building on big-endian system fails with the following errors:
    qdbusintegrator.cpp: In member function 'void QDBusConnectionPrivate::deliverCall(const CallDeliveryEvent&) const':
    qdbusintegrator.cpp:631: error: 'QDBusConnectionPrivate::deliverCall(const CallDeliveryEvent&) const::integer' uses local type 'QDBusConnectionPrivate::deliverCall(const CallDeliveryEvent&) const::integer'
    qdbusintegrator.cpp:631: error:   trying to instantiate 'template<class T, int Prealloc> class QVarLengthArray'
    qdbusintegrator.cpp:648: warning: comparison between signed and unsigned integer expressions
    qdbusintegrator.cpp:660: error: 'auxParameters' was not declared in this scope
 
  I've fixed this by making the integer union declared globally (in the cpp
  file) instead of locally in the function. See qt-endianess.patch

  Sjoerd
-- 
As you will see, I told them, in no uncertain terms, to see Figure one.
		-- Dave "First Strike" Pare
-------------- next part --------------
Index: qt/qdbusintegrator.cpp
===================================================================
RCS file: /cvs/dbus/dbus/qt/qdbusintegrator.cpp,v
retrieving revision 1.3
diff -u -r1.3 qdbusintegrator.cpp
--- qt/qdbusintegrator.cpp	20 Feb 2006 13:23:11 -0000	1.3
+++ qt/qdbusintegrator.cpp	28 Feb 2006 10:02:03 -0000
@@ -39,6 +39,15 @@
 
 int QDBusConnectionPrivate::messageMetaType = 0;
 
+#if __BYTE_ORDER != __LITTLE_ENDIAN
+    union integer
+    {
+        short s;
+        unsigned short us;
+        unsigned char uc;
+    };
+#endif
+
 struct QDBusPendingCall
 {
     QPointer<QObject> receiver;
@@ -622,12 +631,6 @@
     params.reserve(metaTypes.count());
 
 #if __BYTE_ORDER != __LITTLE_ENDIAN
-    union integer
-    {
-        short s;
-        unsigned short us;
-        unsigned char uc;
-    }
     QVarLengthArray<integer, 4> auxParameters;
 #endif
     // let's create the parameter list
-------------- next part --------------
Index: qt/Makefile.am
===================================================================
RCS file: /cvs/dbus/dbus/qt/Makefile.am,v
retrieving revision 1.15
diff -u -r1.15 Makefile.am
--- qt/Makefile.am	25 Feb 2006 19:54:56 -0000	1.15
+++ qt/Makefile.am	28 Feb 2006 10:01:28 -0000
@@ -21,41 +21,41 @@
 	qdbusabstractadaptor.h
 
 libdbus_qt4_1_la_SOURCES = 			\
-	$(top_srcdir)/qt/qdbusconnection.cpp    \
-	$(top_srcdir)/qt/qdbuserror.cpp         \
-	$(top_srcdir)/qt/qdbusintegrator.cpp    \
-	$(top_srcdir)/qt/qdbusmarshall.cpp      \
-	$(top_srcdir)/qt/qdbusmessage.cpp       \
-	$(top_srcdir)/qt/qdbusserver.cpp        \
-	$(top_srcdir)/qt/qdbustype.cpp          \
-	$(top_srcdir)/qt/qdbusobject.cpp        \
-	$(top_srcdir)/qt/qdbusinterface.cpp     \
-	$(top_srcdir)/qt/qdbusstandardinterfaces.cpp	\
-	$(top_srcdir)/qt/qdbusxmlparser.cpp     \
-	$(top_srcdir)/qt/qdbusutil.cpp          \
-	$(top_srcdir)/qt/qdbusintrospection.cpp \
-	$(top_srcdir)/qt/qdbusabstractadaptor.cpp	\
-	$(top_srcdir)/qt/qdbusthread.cpp        \
+	qdbusconnection.cpp    \
+	qdbuserror.cpp         \
+	qdbusintegrator.cpp    \
+	qdbusmarshall.cpp      \
+	qdbusmessage.cpp       \
+	qdbusserver.cpp        \
+	qdbustype.cpp          \
+	qdbusobject.cpp        \
+	qdbusinterface.cpp     \
+	qdbusstandardinterfaces.cpp	\
+	qdbusxmlparser.cpp     \
+	qdbusutil.cpp          \
+	qdbusintrospection.cpp \
+	qdbusabstractadaptor.cpp	\
+	qdbusthread.cpp        \
 						\
-	$(top_srcdir)/dbus/qdbus.h              \
-	$(top_srcdir)/qt/qdbusabstractadaptor.h \
-	$(top_srcdir)/qt/qdbusconnection.h      \
-	$(top_srcdir)/qt/qdbusconnection_p.h    \
-	$(top_srcdir)/qt/qdbuserror.h           \
-	$(top_srcdir)/qt/qdbusinterface.h       \
-	$(top_srcdir)/qt/qdbusinterface_p.h     \
-	$(top_srcdir)/qt/qdbusintrospection.h   \
-	$(top_srcdir)/qt/qdbusmacros.h          \
-	$(top_srcdir)/qt/qdbusmarshall.h        \
-	$(top_srcdir)/qt/qdbusmessage.h         \
-	$(top_srcdir)/qt/qdbusmessage_p.h       \
-	$(top_srcdir)/qt/qdbusobject.h          \
-	$(top_srcdir)/qt/qdbusobject_p.h        \
-	$(top_srcdir)/qt/qdbusserver.h          \
-	$(top_srcdir)/qt/qdbusstandardinterfaces.h \
-	$(top_srcdir)/qt/qdbustype.h            \
-	$(top_srcdir)/qt/qdbusvariant.h		\
-	$(top_srcdir)/qt/qdbusxmlparser_p.h     
+	qdbus.h              \
+	qdbusabstractadaptor.h \
+	qdbusconnection.h      \
+	qdbusconnection_p.h    \
+	qdbuserror.h           \
+	qdbusinterface.h       \
+	qdbusinterface_p.h     \
+	qdbusintrospection.h   \
+	qdbusmacros.h          \
+	qdbusmarshall.h        \
+	qdbusmessage.h         \
+	qdbusmessage_p.h       \
+	qdbusobject.h          \
+	qdbusobject_p.h        \
+	qdbusserver.h          \
+	qdbusstandardinterfaces.h \
+	qdbustype.h            \
+	qdbusvariant.h		\
+	qdbusxmlparser_p.h     
 
 
 qdbusabstractadaptor.lo: qdbusabstractadaptor.moc


More information about the dbus mailing list