aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/window
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-08-22 16:36:42 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-01-10 18:01:27 +0100
commit1cd494fbfb3eaf21717697c3c7df39b214b48ee3 (patch)
tree6ec56567a6f3355b1814ac18169d354239a729fc /src/imports/window
parent8550dff55c62b4f2b588513014b5cad8fe2c5f5b (diff)
Generate registrations for all imports
Now that we can generate all QML type information at build time, we should also use it. Move the types for QtTest into the testlib import plugin. They don't need to be exported from QtQuickTest. Trigger the resource initialization of the shapes library from the plugin so that we retain a dependency and the linker doesn't optimize the module initialization away. Change-Id: Icc8cb338aa03ef1e3085e29356a5db7b73ba0a01 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/imports/window')
-rw-r--r--src/imports/window/plugin.cpp21
-rw-r--r--src/imports/window/plugins.qmltypes378
-rw-r--r--src/imports/window/window.pro1
3 files changed, 4 insertions, 396 deletions
diff --git a/src/imports/window/plugin.cpp b/src/imports/window/plugin.cpp
index aa3ccafdf5..ec4f2c5d2a 100644
--- a/src/imports/window/plugin.cpp
+++ b/src/imports/window/plugin.cpp
@@ -58,28 +58,13 @@ QT_BEGIN_NAMESPACE
\endqml
*/
-
//![class decl]
-class QtQuick2WindowPlugin : public QQmlExtensionPlugin
+class QtQuick2WindowPlugin : public QQmlEngineExtensionPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
+ Q_PLUGIN_METADATA(IID QQmlEngineExtensionInterface_iid)
public:
- QtQuick2WindowPlugin(QObject *parent = nullptr) : QQmlExtensionPlugin(parent) { }
- void registerTypes(const char *uri) override
- {
- Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.Window"));
-
- qmlRegisterTypesAndRevisions<
- QWindowForeign,
- QQuickWindowForeign,
- QQuickWindowQmlImplForeign,
- QQuickScreenForeign,
- QQuickScreenInfoForeign>(uri, 2);
-
- // Auto-increment the import to stay in sync with ALL future QtQuick minor versions from 5.11 onward
- qmlRegisterModule(uri, 2, QT_VERSION_MINOR);
- }
+ QtQuick2WindowPlugin(QObject *parent = nullptr) : QQmlEngineExtensionPlugin(parent) { }
};
//![class decl]
diff --git a/src/imports/window/plugins.qmltypes b/src/imports/window/plugins.qmltypes
deleted file mode 100644
index 5d6cf33f4f..0000000000
--- a/src/imports/window/plugins.qmltypes
+++ /dev/null
@@ -1,378 +0,0 @@
-import QtQuick.tooling 1.2
-
-// This file describes the plugin-supplied types contained in the library.
-// It is used for QML tooling purposes only.
-//
-// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable QtQuick.Window 2.14'
-
-Module {
- dependencies: ["QtQuick 2.0"]
- Component {
- name: "QQuickRootItem"
- defaultProperty: "data"
- prototype: "QQuickItem"
- Method {
- name: "setWidth"
- Parameter { name: "w"; type: "int" }
- }
- Method {
- name: "setHeight"
- Parameter { name: "h"; type: "int" }
- }
- }
- Component {
- name: "QQuickScreen"
- prototype: "QObject"
- exports: [
- "QtQuick.Window/Screen 2.0",
- "QtQuick.Window/Screen 2.10",
- "QtQuick.Window/Screen 2.3"
- ]
- isCreatable: false
- exportMetaObjectRevisions: [0, 10, 3]
- attachedType: "QQuickScreenAttached"
- }
- Component {
- name: "QQuickScreenAttached"
- prototype: "QQuickScreenInfo"
- Property { name: "orientationUpdateMask"; type: "Qt::ScreenOrientations" }
- Method {
- name: "angleBetween"
- type: "int"
- Parameter { name: "a"; type: "int" }
- Parameter { name: "b"; type: "int" }
- }
- }
- Component {
- name: "QQuickScreenInfo"
- prototype: "QObject"
- exports: [
- "QtQuick.Window/ScreenInfo 2.10",
- "QtQuick.Window/ScreenInfo 2.3"
- ]
- isCreatable: false
- exportMetaObjectRevisions: [10, 3]
- Property { name: "name"; type: "string"; isReadonly: true }
- Property { name: "manufacturer"; revision: 10; type: "string"; isReadonly: true }
- Property { name: "model"; revision: 10; type: "string"; isReadonly: true }
- Property { name: "serialNumber"; revision: 10; type: "string"; isReadonly: true }
- Property { name: "width"; type: "int"; isReadonly: true }
- Property { name: "height"; type: "int"; isReadonly: true }
- Property { name: "desktopAvailableWidth"; type: "int"; isReadonly: true }
- Property { name: "desktopAvailableHeight"; type: "int"; isReadonly: true }
- Property { name: "logicalPixelDensity"; type: "double"; isReadonly: true }
- Property { name: "pixelDensity"; type: "double"; isReadonly: true }
- Property { name: "devicePixelRatio"; type: "double"; isReadonly: true }
- Property { name: "primaryOrientation"; type: "Qt::ScreenOrientation"; isReadonly: true }
- Property { name: "orientation"; type: "Qt::ScreenOrientation"; isReadonly: true }
- Property { name: "virtualX"; revision: 3; type: "int"; isReadonly: true }
- Property { name: "virtualY"; revision: 3; type: "int"; isReadonly: true }
- Signal { name: "manufacturerChanged"; revision: 10 }
- Signal { name: "modelChanged"; revision: 10 }
- Signal { name: "serialNumberChanged"; revision: 10 }
- Signal { name: "desktopGeometryChanged" }
- Signal { name: "virtualXChanged"; revision: 3 }
- Signal { name: "virtualYChanged"; revision: 3 }
- }
- Component {
- name: "QQuickWindow"
- defaultProperty: "data"
- prototype: "QWindow"
- exports: ["QtQuick.Window/Window 2.0"]
- exportMetaObjectRevisions: [0]
- Enum {
- name: "CreateTextureOptions"
- values: {
- "TextureHasAlphaChannel": 1,
- "TextureHasMipmaps": 2,
- "TextureOwnsGLTexture": 4,
- "TextureCanUseAtlas": 8,
- "TextureIsOpaque": 16
- }
- }
- Enum {
- name: "SceneGraphError"
- values: {
- "ContextNotAvailable": 1
- }
- }
- Enum {
- name: "TextRenderType"
- values: {
- "QtTextRendering": 0,
- "NativeTextRendering": 1
- }
- }
- Enum {
- name: "NativeObjectType"
- values: {
- "NativeObjectTexture": 0
- }
- }
- Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
- Property { name: "color"; type: "QColor" }
- Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
- Property {
- name: "activeFocusItem"
- revision: 1
- type: "QQuickItem"
- isReadonly: true
- isPointer: true
- }
- Signal { name: "frameSwapped" }
- Signal {
- name: "openglContextCreated"
- revision: 2
- Parameter { name: "context"; type: "QOpenGLContext"; isPointer: true }
- }
- Signal { name: "sceneGraphInitialized" }
- Signal { name: "sceneGraphInvalidated" }
- Signal { name: "beforeSynchronizing" }
- Signal { name: "afterSynchronizing"; revision: 2 }
- Signal { name: "beforeRendering" }
- Signal { name: "afterRendering" }
- Signal { name: "afterAnimating"; revision: 2 }
- Signal { name: "sceneGraphAboutToStop"; revision: 2 }
- Signal {
- name: "closing"
- revision: 1
- Parameter { name: "close"; type: "QQuickCloseEvent"; isPointer: true }
- }
- Signal {
- name: "colorChanged"
- Parameter { type: "QColor" }
- }
- Signal { name: "activeFocusItemChanged"; revision: 1 }
- Signal {
- name: "sceneGraphError"
- revision: 2
- Parameter { name: "error"; type: "QQuickWindow::SceneGraphError" }
- Parameter { name: "message"; type: "string" }
- }
- Signal { name: "beforeRenderPassRecording"; revision: 14 }
- Signal { name: "afterRenderPassRecording"; revision: 14 }
- Method { name: "update" }
- Method { name: "releaseResources" }
- }
- Component {
- name: "QQuickWindowAttached"
- prototype: "QObject"
- Property { name: "visibility"; type: "QWindow::Visibility"; isReadonly: true }
- Property { name: "active"; type: "bool"; isReadonly: true }
- Property { name: "activeFocusItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
- Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
- Property { name: "width"; type: "int"; isReadonly: true }
- Property { name: "height"; type: "int"; isReadonly: true }
- Property { name: "window"; type: "QQuickWindow"; isReadonly: true; isPointer: true }
- }
- Component {
- name: "QQuickWindowQmlImpl"
- defaultProperty: "data"
- prototype: "QQuickWindow"
- exports: [
- "QtQuick.Window/Window 2.1",
- "QtQuick.Window/Window 2.13",
- "QtQuick.Window/Window 2.14",
- "QtQuick.Window/Window 2.2",
- "QtQuick.Window/Window 2.3"
- ]
- exportMetaObjectRevisions: [1, 13, 14, 2, 3]
- attachedType: "QQuickWindowAttached"
- Property { name: "visible"; type: "bool" }
- Property { name: "visibility"; type: "Visibility" }
- Property { name: "screen"; revision: 3; type: "QObject"; isPointer: true }
- Signal {
- name: "visibleChanged"
- Parameter { name: "arg"; type: "bool" }
- }
- Signal {
- name: "visibilityChanged"
- Parameter { name: "visibility"; type: "QWindow::Visibility" }
- }
- Signal { name: "screenChanged"; revision: 3 }
- }
- Component {
- name: "QWindow"
- prototype: "QObject"
- Enum {
- name: "Visibility"
- values: {
- "Hidden": 0,
- "AutomaticVisibility": 1,
- "Windowed": 2,
- "Minimized": 3,
- "Maximized": 4,
- "FullScreen": 5
- }
- }
- Enum {
- name: "AncestorMode"
- values: {
- "ExcludeTransients": 0,
- "IncludeTransients": 1
- }
- }
- Property { name: "title"; type: "string" }
- Property { name: "modality"; type: "Qt::WindowModality" }
- Property { name: "flags"; type: "Qt::WindowFlags" }
- Property { name: "x"; type: "int" }
- Property { name: "y"; type: "int" }
- Property { name: "width"; type: "int" }
- Property { name: "height"; type: "int" }
- Property { name: "minimumWidth"; type: "int" }
- Property { name: "minimumHeight"; type: "int" }
- Property { name: "maximumWidth"; type: "int" }
- Property { name: "maximumHeight"; type: "int" }
- Property { name: "visible"; type: "bool" }
- Property { name: "active"; revision: 1; type: "bool"; isReadonly: true }
- Property { name: "visibility"; revision: 1; type: "Visibility" }
- Property { name: "contentOrientation"; type: "Qt::ScreenOrientation" }
- Property { name: "opacity"; revision: 1; type: "double" }
- Property { name: "transientParent"; revision: 13; type: "QWindow"; isPointer: true }
- Signal {
- name: "screenChanged"
- Parameter { name: "screen"; type: "QScreen"; isPointer: true }
- }
- Signal {
- name: "modalityChanged"
- Parameter { name: "modality"; type: "Qt::WindowModality" }
- }
- Signal {
- name: "windowStateChanged"
- Parameter { name: "windowState"; type: "Qt::WindowState" }
- }
- Signal {
- name: "windowTitleChanged"
- revision: 2
- Parameter { name: "title"; type: "string" }
- }
- Signal {
- name: "xChanged"
- Parameter { name: "arg"; type: "int" }
- }
- Signal {
- name: "yChanged"
- Parameter { name: "arg"; type: "int" }
- }
- Signal {
- name: "widthChanged"
- Parameter { name: "arg"; type: "int" }
- }
- Signal {
- name: "heightChanged"
- Parameter { name: "arg"; type: "int" }
- }
- Signal {
- name: "minimumWidthChanged"
- Parameter { name: "arg"; type: "int" }
- }
- Signal {
- name: "minimumHeightChanged"
- Parameter { name: "arg"; type: "int" }
- }
- Signal {
- name: "maximumWidthChanged"
- Parameter { name: "arg"; type: "int" }
- }
- Signal {
- name: "maximumHeightChanged"
- Parameter { name: "arg"; type: "int" }
- }
- Signal {
- name: "visibleChanged"
- Parameter { name: "arg"; type: "bool" }
- }
- Signal {
- name: "visibilityChanged"
- revision: 1
- Parameter { name: "visibility"; type: "QWindow::Visibility" }
- }
- Signal { name: "activeChanged"; revision: 1 }
- Signal {
- name: "contentOrientationChanged"
- Parameter { name: "orientation"; type: "Qt::ScreenOrientation" }
- }
- Signal {
- name: "focusObjectChanged"
- Parameter { name: "object"; type: "QObject"; isPointer: true }
- }
- Signal {
- name: "opacityChanged"
- revision: 1
- Parameter { name: "opacity"; type: "double" }
- }
- Signal {
- name: "transientParentChanged"
- revision: 13
- Parameter { name: "transientParent"; type: "QWindow"; isPointer: true }
- }
- Method { name: "requestActivate"; revision: 1 }
- Method {
- name: "setVisible"
- Parameter { name: "visible"; type: "bool" }
- }
- Method { name: "show" }
- Method { name: "hide" }
- Method { name: "showMinimized" }
- Method { name: "showMaximized" }
- Method { name: "showFullScreen" }
- Method { name: "showNormal" }
- Method { name: "close"; type: "bool" }
- Method { name: "raise" }
- Method { name: "lower" }
- Method {
- name: "setTitle"
- Parameter { type: "string" }
- }
- Method {
- name: "setX"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setY"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setWidth"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setHeight"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setGeometry"
- Parameter { name: "posx"; type: "int" }
- Parameter { name: "posy"; type: "int" }
- Parameter { name: "w"; type: "int" }
- Parameter { name: "h"; type: "int" }
- }
- Method {
- name: "setGeometry"
- Parameter { name: "rect"; type: "QRect" }
- }
- Method {
- name: "setMinimumWidth"
- Parameter { name: "w"; type: "int" }
- }
- Method {
- name: "setMinimumHeight"
- Parameter { name: "h"; type: "int" }
- }
- Method {
- name: "setMaximumWidth"
- Parameter { name: "w"; type: "int" }
- }
- Method {
- name: "setMaximumHeight"
- Parameter { name: "h"; type: "int" }
- }
- Method {
- name: "alert"
- revision: 1
- Parameter { name: "msec"; type: "int" }
- }
- Method { name: "requestUpdate"; revision: 3 }
- }
-}
diff --git a/src/imports/window/window.pro b/src/imports/window/window.pro
index a8ce79f275..068169b36f 100644
--- a/src/imports/window/window.pro
+++ b/src/imports/window/window.pro
@@ -11,4 +11,5 @@ HEADERS += \
QT += quick-private qml-private
+CONFIG += qmltypes install_qmltypes
load(qml_plugin)