From 31c3dec9fe1341d412830eb1163e252112f9765c Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Fri, 3 May 2013 09:20:52 +0200 Subject: Make sure correct files are bundled on Android The imports must be bundled in the apk. Change-Id: I44cd4b442f9f3c8b6bf3534ffbfb8866475599e4 Reviewed-by: Paul Olav Tvete --- src/declarative/declarative.pro | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/declarative') diff --git a/src/declarative/declarative.pro b/src/declarative/declarative.pro index c5741c2b..7a8a32f1 100644 --- a/src/declarative/declarative.pro +++ b/src/declarative/declarative.pro @@ -4,6 +4,10 @@ qtHaveModule(xmlpatterns): QT_PRIVATE = xmlpatterns else: DEFINES += QT_NO_XMLPATTERNS MODULE=declarative + +ANDROID_BUNDLED_FILES = \ + imports + load(qt_module) DEFINES += QT_NO_URL_CAST_FROM_STRING -- cgit v1.2.3 From 8c02d79c5b7d769c848c0441c4e9a6f1e0a41912 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 7 May 2013 09:45:27 +0200 Subject: Move exports conflicting with QtQml into namespace Move exported qml* symbols that conflict with QtQml into an - automatically imported - namespace. This ensures apps can link against both QtDeclarative and QtQml. To keep the BC promise the old symbols are still exported. Task-number: QTBUG-29584 Change-Id: Icf4e586fee51d2bd82125398e2bb96d6dd355cc5 Reviewed-by: Olivier Goffart Reviewed-by: Thiago Macieira Reviewed-by: Alan Alpert --- src/declarative/qml/qdeclarative.h | 17 +++++++++---- src/declarative/qml/qdeclarativeengine.cpp | 40 +++++++++++++++++++++++++++++- src/declarative/qml/qdeclarativeinfo.cpp | 26 +++++++++++++++++++ src/declarative/qml/qdeclarativeinfo.h | 25 +++++++++++++------ 4 files changed, 94 insertions(+), 14 deletions(-) (limited to 'src/declarative') diff --git a/src/declarative/qml/qdeclarative.h b/src/declarative/qml/qdeclarative.h index dd08105e..95cef935 100644 --- a/src/declarative/qml/qdeclarative.h +++ b/src/declarative/qml/qdeclarative.h @@ -404,11 +404,18 @@ inline int qmlRegisterType(const QUrl &url, const char *uri, int versionMajor, i class QDeclarativeContext; class QDeclarativeEngine; -Q_DECLARATIVE_EXPORT void qmlExecuteDeferred(QObject *); -Q_DECLARATIVE_EXPORT QDeclarativeContext *qmlContext(const QObject *); -Q_DECLARATIVE_EXPORT QDeclarativeEngine *qmlEngine(const QObject *); -Q_DECLARATIVE_EXPORT QObject *qmlAttachedPropertiesObjectById(int, const QObject *, bool create = true); -Q_DECLARATIVE_EXPORT QObject *qmlAttachedPropertiesObject(int *, const QObject *, const QMetaObject *, bool create); + +namespace QtDeclarative { + // declared in namespace to avoid symbol conflicts with QtQml + Q_DECLARATIVE_EXPORT void qmlExecuteDeferred(QObject *); + Q_DECLARATIVE_EXPORT QDeclarativeContext *qmlContext(const QObject *); + Q_DECLARATIVE_EXPORT QDeclarativeEngine *qmlEngine(const QObject *); + Q_DECLARATIVE_EXPORT QObject *qmlAttachedPropertiesObjectById(int, const QObject *, + bool create = true); + Q_DECLARATIVE_EXPORT QObject *qmlAttachedPropertiesObject(int *, const QObject *, + const QMetaObject *, bool create); +} +using namespace QtDeclarative; template QObject *qmlAttachedPropertiesObject(const QObject *obj, bool create = true) diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 691fb713..fe33cc3d 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -1020,6 +1020,8 @@ QDeclarativeEngine::ObjectOwnership QDeclarativeEngine::objectOwnership(QObject return ddata->indestructible?CppOwnership:JavaScriptOwnership; } +namespace QtDeclarative { + void qmlExecuteDeferred(QObject *object) { QDeclarativeData *data = QDeclarativeData::get(object); @@ -1088,9 +1090,45 @@ QObject *qmlAttachedPropertiesObject(int *idCache, const QObject *object, if (*idCache == -1 || !object) return 0; - return qmlAttachedPropertiesObjectById(*idCache, object, create); + return QtDeclarative::qmlAttachedPropertiesObjectById(*idCache, object, create); +} + +} // namespace QtDeclarative + +#if QT_DEPRECATED_SINCE(5, 1) + +// Also define symbols outside namespace to keep binary compatibility with 5.0 + +Q_DECLARATIVE_EXPORT void qmlExecuteDeferred(QObject *obj) +{ + QtDeclarative::qmlExecuteDeferred(obj); +} + +Q_DECLARATIVE_EXPORT QDeclarativeContext *qmlContext(const QObject *obj) +{ + return QtDeclarative::qmlContext(obj); +} + +Q_DECLARATIVE_EXPORT QDeclarativeEngine *qmlEngine(const QObject *obj) +{ + return QtDeclarative::qmlEngine(obj); +} + +Q_DECLARATIVE_EXPORT QObject *qmlAttachedPropertiesObjectById(int id, const QObject * obj, + bool create) +{ + return QtDeclarative::qmlAttachedPropertiesObjectById(id, obj, create); } +Q_DECLARATIVE_EXPORT QObject *qmlAttachedPropertiesObject(int *idCache, const QObject *object, + const QMetaObject *attachedMetaObject, + bool create) +{ + return QtDeclarative::qmlAttachedPropertiesObject(idCache, object, attachedMetaObject, create); +} + +#endif // QT_DEPRECATED_SINCE(5, 1) + QDeclarativeDebuggingEnabler::QDeclarativeDebuggingEnabler() { #ifndef QDECLARATIVE_NO_DEBUG_PROTOCOL diff --git a/src/declarative/qml/qdeclarativeinfo.cpp b/src/declarative/qml/qdeclarativeinfo.cpp index 30c89d8e..960cc352 100644 --- a/src/declarative/qml/qdeclarativeinfo.cpp +++ b/src/declarative/qml/qdeclarativeinfo.cpp @@ -152,6 +152,8 @@ QDeclarativeInfo::~QDeclarativeInfo() } } +namespace QtDeclarative { + QDeclarativeInfo qmlInfo(const QObject *me) { QDeclarativeInfoPrivate *d = new QDeclarativeInfoPrivate; @@ -175,5 +177,29 @@ QDeclarativeInfo qmlInfo(const QObject *me, const QList &erro return QDeclarativeInfo(d); } +} // namespace QtDeclarative + +#if QT_DEPRECATED_SINCE(5, 1) + +// Also define symbols outside namespace to keep binary compatibility with 5.0 + +Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me) +{ + return QtDeclarative::qmlInfo(me); +} + +Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me, + const QDeclarativeError &error) +{ + return QtDeclarative::qmlInfo(me, error); +} + +Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me, + const QList &errors) +{ + return QtDeclarative::qmlInfo(me, errors); +} + +#endif // QT_DEPRECATED_SINCE(5, 1) QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativeinfo.h b/src/declarative/qml/qdeclarativeinfo.h index 7b23a341..2db5d960 100644 --- a/src/declarative/qml/qdeclarativeinfo.h +++ b/src/declarative/qml/qdeclarativeinfo.h @@ -50,6 +50,18 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) +class QDeclarativeInfo; + +namespace QtDeclarative { + // declared in namespace to avoid symbol conflicts with QtQml + Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me); + Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me, + const QDeclarativeError &error); + Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me, + const QList &errors); +} +using namespace QtDeclarative; + class QDeclarativeInfoPrivate; class Q_DECLARATIVE_EXPORT QDeclarativeInfo : public QDebug { @@ -83,18 +95,15 @@ public: #endif private: - friend Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me); - friend Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me, const QDeclarativeError &error); - friend Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me, const QList &errors); - + friend Q_DECLARATIVE_EXPORT QDeclarativeInfo QtDeclarative::qmlInfo(const QObject *me); + friend Q_DECLARATIVE_EXPORT QDeclarativeInfo QtDeclarative::qmlInfo(const QObject *me, + const QDeclarativeError &error); + friend Q_DECLARATIVE_EXPORT QDeclarativeInfo QtDeclarative::qmlInfo(const QObject *me, + const QList &errors); QDeclarativeInfo(QDeclarativeInfoPrivate *); QDeclarativeInfoPrivate *d; }; -Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me); -Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me, const QDeclarativeError &error); -Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me, const QList &errors); - QT_END_NAMESPACE #endif // QDECLARATIVEINFO_H -- cgit v1.2.3 From 8d0159a64e7b10e8c39ade516b27a06d875bff65 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 7 May 2013 13:19:46 +0200 Subject: Move debugger plugins into separate qml1tooling directory Separate the QML 1 and QML 2 debugger plugins. This helps avoid a nasty crash in libgobject when (uneccessarily) loading and unloading the wrong plugins. Task-number: QTCREATORBUG-9232 Change-Id: I0bce7b364fcce983ccaa531d9008609ff08bb77f Reviewed-by: Aurindam Jana --- src/declarative/debugger/qdeclarativedebugserver.cpp | 2 +- src/declarative/debugger/qdeclarativeinspectorservice.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/declarative') diff --git a/src/declarative/debugger/qdeclarativedebugserver.cpp b/src/declarative/debugger/qdeclarativedebugserver.cpp index 652a805c..a65c50b7 100644 --- a/src/declarative/debugger/qdeclarativedebugserver.cpp +++ b/src/declarative/debugger/qdeclarativedebugserver.cpp @@ -126,7 +126,7 @@ QDeclarativeDebugServerConnection *QDeclarativeDebugServerPrivate::loadConnectio QStringList pluginCandidates; const QStringList paths = QCoreApplication::libraryPaths(); foreach (const QString &libPath, paths) { - const QDir dir(libPath + QLatin1String("/qmltooling")); + const QDir dir(libPath + QLatin1String("/qml1tooling")); if (dir.exists()) { QStringList plugins(dir.entryList(QDir::Files)); foreach (const QString &pluginPath, plugins) { diff --git a/src/declarative/debugger/qdeclarativeinspectorservice.cpp b/src/declarative/debugger/qdeclarativeinspectorservice.cpp index 44d4e877..c817c39e 100644 --- a/src/declarative/debugger/qdeclarativeinspectorservice.cpp +++ b/src/declarative/debugger/qdeclarativeinspectorservice.cpp @@ -124,7 +124,7 @@ QDeclarativeInspectorInterface *QDeclarativeInspectorService::loadInspectorPlugi QStringList pluginCandidates; const QStringList paths = QCoreApplication::libraryPaths(); foreach (const QString &libPath, paths) { - const QDir dir(libPath + QLatin1String("/qmltooling")); + const QDir dir(libPath + QLatin1String("/qml1tooling")); if (dir.exists()) foreach (const QString &pluginPath, dir.entryList(QDir::Files)) pluginCandidates << dir.absoluteFilePath(pluginPath); -- cgit v1.2.3