Skip to content

Commit 1bcede2

Browse files
committed
Merge lib and extension plugin
There is no longer a need for a separate lib and extension plugin so they have both been merged into a single declarativewidgets project which produces the qml extension plugin. This builds in debug and release on Windows, but only runs in release.
1 parent a19ccf4 commit 1bcede2

File tree

125 files changed

+223
-248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+223
-248
lines changed

.qmake.conf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
LIB_DESTDIR = $$shadowed($$PWD/libs)
2-
LIBS += -L$${LIB_DESTDIR}
1+
PLUGIN_DESTDIR = $$shadowed($$PWD/qml)
2+
DEFINES += PLUGIN_IMPORT_PATH=\"\\\"$${PLUGIN_DESTDIR}\\\"\"

declarativewidgets.pro

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ TEMPLATE = subdirs
22

33
CONFIG += ordered
44

5-
SUBDIRS = lib runner.pro examples \
6-
extensionplugin \
5+
SUBDIRS = declarativewidgets \
6+
runner.pro \
7+
examples \
78
tests \
89
ui2dw
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

lib/declarativecontainerwidgetextension_p.h declarativewidgets/declarativecontainerwidgetextension_p.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
#ifndef DECLARATIVECONTAINERWIDGETEXTENSION_P_H
2929
#define DECLARATIVECONTAINERWIDGETEXTENSION_P_H
3030

31-
#include "declarativewidgets_export.h"
31+
//#include "declarativewidgets_export.h"
3232
#include "declarativewidgetextension.h"
3333

