From bbad6c226f1ff2657c6095141bbf3ec936a42feb Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 18 May 2015 16:58:37 +0300 Subject: qt4: remove Qt Mobility Qt Mobility is an obsolete and unmaintained framework that is also dependent on gstreamer 0.10 https://bugzilla.yoctoproject.org/show_bug.cgi?id=6294 Signed-off-by: Alexander Kanavin Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- ...embedded-usage-doesn-t-work-outside-of-Qt.patch | 73 - ...stvideoconnector-fixed-buffers-allocation.patch | 34 - ...nnecessary-rpaths-from-qml_device-example.patch | 28 - .../fix-compile-error-no-bluez.patch | 338 -- .../fix_metaobjectbuilder_build_err.patch | 4707 -------------------- .../qt4/qt-mobility-1.2.0/gcc-scope.patch | 48 - .../qt-mobility-1.2.0/qt-mobility-configure.patch | 17 - .../qt-mobility-1.2.0/qt-mobility-no-opengl.patch | 38 - .../qt-mobility-1.2.0/qt-mobility-no-xvideo.patch | 26 - meta/recipes-qt/qt4/qt-mobility-embedded_1.2.0.bb | 11 - meta/recipes-qt/qt4/qt-mobility-x11_1.2.0.bb | 10 - meta/recipes-qt/qt4/qt-mobility_1.2.0.inc | 112 - 12 files changed, 5442 deletions(-) delete mode 100644 meta/recipes-qt/qt4/qt-mobility-1.2.0/0001-fix-embedded-usage-doesn-t-work-outside-of-Qt.patch delete mode 100644 meta/recipes-qt/qt4/qt-mobility-1.2.0/0001-gstvideoconnector-fixed-buffers-allocation.patch delete mode 100644 meta/recipes-qt/qt4/qt-mobility-1.2.0/0002-Remove-unnecessary-rpaths-from-qml_device-example.patch delete mode 100644 meta/recipes-qt/qt4/qt-mobility-1.2.0/fix-compile-error-no-bluez.patch delete mode 100644 meta/recipes-qt/qt4/qt-mobility-1.2.0/fix_metaobjectbuilder_build_err.patch delete mode 100644 meta/recipes-qt/qt4/qt-mobility-1.2.0/gcc-scope.patch delete mode 100644 meta/recipes-qt/qt4/qt-mobility-1.2.0/qt-mobility-configure.patch delete mode 100644 meta/recipes-qt/qt4/qt-mobility-1.2.0/qt-mobility-no-opengl.patch delete mode 100644 meta/recipes-qt/qt4/qt-mobility-1.2.0/qt-mobility-no-xvideo.patch delete mode 100644 meta/recipes-qt/qt4/qt-mobility-embedded_1.2.0.bb delete mode 100644 meta/recipes-qt/qt4/qt-mobility-x11_1.2.0.bb delete mode 100644 meta/recipes-qt/qt4/qt-mobility_1.2.0.inc (limited to 'meta') diff --git a/meta/recipes-qt/qt4/qt-mobility-1.2.0/0001-fix-embedded-usage-doesn-t-work-outside-of-Qt.patch b/meta/recipes-qt/qt4/qt-mobility-1.2.0/0001-fix-embedded-usage-doesn-t-work-outside-of-Qt.patch deleted file mode 100644 index d8d88c2cfc..0000000000 --- a/meta/recipes-qt/qt4/qt-mobility-1.2.0/0001-fix-embedded-usage-doesn-t-work-outside-of-Qt.patch +++ /dev/null @@ -1,73 +0,0 @@ -From de2b568a4f14f38ae26960f543277bd2ac57c9d6 Mon Sep 17 00:00:00 2001 -From: Alex -Date: Tue, 10 May 2011 14:54:49 +1000 -Subject: [PATCH] fix !embedded usage (doesn't work outside of Qt) - -embedded is part of QT_CONFIG and not CONFIG - -Task-number: QTMOBILITY-1586 ---- -Upstream-Status: Backport -https://qt.gitorious.org/qt-mobility/qt-mobility/commit/de2b568a4f14f38ae26960f543277bd2ac57c9d6 -EB: refreshed the patch for it to apply properly - - plugins/multimedia/gstreamer/gstreamer.pro | 2 +- - src/systeminfo/systeminfo.pro | 6 +++--- - tests/auto/auto.pro | 2 +- - 3 files changed, 5 insertions(+), 5 deletions(-) - -Index: qt-mobility-opensource-src-1.2.0/plugins/multimedia/gstreamer/gstreamer.pro -=================================================================== ---- qt-mobility-opensource-src-1.2.0.orig/plugins/multimedia/gstreamer/gstreamer.pro 2013-09-19 10:34:40.880862884 +0200 -+++ qt-mobility-opensource-src-1.2.0/plugins/multimedia/gstreamer/gstreamer.pro 2013-09-19 10:35:22.844862550 +0200 -@@ -85,7 +85,7 @@ - qgstutils.cpp - - --!win32:!embedded:!mac:!symbian:!simulator:!contains(QT_CONFIG, qpa) { -+!win32:!contains(QT_CONFIG,embedded):!mac:!symbian:!simulator:!contains(QT_CONFIG, qpa) { - LIBS += -lXv -lX11 -lXext - - HEADERS += \ -Index: qt-mobility-opensource-src-1.2.0/src/systeminfo/systeminfo.pro -=================================================================== ---- qt-mobility-opensource-src-1.2.0.orig/src/systeminfo/systeminfo.pro 2013-09-19 10:34:40.884862884 +0200 -+++ qt-mobility-opensource-src-1.2.0/src/systeminfo/systeminfo.pro 2013-09-19 10:36:05.480862210 +0200 -@@ -101,7 +101,7 @@ - LIBS += -lblkid - } - -- !embedded:!contains(QT_CONFIG,qpa): { -+ !contains(QT_CONFIG,embedded):!contains(QT_CONFIG,qpa): { - LIBS += -lX11 -lXrandr - } - -@@ -154,7 +154,7 @@ - #for now... udisks - } else { - DEFINES += QT_NO_UDISKS -- !embedded:!contains(QT_CONFIG,qpa): LIBS += -lX11 -lXrandr -+ !contains(QT_CONFIG,embedded):!contains(QT_CONFIG,qpa): LIBS += -lX11 -lXrandr - } - - contains(connman_enabled, yes): { -@@ -165,7 +165,7 @@ - } - } else { - DEFINES += QT_NO_NETWORKMANAGER QT_NO_UDISKS QT_NO_CONNMAN -- !embedded:!contains(QT_CONFIG,qpa): LIBS += -lX11 -lXrandr -+ !contains(QT_CONFIG,embedded):!contains(QT_CONFIG,qpa): LIBS += -lX11 -lXrandr - } - } - -Index: qt-mobility-opensource-src-1.2.0/tests/auto/auto.pro -=================================================================== ---- qt-mobility-opensource-src-1.2.0.orig/tests/auto/auto.pro 2013-09-19 10:34:40.884862884 +0200 -+++ qt-mobility-opensource-src-1.2.0/tests/auto/auto.pro 2013-09-19 10:35:22.844862550 +0200 -@@ -21,5 +21,5 @@ - # which require that the autotest is run on the same machine - # doing the build - i.e. cross-compilation is not allowed. - win32|mac|linux-g++* { -- !embedded:!maemo5:!maemo6:SUBDIRS+=host.pro -+ !contains(QT_CONFIG,embedded):!maemo5:!maemo6:SUBDIRS+=host.pro - } diff --git a/meta/recipes-qt/qt4/qt-mobility-1.2.0/0001-gstvideoconnector-fixed-buffers-allocation.patch b/meta/recipes-qt/qt4/qt-mobility-1.2.0/0001-gstvideoconnector-fixed-buffers-allocation.patch deleted file mode 100644 index 2df76fc778..0000000000 --- a/meta/recipes-qt/qt4/qt-mobility-1.2.0/0001-gstvideoconnector-fixed-buffers-allocation.patch +++ /dev/null @@ -1,34 +0,0 @@ -Upstream-Status: Submitted [QTMOBILITY-1611] - -From b308508b49afa9a129b4e4589c57cd107d1320b8 Mon Sep 17 00:00:00 2001 -From: Dmytro Poplavskiy -Date: Fri, 6 May 2011 10:35:11 +1000 -Subject: [PATCH] gstvideoconnector: fixed buffers allocation - -It should not be necessary, but at least theora video decoder doesn't -iniatilize *buf, while gst_pad_alloc_buffer relies on buf being NULL. - -Task-number: QTMOBILITY-1611 -Reviewed-by: Michael Goddard ---- - plugins/multimedia/gstreamer/gstvideoconnector.c | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) - -diff --git a/plugins/multimedia/gstreamer/gstvideoconnector.c b/plugins/multimedia/gstreamer/gstvideoconnector.c -index ddf68e0..9f8ceae 100644 ---- a/plugins/multimedia/gstreamer/gstvideoconnector.c -+++ b/plugins/multimedia/gstreamer/gstvideoconnector.c -@@ -186,6 +186,10 @@ gst_video_connector_buffer_alloc (GstPad * pad, guint64 offset, guint size, - GstFlowReturn res = GST_FLOW_OK; - element = GST_VIDEO_CONNECTOR (GST_PAD_PARENT (pad)); - -+ if (!buf) -+ return GST_FLOW_ERROR; -+ *buf = NULL; -+ - GST_OBJECT_LOCK (element); - gst_object_ref(element->srcpad); - GST_OBJECT_UNLOCK (element); --- -1.7.4.1 - diff --git a/meta/recipes-qt/qt4/qt-mobility-1.2.0/0002-Remove-unnecessary-rpaths-from-qml_device-example.patch b/meta/recipes-qt/qt4/qt-mobility-1.2.0/0002-Remove-unnecessary-rpaths-from-qml_device-example.patch deleted file mode 100644 index a411640b73..0000000000 --- a/meta/recipes-qt/qt4/qt-mobility-1.2.0/0002-Remove-unnecessary-rpaths-from-qml_device-example.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 92e0c611f4969c716616d64df64831387e5b1632 Mon Sep 17 00:00:00 2001 -From: Paul Eggleton -Date: Fri, 16 Mar 2012 10:24:00 +0000 -Subject: [PATCH] Remove unnecessary rpaths from qml_device example - -These can't be valid in any case. - -Upstream-Status: Pending - -Signed-off-by: Paul Eggleton ---- - examples/declarative-systeminfo/device/device.pro | 3 --- - 1 files changed, 0 insertions(+), 3 deletions(-) - -diff --git a/examples/declarative-systeminfo/device/device.pro b/examples/declarative-systeminfo/device/device.pro -index 698e5fb..05be9b7 100644 ---- a/examples/declarative-systeminfo/device/device.pro -+++ b/examples/declarative-systeminfo/device/device.pro -@@ -17,6 +17,3 @@ symbian { - } - RESOURCES += device.qrc - --QMAKE_LFLAGS_DEBUG += "-Wl,-rpath,/home/user/qt/lib" --QMAKE_LFLAGS_RPATH += "-Wl,-rpath,/home/user/qt/lib" --QMAKE_LFLAGS_RELEASE += "-Wl,-rpath,/home/user/qt/lib" --- -1.7.5.4 - diff --git a/meta/recipes-qt/qt4/qt-mobility-1.2.0/fix-compile-error-no-bluez.patch b/meta/recipes-qt/qt4/qt-mobility-1.2.0/fix-compile-error-no-bluez.patch deleted file mode 100644 index 3f03cf7165..0000000000 --- a/meta/recipes-qt/qt4/qt-mobility-1.2.0/fix-compile-error-no-bluez.patch +++ /dev/null @@ -1,338 +0,0 @@ -From bb05733bd5a685b00f80ddc73a1b7a9a2ba0eb11 Mon Sep 17 00:00:00 2001 -From: Andrew Stanley-Jones -Date: Thu, 12 May 2011 13:07:13 +1000 -Subject: [PATCH] Fix compile error if bluez is not installed - -Upstream-Status: Backport - -Task-number: QTMOBILITY-1576 ---- - src/connectivity/bluetooth/bluetooth.pri | 1 + - .../bluetooth/qbluetoothdevicediscoveryagent.h | 2 +- - .../bluetooth/qbluetoothdevicediscoveryagent_p.cpp | 2 +- - .../bluetooth/qbluetoothdevicediscoveryagent_p.h | 6 +++--- - .../bluetooth/qbluetoothlocaldevice_p.h | 4 ++-- - .../bluetooth/qbluetoothservicediscoveryagent.h | 2 +- - .../bluetooth/qbluetoothservicediscoveryagent_p.h | 8 ++++---- - .../bluetooth/qbluetoothserviceinfo_p.cpp | 2 +- - .../bluetooth/qbluetoothserviceinfo_p.h | 4 ++-- - src/connectivity/bluetooth/ql2capserver.h | 2 +- - src/connectivity/bluetooth/ql2capserver_p.cpp | 2 +- - src/connectivity/bluetooth/ql2capserver_p.h | 6 +++--- - src/connectivity/bluetooth/qrfcommserver.h | 2 +- - src/connectivity/bluetooth/qrfcommserver_p.cpp | 2 +- - src/connectivity/bluetooth/qrfcommserver_p.h | 6 +++--- - tests/tests.pro | 4 +++- - 16 files changed, 29 insertions(+), 26 deletions(-) - -diff --git a/src/connectivity/bluetooth/bluetooth.pri b/src/connectivity/bluetooth/bluetooth.pri -index 717a1ad..4fa2c15 100644 ---- a/src/connectivity/bluetooth/bluetooth.pri -+++ b/src/connectivity/bluetooth/bluetooth.pri -@@ -103,6 +103,7 @@ symbian { - } - } else:contains(bluez_enabled, yes):contains(QT_CONFIG, dbus) { - QT *= dbus -+ DEFINES += QTM_BLUEZ_BLUETOOTH - - include(bluez/bluez.pri) - -diff --git a/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent.h b/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent.h -index a95c467..00cfd14 100644 ---- a/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent.h -+++ b/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent.h -@@ -101,7 +101,7 @@ private: - Q_DECLARE_PRIVATE(QBluetoothDeviceDiscoveryAgent) - QBluetoothDeviceDiscoveryAgentPrivate *d_ptr; - --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - Q_PRIVATE_SLOT(d_func(), void _q_deviceFound(const QString &address, const QVariantMap &dict)); - Q_PRIVATE_SLOT(d_func(), void _q_propertyChanged(const QString &name, const QDBusVariant &value)); - #endif -diff --git a/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent_p.cpp b/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent_p.cpp -index 6edbd16..512002d 100644 ---- a/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent_p.cpp -+++ b/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent_p.cpp -@@ -69,7 +69,7 @@ void QBluetoothDeviceDiscoveryAgentPrivate::start() - void QBluetoothDeviceDiscoveryAgentPrivate::stop() - { - } --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - void QBluetoothDeviceDiscoveryAgentPrivate::_q_deviceFound(const QString &address, - const QVariantMap &dict) - { -diff --git a/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent_p.h b/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent_p.h -index 0e34e05..700e78d 100644 ---- a/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent_p.h -+++ b/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent_p.h -@@ -46,7 +46,7 @@ - - #include - --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - class OrgBluezManagerInterface; - class OrgBluezAdapterInterface; - class QDBusVariant; -@@ -80,7 +80,7 @@ public: - QString errorDescription); - #endif - --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - void _q_deviceFound(const QString &address, const QVariantMap &dict); - void _q_propertyChanged(const QString &name, const QDBusVariant &value); - #endif -@@ -100,7 +100,7 @@ private: - bool pendingCancel; - bool pendingStart; - --#if !defined(QT_NO_DBUS) -+#ifdef QTM_BLUEZ_BLUETOOTH - OrgBluezManagerInterface *manager; - OrgBluezAdapterInterface *adapter; - #endif -diff --git a/src/connectivity/bluetooth/qbluetoothlocaldevice_p.h b/src/connectivity/bluetooth/qbluetoothlocaldevice_p.h -index 750c286..381d6b5 100644 ---- a/src/connectivity/bluetooth/qbluetoothlocaldevice_p.h -+++ b/src/connectivity/bluetooth/qbluetoothlocaldevice_p.h -@@ -51,7 +51,7 @@ - #include - #endif - --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - #include - #include - #include -@@ -68,7 +68,7 @@ QTM_BEGIN_NAMESPACE - - class QBluetoothAddress; - --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - class QBluetoothLocalDevicePrivate : public QObject, - protected QDBusContext - { -diff --git a/src/connectivity/bluetooth/qbluetoothservicediscoveryagent.h b/src/connectivity/bluetooth/qbluetoothservicediscoveryagent.h -index 6279432..7eeccfc 100644 ---- a/src/connectivity/bluetooth/qbluetoothservicediscoveryagent.h -+++ b/src/connectivity/bluetooth/qbluetoothservicediscoveryagent.h -@@ -105,7 +105,7 @@ private: - Q_PRIVATE_SLOT(d_func(), void _q_deviceDiscovered(const QBluetoothDeviceInfo &info)) - Q_PRIVATE_SLOT(d_func(), void _q_deviceDiscoveryFinished()) - Q_PRIVATE_SLOT(d_func(), void _q_serviceDiscoveryFinished()) --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - Q_PRIVATE_SLOT(d_func(), void _q_discoveredServices(QDBusPendingCallWatcher*)) - Q_PRIVATE_SLOT(d_func(), void _q_createdDevice(QDBusPendingCallWatcher*)) - #endif -diff --git a/src/connectivity/bluetooth/qbluetoothservicediscoveryagent_p.h b/src/connectivity/bluetooth/qbluetoothservicediscoveryagent_p.h -index 5e7da43..f25c293 100644 ---- a/src/connectivity/bluetooth/qbluetoothservicediscoveryagent_p.h -+++ b/src/connectivity/bluetooth/qbluetoothservicediscoveryagent_p.h -@@ -53,7 +53,7 @@ - #include - #endif - --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - class OrgBluezManagerInterface; - class OrgBluezAdapterInterface; - class OrgBluezDeviceInterface; -@@ -99,7 +99,7 @@ public: - void _q_deviceDiscoveryFinished(); - void _q_deviceDiscovered(const QBluetoothDeviceInfo &info); - void _q_serviceDiscoveryFinished(); --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - void _q_discoveredServices(QDBusPendingCallWatcher *watcher); - void _q_createdDevice(QDBusPendingCallWatcher *watcher); - #endif -@@ -123,7 +123,7 @@ private: - #ifdef QTM_SYMBIAN_BLUETOOTH - void startL(const QBluetoothAddress &address); - void initL(const QBluetoothAddress &address); --#elif !defined(QT_NO_DBUS) -+#elif defined(QTM_BLUEZ_BLUETOOTH) - QVariant readAttributeValue(QXmlStreamReader &xml); - #endif - -@@ -153,7 +153,7 @@ private: - TSdpAttributeID m_currentAttributeId; - - QStack m_stack; --#elif !defined(QT_NO_DBUS) -+#elif defined(QTM_BLUEZ_BLUETOOTH) - OrgBluezManagerInterface *manager; - OrgBluezAdapterInterface *adapter; - OrgBluezDeviceInterface *device; -diff --git a/src/connectivity/bluetooth/qbluetoothserviceinfo_p.cpp b/src/connectivity/bluetooth/qbluetoothserviceinfo_p.cpp -index 814458c..dd96dcc 100644 ---- a/src/connectivity/bluetooth/qbluetoothserviceinfo_p.cpp -+++ b/src/connectivity/bluetooth/qbluetoothserviceinfo_p.cpp -@@ -79,7 +79,7 @@ void QBluetoothServiceInfoPrivate::removeRegisteredAttribute(quint16 attributeId - Q_UNUSED(attributeId); - } - --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - bool QBluetoothServiceInfoPrivate::registerService() const - { - return false; -diff --git a/src/connectivity/bluetooth/qbluetoothserviceinfo_p.h b/src/connectivity/bluetooth/qbluetoothserviceinfo_p.h -index 5be7341..8e4254c 100644 ---- a/src/connectivity/bluetooth/qbluetoothserviceinfo_p.h -+++ b/src/connectivity/bluetooth/qbluetoothserviceinfo_p.h -@@ -72,7 +72,7 @@ public: - - bool ensureSdpConnection() const; - --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - bool registerService() const; - #endif - -@@ -89,7 +89,7 @@ public: - mutable TSdpServRecordHandle serviceRecord; - #endif - --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - mutable OrgBluezServiceInterface *service; - mutable quint32 serviceRecord; - mutable bool registered; -diff --git a/src/connectivity/bluetooth/ql2capserver.h b/src/connectivity/bluetooth/ql2capserver.h -index 99c20a5..bed65a3 100644 ---- a/src/connectivity/bluetooth/ql2capserver.h -+++ b/src/connectivity/bluetooth/ql2capserver.h -@@ -97,7 +97,7 @@ private: - Q_PRIVATE_SLOT(d_func(), void _q_disconnected()) - #endif //QTM_SYMBIAN_BLUETOOTH - --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - Q_PRIVATE_SLOT(d_func(), void _q_newConnection()) - #endif - -diff --git a/src/connectivity/bluetooth/ql2capserver_p.cpp b/src/connectivity/bluetooth/ql2capserver_p.cpp -index 3a2199f..f19977e 100644 ---- a/src/connectivity/bluetooth/ql2capserver_p.cpp -+++ b/src/connectivity/bluetooth/ql2capserver_p.cpp -@@ -101,7 +101,7 @@ QBluetooth::SecurityFlags QL2capServer::securityFlags() const - - - --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - void QL2capServerPrivate::_q_newConnection() - { - } -diff --git a/src/connectivity/bluetooth/ql2capserver_p.h b/src/connectivity/bluetooth/ql2capserver_p.h -index b5e76d9..2823106 100644 ---- a/src/connectivity/bluetooth/ql2capserver_p.h -+++ b/src/connectivity/bluetooth/ql2capserver_p.h -@@ -50,7 +50,7 @@ - #include - #endif //QTM_SYMBIAN_BLUETOOTH - --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - QT_FORWARD_DECLARE_CLASS(QSocketNotifier) - #endif - -@@ -82,7 +82,7 @@ public: - void _q_disconnected(); - #endif //QTM_SYMBIAN_BLUETOOTH - --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - void _q_newConnection(); - #endif - -@@ -103,7 +103,7 @@ protected: - QL2capServer *q_ptr; - - private: --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - QSocketNotifier *socketNotifier; - #endif - }; -diff --git a/src/connectivity/bluetooth/qrfcommserver.h b/src/connectivity/bluetooth/qrfcommserver.h -index 3f348dd..7974ba6 100644 ---- a/src/connectivity/bluetooth/qrfcommserver.h -+++ b/src/connectivity/bluetooth/qrfcommserver.h -@@ -97,7 +97,7 @@ private: - Q_PRIVATE_SLOT(d_func(), void _q_disconnected()) - #endif //QTM_SYMBIAN_BLUETOOTH - --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - Q_PRIVATE_SLOT(d_func(), void _q_newConnection()) - #endif - }; -diff --git a/src/connectivity/bluetooth/qrfcommserver_p.cpp b/src/connectivity/bluetooth/qrfcommserver_p.cpp -index f8145d9..eb14d64 100644 ---- a/src/connectivity/bluetooth/qrfcommserver_p.cpp -+++ b/src/connectivity/bluetooth/qrfcommserver_p.cpp -@@ -90,7 +90,7 @@ quint16 QRfcommServer::serverPort() const - } - - --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - void QRfcommServerPrivate::_q_newConnection() - { - } -diff --git a/src/connectivity/bluetooth/qrfcommserver_p.h b/src/connectivity/bluetooth/qrfcommserver_p.h -index da6e28b..af40df7 100644 ---- a/src/connectivity/bluetooth/qrfcommserver_p.h -+++ b/src/connectivity/bluetooth/qrfcommserver_p.h -@@ -51,7 +51,7 @@ - #include - #endif - --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - QT_FORWARD_DECLARE_CLASS(QSocketNotifier) - #endif - -@@ -83,7 +83,7 @@ public: - void _q_disconnected(); - #endif //QTM_SYMBIAN_BLUETOOTH - --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - void _q_newConnection(); - #endif - -@@ -102,7 +102,7 @@ protected: - QRfcommServer *q_ptr; - - private: --#ifndef QT_NO_DBUS -+#ifdef QTM_BLUEZ_BLUETOOTH - QSocketNotifier *socketNotifier; - #endif - }; -diff --git a/tests/tests.pro b/tests/tests.pro -index 2f2c355..4800e5e 100644 ---- a/tests/tests.pro -+++ b/tests/tests.pro -@@ -16,7 +16,9 @@ contains(mobility_modules,systeminfo): SUBDIRS += sysinfo-tester - contains(mobility_modules,connectivity) { - SUBDIRS += nfctestserver - -- linux*:!linux-armcc: SUBDIRS += btclient -+ linux*:!linux-armcc:contains(bluez_enabled, yes):contains(QT_CONFIG, dbus) { -+ SUBDIRS += btclient -+ } - } - - symbian { --- -1.7.1 - diff --git a/meta/recipes-qt/qt4/qt-mobility-1.2.0/fix_metaobjectbuilder_build_err.patch b/meta/recipes-qt/qt4/qt-mobility-1.2.0/fix_metaobjectbuilder_build_err.patch deleted file mode 100644 index cffb06706f..0000000000 --- a/meta/recipes-qt/qt4/qt-mobility-1.2.0/fix_metaobjectbuilder_build_err.patch +++ /dev/null @@ -1,4707 +0,0 @@ -Fix metaobjectbuilder build errors against Qt 4.8 and 4.7 - -Error message: -ipc/qmetaobjectbuilder.cpp:803:65: error: invalid conversion from \ -'QMetaObjectExtraData::StaticMetacallFunction {aka void (*)(QObject*, \ -QMetaObject::Call, int, void**)}' to 'QtMobility::QMetaObjectBuilder:: \ -StaticMetacallFunction {aka int (*)(QMetaObject::Call, int, void**)} - -Upstream-commit: -http://qt.gitorious.org/qt-mobility/qt-mobility/commit/f102053b28009b3094b0e5777177208afa6097c5 - -Task-number: QTMOBILITY-1990 - -Upstream-Status: Backport - -Signed-off-by: Wenzong Fan ------------------------------------------------------- -diff --git a/plugins/declarative/common/dynamicproperties.pri b/plugins/declarative/common/dynamicproperties.pri -index 52737a3..4bd06de 100644 ---- a/plugins/declarative/common/dynamicproperties.pri -+++ b/plugins/declarative/common/dynamicproperties.pri -@@ -1,6 +1,8 @@ - INCLUDEPATH += ../../../plugins/declarative/common/dynamicproperties/ --HEADERS += ../../../plugins/declarative/common/dynamicproperties/qdeclarativeopenmetaobject_p.h \ -- ../../../plugins/declarative/common/dynamicproperties/qmetaobjectbuilder_p.h --SOURCES += ../../../plugins/declarative/common/dynamicproperties/qdeclarativeopenmetaobject.cpp \ -- ../../../src/serviceframework/ipc/qmetaobjectbuilder.cpp -- -+HEADERS += ../../../plugins/declarative/common/dynamicproperties/qdeclarativeopenmetaobject_p.h -+SOURCES += ../../../plugins/declarative/common/dynamicproperties/qdeclarativeopenmetaobject.cpp -+include(../../../src/serviceframework/ipc/metaobjectbuilder.pri) -+INCLUDEPATH += ../../../src/serviceframework/$$OBJECTBUILDER_INCLUDEPATH -+DEPENDPATH += ../../../src/serviceframework/$$OBJECTBUILDER_DEPENDPATH -+HEADERS += ../../../src/serviceframework/$$OBJECTBUILDER_HEADERS -+SOURCES += ../../../src/serviceframework/$$OBJECTBUILDER_SOURCES -diff --git a/plugins/declarative/common/dynamicproperties/qdeclarativeopenmetaobject.cpp b/plugins/declarative/common/dynamicproperties/qdeclarativeopenmetaobject.cpp -index 79a2064..9eb6810 100644 ---- a/plugins/declarative/common/dynamicproperties/qdeclarativeopenmetaobject.cpp -+++ b/plugins/declarative/common/dynamicproperties/qdeclarativeopenmetaobject.cpp -@@ -65,8 +65,7 @@ public: - { - int id = mob.propertyCount(); - mob.addSignal("__" + QByteArray::number(id) + "()"); -- QMetaPropertyBuilder build = mob.addProperty(name, type, id); -- build.setDynamic(true); -+ mob.addProperty(name, type, id); - qFree(mem); - mem = mob.toMetaObject(); - -diff --git a/plugins/declarative/common/dynamicproperties/qmetaobjectbuilder_p.h b/plugins/declarative/common/dynamicproperties/qmetaobjectbuilder_p.h -deleted file mode 100644 -index bd937e4..0000000 ---- a/plugins/declarative/common/dynamicproperties/qmetaobjectbuilder_p.h -+++ /dev/null -@@ -1,48 +0,0 @@ --/**************************************************************************** --** --** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). --** All rights reserved. --** Contact: Nokia Corporation (qt-info@nokia.com) --** --** This file is part of the Qt Mobility Components. --** --** $QT_BEGIN_LICENSE:LGPL$ --** No Commercial Usage --** This file contains pre-release code and may not be distributed. --** You may use this file in accordance with the terms and conditions --** contained in the Technology Preview License Agreement accompanying --** this package. --** --** GNU Lesser General Public License Usage --** Alternatively, this file may be used under the terms of the GNU Lesser --** General Public License version 2.1 as published by the Free Software --** Foundation and appearing in the file LICENSE.LGPL included in the --** packaging of this file. Please review the following information to --** ensure the GNU Lesser General Public License version 2.1 requirements --** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. --** --** In addition, as a special exception, Nokia gives you certain additional --** rights. These rights are described in the Nokia Qt LGPL Exception --** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. --** --** If you have questions regarding the use of this file, please contact --** Nokia at qt-info@nokia.com. --** --** --** --** --** --** --** --** --** $QT_END_LICENSE$ --** --****************************************************************************/ -- --/* --This header gets used in a number of different QML plugins --and also in the source tree of Mobility itself. -- --So this header is just a wrapper to grab it from there. --*/ --#include "../../../../src/serviceframework/ipc/qmetaobjectbuilder_p.h" -diff --git a/src/serviceframework/ipc/ipc.pri b/src/serviceframework/ipc/ipc.pri -index 28b910f..d809f59 100644 ---- a/src/serviceframework/ipc/ipc.pri -+++ b/src/serviceframework/ipc/ipc.pri -@@ -25,9 +25,14 @@ else { - } - } - -+include(metaobjectbuilder.pri) -+INCLUDEPATH += $$OBJECTBUILDER_INCLUDEPATH -+DEPENDPATH += $$OBJECTBUILDER_DEPENDPATH -+PRIVATE_HEADERS += $$OBJECTBUILDER_HEADERS -+SOURCES += $$OBJECTBUILDER_SOURCES -+ - PRIVATE_HEADERS += ipc/qslotinvoker_p.h \ - ipc/qsignalintercepter_p.h \ -- ipc/qmetaobjectbuilder_p.h \ - ipc/instancemanager_p.h \ - ipc/qservicepackage_p.h \ - ipc/proxyobject_p.h \ -@@ -37,7 +42,6 @@ PRIVATE_HEADERS += ipc/qslotinvoker_p.h \ - - SOURCES += ipc/qslotinvoker.cpp \ - ipc/qsignalintercepter.cpp \ -- ipc/qmetaobjectbuilder.cpp \ - ipc/instancemanager.cpp \ - ipc/qservicepackage.cpp \ - ipc/proxyobject.cpp \ -diff --git a/src/serviceframework/ipc/metaobjectbuilder.pri b/src/serviceframework/ipc/metaobjectbuilder.pri -new file mode 100644 -index 0000000..cc905f9 ---- /dev/null -+++ b/src/serviceframework/ipc/metaobjectbuilder.pri -@@ -0,0 +1,12 @@ -+#check version for 4.7 ... -+contains(QT_MAJOR_VERSION, 4):lessThan(QT_MINOR_VERSION, 8) { -+ OBJECTBUILDER_INCLUDEPATH += ipc -+ OBJECTBUILDER_DEPENDPATH += ipc -+ OBJECTBUILDER_HEADERS += ipc/qmetaobjectbuilder_47_p.h -+ OBJECTBUILDER_SOURCES += ipc/qmetaobjectbuilder_47.cpp -+} else { -+ OBJECTBUILDER_INCLUDEPATH += ipc -+ OBJECTBUILDER_DEPENDPATH += ipc -+ OBJECTBUILDER_HEADERS += ipc/qmetaobjectbuilder_p.h -+ OBJECTBUILDER_SOURCES += ipc/qmetaobjectbuilder.cpp -+} -diff --git a/src/serviceframework/ipc/qmetaobjectbuilder.cpp b/src/serviceframework/ipc/qmetaobjectbuilder.cpp -index b19eb1a..6ffaa20 100644 ---- a/src/serviceframework/ipc/qmetaobjectbuilder.cpp -+++ b/src/serviceframework/ipc/qmetaobjectbuilder.cpp -@@ -117,6 +117,8 @@ enum PropertyFlags { - EnumOrFlag = 0x00000008, - StdCppSet = 0x00000100, - // Override = 0x00000200, -+ Constant = 0x00000400, -+ Final = 0x00000800, - Designable = 0x00001000, - ResolveDesignable = 0x00002000, - Scriptable = 0x00004000, -@@ -128,7 +130,7 @@ enum PropertyFlags { - User = 0x00100000, - ResolveUser = 0x00200000, - Notify = 0x00400000, -- Dynamic = 0x00800000 -+ Revisioned = 0x00800000 - }; - - enum MethodFlags { -@@ -145,7 +147,8 @@ enum MethodFlags { - - MethodCompatibility = 0x10, - MethodCloned = 0x20, -- MethodScriptable = 0x40 -+ MethodScriptable = 0x40, -+ MethodRevisioned = 0x80 - }; - - struct QMetaObjectPrivate -@@ -623,6 +626,8 @@ QMetaPropertyBuilder QMetaObjectBuilder::addProperty(const QMetaProperty& protot - property.setUser(prototype.isUser()); - property.setStdCppSet(prototype.hasStdCppSet()); - property.setEnumOrFlag(prototype.isEnumType()); -+ property.setConstant(prototype.isConstant()); -+ property.setFinal(prototype.isFinal()); - if (prototype.hasNotifySignal()) { - // Find an existing method for the notify signal, or add a new one. - QMetaMethod method = prototype.notifySignal(); -@@ -796,7 +801,7 @@ void QMetaObjectBuilder::addMetaObject - } - - if ((members & StaticMetacall) != 0) { -- if (priv(prototype->d.data)->revision >= 2) { -+ if (priv(prototype->d.data)->revision >= 6) { - const QMetaObjectExtraData *extra = - (const QMetaObjectExtraData *)(prototype->d.extradata); - if (extra && extra->static_metacall) -@@ -1266,8 +1271,8 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf, - char *str = reinterpret_cast(buf + size); - if (buf) { - if (relocatable) { -- meta->d.stringdata = reinterpret_cast((intptr_t)size); -- meta->d.data = reinterpret_cast((intptr_t)pmetaSize); -+ meta->d.stringdata = reinterpret_cast((quintptr)size); -+ meta->d.data = reinterpret_cast((quintptr)pmetaSize); - } else { - meta->d.stringdata = str; - meta->d.data = reinterpret_cast(data); -@@ -1504,8 +1509,8 @@ void QMetaObjectBuilder::fromRelocatableData(QMetaObject *output, - const char *buf = data.constData(); - const QMetaObject *dataMo = reinterpret_cast(buf); - -- intptr_t stringdataOffset = (intptr_t)dataMo->d.stringdata; -- intptr_t dataOffset = (intptr_t)dataMo->d.data; -+ quintptr stringdataOffset = (quintptr)dataMo->d.stringdata; -+ quintptr dataOffset = (quintptr)dataMo->d.data; - - output->d.superdata = superclass; - output->d.stringdata = buf + stringdataOffset; -@@ -2289,16 +2294,27 @@ bool QMetaPropertyBuilder::isEnumOrFlag() const - } - - /*! -- Returns true if the property has the dynamic flag set; -- otherwise returns false. The default value is false. -+ Returns true if the property is constant; otherwise returns false. -+ The default value is false. -+*/ -+bool QMetaPropertyBuilder::isConstant() const -+{ -+ QMetaPropertyBuilderPrivate *d = d_func(); -+ if (d) -+ return d->flag(Constant); -+ else -+ return false; -+} - -- \sa setDynamic() -+/*! -+ Returns true if the property is final; otherwise returns false. -+ The default value is false. - */ --bool QMetaPropertyBuilder::isDynamic() const -+bool QMetaPropertyBuilder::isFinal() const - { - QMetaPropertyBuilderPrivate *d = d_func(); - if (d) -- return d->flag(Dynamic); -+ return d->flag(Final); - else - return false; - } -@@ -2427,16 +2443,27 @@ void QMetaPropertyBuilder::setEnumOrFlag(bool value) - } - - /*! -- Sets this property to have the dynamic flag if \a value is -- true. -+ Sets the \c CONSTANT flag on this property to \a value. -+ -+ \sa isConstant() -+*/ -+void QMetaPropertyBuilder::setConstant(bool value) -+{ -+ QMetaPropertyBuilderPrivate *d = d_func(); -+ if (d) -+ d->setFlag(Constant, value); -+} -+ -+/*! -+ Sets the \c FINAL flag on this property to \a value. - -- \sa isDynamic() -+ \sa isFinal() - */ --void QMetaPropertyBuilder::setDynamic(bool value) -+void QMetaPropertyBuilder::setFinal(bool value) - { - QMetaPropertyBuilderPrivate *d = d_func(); - if (d) -- d->setFlag(Dynamic, value); -+ d->setFlag(Final, value); - } - - /*! -diff --git a/src/serviceframework/ipc/qmetaobjectbuilder_47.cpp b/src/serviceframework/ipc/qmetaobjectbuilder_47.cpp -new file mode 100644 -index 0000000..509d6c6 ---- /dev/null -+++ b/src/serviceframework/ipc/qmetaobjectbuilder_47.cpp -@@ -0,0 +1,2583 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -+** All rights reserved. -+** Contact: Nokia Corporation (qt-info@nokia.com) -+** -+** This file is part of the QtDeclarative module of the Qt Toolkit. -+** -+** $QT_BEGIN_LICENSE:LGPL$ -+** No Commercial Usage -+** This file contains pre-release code and may not be distributed. -+** You may use this file in accordance with the terms and conditions -+** contained in the Technology Preview License Agreement accompanying -+** this package. -+** -+** GNU Lesser General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU Lesser -+** General Public License version 2.1 as published by the Free Software -+** Foundation and appearing in the file LICENSE.LGPL included in the -+** packaging of this file. Please review the following information to -+** ensure the GNU Lesser General Public License version 2.1 requirements -+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -+** -+** In addition, as a special exception, Nokia gives you certain additional -+** rights. These rights are described in the Nokia Qt LGPL Exception -+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -+** -+** If you have questions regarding the use of this file, please contact -+** Nokia at qt-info@nokia.com. -+** -+** -+** -+** -+** -+** -+** -+** -+** $QT_END_LICENSE$ -+** -+****************************************************************************/ -+ -+#include "qmetaobjectbuilder_47_p.h" -+#include -+ -+#ifndef Q_OS_WIN -+#include -+#endif -+ -+QTM_BEGIN_NAMESPACE -+ -+/*! -+ \class QMetaObjectBuilder -+ \internal -+ \brief The QMetaObjectBuilder class supports building QMetaObject objects at runtime. -+ \since 1.1 -+ -+*/ -+ -+/*! -+ \enum QMetaObjectBuilder::AddMember -+ This enum defines which members of QMetaObject should be copied by QMetaObjectBuilder::addMetaObject() -+ -+ \value ClassName Add the class name. -+ \value SuperClass Add the super class. -+ \value Methods Add methods that aren't signals or slots. -+ \value Signals Add signals. -+ \value Slots Add slots. -+ \value Constructors Add constructors. -+ \value Properties Add properties. -+ \value Enumerators Add enumerators. -+ \value ClassInfos Add items of class information. -+ \value RelatedMetaObjects Add related meta objects. -+ \value StaticMetacall Add the static metacall function. -+ \value PublicMethods Add public methods (ignored for signals). -+ \value ProtectedMethods Add protected methods (ignored for signals). -+ \value PrivateMethods All private methods (ignored for signals). -+ \value AllMembers Add all members. -+ \value AllPrimaryMembers Add everything except the class name, super class, and static metacall function. -+*/ -+ -+// copied from moc's generator.cpp -+uint qvariant_nameToType(const char* name) -+{ -+ if (!name) -+ return 0; -+ -+ if (strcmp(name, "QVariant") == 0) -+ return 0xffffffff; -+ if (strcmp(name, "QCString") == 0) -+ return QMetaType::QByteArray; -+ if (strcmp(name, "Q_LLONG") == 0) -+ return QMetaType::LongLong; -+ if (strcmp(name, "Q_ULLONG") == 0) -+ return QMetaType::ULongLong; -+ if (strcmp(name, "QIconSet") == 0) -+ return QMetaType::QIcon; -+ -+ uint tp = QMetaType::type(name); -+ return tp < QMetaType::User ? tp : 0; -+} -+ -+/* -+ Returns true if the type is a QVariant types. -+*/ -+bool isVariantType(const char* type) -+{ -+ return qvariant_nameToType(type) != 0; -+} -+ -+// copied from qmetaobject.cpp -+// do not touch without touching the moc as well -+enum PropertyFlags { -+ Invalid = 0x00000000, -+ Readable = 0x00000001, -+ Writable = 0x00000002, -+ Resettable = 0x00000004, -+ EnumOrFlag = 0x00000008, -+ StdCppSet = 0x00000100, -+// Override = 0x00000200, -+ Designable = 0x00001000, -+ ResolveDesignable = 0x00002000, -+ Scriptable = 0x00004000, -+ ResolveScriptable = 0x00008000, -+ Stored = 0x00010000, -+ ResolveStored = 0x00020000, -+ Editable = 0x00040000, -+ ResolveEditable = 0x00080000, -+ User = 0x00100000, -+ ResolveUser = 0x00200000, -+ Notify = 0x00400000, -+ Dynamic = 0x00800000 -+}; -+ -+enum MethodFlags { -+ AccessPrivate = 0x00, -+ AccessProtected = 0x01, -+ AccessPublic = 0x02, -+ AccessMask = 0x03, //mask -+ -+ MethodMethod = 0x00, -+ MethodSignal = 0x04, -+ MethodSlot = 0x08, -+ MethodConstructor = 0x0c, -+ MethodTypeMask = 0x0c, -+ -+ MethodCompatibility = 0x10, -+ MethodCloned = 0x20, -+ MethodScriptable = 0x40 -+}; -+ -+struct QMetaObjectPrivate -+{ -+ int revision; -+ int className; -+ int classInfoCount, classInfoData; -+ int methodCount, methodData; -+ int propertyCount, propertyData; -+ int enumeratorCount, enumeratorData; -+ int constructorCount, constructorData; -+ int flags; -+}; -+ -+static inline const QMetaObjectPrivate *priv(const uint* data) -+{ return reinterpret_cast(data); } -+// end of copied lines from qmetaobject.cpp -+ -+class QMetaMethodBuilderPrivate -+{ -+public: -+ QMetaMethodBuilderPrivate -+ (QMetaMethod::MethodType _methodType, -+ const QByteArray& _signature, -+ const QByteArray& _returnType = QByteArray(), -+ QMetaMethod::Access _access = QMetaMethod::Public) -+ : signature(QMetaObject::normalizedSignature(_signature.constData())), -+ returnType(QMetaObject::normalizedType(_returnType)), -+ attributes(((int)_access) | (((int)_methodType) << 2)) -+ { -+ } -+ -+ QByteArray signature; -+ QByteArray returnType; -+ QList parameterNames; -+ QByteArray tag; -+ int attributes; -+ -+ QMetaMethod::MethodType methodType() const -+ { -+ return (QMetaMethod::MethodType)((attributes & MethodTypeMask) >> 2); -+ } -+ -+ QMetaMethod::Access access() const -+ { -+ return (QMetaMethod::Access)(attributes & AccessMask); -+ } -+ -+ void setAccess(QMetaMethod::Access value) -+ { -+ attributes = ((attributes & ~AccessMask) | (int)value); -+ } -+}; -+ -+class QMetaPropertyBuilderPrivate -+{ -+public: -+ QMetaPropertyBuilderPrivate -+ (const QByteArray& _name, const QByteArray& _type, int notifierIdx=-1) -+ : name(_name), -+ type(QMetaObject::normalizedType(_type.constData())), -+ flags(Readable | Writable | Scriptable), notifySignal(-1) -+ { -+ if (notifierIdx >= 0) { -+ flags |= Notify; -+ notifySignal = notifierIdx; -+ } -+ } -+ -+ QByteArray name; -+ QByteArray type; -+ int flags; -+ int notifySignal; -+ -+ bool flag(int f) const -+ { -+ return ((flags & f) != 0); -+ } -+ -+ void setFlag(int f, bool value) -+ { -+ if (value) -+ flags |= f; -+ else -+ flags &= ~f; -+ } -+}; -+ -+class QMetaEnumBuilderPrivate -+{ -+public: -+ QMetaEnumBuilderPrivate(const QByteArray& _name) -+ : name(_name), isFlag(false) -+ { -+ } -+ -+ QByteArray name; -+ bool isFlag; -+ QList keys; -+ QList values; -+}; -+ -+class QMetaObjectBuilderPrivate -+{ -+public: -+ QMetaObjectBuilderPrivate() -+ : flags(0) -+ { -+ superClass = &QObject::staticMetaObject; -+ staticMetacallFunction = 0; -+ } -+ -+ QByteArray className; -+ const QMetaObject *superClass; -+ QMetaObjectBuilder::StaticMetacallFunction staticMetacallFunction; -+ QList methods; -+ QList constructors; -+ QList properties; -+ QList classInfoNames; -+ QList classInfoValues; -+ QList enumerators; -+#ifdef Q_NO_DATA_RELOCATION -+ QList relatedMetaObjects; -+#else -+ QList relatedMetaObjects; -+#endif -+ int flags; -+}; -+ -+/*! -+ Constructs a new QMetaObjectBuilder. -+*/ -+QMetaObjectBuilder::QMetaObjectBuilder() -+{ -+ d = new QMetaObjectBuilderPrivate(); -+} -+ -+/*! -+ Constructs a new QMetaObjectBuilder which is a copy of the -+ meta object information in \a prototype. Note: the super class -+ contents for \a prototype are not copied, only the immediate -+ class that is defined by \a prototype. -+ -+ The \a members parameter indicates which members of \a prototype -+ should be added. The default is AllMembers. -+ -+ \sa addMetaObject() -+*/ -+QMetaObjectBuilder::QMetaObjectBuilder -+ (const QMetaObject *prototype, QMetaObjectBuilder::AddMembers members) -+{ -+ d = new QMetaObjectBuilderPrivate(); -+ addMetaObject(prototype, members); -+} -+ -+/*! -+ Destroys this meta object builder. -+*/ -+QMetaObjectBuilder::~QMetaObjectBuilder() -+{ -+ delete d; -+} -+ -+/*! -+ Returns the name of the class being constructed by this -+ meta object builder. The default value is an empty QByteArray. -+ -+ \sa setClassName(), superClass() -+*/ -+QByteArray QMetaObjectBuilder::className() const -+{ -+ return d->className; -+} -+ -+/*! -+ Sets the \a name of the class being constructed by this -+ meta object builder. -+ -+ \sa className(), setSuperClass() -+*/ -+void QMetaObjectBuilder::setClassName(const QByteArray& name) -+{ -+ d->className = name; -+} -+ -+/*! -+ Returns the superclass meta object of the class being constructed -+ by this meta object builder. The default value is the meta object -+ for QObject. -+ -+ \sa setSuperClass(), className() -+*/ -+const QMetaObject *QMetaObjectBuilder::superClass() const -+{ -+ return d->superClass; -+} -+ -+/*! -+ Sets the superclass meta object of the class being constructed -+ by this meta object builder to \a meta. The \a meta parameter -+ must not be null. -+ -+ \sa superClass(), setClassName() -+*/ -+void QMetaObjectBuilder::setSuperClass(const QMetaObject *meta) -+{ -+ Q_ASSERT(meta); -+ d->superClass = meta; -+} -+ -+/*! -+ Returns the flags of the class being constructed by this meta object -+ builder. -+ -+ \sa setFlags() -+*/ -+QMetaObjectBuilder::MetaObjectFlags QMetaObjectBuilder::flags() const -+{ -+ return (QMetaObjectBuilder::MetaObjectFlags)d->flags; -+} -+ -+/*! -+ Sets the \a flags of the class being constructed by this meta object -+ builder. -+ -+ \sa flags() -+*/ -+void QMetaObjectBuilder::setFlags(MetaObjectFlags flags) -+{ -+ d->flags = flags; -+} -+ -+/*! -+ Returns the number of methods in this class, excluding the number -+ of methods in the base class. These include signals and slots -+ as well as normal member functions. -+ -+ \sa addMethod(), method(), removeMethod(), indexOfMethod() -+*/ -+int QMetaObjectBuilder::methodCount() const -+{ -+ return d->methods.size(); -+} -+ -+/*! -+ Returns the number of constructors in this class. -+ -+ \sa addConstructor(), constructor(), removeConstructor(), indexOfConstructor() -+*/ -+int QMetaObjectBuilder::constructorCount() const -+{ -+ return d->constructors.size(); -+} -+ -+/*! -+ Returns the number of properties in this class, excluding the number -+ of properties in the base class. -+ -+ \sa addProperty(), property(), removeProperty(), indexOfProperty() -+*/ -+int QMetaObjectBuilder::propertyCount() const -+{ -+ return d->properties.size(); -+} -+ -+/*! -+ Returns the number of enumerators in this class, excluding the -+ number of enumerators in the base class. -+ -+ \sa addEnumerator(), enumerator(), removeEnumerator() -+ \sa indexOfEnumerator() -+*/ -+int QMetaObjectBuilder::enumeratorCount() const -+{ -+ return d->enumerators.size(); -+} -+ -+/*! -+ Returns the number of items of class information in this class, -+ exclusing the number of items of class information in the base class. -+ -+ \sa addClassInfo(), classInfoName(), classInfoValue(), removeClassInfo() -+ \sa indexOfClassInfo() -+*/ -+int QMetaObjectBuilder::classInfoCount() const -+{ -+ return d->classInfoNames.size(); -+} -+ -+/*! -+ Returns the number of related meta objects that are associated -+ with this class. -+ -+ Related meta objects are used when resolving the enumerated type -+ associated with a property, where the enumerated type is in a -+ different class from the property. -+ -+ \sa addRelatedMetaObject(), relatedMetaObject() -+ \sa removeRelatedMetaObject() -+*/ -+int QMetaObjectBuilder::relatedMetaObjectCount() const -+{ -+ return d->relatedMetaObjects.size(); -+} -+ -+/*! -+ Adds a new public method to this class with the specified \a signature. -+ Returns an object that can be used to adjust the other attributes -+ of the method. The \a signature will be normalized before it is -+ added to the class. -+ -+ \sa method(), methodCount(), removeMethod(), indexOfMethod() -+*/ -+QMetaMethodBuilder QMetaObjectBuilder::addMethod(const QByteArray& signature) -+{ -+ int index = d->methods.size(); -+ d->methods.append(QMetaMethodBuilderPrivate(QMetaMethod::Method, signature)); -+ return QMetaMethodBuilder(this, index); -+} -+ -+/*! -+ Adds a new public method to this class with the specified -+ \a signature and \a returnType. Returns an object that can be -+ used to adjust the other attributes of the method. The \a signature -+ and \a returnType will be normalized before they are added to -+ the class. If \a returnType is empty, then it indicates that -+ the method has \c{void} as its return type. -+ -+ \sa method(), methodCount(), removeMethod(), indexOfMethod() -+*/ -+QMetaMethodBuilder QMetaObjectBuilder::addMethod -+ (const QByteArray& signature, const QByteArray& returnType) -+{ -+ int index = d->methods.size(); -+ d->methods.append(QMetaMethodBuilderPrivate -+ (QMetaMethod::Method, signature, returnType)); -+ return QMetaMethodBuilder(this, index); -+} -+ -+/*! -+ Adds a new public method to this class that has the same information as -+ \a prototype. This is used to clone the methods of an existing -+ QMetaObject. Returns an object that can be used to adjust the -+ attributes of the method. -+ -+ This function will detect if \a prototype is an ordinary method, -+ signal, slot, or constructor and act accordingly. -+ -+ \sa method(), methodCount(), removeMethod(), indexOfMethod() -+*/ -+QMetaMethodBuilder QMetaObjectBuilder::addMethod(const QMetaMethod& prototype) -+{ -+ QMetaMethodBuilder method; -+ if (prototype.methodType() == QMetaMethod::Method) -+ method = addMethod(prototype.signature()); -+ else if (prototype.methodType() == QMetaMethod::Signal) -+ method = addSignal(prototype.signature()); -+ else if (prototype.methodType() == QMetaMethod::Slot) -+ method = addSlot(prototype.signature()); -+ else if (prototype.methodType() == QMetaMethod::Constructor) -+ method = addConstructor(prototype.signature()); -+ method.setReturnType(prototype.typeName()); -+ method.setParameterNames(prototype.parameterNames()); -+ method.setTag(prototype.tag()); -+ method.setAccess(prototype.access()); -+ method.setAttributes(prototype.attributes()); -+ return method; -+} -+ -+/*! -+ Adds a new public slot to this class with the specified \a signature. -+ Returns an object that can be used to adjust the other attributes -+ of the slot. The \a signature will be normalized before it is -+ added to the class. -+ -+ \sa addMethod(), addSignal(), indexOfSlot() -+*/ -+QMetaMethodBuilder QMetaObjectBuilder::addSlot(const QByteArray& signature) -+{ -+ int index = d->methods.size(); -+ d->methods.append(QMetaMethodBuilderPrivate(QMetaMethod::Slot, signature)); -+ return QMetaMethodBuilder(this, index); -+} -+ -+/*! -+ Adds a new signal to this class with the specified \a signature. -+ Returns an object that can be used to adjust the other attributes -+ of the signal. The \a signature will be normalized before it is -+ added to the class. -+ -+ \sa addMethod(), addSlot(), indexOfSignal() -+*/ -+QMetaMethodBuilder QMetaObjectBuilder::addSignal(const QByteArray& signature) -+{ -+ int index = d->methods.size(); -+ d->methods.append(QMetaMethodBuilderPrivate -+ (QMetaMethod::Signal, signature, QByteArray(), QMetaMethod::Protected)); -+ return QMetaMethodBuilder(this, index); -+} -+ -+/*! -+ Adds a new constructor to this class with the specified \a signature. -+ Returns an object that can be used to adjust the other attributes -+ of the constructor. The \a signature will be normalized before it is -+ added to the class. -+ -+ \sa constructor(), constructorCount(), removeConstructor() -+ \sa indexOfConstructor() -+*/ -+QMetaMethodBuilder QMetaObjectBuilder::addConstructor(const QByteArray& signature) -+{ -+ int index = d->constructors.size(); -+ d->constructors.append(QMetaMethodBuilderPrivate(QMetaMethod::Constructor, signature)); -+ return QMetaMethodBuilder(this, -(index + 1)); -+} -+ -+/*! -+ Adds a new constructor to this class that has the same information as -+ \a prototype. This is used to clone the constructors of an existing -+ QMetaObject. Returns an object that can be used to adjust the -+ attributes of the constructor. -+ -+ This function requires that \a prototype be a constructor. -+ -+ \sa constructor(), constructorCount(), removeConstructor() -+ \sa indexOfConstructor() -+*/ -+QMetaMethodBuilder QMetaObjectBuilder::addConstructor(const QMetaMethod& prototype) -+{ -+ Q_ASSERT(prototype.methodType() == QMetaMethod::Constructor); -+ QMetaMethodBuilder ctor = addConstructor(prototype.signature()); -+ ctor.setReturnType(prototype.typeName()); -+ ctor.setParameterNames(prototype.parameterNames()); -+ ctor.setTag(prototype.tag()); -+ ctor.setAccess(prototype.access()); -+ ctor.setAttributes(prototype.attributes()); -+ return ctor; -+} -+ -+/*! -+ Adds a new readable/writable property to this class with the -+ specified \a name and \a type. Returns an object that can be used -+ to adjust the other attributes of the property. The \a type will -+ be normalized before it is added to the class. \a notifierId will -+ be registered as the property's \e notify signal. -+ -+ \sa property(), propertyCount(), removeProperty(), indexOfProperty() -+*/ -+QMetaPropertyBuilder QMetaObjectBuilder::addProperty -+ (const QByteArray& name, const QByteArray& type, int notifierId) -+{ -+ int index = d->properties.size(); -+ d->properties.append(QMetaPropertyBuilderPrivate(name, type, notifierId)); -+ return QMetaPropertyBuilder(this, index); -+} -+ -+/*! -+ Adds a new property to this class that has the same information as -+ \a prototype. This is used to clone the properties of an existing -+ QMetaObject. Returns an object that can be used to adjust the -+ attributes of the property. -+ -+ \sa property(), propertyCount(), removeProperty(), indexOfProperty() -+*/ -+QMetaPropertyBuilder QMetaObjectBuilder::addProperty(const QMetaProperty& prototype) -+{ -+ QMetaPropertyBuilder property = addProperty(prototype.name(), prototype.typeName()); -+ property.setReadable(prototype.isReadable()); -+ property.setWritable(prototype.isWritable()); -+ property.setResettable(prototype.isResettable()); -+ property.setDesignable(prototype.isDesignable()); -+ property.setScriptable(prototype.isScriptable()); -+ property.setStored(prototype.isStored()); -+ property.setEditable(prototype.isEditable()); -+ property.setUser(prototype.isUser()); -+ property.setStdCppSet(prototype.hasStdCppSet()); -+ property.setEnumOrFlag(prototype.isEnumType()); -+ if (prototype.hasNotifySignal()) { -+ // Find an existing method for the notify signal, or add a new one. -+ QMetaMethod method = prototype.notifySignal(); -+ int index = indexOfMethod(method.signature()); -+ if (index == -1) -+ index = addMethod(method).index(); -+ d->properties[property._index].notifySignal = index; -+ d->properties[property._index].setFlag(Notify, true); -+ } -+ return property; -+} -+ -+/*! -+ Adds a new enumerator to this class with the specified -+ \a name. Returns an object that can be used to adjust -+ the other attributes of the enumerator. -+ -+ \sa enumerator(), enumeratorCount(), removeEnumerator(), -+ \sa indexOfEnumerator() -+*/ -+QMetaEnumBuilder QMetaObjectBuilder::addEnumerator(const QByteArray& name) -+{ -+ int index = d->enumerators.size(); -+ d->enumerators.append(QMetaEnumBuilderPrivate(name)); -+ return QMetaEnumBuilder(this, index); -+} -+ -+/*! -+ Adds a new enumerator to this class that has the same information as -+ \a prototype. This is used to clone the enumerators of an existing -+ QMetaObject. Returns an object that can be used to adjust the -+ attributes of the enumerator. -+ -+ \sa enumerator(), enumeratorCount(), removeEnumerator(), -+ \sa indexOfEnumerator() -+*/ -+QMetaEnumBuilder QMetaObjectBuilder::addEnumerator(const QMetaEnum& prototype) -+{ -+ QMetaEnumBuilder en = addEnumerator(prototype.name()); -+ en.setIsFlag(prototype.isFlag()); -+ int count = prototype.keyCount(); -+ for (int index = 0; index < count; ++index) -+ en.addKey(prototype.key(index), prototype.value(index)); -+ return en; -+} -+ -+/*! -+ Adds \a name and \a value as an item of class information to this class. -+ Returns the index of the new item of class information. -+ -+ \sa classInfoCount(), classInfoName(), classInfoValue(), removeClassInfo() -+ \sa indexOfClassInfo() -+*/ -+int QMetaObjectBuilder::addClassInfo(const QByteArray& name, const QByteArray& value) -+{ -+ int index = d->classInfoNames.size(); -+ d->classInfoNames += name; -+ d->classInfoValues += value; -+ return index; -+} -+ -+/*! -+ Adds \a meta to this class as a related meta object. Returns -+ the index of the new related meta object entry. -+ -+ Related meta objects are used when resolving the enumerated type -+ associated with a property, where the enumerated type is in a -+ different class from the property. -+ -+ \sa relatedMetaObjectCount(), relatedMetaObject() -+ \sa removeRelatedMetaObject() -+*/ -+#ifdef Q_NO_DATA_RELOCATION -+int QMetaObjectBuilder::addRelatedMetaObject(const QMetaObjectAccessor &meta) -+#else -+int QMetaObjectBuilder::addRelatedMetaObject(const QMetaObject *meta) -+#endif -+{ -+ Q_ASSERT(meta); -+ int index = d->relatedMetaObjects.size(); -+ d->relatedMetaObjects.append(meta); -+ return index; -+} -+ -+/*! -+ Adds the contents of \a prototype to this meta object builder. -+ This function is useful for cloning the contents of an existing QMetaObject. -+ -+ The \a members parameter indicates which members of \a prototype -+ should be added. The default is AllMembers. -+*/ -+void QMetaObjectBuilder::addMetaObject -+ (const QMetaObject *prototype, QMetaObjectBuilder::AddMembers members) -+{ -+ Q_ASSERT(prototype); -+ int index; -+ -+ if ((members & ClassName) != 0) -+ d->className = prototype->className(); -+ -+ if ((members & SuperClass) != 0) -+ d->superClass = prototype->superClass(); -+ -+ if ((members & (Methods | Signals | Slots)) != 0) { -+ for (index = prototype->methodOffset(); index < prototype->methodCount(); ++index) { -+ QMetaMethod method = prototype->method(index); -+ if (method.methodType() != QMetaMethod::Signal) { -+ if (method.access() == QMetaMethod::Public && (members & PublicMethods) == 0) -+ continue; -+ if (method.access() == QMetaMethod::Private && (members & PrivateMethods) == 0) -+ continue; -+ if (method.access() == QMetaMethod::Protected && (members & ProtectedMethods) == 0) -+ continue; -+ } -+ if (method.methodType() == QMetaMethod::Method && (members & Methods) != 0) { -+ addMethod(method); -+ } else if (method.methodType() == QMetaMethod::Signal && -+ (members & Signals) != 0) { -+ addMethod(method); -+ } else if (method.methodType() == QMetaMethod::Slot && -+ (members & Slots) != 0) { -+ addMethod(method); -+ } -+ } -+ } -+ -+ if ((members & Constructors) != 0) { -+ for (index = 0; index < prototype->constructorCount(); ++index) -+ addConstructor(prototype->constructor(index)); -+ } -+ -+ if ((members & Properties) != 0) { -+ for (index = prototype->propertyOffset(); index < prototype->propertyCount(); ++index) -+ addProperty(prototype->property(index)); -+ } -+ -+ if ((members & Enumerators) != 0) { -+ for (index = prototype->enumeratorOffset(); index < prototype->enumeratorCount(); ++index) -+ addEnumerator(prototype->enumerator(index)); -+ } -+ -+ if ((members & ClassInfos) != 0) { -+ for (index = prototype->classInfoOffset(); index < prototype->classInfoCount(); ++index) { -+ QMetaClassInfo ci = prototype->classInfo(index); -+ addClassInfo(ci.name(), ci.value()); -+ } -+ } -+ -+ if ((members & RelatedMetaObjects) != 0) { -+#ifdef Q_NO_DATA_RELOCATION -+ const QMetaObjectAccessor *objects = 0; -+#else -+ const QMetaObject **objects; -+ if (priv(prototype->d.data)->revision < 2) { -+ objects = (const QMetaObject **)(prototype->d.extradata); -+ } else -+#endif -+ { -+ const QMetaObjectExtraData *extra = (const QMetaObjectExtraData *)(prototype->d.extradata); -+ if (extra) -+ objects = extra->objects; -+ else -+ objects = 0; -+ } -+ if (objects) { -+ while (*objects != 0) { -+ addRelatedMetaObject(*objects); -+ ++objects; -+ } -+ } -+ } -+ -+ if ((members & StaticMetacall) != 0) { -+ if (priv(prototype->d.data)->revision >= 2) { -+ const QMetaObjectExtraData *extra = -+ (const QMetaObjectExtraData *)(prototype->d.extradata); -+ if (extra && extra->static_metacall) -+ setStaticMetacallFunction(extra->static_metacall); -+ } -+ } -+} -+ -+/*! -+ Returns the method at \a index in this class. -+ -+ \sa methodCount(), addMethod(), removeMethod(), indexOfMethod() -+*/ -+QMetaMethodBuilder QMetaObjectBuilder::method(int index) const -+{ -+ if (index >= 0 && index < d->methods.size()) -+ return QMetaMethodBuilder(this, index); -+ else -+ return QMetaMethodBuilder(); -+} -+ -+/*! -+ Returns the constructor at \a index in this class. -+ -+ \sa methodCount(), addMethod(), removeMethod(), indexOfConstructor() -+*/ -+QMetaMethodBuilder QMetaObjectBuilder::constructor(int index) const -+{ -+ if (index >= 0 && index < d->constructors.size()) -+ return QMetaMethodBuilder(this, -(index + 1)); -+ else -+ return QMetaMethodBuilder(); -+} -+ -+/*! -+ Returns the property at \a index in this class. -+ -+ \sa methodCount(), addMethod(), removeMethod(), indexOfProperty() -+*/ -+QMetaPropertyBuilder QMetaObjectBuilder::property(int index) const -+{ -+ if (index >= 0 && index < d->properties.size()) -+ return QMetaPropertyBuilder(this, index); -+ else -+ return QMetaPropertyBuilder(); -+} -+ -+/*! -+ Returns the enumerator at \a index in this class. -+ -+ \sa enumeratorCount(), addEnumerator(), removeEnumerator() -+ \sa indexOfEnumerator() -+*/ -+QMetaEnumBuilder QMetaObjectBuilder::enumerator(int index) const -+{ -+ if (index >= 0 && index < d->enumerators.size()) -+ return QMetaEnumBuilder(this, index); -+ else -+ return QMetaEnumBuilder(); -+} -+ -+/*! -+ Returns the related meta object at \a index in this class. -+ -+ Related meta objects are used when resolving the enumerated type -+ associated with a property, where the enumerated type is in a -+ different class from the property. -+ -+ \sa relatedMetaObjectCount(), addRelatedMetaObject() -+ \sa removeRelatedMetaObject() -+*/ -+const QMetaObject *QMetaObjectBuilder::relatedMetaObject(int index) const -+{ -+ if (index >= 0 && index < d->relatedMetaObjects.size()) -+#ifdef Q_NO_DATA_RELOCATION -+ return &((*(d->relatedMetaObjects[index]))()); -+#else -+ return d->relatedMetaObjects[index]; -+#endif -+ else -+ return 0; -+} -+ -+/*! -+ Returns the name of the item of class information at \a index -+ in this class. -+ -+ \sa classInfoCount(), addClassInfo(), classInfoValue(), removeClassInfo() -+ \sa indexOfClassInfo() -+*/ -+QByteArray QMetaObjectBuilder::classInfoName(int index) const -+{ -+ if (index >= 0 && index < d->classInfoNames.size()) -+ return d->classInfoNames[index]; -+ else -+ return QByteArray(); -+} -+ -+/*! -+ Returns the value of the item of class information at \a index -+ in this class. -+ -+ \sa classInfoCount(), addClassInfo(), classInfoName(), removeClassInfo() -+ \sa indexOfClassInfo() -+*/ -+QByteArray QMetaObjectBuilder::classInfoValue(int index) const -+{ -+ if (index >= 0 && index < d->classInfoValues.size()) -+ return d->classInfoValues[index]; -+ else -+ return QByteArray(); -+} -+ -+/*! -+ Removes the method at \a index from this class. The indices of -+ all following methods will be adjusted downwards by 1. If the -+ method is registered as a notify signal on a property, then the -+ notify signal will be removed from the property. -+ -+ \sa methodCount(), addMethod(), method(), indexOfMethod() -+*/ -+void QMetaObjectBuilder::removeMethod(int index) -+{ -+ if (index >= 0 && index < d->methods.size()) { -+ d->methods.removeAt(index); -+ for (int prop = 0; prop < d->properties.size(); ++prop) { -+ // Adjust the indices of property notify signal references. -+ if (d->properties[prop].notifySignal == index) { -+ d->properties[prop].notifySignal = -1; -+ d->properties[prop].setFlag(Notify, false); -+ } else if (d->properties[prop].notifySignal > index) -+ (d->properties[prop].notifySignal)--; -+ } -+ } -+} -+ -+/*! -+ Removes the constructor at \a index from this class. The indices of -+ all following constructors will be adjusted downwards by 1. -+ -+ \sa constructorCount(), addConstructor(), constructor() -+ \sa indexOfConstructor() -+*/ -+void QMetaObjectBuilder::removeConstructor(int index) -+{ -+ if (index >= 0 && index < d->constructors.size()) -+ d->constructors.removeAt(index); -+} -+ -+/*! -+ Removes the property at \a index from this class. The indices of -+ all following properties will be adjusted downwards by 1. -+ -+ \sa propertyCount(), addProperty(), property(), indexOfProperty() -+*/ -+void QMetaObjectBuilder::removeProperty(int index) -+{ -+ if (index >= 0 && index < d->properties.size()) -+ d->properties.removeAt(index); -+} -+ -+/*! -+ Removes the enumerator at \a index from th