From ed90226834f8d4ef76149e995e2aecff68e4df43 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 26 Jul 2017 12:13:03 +0200 Subject: Fix loading of QML plugins with old IID in static builds After commit 709f6370884b110def2e4665df8fa7bbf5fae734 we required the use of QQmlExtensionInterface_iid in qml plugins for static linkage. This mean that plugins using the "/1.0" variant would also continue to load, but those not would fail to load. This is annoying when porting apps from older Qt versions. To make the upgrade path easier, let's just support both IIDs. [ChangeLog][Qml] Fix loading of static qml plugins using the old plugin interface id Change-Id: I1c662b1fedad3f32b7dea1eddc32838d2eb9f3be Reviewed-by: J-P Nurmi --- src/qml/qml/qqmlextensioninterface.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/qml/qml/qqmlextensioninterface.h') diff --git a/src/qml/qml/qqmlextensioninterface.h b/src/qml/qml/qqmlextensioninterface.h index ef56d5e312..62b9b26569 100644 --- a/src/qml/qml/qqmlextensioninterface.h +++ b/src/qml/qml/qqmlextensioninterface.h @@ -66,7 +66,10 @@ public: Q_DECLARE_INTERFACE(QQmlTypesExtensionInterface, "org.qt-project.Qt.QQmlTypesExtensionInterface/1.0") +// NOTE: When changing this to a new version and deciding to add backup code to +// continue to support the previous version, make sure to support both of these iids. #define QQmlExtensionInterface_iid "org.qt-project.Qt.QQmlExtensionInterface/1.0" +#define QQmlExtensionInterface_iid_old "org.qt-project.Qt.QQmlExtensionInterface" Q_DECLARE_INTERFACE(QQmlExtensionInterface, QQmlExtensionInterface_iid) -- cgit v1.2.3