3434
template <class T>
35-
class DECLARATIVEWIDGETS_EXPORT DeclarativeContainerWidgetExtension : public DeclarativeWidgetExtension
35+
class DeclarativeContainerWidgetExtension : public DeclarativeWidgetExtension
3636
{
3737
public:
3838
explicit DeclarativeContainerWidgetExtension(QObject *parent = 0)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
TEMPLATE = lib
2+
TARGET = declarativewidgets
3+
QT += core-private qml widgets quickwidgets
4+
5+
qtHaveModule(webenginewidgets) {
6+
QT += webenginewidgets
7+
}
8+
9+
CONFIG += qt plugin
10+
11+
TARGET = $$qtLibraryTarget($$TARGET)
12+
uri = QtWidgets
13+
14+
OTHER_FILES = qmldir
15+
16+
DESTDIR = $${PLUGIN_DESTDIR}/QtWidgets
17+
18+
!equals(_PRO_FILE_PWD_, $$DESTDIR) {
19+
copy_qmldir.target = $$DESTDIR/qmldir
20+
copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir
21+
copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\"
22+
QMAKE_EXTRA_TARGETS += copy_qmldir
23+
PRE_TARGETDEPS += $$copy_qmldir.target
24+
}
25+
26+
qmldir.files = qmldir
27+
installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
28+
qmldir.path = $$installPath
29+
target.path = $$installPath
30+
INSTALLS += target qmldir
31+
32+
DEFINES += BUILDING_DECLARATIVEWIDGETS
33+
CONFIG += c++11
34+
35+
HEADERS = \
36+
abstractdeclarativeobject_p.h \
37+
declarativeaction_p.h \
38+
declarativeactionitem_p.h \
39+
declarativeboxlayout_p.h \
40+
declarativebuttongroupextension_p.h \
41+
declarativecolordialog_p.h \
42+
declarativecomboboxextension_p.h \
43+
declarativecontainerwidgetextension_p.h \
44+
declarativefiledialog_p.h \
45+
declarativefilesystemmodelextension_p.h \
46+
declarativefontdialog_p.h \
47+
declarativeformlayout_p.h \
48+
declarativegridlayout_p.h \
49+
declarativehboxlayout_p.h \
50+
declarativeicon_p.h \
51+
declarativeinputdialog_p.h \
52+
declarativeitemviewextension_p.h \
53+
declarativelabelextension_p.h \
54+
declarativelayoutextension.h \
55+
declarativeline_p.h \
56+
declarativeloaderwidget_p.h \
57+
declarativemessagebox_p.h \
58+
declarativeobjectextension.h \
59+
declarativeobjectproxy_p.h \
60+
declarativepixmap_p.h \
61+
declarativeqmlcontext_p.h \
62+
declarativequickwidgetextension_p.h \
63+
declarativeseparator_p.h \
64+
declarativespaceritem_p.h \
65+
declarativestackedlayout_p.h \
66+
declarativestatusbar_p.h \
67+
declarativestringlistmodelextension_p.h \
68+
declarativetableviewextension_p.h \
69+
declarativetabstops_p.h \
70+
declarativetabwidget_p.h \
71+
declarativetexteditextension_p.h \
72+
declarativetreeviewextension_p.h \
73+
declarativevboxlayout_p.h \
74+
declarativewidgetextension.h \
75+
declarativewidgets_plugin.h \
76+
defaultobjectcontainer_p.h \
77+
defaultwidgetcontainer.h \
78+
layoutcontainerinterface_p.h \
79+
mainwindowwidgetcontainer_p.h \
80+
menubarwidgetcontainer_p.h \
81+
menuwidgetcontainer_p.h \
82+
objectadaptors_p.h \
83+
objectcontainerinterface_p.h \
84+
scrollareawidgetcontainer_p.h \
85+
stackedwidgetwidgetcontainer_p.h \
86+
staticdialogmethodattached_p.h \
87+
toolbarwidgetcontainer_p.h \
88+
widgetcontainerinterface_p.h
89+
90+
SOURCES = \
91+
abstractdeclarativeobject.cpp \
92+
declarativeaction.cpp \
93+
declarativeactionitem.cpp \
94+
declarativeboxlayout.cpp \
95+
declarativebuttongroupextension.cpp \
96+
declarativecolordialog.cpp \
97+
declarativecomboboxextension.cpp \
98+
declarativefiledialog.cpp \
99+
declarativefilesystemmodelextension.cpp \
100+
declarativefontdialog.cpp \
101+
declarativeformlayout.cpp \
102+
declarativegridlayout.cpp \
103+
declarativehboxlayout.cpp \
104+
declarativeicon.cpp \
105+
declarativeinputdialog.cpp \
106+
declarativeitemviewextension.cpp \
107+
declarativelabelextension.cpp \
108+
declarativelayoutextension.cpp \
109+
declarativeline.cpp \
110+
declarativeloaderwidget.cpp \
111+
declarativemessagebox.cpp \
112+
declarativeobjectextension.cpp \
113+
declarativepixmap.cpp \
114+
declarativeqmlcontext.cpp \
115+
declarativequickwidgetextension.cpp \
116+
declarativeseparator.cpp \
117+
declarativespaceritem.cpp \
118+
declarativestackedlayout.cpp \
119+
declarativestatusbar.cpp \
120+
declarativestringlistmodelextension.cpp \
121+
declarativetableviewextension.cpp \
122+
declarativetabstops.cpp \
123+
declarativetabwidget.cpp \
124+
declarativetexteditextension.cpp \
125+
declarativetreeviewextension.cpp \
126+
declarativevboxlayout.cpp \
127+
declarativewidgetextension.cpp \
128+
declarativewidgets_plugin.cpp \
129+
defaultobjectcontainer.cpp \
130+
defaultwidgetcontainer.cpp \
131+
mainwindowwidgetcontainer.cpp \
132+
menubarwidgetcontainer.cpp \
133+
menuwidgetcontainer.cpp \
134+
objectadaptors.cpp \
135+
scrollareawidgetcontainer.cpp \
136+
stackedwidgetwidgetcontainer.cpp \
137+
staticdialogmethodattached.cpp \
138+
toolbarwidgetcontainer.cpp
File renamed without changes.

extensionplugin/extensionplugin_plugin.cpp declarativewidgets/declarativewidgets_plugin.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
extensionplugin_plugin.cpp
2+
declarativewidgets_plugin.cpp
33
44
This file is part of DeclarativeWidgets, library and tools for creating QtWidget UIs with QML.
55
@@ -26,7 +26,7 @@
2626
along with this program. If not, see <http://www.gnu.org/licenses/>.
2727
*/
2828

29-
#include "extensionplugin_plugin.h"
29+
#include "declarativewidgets_plugin.h"
3030

3131
#include "declarativeactionitem_p.h"
3232
#include "declarativeaction_p.h"
@@ -111,6 +111,7 @@ void ExtensionpluginPlugin::registerTypes(const char *uri)
111111
{
112112
Q_ASSERT(uri == QLatin1String("QtWidgets"));
113113

114+
114115
// uncreatable core
115116
qmlRegisterType<QAbstractItemModel>();
116117
qmlRegisterType<QItemSelectionModel>();

extensionplugin/extensionplugin_plugin.h declarativewidgets/declarativewidgets_plugin.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
extensionplugin_plugin.h
2+
declarativewidgets_plugin.h
33
44
This file is part of DeclarativeWidgets, library and tools for creating QtWidget UIs with QML.
55
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

declarativewidgets/qmldir

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
module QtWidgets
2+
plugin declarativewidgets
File renamed without changes.
File renamed without changes.

examples/bookstore/bookstore.pro

+3-10
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,7 @@ RESOURCES += \
2424
bookstore.qrc
2525

2626
mac {
27-
APP_LIBS.files = $${LIB_DESTDIR}/libdeclarativewidgets.1.0.0.dylib
28-
APP_LIBS.files += $${LIB_DESTDIR}/libdeclarativewidgets.1.0.dylib
29-
APP_LIBS.files += $${LIB_DESTDIR}/libdeclarativewidgets.1.dylib
30-
APP_LIBS.files += $${LIB_DESTDIR}/libdeclarativewidgets.dylib
31-
APP_LIBS.path = Contents/Frameworks
32-
QMAKE_BUNDLE_DATA += APP_LIBS
33-
34-
DECLARATIVE_WIDGETS.files = $${OUT_PWD}/../../qml/QtWidgets
35-
DECLARATIVE_WIDGETS.path = Contents/PlugIns
36-
QMAKE_BUNDLE_DATA += DECLARATIVE_WIDGETS
27+
QT_WIDGETS.files = $${PLUGIN_DESTDIR}
28+
QT_WIDGETS.path = Contents/PlugIns
29+
QMAKE_BUNDLE_DATA += QT_WIDGETS
3730
}

examples/bookstore/main.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ static QWidget *createDeclarativeWidgetsUi(BookStore *bookStore, const QString &
4343
QQmlEngine engine;
4444
#ifdef Q_OS_MACOS
4545
engine.addImportPath(QStringLiteral("%1/../PlugIns").arg(QCoreApplication::applicationDirPath()));
46+
#else
47+
engine.addImportPath(PLUGIN_IMPORT_PATH);
4648
#endif
4749
engine.rootContext()->setContextProperty("_store", bookStore);
4850
QObject::connect(&engine, &QQmlEngine::quit, QCoreApplication::instance(), &QCoreApplication::quit);

examples/config-editor/config-editor.pro

+3-10
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,7 @@ HEADERS += \
1919
settingsadaptor.h
2020

2121
mac {
22-
APP_LIBS.files = $${LIB_DESTDIR}/libdeclarativewidgets.1.0.0.dylib
23-
APP_LIBS.files += $${LIB_DESTDIR}/libdeclarativewidgets.1.0.dylib
24-
APP_LIBS.files += $${LIB_DESTDIR}/libdeclarativewidgets.1.dylib
25-
APP_LIBS.files += $${LIB_DESTDIR}/libdeclarativewidgets.dylib
26-
APP_LIBS.path = Contents/Frameworks
27-
QMAKE_BUNDLE_DATA += APP_LIBS
28-
29-
DECLARATIVE_WIDGETS.files = $${OUT_PWD}/../../qml/QtWidgets
30-
DECLARATIVE_WIDGETS.path = Contents/PlugIns
31-
QMAKE_BUNDLE_DATA += DECLARATIVE_WIDGETS
22+
QT_WIDGETS.files = $${PLUGIN_DESTDIR}
23+
QT_WIDGETS.path = Contents/PlugIns
24+
QMAKE_BUNDLE_DATA += QT_WIDGETS
3225
}

examples/config-editor/main.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ int main(int argc, char *argv[])
4040
QQmlEngine engine;
4141
#ifdef Q_OS_MACOS
4242
engine.addImportPath(QStringLiteral("%1/../PlugIns").arg(QCoreApplication::applicationDirPath()));
43+
#else
44+
engine.addImportPath(PLUGIN_IMPORT_PATH);
4345
#endif
4446
ConfigEditor editor;
4547
engine.rootContext()->setContextProperty("_editor", &editor);

examples/examples.pri

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
TEMPLATE = app
22
DEPENDPATH += .
3-
INCLUDEPATH += . $$PWD/../lib
3+
INCLUDEPATH += .
44
QT += qml widgets
5-
LIBS += -ldeclarativewidgets

examples/text-editor/main.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ int main(int argc, char **argv)
4343
QQmlEngine engine;
4444
#ifdef Q_OS_MACOS
4545
engine.addImportPath(QStringLiteral("%1/../PlugIns").arg(QCoreApplication::applicationDirPath()));
46+
#else
47+
engine.addImportPath(PLUGIN_IMPORT_PATH);
4648
#endif
4749
Editor editor;
4850
engine.rootContext()->setContextProperty("_editor", &editor);

examples/text-editor/text-editor.pro

+3-10
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,7 @@ OTHER_FILES += \
1515
main.qml
1616

1717
mac {
18-
APP_LIBS.files = $${LIB_DESTDIR}/libdeclarativewidgets.1.0.0.dylib
19-
APP_LIBS.files += $${LIB_DESTDIR}/libdeclarativewidgets.1.0.dylib
20-
APP_LIBS.files += $${LIB_DESTDIR}/libdeclarativewidgets.1.dylib
21-
APP_LIBS.files += $${LIB_DESTDIR}/libdeclarativewidgets.dylib
22-
APP_LIBS.path = Contents/Frameworks
23-
QMAKE_BUNDLE_DATA += APP_LIBS
24-
25-
DECLARATIVE_WIDGETS.files = $${OUT_PWD}/../../qml/QtWidgets
26-
DECLARATIVE_WIDGETS.path = Contents/PlugIns
27-
QMAKE_BUNDLE_DATA += DECLARATIVE_WIDGETS
18+
QT_WIDGETS.files = $${PLUGIN_DESTDIR}
19+
QT_WIDGETS.path = Contents/PlugIns
20+
QMAKE_BUNDLE_DATA += QT_WIDGETS
2821
}

extensionplugin/extensionplugin.pro

-43
This file was deleted.

extensionplugin/qmldir

-3
This file was deleted.

0 commit comments

Comments
 (0)