aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-04 18:15:33 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-13 15:45:28 +0000
commit6cbd098190ce4fc624f8f6427d9caa460109f324 (patch)
tree988192208023c3d804839f5b4c4f2c0b991043a7 /src/imports
parent3bd5304827359c32e50f84c75436521c440bba86 (diff)
Support static builds
Change-Id: I17bb9131603da912597777b2ec0b9be3894ed858 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/calendar/qtlabscalendarplugin.cpp13
-rw-r--r--src/imports/controls/ComboBox.qml1
-rw-r--r--src/imports/controls/material/CheckBox.qml1
-rw-r--r--src/imports/controls/material/ComboBox.qml1
-rw-r--r--src/imports/controls/material/ItemDelegate.qml1
-rw-r--r--src/imports/controls/material/MenuItem.qml1
-rw-r--r--src/imports/controls/material/RadioButton.qml1
-rw-r--r--src/imports/controls/material/RangeSlider.qml1
-rw-r--r--src/imports/controls/material/Slider.qml1
-rw-r--r--src/imports/controls/material/Switch.qml1
-rw-r--r--src/imports/controls/material/qtlabsmaterialstyleplugin.cpp14
-rw-r--r--src/imports/controls/qtlabscontrolsplugin.cpp10
-rw-r--r--src/imports/controls/universal/ComboBox.qml1
-rw-r--r--src/imports/controls/universal/qtlabsuniversalstyleplugin.cpp10
-rw-r--r--src/imports/templates/qtlabstemplatesplugin.cpp13
15 files changed, 65 insertions, 5 deletions
diff --git a/src/imports/calendar/qtlabscalendarplugin.cpp b/src/imports/calendar/qtlabscalendarplugin.cpp
index 8d7d563d..a0b52718 100644
--- a/src/imports/calendar/qtlabscalendarplugin.cpp
+++ b/src/imports/calendar/qtlabscalendarplugin.cpp
@@ -42,6 +42,13 @@
#include "qquickcalendarmodel_p.h"
#include "qquickcalendar_p.h"
+static inline void initResources()
+{
+#ifdef QT_STATIC
+ Q_INIT_RESOURCE(qmake_Qt_labs_calendar);
+#endif
+}
+
QT_BEGIN_NAMESPACE
class QtLabsCalendarPlugin: public QQmlExtensionPlugin
@@ -50,9 +57,15 @@ class QtLabsCalendarPlugin: public QQmlExtensionPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0")
public:
+ QtLabsCalendarPlugin(QObject *parent = Q_NULLPTR);
void registerTypes(const char *uri);
};
+QtLabsCalendarPlugin::QtLabsCalendarPlugin(QObject *parent) : QQmlExtensionPlugin(parent)
+{
+ initResources();
+}
+
static QObject *calendarSingleton(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine);
diff --git a/src/imports/controls/ComboBox.qml b/src/imports/controls/ComboBox.qml
index e06372e7..5be26304 100644
--- a/src/imports/controls/ComboBox.qml
+++ b/src/imports/controls/ComboBox.qml
@@ -36,6 +36,7 @@
import QtQuick 2.6
import QtQuick.Window 2.2
+import Qt.labs.controls 1.0
import Qt.labs.templates 1.0 as T
T.ComboBox {
diff --git a/src/imports/controls/material/CheckBox.qml b/src/imports/controls/material/CheckBox.qml
index 939d5a31..a4af00c7 100644
--- a/src/imports/controls/material/CheckBox.qml
+++ b/src/imports/controls/material/CheckBox.qml
@@ -37,6 +37,7 @@
import QtQuick 2.6
import Qt.labs.templates 1.0 as T
import Qt.labs.controls.material 1.0
+import Qt.labs.controls.material.impl 1.0
T.CheckBox {
id: control
diff --git a/src/imports/controls/material/ComboBox.qml b/src/imports/controls/material/ComboBox.qml
index 93494a60..4b154182 100644
--- a/src/imports/controls/material/ComboBox.qml
+++ b/src/imports/controls/material/ComboBox.qml
@@ -36,6 +36,7 @@
import QtQuick 2.6
import QtQuick.Window 2.2
+import Qt.labs.controls 1.0
import Qt.labs.templates 1.0 as T
import Qt.labs.controls.material 1.0
import QtGraphicalEffects 1.0
diff --git a/src/imports/controls/material/ItemDelegate.qml b/src/imports/controls/material/ItemDelegate.qml
index 8cd53e88..b955c6d9 100644
--- a/src/imports/controls/material/ItemDelegate.qml
+++ b/src/imports/controls/material/ItemDelegate.qml
@@ -37,6 +37,7 @@
import QtQuick 2.6
import Qt.labs.templates 1.0 as T
import Qt.labs.controls.material 1.0
+import Qt.labs.controls.material.impl 1.0
T.ItemDelegate {
id: control
diff --git a/src/imports/controls/material/MenuItem.qml b/src/imports/controls/material/MenuItem.qml
index f9c69291..15ef6065 100644
--- a/src/imports/controls/material/MenuItem.qml
+++ b/src/imports/controls/material/MenuItem.qml
@@ -37,6 +37,7 @@
import QtQuick 2.6
import Qt.labs.templates 1.0 as T
import Qt.labs.controls.material 1.0
+import Qt.labs.controls.material.impl 1.0
T.MenuItem {
id: control
diff --git a/src/imports/controls/material/RadioButton.qml b/src/imports/controls/material/RadioButton.qml
index 96605311..40761be6 100644
--- a/src/imports/controls/material/RadioButton.qml
+++ b/src/imports/controls/material/RadioButton.qml
@@ -37,6 +37,7 @@
import QtQuick 2.6
import Qt.labs.templates 1.0 as T
import Qt.labs.controls.material 1.0
+import Qt.labs.controls.material.impl 1.0
T.RadioButton {
id: control
diff --git a/src/imports/controls/material/RangeSlider.qml b/src/imports/controls/material/RangeSlider.qml
index bf8c16ef..617f9ac7 100644
--- a/src/imports/controls/material/RangeSlider.qml
+++ b/src/imports/controls/material/RangeSlider.qml
@@ -37,6 +37,7 @@
import QtQuick 2.6
import Qt.labs.templates 1.0 as T
import Qt.labs.controls.material 1.0
+import Qt.labs.controls.material.impl 1.0
T.RangeSlider {
id: control
diff --git a/src/imports/controls/material/Slider.qml b/src/imports/controls/material/Slider.qml
index 139c9151..c121c10b 100644
--- a/src/imports/controls/material/Slider.qml
+++ b/src/imports/controls/material/Slider.qml
@@ -37,6 +37,7 @@
import QtQuick 2.6
import Qt.labs.templates 1.0 as T
import Qt.labs.controls.material 1.0
+import Qt.labs.controls.material.impl 1.0
T.Slider {
id: control
diff --git a/src/imports/controls/material/Switch.qml b/src/imports/controls/material/Switch.qml
index d2658de6..36e2d4a8 100644
--- a/src/imports/controls/material/Switch.qml
+++ b/src/imports/controls/material/Switch.qml
@@ -36,6 +36,7 @@
import QtQuick 2.6
import Qt.labs.controls.material 1.0
+import Qt.labs.controls.material.impl 1.0
import Qt.labs.templates 1.0 as T
import QtGraphicalEffects 1.0
diff --git a/src/imports/controls/material/qtlabsmaterialstyleplugin.cpp b/src/imports/controls/material/qtlabsmaterialstyleplugin.cpp
index 975e5db6..06c84aa1 100644
--- a/src/imports/controls/material/qtlabsmaterialstyleplugin.cpp
+++ b/src/imports/controls/material/qtlabsmaterialstyleplugin.cpp
@@ -46,6 +46,9 @@
static inline void initResources()
{
Q_INIT_RESOURCE(qtlabsmaterialstyleplugin);
+#ifdef QT_STATIC
+ Q_INIT_RESOURCE(qmake_Qt_labs_controls_material);
+#endif
}
QT_BEGIN_NAMESPACE
@@ -56,6 +59,7 @@ class QtLabsMaterialStylePlugin : public QQmlExtensionPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0")
public:
+ QtLabsMaterialStylePlugin(QObject *parent = Q_NULLPTR);
~QtLabsMaterialStylePlugin();
void registerTypes(const char *uri) Q_DECL_OVERRIDE;
void initializeEngine(QQmlEngine *engine, const char *uri) Q_DECL_OVERRIDE;
@@ -64,6 +68,11 @@ private:
QQuickProxyTheme *theme;
};
+QtLabsMaterialStylePlugin::QtLabsMaterialStylePlugin(QObject *parent) : QQmlExtensionPlugin(parent)
+{
+ initResources();
+}
+
QtLabsMaterialStylePlugin::~QtLabsMaterialStylePlugin()
{
if (theme) {
@@ -81,7 +90,6 @@ void QtLabsMaterialStylePlugin::registerTypes(const char *uri)
void QtLabsMaterialStylePlugin::initializeEngine(QQmlEngine *engine, const char *uri)
{
Q_UNUSED(engine);
- Q_UNUSED(uri);
QQuickStyleSelector selector;
if (selector.style() == QStringLiteral("material")) {
@@ -94,11 +102,11 @@ void QtLabsMaterialStylePlugin::initializeEngine(QQmlEngine *engine, const char
}
}
- initResources();
-
QByteArray import = QByteArray(uri) + ".impl";
qmlRegisterType<QQuickMaterialProgressRing>(import, 1, 0, "ProgressRing");
qmlRegisterType<QQuickMaterialRingAnimator>(import, 1, 0, "RingAnimator");
+ qmlRegisterType(QUrl(baseUrl().toString() + QStringLiteral("/Ripple.qml")), import, 1, 0, "Ripple");
+ qmlRegisterType(QUrl(baseUrl().toString() + QStringLiteral("/SliderHandle.qml")), import, 1, 0, "SliderHandle");
}
QT_END_NAMESPACE
diff --git a/src/imports/controls/qtlabscontrolsplugin.cpp b/src/imports/controls/qtlabscontrolsplugin.cpp
index b56df31a..e075898c 100644
--- a/src/imports/controls/qtlabscontrolsplugin.cpp
+++ b/src/imports/controls/qtlabscontrolsplugin.cpp
@@ -51,6 +51,9 @@
static inline void initResources()
{
Q_INIT_RESOURCE(qtlabscontrolsplugin);
+#ifdef QT_STATIC
+ Q_INIT_RESOURCE(qmake_Qt_labs_controls);
+#endif
}
QT_BEGIN_NAMESPACE
@@ -61,10 +64,16 @@ class QtLabsControlsPlugin: public QQmlExtensionPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0")
public:
+ QtLabsControlsPlugin(QObject *parent = Q_NULLPTR);
void registerTypes(const char *uri);
void initializeEngine(QQmlEngine *engine, const char *uri);
};
+QtLabsControlsPlugin::QtLabsControlsPlugin(QObject *parent) : QQmlExtensionPlugin(parent)
+{
+ initResources();
+}
+
void QtLabsControlsPlugin::registerTypes(const char *uri)
{
qmlRegisterType<QQuickAbstractButton>(uri, 1, 0, "AbstractButton");
@@ -115,7 +124,6 @@ void QtLabsControlsPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
{
Q_UNUSED(engine);
Q_UNUSED(uri);
- initResources();
const QByteArray import = QByteArray(uri) + ".impl";
qmlRegisterType<QQuickBusyIndicatorRing>(import, 1, 0, "BusyRing");
diff --git a/src/imports/controls/universal/ComboBox.qml b/src/imports/controls/universal/ComboBox.qml
index 4e73321e..56d7a983 100644
--- a/src/imports/controls/universal/ComboBox.qml
+++ b/src/imports/controls/universal/ComboBox.qml
@@ -36,6 +36,7 @@
import QtQuick 2.6
import QtQuick.Window 2.2
+import Qt.labs.controls 1.0
import Qt.labs.templates 1.0 as T
import Qt.labs.controls.universal 1.0
diff --git a/src/imports/controls/universal/qtlabsuniversalstyleplugin.cpp b/src/imports/controls/universal/qtlabsuniversalstyleplugin.cpp
index 703da011..605c06e5 100644
--- a/src/imports/controls/universal/qtlabsuniversalstyleplugin.cpp
+++ b/src/imports/controls/universal/qtlabsuniversalstyleplugin.cpp
@@ -48,6 +48,9 @@
static inline void initResources()
{
Q_INIT_RESOURCE(qtlabsuniversalstyleplugin);
+#ifdef QT_STATIC
+ Q_INIT_RESOURCE(qmake_Qt_labs_controls_universal);
+#endif
}
QT_BEGIN_NAMESPACE
@@ -58,6 +61,7 @@ class QtLabsUniversalStylePlugin: public QQmlExtensionPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0")
public:
+ QtLabsUniversalStylePlugin(QObject *parent = Q_NULLPTR);
~QtLabsUniversalStylePlugin();
void registerTypes(const char *uri) Q_DECL_OVERRIDE;
void initializeEngine(QQmlEngine *engine, const char *uri) Q_DECL_OVERRIDE;
@@ -66,6 +70,11 @@ private:
QQuickProxyTheme *theme;
};
+QtLabsUniversalStylePlugin::QtLabsUniversalStylePlugin(QObject *parent) : QQmlExtensionPlugin(parent)
+{
+ initResources();
+}
+
QtLabsUniversalStylePlugin::~QtLabsUniversalStylePlugin()
{
if (theme) {
@@ -93,7 +102,6 @@ void QtLabsUniversalStylePlugin::initializeEngine(QQmlEngine *engine, const char
}
}
- initResources();
engine->addImageProvider(QStringLiteral("universal"), new QQuickUniversalImageProvider);
QByteArray import = QByteArray(uri) + ".impl";
diff --git a/src/imports/templates/qtlabstemplatesplugin.cpp b/src/imports/templates/qtlabstemplatesplugin.cpp
index 76698b90..4e38d1a6 100644
--- a/src/imports/templates/qtlabstemplatesplugin.cpp
+++ b/src/imports/templates/qtlabstemplatesplugin.cpp
@@ -74,6 +74,13 @@
#include <QtLabsTemplates/private/qquicktoolbutton_p.h>
#include <QtLabsTemplates/private/qquicktumbler_p.h>
+static inline void initResources()
+{
+#ifdef QT_STATIC
+ Q_INIT_RESOURCE(qmake_Qt_labs_templates);
+#endif
+}
+
QT_BEGIN_NAMESPACE
class QtLabsTemplatesPlugin: public QQmlExtensionPlugin
@@ -82,9 +89,15 @@ class QtLabsTemplatesPlugin: public QQmlExtensionPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0")
public:
+ QtLabsTemplatesPlugin(QObject *parent = Q_NULLPTR);
void registerTypes(const char *uri);
};
+QtLabsTemplatesPlugin::QtLabsTemplatesPlugin(QObject *parent) : QQmlExtensionPlugin(parent)
+{
+ initResources();
+}
+
void QtLabsTemplatesPlugin::registerTypes(const char *uri)
{
qmlRegisterType<QQuickAbstractButton>(uri, 1, 0, "AbstractButton");