From f2a940876c440ecf360fb81d897e9754aef624b3 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 17 Feb 2012 10:24:29 +0100 Subject: [PATCH] Use new plugin system in Qt Designer. - Change interface names to use the prefix "org.qt-project.Qt." - Add json files and use new macros. Change-Id: I2b0e6ac59b6dfbdced70751921a588f6e417615f Reviewed-by: Lars Knoll --- .../containerextension/containerextension.pro | 2 + .../containerextension/multipagewidget.json | 1 + .../containerextension/multipagewidgetplugin.cpp | 4 -- .../containerextension/multipagewidgetplugin.h | 1 + .../designer/customwidgetplugin/analogclock.json | 1 + .../customwidgetplugin/customwidgetplugin.cpp | 4 -- .../customwidgetplugin/customwidgetplugin.h | 2 +- .../customwidgetplugin/customwidgetplugin.pro | 1 + .../taskmenuextension/taskmenuextension.pro | 1 + examples/designer/taskmenuextension/tictactoe.json | 1 + .../designer/taskmenuextension/tictactoeplugin.cpp | 4 -- .../designer/taskmenuextension/tictactoeplugin.h | 1 + .../worldtimeclockplugin/worldtimeclock.json | 1 + .../worldtimeclockplugin/worldtimeclockplugin.cpp | 4 -- .../worldtimeclockplugin/worldtimeclockplugin.h | 1 + .../src/components/buddyeditor/buddyeditor.json | 1 + .../src/components/buddyeditor/buddyeditor.pri | 5 ++- .../buddyeditor/buddyeditor_instance.cpp | 50 ---------------------- .../components/buddyeditor/buddyeditor_plugin.h | 1 + .../signalsloteditor/signalsloteditor.json | 1 + .../signalsloteditor/signalsloteditor.pri | 3 +- .../signalsloteditor/signalsloteditor_instance.cpp | 50 ---------------------- .../signalsloteditor/signalsloteditor_plugin.h | 1 + .../components/tabordereditor/tabordereditor.json | 1 + .../components/tabordereditor/tabordereditor.pri | 5 ++- .../tabordereditor/tabordereditor_instance.cpp | 49 --------------------- .../tabordereditor/tabordereditor_plugin.h | 1 + src/designer/src/lib/extension/extension.h | 4 +- .../src/lib/sdk/abstractformeditorplugin.h | 2 +- src/designer/src/lib/sdk/abstractlanguage.h | 2 +- src/designer/src/lib/sdk/dynamicpropertysheet.h | 2 +- src/designer/src/lib/sdk/extrainfo.h | 2 +- src/designer/src/lib/sdk/layoutdecoration.h | 2 +- src/designer/src/lib/sdk/membersheet.h | 2 +- src/designer/src/lib/sdk/propertysheet.h | 2 +- src/designer/src/lib/sdk/taskmenu.h | 2 +- src/designer/src/lib/shared/actionprovider_p.h | 2 +- src/designer/src/lib/shared/qdesigner_utils_p.h | 2 +- src/designer/src/lib/uilib/container.h | 2 +- src/designer/src/lib/uilib/customwidget.h | 10 +++-- src/designer/src/plugins/activeqt/activeqt.json | 1 + src/designer/src/plugins/activeqt/activeqt.pro | 2 + .../src/plugins/activeqt/qaxwidgetplugin.cpp | 2 - .../src/plugins/activeqt/qaxwidgetplugin.h | 3 +- .../src/plugins/activeqt/qdesigneraxwidget.cpp | 2 +- .../src/plugins/phononwidgets/phononcollection.cpp | 3 +- .../src/plugins/phononwidgets/phononwidgets.json | 1 + .../src/plugins/phononwidgets/phononwidgets.pro | 2 + .../plugins/qdeclarativeview/qdeclarativeview.json | 1 + .../plugins/qdeclarativeview/qdeclarativeview.pro | 1 + .../qdeclarativeview/qdeclarativeview_plugin.cpp | 2 - .../qdeclarativeview/qdeclarativeview_plugin.h | 1 + src/designer/src/plugins/qwebview/qwebview.json | 1 + src/designer/src/plugins/qwebview/qwebview.pro | 1 + .../src/plugins/qwebview/qwebview_plugin.cpp | 2 - .../src/plugins/qwebview/qwebview_plugin.h | 1 + 56 files changed, 62 insertions(+), 197 deletions(-) create mode 100644 examples/designer/containerextension/multipagewidget.json create mode 100644 examples/designer/customwidgetplugin/analogclock.json create mode 100644 examples/designer/taskmenuextension/tictactoe.json create mode 100644 examples/designer/worldtimeclockplugin/worldtimeclock.json create mode 100644 src/designer/src/components/buddyeditor/buddyeditor.json delete mode 100644 src/designer/src/components/buddyeditor/buddyeditor_instance.cpp create mode 100644 src/designer/src/components/signalsloteditor/signalsloteditor.json delete mode 100644 src/designer/src/components/signalsloteditor/signalsloteditor_instance.cpp create mode 100644 src/designer/src/components/tabordereditor/tabordereditor.json delete mode 100644 src/designer/src/components/tabordereditor/tabordereditor_instance.cpp create mode 100644 src/designer/src/plugins/activeqt/activeqt.json create mode 100644 src/designer/src/plugins/phononwidgets/phononwidgets.json create mode 100644 src/designer/src/plugins/qdeclarativeview/qdeclarativeview.json create mode 100644 src/designer/src/plugins/qwebview/qwebview.json diff --git a/examples/designer/containerextension/containerextension.pro b/examples/designer/containerextension/containerextension.pro index add7e44..fe72767 100644 --- a/examples/designer/containerextension/containerextension.pro +++ b/examples/designer/containerextension/containerextension.pro @@ -18,6 +18,8 @@ SOURCES += multipagewidget.cpp \ multipagewidgetplugin.cpp \ multipagewidgetcontainerextension.cpp \ multipagewidgetextensionfactory.cpp + +OTHER_FILES += multipagewidget.json #! [2] # install diff --git a/examples/designer/containerextension/multipagewidget.json b/examples/designer/containerextension/multipagewidget.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/examples/designer/containerextension/multipagewidget.json @@ -0,0 +1 @@ +{} diff --git a/examples/designer/containerextension/multipagewidgetplugin.cpp b/examples/designer/containerextension/multipagewidgetplugin.cpp index b709ca5..2dbb4cb 100644 --- a/examples/designer/containerextension/multipagewidgetplugin.cpp +++ b/examples/designer/containerextension/multipagewidgetplugin.cpp @@ -190,7 +190,3 @@ void MultiPageWidgetPlugin::pageTitleChanged(const QString &title) } //! [13] - -//! [14] -Q_EXPORT_PLUGIN2(containerextension, MultiPageWidgetPlugin) -//! [14] diff --git a/examples/designer/containerextension/multipagewidgetplugin.h b/examples/designer/containerextension/multipagewidgetplugin.h index d376318..c68c52d 100644 --- a/examples/designer/containerextension/multipagewidgetplugin.h +++ b/examples/designer/containerextension/multipagewidgetplugin.h @@ -52,6 +52,7 @@ QT_END_NAMESPACE class MultiPageWidgetPlugin: public QObject, public QDesignerCustomWidgetInterface { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidget" FILE "multipagewidget.json") Q_INTERFACES(QDesignerCustomWidgetInterface) public: MultiPageWidgetPlugin(QObject *parent = 0); diff --git a/examples/designer/customwidgetplugin/analogclock.json b/examples/designer/customwidgetplugin/analogclock.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/examples/designer/customwidgetplugin/analogclock.json @@ -0,0 +1 @@ +{} diff --git a/examples/designer/customwidgetplugin/customwidgetplugin.cpp b/examples/designer/customwidgetplugin/customwidgetplugin.cpp index 3494ac5..d5e468c 100644 --- a/examples/designer/customwidgetplugin/customwidgetplugin.cpp +++ b/examples/designer/customwidgetplugin/customwidgetplugin.cpp @@ -149,7 +149,3 @@ QString AnalogClockPlugin::includeFile() const return "analogclock.h"; } //! [12] - -//! [13] -Q_EXPORT_PLUGIN2(customwidgetplugin, AnalogClockPlugin) -//! [13] diff --git a/examples/designer/customwidgetplugin/customwidgetplugin.h b/examples/designer/customwidgetplugin/customwidgetplugin.h index f1f82d3..781983d 100644 --- a/examples/designer/customwidgetplugin/customwidgetplugin.h +++ b/examples/designer/customwidgetplugin/customwidgetplugin.h @@ -47,8 +47,8 @@ class AnalogClockPlugin : public QObject, public QDesignerCustomWidgetInterface { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetInterface" FILE "analogclock.json") Q_INTERFACES(QDesignerCustomWidgetInterface) - public: AnalogClockPlugin(QObject *parent = 0); diff --git a/examples/designer/customwidgetplugin/customwidgetplugin.pro b/examples/designer/customwidgetplugin/customwidgetplugin.pro index 76c22bb..feb8689 100644 --- a/examples/designer/customwidgetplugin/customwidgetplugin.pro +++ b/examples/designer/customwidgetplugin/customwidgetplugin.pro @@ -13,6 +13,7 @@ HEADERS = analogclock.h \ customwidgetplugin.h SOURCES = analogclock.cpp \ customwidgetplugin.cpp +OTHER_FILES += analogclock.json #! [3] # install diff --git a/examples/designer/taskmenuextension/taskmenuextension.pro b/examples/designer/taskmenuextension/taskmenuextension.pro index fbc57f4..46a193f 100644 --- a/examples/designer/taskmenuextension/taskmenuextension.pro +++ b/examples/designer/taskmenuextension/taskmenuextension.pro @@ -17,6 +17,7 @@ SOURCES += tictactoe.cpp \ tictactoedialog.cpp \ tictactoeplugin.cpp \ tictactoetaskmenu.cpp +OTHER_FILES += tictactoe.json #! [2] # install diff --git a/examples/designer/taskmenuextension/tictactoe.json b/examples/designer/taskmenuextension/tictactoe.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/examples/designer/taskmenuextension/tictactoe.json @@ -0,0 +1 @@ +{} diff --git a/examples/designer/taskmenuextension/tictactoeplugin.cpp b/examples/designer/taskmenuextension/tictactoeplugin.cpp index b71b176..ef5690e 100644 --- a/examples/designer/taskmenuextension/tictactoeplugin.cpp +++ b/examples/designer/taskmenuextension/tictactoeplugin.cpp @@ -135,7 +135,3 @@ QString TicTacToePlugin::domXml() const } //! [3] - -//! [4] -Q_EXPORT_PLUGIN2(taskmenuextension, TicTacToePlugin) -//! [4] diff --git a/examples/designer/taskmenuextension/tictactoeplugin.h b/examples/designer/taskmenuextension/tictactoeplugin.h index 613c5a9..92794a3 100644 --- a/examples/designer/taskmenuextension/tictactoeplugin.h +++ b/examples/designer/taskmenuextension/tictactoeplugin.h @@ -52,6 +52,7 @@ QT_END_NAMESPACE class TicTacToePlugin : public QObject, public QDesignerCustomWidgetInterface { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetInterface" FILE "tictactoe.json") Q_INTERFACES(QDesignerCustomWidgetInterface) public: diff --git a/examples/designer/worldtimeclockplugin/worldtimeclock.json b/examples/designer/worldtimeclockplugin/worldtimeclock.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/examples/designer/worldtimeclockplugin/worldtimeclock.json @@ -0,0 +1 @@ +{} diff --git a/examples/designer/worldtimeclockplugin/worldtimeclockplugin.cpp b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.cpp index 0b24eb1..581483c 100644 --- a/examples/designer/worldtimeclockplugin/worldtimeclockplugin.cpp +++ b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.cpp @@ -117,7 +117,3 @@ QString WorldTimeClockPlugin::includeFile() const { return "worldtimeclock.h"; } - -//! [0] -Q_EXPORT_PLUGIN2(worldtimeclockplugin, WorldTimeClockPlugin) -//! [0] diff --git a/examples/designer/worldtimeclockplugin/worldtimeclockplugin.h b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.h index fb20846..341db18 100644 --- a/examples/designer/worldtimeclockplugin/worldtimeclockplugin.h +++ b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.h @@ -48,6 +48,7 @@ class WorldTimeClockPlugin : public QObject, public QDesignerCustomWidgetInterface { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetInterface" FILE "worldtimeclock.json") Q_INTERFACES(QDesignerCustomWidgetInterface) public: diff --git a/src/designer/src/components/buddyeditor/buddyeditor.json b/src/designer/src/components/buddyeditor/buddyeditor.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/src/designer/src/components/buddyeditor/buddyeditor.json @@ -0,0 +1 @@ +{} diff --git a/src/designer/src/components/buddyeditor/buddyeditor.pri b/src/designer/src/components/buddyeditor/buddyeditor.pri index c507aa0..b6e9614 100644 --- a/src/designer/src/components/buddyeditor/buddyeditor.pri +++ b/src/designer/src/components/buddyeditor/buddyeditor.pri @@ -12,5 +12,6 @@ HEADERS += \ SOURCES += \ $$PWD/buddyeditor.cpp \ $$PWD/buddyeditor_tool.cpp \ - $$PWD/buddyeditor_plugin.cpp \ - $$PWD/buddyeditor_instance.cpp + $$PWD/buddyeditor_plugin.cpp + +OTHER_FILES += $$PWD/buddyeditor.json diff --git a/src/designer/src/components/buddyeditor/buddyeditor_instance.cpp b/src/designer/src/components/buddyeditor/buddyeditor_instance.cpp deleted file mode 100644 index 50547e8..0000000 --- a/src/designer/src/components/buddyeditor/buddyeditor_instance.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include - -#include "buddyeditor_plugin.h" - -QT_USE_NAMESPACE - -using namespace qdesigner_internal; - -Q_EXPORT_PLUGIN(BuddyEditorPlugin) diff --git a/src/designer/src/components/buddyeditor/buddyeditor_plugin.h b/src/designer/src/components/buddyeditor/buddyeditor_plugin.h index 2443622..2f712a1 100644 --- a/src/designer/src/components/buddyeditor/buddyeditor_plugin.h +++ b/src/designer/src/components/buddyeditor/buddyeditor_plugin.h @@ -61,6 +61,7 @@ class BuddyEditorTool; class QT_BUDDYEDITOR_EXPORT BuddyEditorPlugin: public QObject, public QDesignerFormEditorPluginInterface { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerFormEditorPluginInterface" FILE "buddyeditor.json") Q_INTERFACES(QDesignerFormEditorPluginInterface) public: BuddyEditorPlugin(); diff --git a/src/designer/src/components/signalsloteditor/signalsloteditor.json b/src/designer/src/components/signalsloteditor/signalsloteditor.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/src/designer/src/components/signalsloteditor/signalsloteditor.json @@ -0,0 +1 @@ +{} diff --git a/src/designer/src/components/signalsloteditor/signalsloteditor.pri b/src/designer/src/components/signalsloteditor/signalsloteditor.pri index e903ce1..f8d9d35 100644 --- a/src/designer/src/components/signalsloteditor/signalsloteditor.pri +++ b/src/designer/src/components/signalsloteditor/signalsloteditor.pri @@ -15,7 +15,8 @@ SOURCES += $$PWD/signalslot_utils.cpp \ $$PWD/signalsloteditor.cpp \ $$PWD/signalsloteditor_tool.cpp \ $$PWD/signalsloteditor_plugin.cpp \ - $$PWD/signalsloteditor_instance.cpp \ $$PWD/signalsloteditorwindow.cpp FORMS += $$PWD/connectdialog.ui + +OTHER_FILES += $$PWD/signalsloteditor.json diff --git a/src/designer/src/components/signalsloteditor/signalsloteditor_instance.cpp b/src/designer/src/components/signalsloteditor/signalsloteditor_instance.cpp deleted file mode 100644 index 49b86e2..0000000 --- a/src/designer/src/components/signalsloteditor/signalsloteditor_instance.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include - -#include "signalsloteditor_plugin.h" - -QT_USE_NAMESPACE - -using namespace qdesigner_internal; - -Q_EXPORT_PLUGIN(SignalSlotEditorPlugin) diff --git a/src/designer/src/components/signalsloteditor/signalsloteditor_plugin.h b/src/designer/src/components/signalsloteditor/signalsloteditor_plugin.h index 1a676d6..5d85850 100644 --- a/src/designer/src/components/signalsloteditor/signalsloteditor_plugin.h +++ b/src/designer/src/components/signalsloteditor/signalsloteditor_plugin.h @@ -60,6 +60,7 @@ class SignalSlotEditorTool; class QT_SIGNALSLOTEDITOR_EXPORT SignalSlotEditorPlugin: public QObject, public QDesignerFormEditorPluginInterface { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerFormEditorPluginInterface" FILE "signalsloteditor.json") Q_INTERFACES(QDesignerFormEditorPluginInterface) public: SignalSlotEditorPlugin(); diff --git a/src/designer/src/components/tabordereditor/tabordereditor.json b/src/designer/src/components/tabordereditor/tabordereditor.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/src/designer/src/components/tabordereditor/tabordereditor.json @@ -0,0 +1 @@ +{} diff --git a/src/designer/src/components/tabordereditor/tabordereditor.pri b/src/designer/src/components/tabordereditor/tabordereditor.pri index 786c6ae..da1ecfb 100644 --- a/src/designer/src/components/tabordereditor/tabordereditor.pri +++ b/src/designer/src/components/tabordereditor/tabordereditor.pri @@ -12,5 +12,6 @@ HEADERS += \ SOURCES += \ $$PWD/tabordereditor.cpp \ $$PWD/tabordereditor_tool.cpp \ - $$PWD/tabordereditor_plugin.cpp \ - $$PWD/tabordereditor_instance.cpp + $$PWD/tabordereditor_plugin.cpp + +OTHER_FILES += $$PWD/tabordereditor.json diff --git a/src/designer/src/components/tabordereditor/tabordereditor_instance.cpp b/src/designer/src/components/tabordereditor/tabordereditor_instance.cpp deleted file mode 100644 index 8d163f1..0000000 --- a/src/designer/src/components/tabordereditor/tabordereditor_instance.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include - -#include "tabordereditor_plugin.h" - -QT_USE_NAMESPACE -using namespace qdesigner_internal; - -Q_EXPORT_PLUGIN(TabOrderEditorPlugin) diff --git a/src/designer/src/components/tabordereditor/tabordereditor_plugin.h b/src/designer/src/components/tabordereditor/tabordereditor_plugin.h index 9ad3d96..75c53ad 100644 --- a/src/designer/src/components/tabordereditor/tabordereditor_plugin.h +++ b/src/designer/src/components/tabordereditor/tabordereditor_plugin.h @@ -61,6 +61,7 @@ class TabOrderEditorTool; class QT_TABORDEREDITOR_EXPORT TabOrderEditorPlugin: public QObject, public QDesignerFormEditorPluginInterface { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerFormEditorPluginInterface" FILE "tabordereditor.json") Q_INTERFACES(QDesignerFormEditorPluginInterface) public: TabOrderEditorPlugin(); diff --git a/src/designer/src/lib/extension/extension.h b/src/designer/src/lib/extension/extension.h index 2cf602e..160c1cb 100644 --- a/src/designer/src/lib/extension/extension.h +++ b/src/designer/src/lib/extension/extension.h @@ -58,7 +58,7 @@ public: virtual QObject *extension(QObject *object, const QString &iid) const = 0; }; -Q_DECLARE_INTERFACE(QAbstractExtensionFactory, "com.trolltech.Qt.QAbstractExtensionFactory") +Q_DECLARE_INTERFACE(QAbstractExtensionFactory, "org.qt-project.Qt.QAbstractExtensionFactory") class QAbstractExtensionManager { @@ -70,7 +70,7 @@ public: virtual QObject *extension(QObject *object, const QString &iid) const = 0; }; -Q_DECLARE_INTERFACE(QAbstractExtensionManager, "com.trolltech.Qt.QAbstractExtensionManager") +Q_DECLARE_INTERFACE(QAbstractExtensionManager, "org.qt-project.Qt.QAbstractExtensionManager") #if defined(Q_CC_MSVC) && (_MSC_VER < 1300) diff --git a/src/designer/src/lib/sdk/abstractformeditorplugin.h b/src/designer/src/lib/sdk/abstractformeditorplugin.h index d6be37e..62bd4fa 100644 --- a/src/designer/src/lib/sdk/abstractformeditorplugin.h +++ b/src/designer/src/lib/sdk/abstractformeditorplugin.h @@ -64,7 +64,7 @@ public: virtual QDesignerFormEditorInterface *core() const = 0; }; -Q_DECLARE_INTERFACE(QDesignerFormEditorPluginInterface, "com.trolltech.Qt.Designer.QDesignerFormEditorPluginInterface") +Q_DECLARE_INTERFACE(QDesignerFormEditorPluginInterface, "org.qt-project.Qt.Designer.QDesignerFormEditorPluginInterface") QT_END_NAMESPACE diff --git a/src/designer/src/lib/sdk/abstractlanguage.h b/src/designer/src/lib/sdk/abstractlanguage.h index db70b2f..3208bc7 100644 --- a/src/designer/src/lib/sdk/abstractlanguage.h +++ b/src/designer/src/lib/sdk/abstractlanguage.h @@ -99,7 +99,7 @@ public: virtual QString uiExtension() const = 0; }; -Q_DECLARE_EXTENSION_INTERFACE(QDesignerLanguageExtension, "com.trolltech.Qt.Designer.Language.3") +Q_DECLARE_EXTENSION_INTERFACE(QDesignerLanguageExtension, "org.qt-project.Qt.Designer.Language.3") QT_END_NAMESPACE diff --git a/src/designer/src/lib/sdk/dynamicpropertysheet.h b/src/designer/src/lib/sdk/dynamicpropertysheet.h index 171157f..019cf44 100644 --- a/src/designer/src/lib/sdk/dynamicpropertysheet.h +++ b/src/designer/src/lib/sdk/dynamicpropertysheet.h @@ -72,7 +72,7 @@ public: virtual bool isDynamicProperty(int index) const = 0; virtual bool canAddDynamicProperty(const QString &propertyName) const = 0; }; -Q_DECLARE_EXTENSION_INTERFACE(QDesignerDynamicPropertySheetExtension, "com.trolltech.Qt.Designer.DynamicPropertySheet") +Q_DECLARE_EXTENSION_INTERFACE(QDesignerDynamicPropertySheetExtension, "org.qt-project.Qt.Designer.DynamicPropertySheet") QT_END_NAMESPACE diff --git a/src/designer/src/lib/sdk/extrainfo.h b/src/designer/src/lib/sdk/extrainfo.h index 72133fb..aeb0fe2 100644 --- a/src/designer/src/lib/sdk/extrainfo.h +++ b/src/designer/src/lib/sdk/extrainfo.h @@ -75,7 +75,7 @@ public: private: QString m_workingDirectory; }; -Q_DECLARE_EXTENSION_INTERFACE(QDesignerExtraInfoExtension, "com.trolltech.Qt.Designer.ExtraInfo.2") +Q_DECLARE_EXTENSION_INTERFACE(QDesignerExtraInfoExtension, "org.qt-project.Qt.Designer.ExtraInfo.2") QT_END_NAMESPACE diff --git a/src/designer/src/lib/sdk/layoutdecoration.h b/src/designer/src/lib/sdk/layoutdecoration.h index 29b9ec6..b508dcd 100644 --- a/src/designer/src/lib/sdk/layoutdecoration.h +++ b/src/designer/src/lib/sdk/layoutdecoration.h @@ -90,7 +90,7 @@ public: virtual void adjustIndicator(const QPoint &pos, int index) = 0; }; -Q_DECLARE_EXTENSION_INTERFACE(QDesignerLayoutDecorationExtension, "com.trolltech.Qt.Designer.LayoutDecoration") +Q_DECLARE_EXTENSION_INTERFACE(QDesignerLayoutDecorationExtension, "org.qt-project.Qt.Designer.LayoutDecoration") QT_END_NAMESPACE diff --git a/src/designer/src/lib/sdk/membersheet.h b/src/designer/src/lib/sdk/membersheet.h index 87ded49..b60f2c0 100644 --- a/src/designer/src/lib/sdk/membersheet.h +++ b/src/designer/src/lib/sdk/membersheet.h @@ -80,7 +80,7 @@ public: virtual QList parameterTypes(int index) const = 0; virtual QList parameterNames(int index) const = 0; }; -Q_DECLARE_EXTENSION_INTERFACE(QDesignerMemberSheetExtension, "com.trolltech.Qt.Designer.MemberSheet") +Q_DECLARE_EXTENSION_INTERFACE(QDesignerMemberSheetExtension, "org.qt-project.Qt.Designer.MemberSheet") QT_END_NAMESPACE diff --git a/src/designer/src/lib/sdk/propertysheet.h b/src/designer/src/lib/sdk/propertysheet.h index 5e73fa4..03129f4 100644 --- a/src/designer/src/lib/sdk/propertysheet.h +++ b/src/designer/src/lib/sdk/propertysheet.h @@ -84,7 +84,7 @@ public: }; Q_DECLARE_EXTENSION_INTERFACE(QDesignerPropertySheetExtension, - "com.trolltech.Qt.Designer.PropertySheet") + "org.qt-project.Qt.Designer.PropertySheet") QT_END_NAMESPACE diff --git a/src/designer/src/lib/sdk/taskmenu.h b/src/designer/src/lib/sdk/taskmenu.h index 24544f1..2029e9f 100644 --- a/src/designer/src/lib/sdk/taskmenu.h +++ b/src/designer/src/lib/sdk/taskmenu.h @@ -59,7 +59,7 @@ public: virtual QList taskActions() const = 0; }; -Q_DECLARE_EXTENSION_INTERFACE(QDesignerTaskMenuExtension, "com.trolltech.Qt.Designer.TaskMenu") +Q_DECLARE_EXTENSION_INTERFACE(QDesignerTaskMenuExtension, "org.qt-project.Qt.Designer.TaskMenu") inline QAction *QDesignerTaskMenuExtension::preferredEditAction() const diff --git a/src/designer/src/lib/shared/actionprovider_p.h b/src/designer/src/lib/shared/actionprovider_p.h index 8e9ddc0..45a7999 100644 --- a/src/designer/src/lib/shared/actionprovider_p.h +++ b/src/designer/src/lib/shared/actionprovider_p.h @@ -101,7 +101,7 @@ template return -1; } -Q_DECLARE_EXTENSION_INTERFACE(QDesignerActionProviderExtension, "com.trolltech.Qt.Designer.ActionProvider") +Q_DECLARE_EXTENSION_INTERFACE(QDesignerActionProviderExtension, "org.qt-project.Qt.Designer.ActionProvider") QT_END_NAMESPACE diff --git a/src/designer/src/lib/shared/qdesigner_utils_p.h b/src/designer/src/lib/shared/qdesigner_utils_p.h index cfbd38c..4ba70c1 100644 --- a/src/designer/src/lib/shared/qdesigner_utils_p.h +++ b/src/designer/src/lib/shared/qdesigner_utils_p.h @@ -84,7 +84,7 @@ QDESIGNER_SHARED_EXPORT void reloadIconResources(DesignerIconCache *iconCache, Q * by the form builders (names, etc). * Note that the property editor uses unqualified names ("Cancel") while the form builder serialization (uic) * requires the whole string - * ("QDialogButtonBox::Cancel" or "com.trolltech.qt.gui.QDialogButtonBox.StandardButton.Cancel").*/ + * ("QDialogButtonBox::Cancel" or "org.qt-project.qt.gui.QDialogButtonBox.StandardButton.Cancel").*/ /* --------- MetaEnum: Base class representing a QMetaEnum with lookup functions * in both ways. Template of int type since unsigned is more suitable for flags. diff --git a/src/designer/src/lib/uilib/container.h b/src/designer/src/lib/uilib/container.h index ebd5278..f7517a5 100644 --- a/src/designer/src/lib/uilib/container.h +++ b/src/designer/src/lib/uilib/container.h @@ -73,7 +73,7 @@ public: // ### Qt6 remove body, provided in Qt5 for source compatibility to Qt4. { Q_UNUSED(index); return true; } }; -Q_DECLARE_EXTENSION_INTERFACE(QDesignerContainerExtension, "com.trolltech.Qt.Designer.Container") +Q_DECLARE_EXTENSION_INTERFACE(QDesignerContainerExtension, "org.qt-project.Qt.Designer.Container") QT_END_NAMESPACE diff --git a/src/designer/src/lib/uilib/customwidget.h b/src/designer/src/lib/uilib/customwidget.h index 3d82392..6320f58 100644 --- a/src/designer/src/lib/uilib/customwidget.h +++ b/src/designer/src/lib/uilib/customwidget.h @@ -81,8 +81,10 @@ public: virtual QString codeTemplate() const { return QString(); } }; -Q_DECLARE_INTERFACE(QDesignerCustomWidgetInterface, "com.trolltech.Qt.Designer.CustomWidget") +#define QDesignerCustomWidgetInterface_iid "org.qt-project.QDesignerCustomWidgetInterface" + +Q_DECLARE_INTERFACE(QDesignerCustomWidgetInterface, QDesignerCustomWidgetInterface_iid) class QDesignerCustomWidgetCollectionInterface { @@ -91,8 +93,10 @@ public: virtual QList customWidgets() const = 0; }; -Q_DECLARE_INTERFACE(QDesignerCustomWidgetCollectionInterface, - "com.trolltech.Qt.Designer.CustomWidgetCollection") + +#define QDesignerCustomWidgetCollectionInterface_iid "org.qt-project.Qt.QDesignerCustomWidgetCollectionInterface" + +Q_DECLARE_INTERFACE(QDesignerCustomWidgetCollectionInterface, QDesignerCustomWidgetCollectionInterface_iid) QT_END_NAMESPACE diff --git a/src/designer/src/plugins/activeqt/activeqt.json b/src/designer/src/plugins/activeqt/activeqt.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/src/designer/src/plugins/activeqt/activeqt.json @@ -0,0 +1 @@ +{} diff --git a/src/designer/src/plugins/activeqt/activeqt.pro b/src/designer/src/plugins/activeqt/activeqt.pro index 2ed0b10..038375d 100644 --- a/src/designer/src/plugins/activeqt/activeqt.pro +++ b/src/designer/src/plugins/activeqt/activeqt.pro @@ -2,6 +2,7 @@ TARGET = $$qtLibraryTarget(qaxwidget) TEMPLATE = lib DESTDIR = $$QT.designer.plugins/designer +QT += designer-private widgets CONFIG += qt warn_on qaxcontainer plugin designer debug_and_release build_all:!build_pass { CONFIG -= build_all @@ -29,5 +30,6 @@ qaxwidgettaskmenu.h \ $$QT.activeqt.sources/shared/qaxtypes.h # install +OTHER_FILES += activeqt.json target.path = $$[QT_INSTALL_PLUGINS]/designer INSTALLS += target diff --git a/src/designer/src/plugins/activeqt/qaxwidgetplugin.cpp b/src/designer/src/plugins/activeqt/qaxwidgetplugin.cpp index a91ebde..3e7bdde 100644 --- a/src/designer/src/plugins/activeqt/qaxwidgetplugin.cpp +++ b/src/designer/src/plugins/activeqt/qaxwidgetplugin.cpp @@ -141,6 +141,4 @@ QString QAxWidgetPlugin::domXml() const "); } -Q_EXPORT_PLUGIN(QAxWidgetPlugin) - QT_END_NAMESPACE diff --git a/src/designer/src/plugins/activeqt/qaxwidgetplugin.h b/src/designer/src/plugins/activeqt/qaxwidgetplugin.h index 2be8aab..a9f6906 100644 --- a/src/designer/src/plugins/activeqt/qaxwidgetplugin.h +++ b/src/designer/src/plugins/activeqt/qaxwidgetplugin.h @@ -52,9 +52,10 @@ class QDesignerFormEditorInterface; class QAxWidgetPlugin : public QObject, public QDesignerCustomWidgetInterface { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidget" FILE "activeqt.json") Q_INTERFACES(QDesignerCustomWidgetInterface) public: - explicit inline QAxWidgetPlugin(QObject *parent = 0); + explicit QAxWidgetPlugin(QObject *parent = 0); virtual QString name() const; virtual QString group() const; diff --git a/src/designer/src/plugins/activeqt/qdesigneraxwidget.cpp b/src/designer/src/plugins/activeqt/qdesigneraxwidget.cpp index bb66a15..cf7298a 100644 --- a/src/designer/src/plugins/activeqt/qdesigneraxwidget.cpp +++ b/src/designer/src/plugins/activeqt/qdesigneraxwidget.cpp @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include diff --git a/src/designer/src/plugins/phononwidgets/phononcollection.cpp b/src/designer/src/plugins/phononwidgets/phononcollection.cpp index 5b41bfa..e48313d 100644 --- a/src/designer/src/plugins/phononwidgets/phononcollection.cpp +++ b/src/designer/src/plugins/phononwidgets/phononcollection.cpp @@ -51,6 +51,7 @@ QT_BEGIN_NAMESPACE class PhononCollection: public QObject, public QDesignerCustomWidgetCollectionInterface { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetCollectionInterface" FILE "phonon.json") Q_INTERFACES(QDesignerCustomWidgetCollectionInterface) public: explicit PhononCollection(QObject *parent = 0); @@ -75,8 +76,6 @@ QList PhononCollection::customWidgets() const return m_plugins; } -Q_EXPORT_PLUGIN(PhononCollection) - QT_END_NAMESPACE #include "phononcollection.moc" diff --git a/src/designer/src/plugins/phononwidgets/phononwidgets.json b/src/designer/src/plugins/phononwidgets/phononwidgets.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/src/designer/src/plugins/phononwidgets/phononwidgets.json @@ -0,0 +1 @@ +{} diff --git a/src/designer/src/plugins/phononwidgets/phononwidgets.pro b/src/designer/src/plugins/phononwidgets/phononwidgets.pro index 1da3f5b..72fbd3d 100644 --- a/src/designer/src/plugins/phononwidgets/phononwidgets.pro +++ b/src/designer/src/plugins/phononwidgets/phononwidgets.pro @@ -21,4 +21,6 @@ HEADERS += videoplayerplugin.h \ seeksliderplugin.h \ volumesliderplugin.h +OTHER_FILES = "phonon.json" + RESOURCES += phononwidgets.qrc diff --git a/src/designer/src/plugins/qdeclarativeview/qdeclarativeview.json b/src/designer/src/plugins/qdeclarativeview/qdeclarativeview.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/src/designer/src/plugins/qdeclarativeview/qdeclarativeview.json @@ -0,0 +1 @@ +{} diff --git a/src/designer/src/plugins/qdeclarativeview/qdeclarativeview.pro b/src/designer/src/plugins/qdeclarativeview/qdeclarativeview.pro index 084441a..199819f 100644 --- a/src/designer/src/plugins/qdeclarativeview/qdeclarativeview.pro +++ b/src/designer/src/plugins/qdeclarativeview/qdeclarativeview.pro @@ -11,3 +11,4 @@ build_all:!build_pass { SOURCES += qdeclarativeview_plugin.cpp HEADERS += qdeclarativeview_plugin.h +OTHER_FILES += qdeclarativeview.json diff --git a/src/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.cpp b/src/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.cpp index 8edde57..cdc6097 100644 --- a/src/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.cpp +++ b/src/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.cpp @@ -127,6 +127,4 @@ QString QDeclarativeViewPlugin::domXml() const "); } -Q_EXPORT_PLUGIN2(customwidgetplugin, QDeclarativeViewPlugin) - QT_END_NAMESPACE diff --git a/src/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.h b/src/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.h index b189c85..32cfdbe 100644 --- a/src/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.h +++ b/src/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.h @@ -49,6 +49,7 @@ QT_BEGIN_NAMESPACE class QDeclarativeViewPlugin: public QObject, public QDesignerCustomWidgetInterface { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetInterface" FILE "qdeclarativeview.json") Q_INTERFACES(QDesignerCustomWidgetInterface) public: QDeclarativeViewPlugin(QObject *parent = 0); diff --git a/src/designer/src/plugins/qwebview/qwebview.json b/src/designer/src/plugins/qwebview/qwebview.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/src/designer/src/plugins/qwebview/qwebview.json @@ -0,0 +1 @@ +{} diff --git a/src/designer/src/plugins/qwebview/qwebview.pro b/src/designer/src/plugins/qwebview/qwebview.pro index cbbc37d..52fc8ff 100644 --- a/src/designer/src/plugins/qwebview/qwebview.pro +++ b/src/designer/src/plugins/qwebview/qwebview.pro @@ -13,3 +13,4 @@ build_all:!build_pass { SOURCES += qwebview_plugin.cpp HEADERS += qwebview_plugin.h RESOURCES += qwebview_plugin.qrc +OTHER_FILES += qwebview.json diff --git a/src/designer/src/plugins/qwebview/qwebview_plugin.cpp b/src/designer/src/plugins/qwebview/qwebview_plugin.cpp index c86daf0..e3ac917 100644 --- a/src/designer/src/plugins/qwebview/qwebview_plugin.cpp +++ b/src/designer/src/plugins/qwebview/qwebview_plugin.cpp @@ -132,6 +132,4 @@ QString QWebViewPlugin::domXml() const "); } -Q_EXPORT_PLUGIN2(customwidgetplugin, QWebViewPlugin) - QT_END_NAMESPACE diff --git a/src/designer/src/plugins/qwebview/qwebview_plugin.h b/src/designer/src/plugins/qwebview/qwebview_plugin.h index 69a2a73..392149c 100644 --- a/src/designer/src/plugins/qwebview/qwebview_plugin.h +++ b/src/designer/src/plugins/qwebview/qwebview_plugin.h @@ -49,6 +49,7 @@ QT_BEGIN_NAMESPACE class QWebViewPlugin: public QObject, public QDesignerCustomWidgetInterface { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetInterface" FILE "qwebview.json") Q_INTERFACES(QDesignerCustomWidgetInterface) public: QWebViewPlugin(QObject *parent = 0); -- 2.7.4