aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2017-04-03 11:58:46 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2017-04-25 13:03:28 +0000
commite2520ff76be49c5aa917741cc6a380fe1549e47d (patch)
tree6ec310e84eba500ac39a49c8df2ed0d22acd2dff
parentb334a92493c9e4956b0fc631610857d1b1cf5f6d (diff)
Move PathItem to qt.labs
Change-Id: I1cd686cff60bd40fe2cbbc34f917fac7835b6b7d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
-rw-r--r--examples/quick/pathitem/content/item1.qml3
-rw-r--r--examples/quick/pathitem/content/item10.qml3
-rw-r--r--examples/quick/pathitem/content/item11.qml3
-rw-r--r--examples/quick/pathitem/content/item12.qml3
-rw-r--r--examples/quick/pathitem/content/item13.qml3
-rw-r--r--examples/quick/pathitem/content/item14.qml3
-rw-r--r--examples/quick/pathitem/content/item15.qml3
-rw-r--r--examples/quick/pathitem/content/item17.qml3
-rw-r--r--examples/quick/pathitem/content/item2.qml3
-rw-r--r--examples/quick/pathitem/content/item4.qml3
-rw-r--r--examples/quick/pathitem/content/item5.qml3
-rw-r--r--examples/quick/pathitem/content/item6.qml3
-rw-r--r--examples/quick/pathitem/content/item7.qml3
-rw-r--r--examples/quick/pathitem/content/item8.qml3
-rw-r--r--examples/quick/pathitem/content/item9.qml3
-rw-r--r--examples/quick/pathitem/content/pathitemgallery.qml1
-rw-r--r--examples/quick/pathitem/content/pathiteminteract.qml11
-rw-r--r--examples/quick/pathitem/content/pathitemsampling.qml3
-rw-r--r--examples/quick/pathitem/content/pathitemtigers.qml3
-rw-r--r--examples/quick/pathitem/content/tiger.qml1
-rw-r--r--examples/quick/quick.pro1
-rw-r--r--src/imports/imports.pro2
-rw-r--r--src/imports/pathitem/pathitem.pro31
-rw-r--r--src/imports/pathitem/plugin.cpp74
-rw-r--r--src/imports/pathitem/plugins.qmltypes312
-rw-r--r--src/imports/pathitem/qmldir4
-rw-r--r--src/imports/pathitem/qquicknvprfunctions.cpp (renamed from src/quick/util/qquicknvprfunctions.cpp)0
-rw-r--r--src/imports/pathitem/qquicknvprfunctions_p.h (renamed from src/quick/util/qquicknvprfunctions_p.h)0
-rw-r--r--src/imports/pathitem/qquicknvprfunctions_p_p.h (renamed from src/quick/util/qquicknvprfunctions_p_p.h)0
-rw-r--r--src/imports/pathitem/qquickpathitem.cpp (renamed from src/quick/items/qquickpathitem.cpp)2
-rw-r--r--src/imports/pathitem/qquickpathitem_p.h (renamed from src/quick/items/qquickpathitem_p.h)12
-rw-r--r--src/imports/pathitem/qquickpathitem_p_p.h (renamed from src/quick/items/qquickpathitem_p_p.h)2
-rw-r--r--src/imports/pathitem/qquickpathitemgenericrenderer.cpp (renamed from src/quick/items/qquickpathitemgenericrenderer.cpp)0
-rw-r--r--src/imports/pathitem/qquickpathitemgenericrenderer_p.h (renamed from src/quick/items/qquickpathitemgenericrenderer_p.h)0
-rw-r--r--src/imports/pathitem/qquickpathitemnvprrenderer.cpp (renamed from src/quick/items/qquickpathitemnvprrenderer.cpp)0
-rw-r--r--src/imports/pathitem/qquickpathitemnvprrenderer_p.h (renamed from src/quick/items/qquickpathitemnvprrenderer_p.h)2
-rw-r--r--src/imports/pathitem/qquickpathitemsoftwarerenderer.cpp (renamed from src/quick/items/qquickpathitemsoftwarerenderer.cpp)0
-rw-r--r--src/imports/pathitem/qquickpathitemsoftwarerenderer_p.h (renamed from src/quick/items/qquickpathitemsoftwarerenderer_p.h)0
-rw-r--r--src/quick/items/context2d/qquickcontext2d.cpp3
-rw-r--r--src/quick/items/items.pri15
-rw-r--r--src/quick/items/qquickitemsmodule.cpp6
-rw-r--r--src/quick/util/qquicksvgparser_p.h7
-rw-r--r--src/quick/util/util.pri7
-rw-r--r--tests/auto/quick/qquickpathitem/data/pathitem1.qml1
-rw-r--r--tests/auto/quick/qquickpathitem/data/pathitem2.qml1
-rw-r--r--tests/auto/quick/qquickpathitem/data/pathitem3.qml1
-rw-r--r--tests/auto/quick/qquickpathitem/data/pathitem4.qml1
-rw-r--r--tests/auto/quick/qquickpathitem/qquickpathitem.pro22
-rw-r--r--tests/auto/quick/qquickpathitem/tst_qquickpathitem.cpp9
-rw-r--r--tests/manual/pathitem/pathitemtest.qml3
-rw-r--r--tests/manual/scenegraph_lancelot/data/pathitem/pathitem_arc.qml1
-rw-r--r--tests/manual/scenegraph_lancelot/data/pathitem/pathitem_arc_fill.qml1
-rw-r--r--tests/manual/scenegraph_lancelot/data/pathitem/pathitem_cubic.qml1
-rw-r--r--tests/manual/scenegraph_lancelot/data/pathitem/pathitem_linear_gradient.qml1
-rw-r--r--tests/manual/scenegraph_lancelot/data/pathitem/pathitem_lines.qml1
-rw-r--r--tests/manual/scenegraph_lancelot/data/pathitem/pathitem_quad.qml1
-rw-r--r--tests/manual/scenegraph_lancelot/data/pathitem/pathitem_spread.qml1
57 files changed, 525 insertions, 64 deletions
diff --git a/examples/quick/pathitem/content/item1.qml b/examples/quick/pathitem/content/item1.qml
index 0c067d0273..e870c50a89 100644
--- a/examples/quick/pathitem/content/item1.qml
+++ b/examples/quick/pathitem/content/item1.qml
@@ -48,7 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.9 // to get PathItem
+import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Rectangle {
color: "lightGray"
diff --git a/examples/quick/pathitem/content/item10.qml b/examples/quick/pathitem/content/item10.qml
index 960a035ce2..599d41506f 100644
--- a/examples/quick/pathitem/content/item10.qml
+++ b/examples/quick/pathitem/content/item10.qml
@@ -48,7 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.9 // to get PathItem
+import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Rectangle {
color: "lightGray"
diff --git a/examples/quick/pathitem/content/item11.qml b/examples/quick/pathitem/content/item11.qml
index ad14728a61..4f26663e5f 100644
--- a/examples/quick/pathitem/content/item11.qml
+++ b/examples/quick/pathitem/content/item11.qml
@@ -48,7 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.9 // to get PathItem
+import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Rectangle {
color: "lightGray"
diff --git a/examples/quick/pathitem/content/item12.qml b/examples/quick/pathitem/content/item12.qml
index e64a2306cf..cf7e13dcca 100644
--- a/examples/quick/pathitem/content/item12.qml
+++ b/examples/quick/pathitem/content/item12.qml
@@ -48,7 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.9 // to get PathItem
+import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Rectangle {
color: "lightGray"
diff --git a/examples/quick/pathitem/content/item13.qml b/examples/quick/pathitem/content/item13.qml
index b6b7f33265..02dc6a719e 100644
--- a/examples/quick/pathitem/content/item13.qml
+++ b/examples/quick/pathitem/content/item13.qml
@@ -48,7 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.9 // to get PathItem
+import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Rectangle {
color: "lightGray"
diff --git a/examples/quick/pathitem/content/item14.qml b/examples/quick/pathitem/content/item14.qml
index b83722ad1b..320ba7cb47 100644
--- a/examples/quick/pathitem/content/item14.qml
+++ b/examples/quick/pathitem/content/item14.qml
@@ -48,7 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.9 // to get PathItem
+import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Rectangle {
color: "lightGray"
diff --git a/examples/quick/pathitem/content/item15.qml b/examples/quick/pathitem/content/item15.qml
index db6dd6e031..470e2f88f3 100644
--- a/examples/quick/pathitem/content/item15.qml
+++ b/examples/quick/pathitem/content/item15.qml
@@ -48,7 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.9 // to get PathItem
+import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Rectangle {
color: "lightGray"
diff --git a/examples/quick/pathitem/content/item17.qml b/examples/quick/pathitem/content/item17.qml
index 7f3f06cfb8..f16608a7d9 100644
--- a/examples/quick/pathitem/content/item17.qml
+++ b/examples/quick/pathitem/content/item17.qml
@@ -48,7 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.9 // to get PathItem
+import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Rectangle {
color: "lightGray"
diff --git a/examples/quick/pathitem/content/item2.qml b/examples/quick/pathitem/content/item2.qml
index bda87c8425..dc65f51cf3 100644
--- a/examples/quick/pathitem/content/item2.qml
+++ b/examples/quick/pathitem/content/item2.qml
@@ -48,7 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.9 // to get PathItem
+import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Rectangle {
color: "lightGray"
diff --git a/examples/quick/pathitem/content/item4.qml b/examples/quick/pathitem/content/item4.qml
index 095577eb66..4a3ccf049b 100644
--- a/examples/quick/pathitem/content/item4.qml
+++ b/examples/quick/pathitem/content/item4.qml
@@ -48,7 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.9 // to get PathItem
+import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Rectangle {
color: "lightGray"
diff --git a/examples/quick/pathitem/content/item5.qml b/examples/quick/pathitem/content/item5.qml
index d1a8447cc1..6a876fa1f7 100644
--- a/examples/quick/pathitem/content/item5.qml
+++ b/examples/quick/pathitem/content/item5.qml
@@ -48,7 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.9 // to get PathItem
+import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Rectangle {
color: "lightGray"
diff --git a/examples/quick/pathitem/content/item6.qml b/examples/quick/pathitem/content/item6.qml
index a0c9e32553..10deafdcd7 100644
--- a/examples/quick/pathitem/content/item6.qml
+++ b/examples/quick/pathitem/content/item6.qml
@@ -48,7 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.9 // to get PathItem
+import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Rectangle {
color: "lightGray"
diff --git a/examples/quick/pathitem/content/item7.qml b/examples/quick/pathitem/content/item7.qml
index 4f8d5770d4..2840cd7c5a 100644
--- a/examples/quick/pathitem/content/item7.qml
+++ b/examples/quick/pathitem/content/item7.qml
@@ -48,7 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.9 // to get PathItem
+import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Rectangle {
color: "lightGray"
diff --git a/examples/quick/pathitem/content/item8.qml b/examples/quick/pathitem/content/item8.qml
index a124b9b719..97304baa91 100644
--- a/examples/quick/pathitem/content/item8.qml
+++ b/examples/quick/pathitem/content/item8.qml
@@ -48,7 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.9 // to get PathItem
+import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Rectangle {
color: "lightGray"
diff --git a/examples/quick/pathitem/content/item9.qml b/examples/quick/pathitem/content/item9.qml
index 4ad7a7f621..a57b4484a8 100644
--- a/examples/quick/pathitem/content/item9.qml
+++ b/examples/quick/pathitem/content/item9.qml
@@ -48,7 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.9 // to get PathItem
+import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Rectangle {
color: "lightGray"
diff --git a/examples/quick/pathitem/content/pathitemgallery.qml b/examples/quick/pathitem/content/pathitemgallery.qml
index 3ade189ffd..b4ec787e91 100644
--- a/examples/quick/pathitem/content/pathitemgallery.qml
+++ b/examples/quick/pathitem/content/pathitemgallery.qml
@@ -49,6 +49,7 @@
****************************************************************************/
import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Rectangle {
id: root
diff --git a/examples/quick/pathitem/content/pathiteminteract.qml b/examples/quick/pathitem/content/pathiteminteract.qml
index 219683b558..f0d2a95702 100644
--- a/examples/quick/pathitem/content/pathiteminteract.qml
+++ b/examples/quick/pathitem/content/pathiteminteract.qml
@@ -48,7 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.9 // to get PathItem
+import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Rectangle {
id: root
@@ -170,7 +171,7 @@ Rectangle {
property variant funcs
function genResizer(obj, x, y, xprop, yprop, color) {
- var ma = Qt.createQmlObject('import QtQuick 2.9; Rectangle { id: rr; property variant obj; color: "' + color + '"; width: 20; height: 20;'+
+ var ma = Qt.createQmlObject('import QtQuick 2.9; import Qt.labs.pathitem 1.0; Rectangle { id: rr; property variant obj; color: "' + color + '"; width: 20; height: 20;'+
'MouseArea { anchors.fill: parent; hoverEnabled: true;' +
'onEntered: color = "yellow"; onExited: color = "' + color + '";' +
'property bool a: false; onPressed: a = true; onReleased: a = false; ' +
@@ -188,7 +189,7 @@ Rectangle {
Component.onCompleted: {
funcs = [
{ "start": function(x, y) {
- var p = Qt.createQmlObject('import QtQuick 2.9; VisualPath {' +
+ var p = Qt.createQmlObject('import QtQuick 2.9; import Qt.labs.pathitem 1.0; VisualPath {' +
'strokeColor: "black"; fillColor: "transparent";'+
'strokeWidth: ' + widthSlider.value + ';' +
'Path { startX: ' + x + '; startY: ' + y + ';' +
@@ -210,7 +211,7 @@ Rectangle {
}
},
{ "start": function(x, y) {
- var p = Qt.createQmlObject('import QtQuick 2.9; VisualPath {' +
+ var p = Qt.createQmlObject('import QtQuick 2.9; import Qt.labs.pathitem 1.0; VisualPath {' +
'strokeColor: "black"; fillColor: "' + (root.fill ? 'green' : 'transparent') + '";'+
'strokeWidth: ' + widthSlider.value + ';' +
'Path { startX: ' + x + '; startY: ' + y + ';' +
@@ -235,7 +236,7 @@ Rectangle {
}
},
{ "start": function(x, y) {
- var p = Qt.createQmlObject('import QtQuick 2.9; VisualPath {' +
+ var p = Qt.createQmlObject('import QtQuick 2.9; import Qt.labs.pathitem 1.0; VisualPath {' +
'strokeColor: "black"; fillColor: "' + (root.fill ? 'green' : 'transparent') + '";'+
'strokeWidth: ' + widthSlider.value + ';' +
'Path { startX: ' + x + '; startY: ' + y + ';' +
diff --git a/examples/quick/pathitem/content/pathitemsampling.qml b/examples/quick/pathitem/content/pathitemsampling.qml
index 15c9cbe323..cb67897139 100644
--- a/examples/quick/pathitem/content/pathitemsampling.qml
+++ b/examples/quick/pathitem/content/pathitemsampling.qml
@@ -48,7 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.9 // to get PathItem
+import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Rectangle {
id: root
diff --git a/examples/quick/pathitem/content/pathitemtigers.qml b/examples/quick/pathitem/content/pathitemtigers.qml
index 36bff891c6..3ae31ba5bd 100644
--- a/examples/quick/pathitem/content/pathitemtigers.qml
+++ b/examples/quick/pathitem/content/pathitemtigers.qml
@@ -48,7 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.9 // to get PathItem
+import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Rectangle {
id: root
diff --git a/examples/quick/pathitem/content/tiger.qml b/examples/quick/pathitem/content/tiger.qml
index a9f4abe46a..b792195eec 100644
--- a/examples/quick/pathitem/content/tiger.qml
+++ b/examples/quick/pathitem/content/tiger.qml
@@ -49,6 +49,7 @@
****************************************************************************/
import QtQuick 2.9
+import Qt.labs.pathitem 1.0
PathItem {
id: pathItem
diff --git a/examples/quick/quick.pro b/examples/quick/quick.pro
index 445dfb0fab..bb5af35dc6 100644
--- a/examples/quick/quick.pro
+++ b/examples/quick/quick.pro
@@ -24,6 +24,7 @@ SUBDIRS = quick-accessibility \
imageresponseprovider \
window \
particles \
+ pathitem \
demos
#OpenGL Support Required
diff --git a/src/imports/imports.pro b/src/imports/imports.pro
index c03224958c..df0ad01c06 100644
--- a/src/imports/imports.pro
+++ b/src/imports/imports.pro
@@ -22,6 +22,8 @@ qtHaveModule(quick) {
qtConfig(systemsemaphore): SUBDIRS += sharedimage
qtConfig(quick-particles): \
SUBDIRS += particles
+
+ SUBDIRS += pathitem
}
qtHaveModule(xmlpatterns) : SUBDIRS += xmllistmodel
diff --git a/src/imports/pathitem/pathitem.pro b/src/imports/pathitem/pathitem.pro
new file mode 100644
index 0000000000..d70bb6f203
--- /dev/null
+++ b/src/imports/pathitem/pathitem.pro
@@ -0,0 +1,31 @@
+CXX_MODULE = qml
+TARGET = qmlpathitemplugin
+TARGETPATH = Qt/labs/pathitem
+IMPORT_VERSION = 1.0
+
+QT = core gui qml quick quick-private
+
+HEADERS += \
+ qquickpathitem_p.h \
+ qquickpathitem_p_p.h \
+ qquickpathitemgenericrenderer_p.h \
+ qquickpathitemsoftwarerenderer_p.h
+
+SOURCES += \
+ plugin.cpp \
+ qquickpathitem.cpp \
+ qquickpathitemgenericrenderer.cpp \
+ qquickpathitemsoftwarerenderer.cpp
+
+qtConfig(opengl) {
+ HEADERS += \
+ qquicknvprfunctions_p.h \
+ qquicknvprfunctions_p_p.h \
+ qquickpathitemnvprrenderer_p.h
+
+ SOURCES += \
+ qquicknvprfunctions.cpp \
+ qquickpathitemnvprrenderer.cpp
+}
+
+load(qml_plugin)
diff --git a/src/imports/pathitem/plugin.cpp b/src/imports/pathitem/plugin.cpp
new file mode 100644
index 0000000000..6b43e8f398
--- /dev/null
+++ b/src/imports/pathitem/plugin.cpp
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQuick module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtQml/qqmlextensionplugin.h>
+#include <QtQml/qqml.h>
+
+#include "qquickpathitem_p.h"
+
+static void initResources()
+{
+#ifdef QT_STATIC
+ Q_INIT_RESOURCE(qmake_Qt_labs_pathitem);
+#endif
+}
+
+QT_BEGIN_NAMESPACE
+
+class QmlPathItemPlugin : public QQmlExtensionPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
+
+public:
+ QmlPathItemPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); }
+ void registerTypes(const char *uri) Q_DECL_OVERRIDE
+ {
+ Q_ASSERT(QByteArray(uri) == QByteArray("Qt.labs.pathitem"));
+ qmlRegisterType<QQuickPathItem>(uri, 1, 0, "PathItem");
+ qmlRegisterType<QQuickVisualPath>(uri, 1, 0, "VisualPath");
+ qmlRegisterType<QQuickPathGradientStop>(uri, 1, 0, "PathGradientStop");
+ qmlRegisterUncreatableType<QQuickPathGradient>(uri, 1, 0, "PathGradient", QQuickPathGradient::tr("PathGradient is an abstract base class"));
+ qmlRegisterType<QQuickPathLinearGradient>(uri, 1, 0, "PathLinearGradient");
+ }
+};
+
+QT_END_NAMESPACE
+
+#include "plugin.moc"
diff --git a/src/imports/pathitem/plugins.qmltypes b/src/imports/pathitem/plugins.qmltypes
new file mode 100644
index 0000000000..03f26e243c
--- /dev/null
+++ b/src/imports/pathitem/plugins.qmltypes
@@ -0,0 +1,312 @@
+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 -noforceqtquick Qt.labs.pathitem 1.0'
+
+Module {
+ dependencies: []
+ Component {
+ name: "QQuickItem"
+ defaultProperty: "data"
+ prototype: "QObject"
+ Enum {
+ name: "TransformOrigin"
+ values: {
+ "TopLeft": 0,
+ "Top": 1,
+ "TopRight": 2,
+ "Left": 3,
+ "Center": 4,
+ "Right": 5,
+ "BottomLeft": 6,
+ "Bottom": 7,
+ "BottomRight": 8
+ }
+ }
+ Property { name: "parent"; type: "QQuickItem"; isPointer: true }
+ Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "resources"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "children"; type: "QQuickItem"; isList: true; isReadonly: true }
+ Property { name: "x"; type: "double" }
+ Property { name: "y"; type: "double" }
+ Property { name: "z"; type: "double" }
+ Property { name: "width"; type: "double" }
+ Property { name: "height"; type: "double" }
+ Property { name: "opacity"; type: "double" }
+ Property { name: "enabled"; type: "bool" }
+ Property { name: "visible"; type: "bool" }
+ Property { name: "visibleChildren"; type: "QQuickItem"; isList: true; isReadonly: true }
+ Property { name: "states"; type: "QQuickState"; isList: true; isReadonly: true }
+ Property { name: "transitions"; type: "QQuickTransition"; isList: true; isReadonly: true }
+ Property { name: "state"; type: "string" }
+ Property { name: "childrenRect"; type: "QRectF"; isReadonly: true }
+ Property { name: "anchors"; type: "QQuickAnchors"; isReadonly: true; isPointer: true }
+ Property { name: "left"; type: "QQuickAnchorLine"; isReadonly: true }
+ Property { name: "right"; type: "QQuickAnchorLine"; isReadonly: true }
+ Property { name: "horizontalCenter"; type: "QQuickAnchorLine"; isReadonly: true }
+ Property { name: "top"; type: "QQuickAnchorLine"; isReadonly: true }
+ Property { name: "bottom"; type: "QQuickAnchorLine"; isReadonly: true }
+ Property { name: "verticalCenter"; type: "QQuickAnchorLine"; isReadonly: true }
+ Property { name: "baseline"; type: "QQuickAnchorLine"; isReadonly: true }
+ Property { name: "baselineOffset"; type: "double" }
+ Property { name: "clip"; type: "bool" }
+ Property { name: "focus"; type: "bool" }
+ Property { name: "activeFocus"; type: "bool"; isReadonly: true }
+ Property { name: "activeFocusOnTab"; revision: 1; type: "bool" }
+ Property { name: "rotation"; type: "double" }
+ Property { name: "scale"; type: "double" }
+ Property { name: "transformOrigin"; type: "TransformOrigin" }
+ Property { name: "transformOriginPoint"; type: "QPointF"; isReadonly: true }
+ Property { name: "transform"; type: "QQuickTransform"; isList: true; isReadonly: true }
+ Property { name: "smooth"; type: "bool" }
+ Property { name: "antialiasing"; type: "bool" }
+ Property { name: "implicitWidth"; type: "double" }
+ Property { name: "implicitHeight"; type: "double" }
+ Property { name: "layer"; type: "QQuickItemLayer"; isReadonly: true; isPointer: true }
+ Signal {
+ name: "childrenRectChanged"
+ Parameter { type: "QRectF" }
+ }
+ Signal {
+ name: "baselineOffsetChanged"
+ Parameter { type: "double" }
+ }
+ Signal {
+ name: "stateChanged"
+ Parameter { type: "string" }
+ }
+ Signal {
+ name: "focusChanged"
+ Parameter { type: "bool" }
+ }
+ Signal {
+ name: "activeFocusChanged"
+ Parameter { type: "bool" }
+ }
+ Signal {
+ name: "activeFocusOnTabChanged"
+ revision: 1
+ Parameter { type: "bool" }
+ }
+ Signal {
+ name: "parentChanged"
+ Parameter { type: "QQuickItem"; isPointer: true }
+ }
+ Signal {
+ name: "transformOriginChanged"
+ Parameter { type: "TransformOrigin" }
+ }
+ Signal {
+ name: "smoothChanged"
+ Parameter { type: "bool" }
+ }
+ Signal {
+ name: "antialiasingChanged"
+ Parameter { type: "bool" }
+ }
+ Signal {
+ name: "clipChanged"
+ Parameter { type: "bool" }
+ }
+ Signal {
+ name: "windowChanged"
+ revision: 1
+ Parameter { name: "window"; type: "QQuickWindow"; isPointer: true }
+ }
+ Method { name: "update" }
+ Method {
+ name: "grabToImage"
+ revision: 2
+ type: "bool"
+ Parameter { name: "callback"; type: "QJSValue" }
+ Parameter { name: "targetSize"; type: "QSize" }
+ }
+ Method {
+ name: "grabToImage"
+ revision: 2
+ type: "bool"
+ Parameter { name: "callback"; type: "QJSValue" }
+ }
+ Method {
+ name: "contains"
+ type: "bool"
+ Parameter { name: "point"; type: "QPointF" }
+ }
+ Method {
+ name: "mapFromItem"
+ Parameter { type: "QQmlV4Function"; isPointer: true }
+ }
+ Method {
+ name: "mapToItem"
+ Parameter { type: "QQmlV4Function"; isPointer: true }
+ }
+ Method {
+ name: "mapFromGlobal"
+ revision: 7
+ Parameter { type: "QQmlV4Function"; isPointer: true }
+ }
+ Method {
+ name: "mapToGlobal"
+ revision: 7
+ Parameter { type: "QQmlV4Function"; isPointer: true }
+ }
+ Method { name: "forceActiveFocus" }
+ Method {
+ name: "forceActiveFocus"
+ Parameter { name: "reason"; type: "Qt::FocusReason" }
+ }
+ Method {
+ name: "nextItemInFocusChain"
+ revision: 1
+ type: "QQuickItem*"
+ Parameter { name: "forward"; type: "bool" }
+ }
+ Method { name: "nextItemInFocusChain"; revision: 1; type: "QQuickItem*" }
+ Method {
+ name: "childAt"
+ type: "QQuickItem*"
+ Parameter { name: "x"; type: "double" }
+ Parameter { name: "y"; type: "double" }
+ }
+ }
+ Component {
+ name: "QQuickPathGradient"
+ defaultProperty: "stops"
+ prototype: "QObject"
+ exports: ["Qt.labs.pathitem/PathGradient 1.0"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "SpreadMode"
+ values: {
+ "PadSpread": 0,
+ "RepeatSpread": 1,
+ "ReflectSpread": 2
+ }
+ }
+ Property { name: "stops"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "spread"; type: "SpreadMode" }
+ Signal { name: "updated" }
+ }
+ Component {
+ name: "QQuickPathGradientStop"
+ prototype: "QObject"
+ exports: ["Qt.labs.pathitem/PathGradientStop 1.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "position"; type: "double" }
+ Property { name: "color"; type: "QColor" }
+ }
+ Component {
+ name: "QQuickPathItem"
+ defaultProperty: "elements"
+ prototype: "QQuickItem"
+ exports: ["Qt.labs.pathitem/PathItem 1.0"]
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "RendererType"
+ values: {
+ "UnknownRenderer": 0,
+ "GeometryRenderer": 1,
+ "NvprRenderer": 2,
+ "SoftwareRenderer": 3
+ }
+ }
+ Enum {
+ name: "Status"
+ values: {
+ "Null": 0,
+ "Ready": 1,
+ "Processing": 2
+ }
+ }
+ Property { name: "renderer"; type: "RendererType"; isReadonly: true }
+ Property { name: "asynchronous"; type: "bool" }
+ Property { name: "enableVendorExtensions"; type: "bool" }
+ Property { name: "status"; type: "Status"; isReadonly: true }
+ Property { name: "elements"; type: "QQuickVisualPath"; isList: true; isReadonly: true }
+ Method {
+ name: "newPath"
+ Parameter { name: "args"; type: "QQmlV4Function"; isPointer: true }
+ }
+ Method {
+ name: "newStrokeFillParams"
+ Parameter { name: "args"; type: "QQmlV4Function"; isPointer: true }
+ }
+ Method {
+ name: "clearVisualPaths"
+ Parameter { name: "args"; type: "QQmlV4Function"; isPointer: true }
+ }
+ Method {
+ name: "commitVisualPaths"
+ Parameter { name: "args"; type: "QQmlV4Function"; isPointer: true }
+ }
+ Method {
+ name: "appendVisualPath"
+ Parameter { name: "args"; type: "QQmlV4Function"; isPointer: true }
+ }
+ }
+ Component {
+ name: "QQuickPathLinearGradient"
+ defaultProperty: "stops"
+ prototype: "QQuickPathGradient"
+ exports: ["Qt.labs.pathitem/PathLinearGradient 1.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "x1"; type: "double" }
+ Property { name: "y1"; type: "double" }
+ Property { name: "x2"; type: "double" }
+ Property { name: "y2"; type: "double" }
+ }
+ Component {
+ name: "QQuickVisualPath"
+ defaultProperty: "path"
+ prototype: "QObject"
+ exports: ["Qt.labs.pathitem/VisualPath 1.0"]
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "FillRule"
+ values: {
+ "OddEvenFill": 0,
+ "WindingFill": 1
+ }
+ }
+ Enum {
+ name: "JoinStyle"
+ values: {
+ "MiterJoin": 0,
+ "BevelJoin": 64,
+ "RoundJoin": 128
+ }
+ }
+ Enum {
+ name: "CapStyle"
+ values: {
+ "FlatCap": 0,
+ "SquareCap": 16,
+ "RoundCap": 32
+ }
+ }
+ Enum {
+ name: "StrokeStyle"
+ values: {
+ "SolidLine": 1,
+ "DashLine": 2
+ }
+ }
+ Property { name: "path"; type: "QQuickPath"; isPointer: true }
+ Property { name: "strokeColor"; type: "QColor" }
+ Property { name: "strokeWidth"; type: "double" }
+ Property { name: "fillColor"; type: "QColor" }
+ Property { name: "fillRule"; type: "FillRule" }
+ Property { name: "joinStyle"; type: "JoinStyle" }
+ Property { name: "miterLimit"; type: "int" }
+ Property { name: "capStyle"; type: "CapStyle" }
+ Property { name: "strokeStyle"; type: "StrokeStyle" }
+ Property { name: "dashOffset"; type: "double" }
+ Property { name: "dashPattern"; type: "QVector<qreal>" }
+ Property { name: "fillGradient"; type: "QQuickPathGradient"; isPointer: true }
+ Signal { name: "changed" }
+ }
+}
diff --git a/src/imports/pathitem/qmldir b/src/imports/pathitem/qmldir
new file mode 100644
index 0000000000..277b8a199b
--- /dev/null
+++ b/src/imports/pathitem/qmldir
@@ -0,0 +1,4 @@
+module Qt.labs.pathitem
+plugin qmlpathitemplugin
+classname QmlPathItemPlugin
+typeinfo plugins.qmltypes
diff --git a/src/quick/util/qquicknvprfunctions.cpp b/src/imports/pathitem/qquicknvprfunctions.cpp
index 40eb2bb932..40eb2bb932 100644
--- a/src/quick/util/qquicknvprfunctions.cpp
+++ b/src/imports/pathitem/qquicknvprfunctions.cpp
diff --git a/src/quick/util/qquicknvprfunctions_p.h b/src/imports/pathitem/qquicknvprfunctions_p.h
index 7900388305..7900388305 100644
--- a/src/quick/util/qquicknvprfunctions_p.h
+++ b/src/imports/pathitem/qquicknvprfunctions_p.h
diff --git a/src/quick/util/qquicknvprfunctions_p_p.h b/src/imports/pathitem/qquicknvprfunctions_p_p.h
index 6df20566af..6df20566af 100644
--- a/src/quick/util/qquicknvprfunctions_p_p.h
+++ b/src/imports/pathitem/qquicknvprfunctions_p_p.h
diff --git a/src/quick/items/qquickpathitem.cpp b/src/imports/pathitem/qquickpathitem.cpp
index fae16064e5..5255a55798 100644
--- a/src/quick/items/qquickpathitem.cpp
+++ b/src/imports/pathitem/qquickpathitem.cpp
@@ -1681,7 +1681,7 @@ void QQuickPathItemJSStrokeFillParamsPrototype::method_clear(const QV4::BuiltinF
scope.result = callData->thisObject.asReturnedValue();
}
-extern QColor qt_color_from_string(const QV4::Value &name); // qquickcontext2d.cpp
+Q_QUICK_PRIVATE_EXPORT QColor qt_color_from_string(const QV4::Value &name); // qquickcontext2d.cpp
static inline QString qt_color_string(const QColor &color)
{
diff --git a/src/quick/items/qquickpathitem_p.h b/src/imports/pathitem/qquickpathitem_p.h
index 37b23dee6f..c7c56fd5d8 100644
--- a/src/quick/items/qquickpathitem_p.h
+++ b/src/imports/pathitem/qquickpathitem_p.h
@@ -58,14 +58,12 @@
#include <private/qv8engine_p.h>
#include <QGradientStops>
-QT_REQUIRE_CONFIG(quick_path);
-
QT_BEGIN_NAMESPACE
class QQuickVisualPathPrivate;
class QQuickPathItemPrivate;
-class Q_QUICK_PRIVATE_EXPORT QQuickPathGradientStop : public QObject
+class QQuickPathGradientStop : public QObject
{
Q_OBJECT
Q_PROPERTY(qreal position READ position WRITE setPosition)
@@ -85,7 +83,7 @@ private:
QColor m_color;
};
-class Q_QUICK_PRIVATE_EXPORT QQuickPathGradient : public QObject
+class QQuickPathGradient : public QObject
{
Q_OBJECT
Q_PROPERTY(QQmlListProperty<QObject> stops READ stops)
@@ -122,7 +120,7 @@ private:
SpreadMode m_spread;
};
-class Q_QUICK_PRIVATE_EXPORT QQuickPathLinearGradient : public QQuickPathGradient
+class QQuickPathLinearGradient : public QQuickPathGradient
{
Q_OBJECT
Q_PROPERTY(qreal x1 READ x1 WRITE setX1 NOTIFY x1Changed)
@@ -154,7 +152,7 @@ private:
QPointF m_end;
};
-class Q_QUICK_PRIVATE_EXPORT QQuickVisualPath : public QObject
+class QQuickVisualPath : public QObject
{
Q_OBJECT
@@ -262,7 +260,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_fillGradientChanged())
};
-class Q_QUICK_PRIVATE_EXPORT QQuickPathItem : public QQuickItem
+class QQuickPathItem : public QQuickItem
{
Q_OBJECT
Q_PROPERTY(RendererType renderer READ rendererType NOTIFY rendererChanged)
diff --git a/src/quick/items/qquickpathitem_p_p.h b/src/imports/pathitem/qquickpathitem_p_p.h
index c9a2904a25..6dde314a30 100644
--- a/src/quick/items/qquickpathitem_p_p.h
+++ b/src/imports/pathitem/qquickpathitem_p_p.h
@@ -52,7 +52,7 @@
//
#include "qquickpathitem_p.h"
-#include "qquickitem_p.h"
+#include <QtQuick/private/qquickitem_p.h>
#include <QPainterPath>
#include <QColor>
#include <QBrush>
diff --git a/src/quick/items/qquickpathitemgenericrenderer.cpp b/src/imports/pathitem/qquickpathitemgenericrenderer.cpp
index 4e8fe55df2..4e8fe55df2 100644
--- a/src/quick/items/qquickpathitemgenericrenderer.cpp
+++ b/src/imports/pathitem/qquickpathitemgenericrenderer.cpp
diff --git a/src/quick/items/qquickpathitemgenericrenderer_p.h b/src/imports/pathitem/qquickpathitemgenericrenderer_p.h
index 70a9e88d2f..70a9e88d2f 100644
--- a/src/quick/items/qquickpathitemgenericrenderer_p.h
+++ b/src/imports/pathitem/qquickpathitemgenericrenderer_p.h
diff --git a/src/quick/items/qquickpathitemnvprrenderer.cpp b/src/imports/pathitem/qquickpathitemnvprrenderer.cpp
index f8504f9985..f8504f9985 100644
--- a/src/quick/items/qquickpathitemnvprrenderer.cpp
+++ b/src/imports/pathitem/qquickpathitemnvprrenderer.cpp
diff --git a/src/quick/items/qquickpathitemnvprrenderer_p.h b/src/imports/pathitem/qquickpathitemnvprrenderer_p.h
index deab9cf7f9..cfe1c7eab9 100644
--- a/src/quick/items/qquickpathitemnvprrenderer_p.h
+++ b/src/imports/pathitem/qquickpathitemnvprrenderer_p.h
@@ -52,8 +52,8 @@
//
#include "qquickpathitem_p_p.h"
+#include "qquicknvprfunctions_p.h"
#include <qsgrendernode.h>
-#include <private/qquicknvprfunctions_p.h>
#include <QColor>
#include <QVector4D>
#include <QDebug>
diff --git a/src/quick/items/qquickpathitemsoftwarerenderer.cpp b/src/imports/pathitem/qquickpathitemsoftwarerenderer.cpp
index b7aa93bf65..b7aa93bf65 100644
--- a/src/quick/items/qquickpathitemsoftwarerenderer.cpp
+++ b/src/imports/pathitem/qquickpathitemsoftwarerenderer.cpp
diff --git a/src/quick/items/qquickpathitemsoftwarerenderer_p.h b/src/imports/pathitem/qquickpathitemsoftwarerenderer_p.h
index e76590bdfe..e76590bdfe 100644
--- a/src/quick/items/qquickpathitemsoftwarerenderer_p.h
+++ b/src/imports/pathitem/qquickpathitemsoftwarerenderer_p.h
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp
index 1a6f530bfa..715fc4b2c7 100644
--- a/src/quick/items/context2d/qquickcontext2d.cpp
+++ b/src/quick/items/context2d/qquickcontext2d.cpp
@@ -40,6 +40,7 @@
#include "qquickcontext2d_p.h"
#include "qquickcontext2dcommandbuffer_p.h"
#include "qquickcanvasitem_p.h"
+#include <private/qtquickglobal_p.h>
#include <private/qquickcontext2dtexture_p.h>
#include <private/qquickitem_p.h>
#if QT_CONFIG(quick_shadereffect)
@@ -136,7 +137,7 @@ Q_CORE_EXPORT double qstrtod(const char *s00, char const **se, bool *ok);
THROW_GENERIC_ERROR("Not a Context2D object");
#define qClamp(val, min, max) qMin(qMax(val, min), max)
#define CHECK_RGBA(c) (c == '-' || c == '.' || (c >=0 && c <= 9))
-QColor qt_color_from_string(const QV4::Value &name)
+Q_QUICK_PRIVATE_EXPORT QColor qt_color_from_string(const QV4::Value &name)
{
QByteArray str = name.toQString().toUtf8();
diff --git a/src/quick/items/items.pri b/src/quick/items/items.pri
index 511c6f18d8..0f8061b5ef 100644
--- a/src/quick/items/items.pri
+++ b/src/quick/items/items.pri
@@ -148,20 +148,9 @@ qtConfig(quick-listview) {
qtConfig(quick-pathview) {
HEADERS += \
$$PWD/qquickpathview_p.h \
- $$PWD/qquickpathview_p_p.h \
- $$PWD/qquickpathitem_p.h \
- $$PWD/qquickpathitem_p_p.h \
- $$PWD/qquickpathitemgenericrenderer_p.h \
- $$PWD/qquickpathitemsoftwarerenderer_p.h
+ $$PWD/qquickpathview_p_p.h
SOURCES += \
- $$PWD/qquickpathview.cpp \
- $$PWD/qquickpathitem.cpp \
- $$PWD/qquickpathitemgenericrenderer.cpp \
- $$PWD/qquickpathitemsoftwarerenderer.cpp
- qtConfig(opengl) {
- HEADERS += $$PWD/qquickpathitemnvprrenderer_p.h
- SOURCES += $$PWD/qquickpathitemnvprrenderer.cpp
- }
+ $$PWD/qquickpathview.cpp
}
qtConfig(quick-positioners) {
diff --git a/src/quick/items/qquickitemsmodule.cpp b/src/quick/items/qquickitemsmodule.cpp
index 9e692da442..e6321e9365 100644
--- a/src/quick/items/qquickitemsmodule.cpp
+++ b/src/quick/items/qquickitemsmodule.cpp
@@ -70,7 +70,6 @@
#if QT_CONFIG(quick_path)
#include <private/qquickpath_p.h>
#include <private/qquickpathinterpolator_p.h>
-#include "qquickpathitem_p.h"
#endif
#if QT_CONFIG(quick_positioners)
#include "qquickpositioners_p.h"
@@ -381,11 +380,6 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor)
#if QT_CONFIG(quick_path)
qmlRegisterType<QQuickPathArc, 2>(uri, 2, 9, "PathArc");
qmlRegisterType<QQuickPathMove>(uri, 2, 9, "PathMove");
- qmlRegisterType<QQuickPathItem>(uri, 2, 9, "PathItem");
- qmlRegisterType<QQuickVisualPath>(uri, 2, 9, "VisualPath");
- qmlRegisterType<QQuickPathGradientStop>(uri, 2, 9, "PathGradientStop");
- qmlRegisterUncreatableType<QQuickPathGradient>(uri, 2, 9, "PathGradient", QQuickPathGradient::tr("PathGradient is an abstract base class"));
- qmlRegisterType<QQuickPathLinearGradient>(uri, 2, 9, "PathLinearGradient");
#endif
qmlRegisterType<QQuickText, 9>(uri, 2, 9, "Text");
diff --git a/src/quick/util/qquicksvgparser_p.h b/src/quick/util/qquicksvgparser_p.h
index 44b0d1b6dd..1777b99bf4 100644
--- a/src/quick/util/qquicksvgparser_p.h
+++ b/src/quick/util/qquicksvgparser_p.h
@@ -51,6 +51,7 @@
// We mean it.
//
+#include <private/qtquickglobal_p.h>
#include <QtCore/qstring.h>
#include <QtGui/qpainterpath.h>
@@ -59,9 +60,9 @@ QT_BEGIN_NAMESPACE
namespace QQuickSvgParser
{
bool parsePathDataFast(const QString &dataStr, QPainterPath &path);
- void pathArc(QPainterPath &path, qreal rx, qreal ry, qreal x_axis_rotation,
- int large_arc_flag, int sweep_flag, qreal x, qreal y, qreal curx,
- qreal cury);
+ Q_QUICK_PRIVATE_EXPORT void pathArc(QPainterPath &path, qreal rx, qreal ry, qreal x_axis_rotation,
+ int large_arc_flag, int sweep_flag, qreal x, qreal y, qreal curx,
+ qreal cury);
}
QT_END_NAMESPACE
diff --git a/src/quick/util/util.pri b/src/quick/util/util.pri
index 56eb8ea3b7..b53b132cce 100644
--- a/src/quick/util/util.pri
+++ b/src/quick/util/util.pri
@@ -79,11 +79,4 @@ qtConfig(quick-path) {
$$PWD/qquickpath_p.h \
$$PWD/qquickpath_p_p.h \
$$PWD/qquickpathinterpolator_p.h
- qtConfig(opengl) {
- SOURCES += \
- $$PWD/qquicknvprfunctions.cpp
- HEADERS += \
- $$PWD/qquicknvprfunctions_p.h \
- $$PWD/qquicknvprfunctions_p_p.h
- }
}
diff --git a/tests/auto/quick/qquickpathitem/data/pathitem1.qml b/tests/auto/quick/qquickpathitem/data/pathitem1.qml
index 885ec7d323..d4bc133d86 100644
--- a/tests/auto/quick/qquickpathitem/data/pathitem1.qml
+++ b/tests/auto/quick/qquickpathitem/data/pathitem1.qml
@@ -1,4 +1,5 @@
import QtQuick 2.9
+import tst_qquickpathitem 1.0
PathItem {
}
diff --git a/tests/auto/quick/qquickpathitem/data/pathitem2.qml b/tests/auto/quick/qquickpathitem/data/pathitem2.qml
index 9f4a3b5957..fcef43a4fe 100644
--- a/tests/auto/quick/qquickpathitem/data/pathitem2.qml
+++ b/tests/auto/quick/qquickpathitem/data/pathitem2.qml
@@ -1,4 +1,5 @@
import QtQuick 2.9
+import tst_qquickpathitem 1.0
PathItem {
VisualPath { }
diff --git a/tests/auto/quick/qquickpathitem/data/pathitem3.qml b/tests/auto/quick/qquickpathitem/data/pathitem3.qml
index 69a56dd488..3d2b9f6229 100644
--- a/tests/auto/quick/qquickpathitem/data/pathitem3.qml
+++ b/tests/auto/quick/qquickpathitem/data/pathitem3.qml
@@ -1,4 +1,5 @@
import QtQuick 2.9
+import tst_qquickpathitem 1.0
Item {
width: 200
diff --git a/tests/auto/quick/qquickpathitem/data/pathitem4.qml b/tests/auto/quick/qquickpathitem/data/pathitem4.qml
index 74f0ca7408..3f756336c4 100644
--- a/tests/auto/quick/qquickpathitem/data/pathitem4.qml
+++ b/tests/auto/quick/qquickpathitem/data/pathitem4.qml
@@ -1,4 +1,5 @@
import QtQuick 2.9
+import tst_qquickpathitem 1.0
Item {
width: 200
diff --git a/tests/auto/quick/qquickpathitem/qquickpathitem.pro b/tests/auto/quick/qquickpathitem/qquickpathitem.pro
index 909fbd8027..4b70a38436 100644
--- a/tests/auto/quick/qquickpathitem/qquickpathitem.pro
+++ b/tests/auto/quick/qquickpathitem/qquickpathitem.pro
@@ -9,5 +9,27 @@ include (../shared/util.pri)
TESTDATA = data/*
+HEADERS += \
+ ../../../../src/imports/pathitem/qquickpathitem_p.h \
+ ../../../../src/imports/pathitem/qquickpathitem_p_p.h \
+ ../../../../src/imports/pathitem/qquickpathitemgenericrenderer_p.h \
+ ../../../../src/imports/pathitem/qquickpathitemsoftwarerenderer_p.h
+
+SOURCES += \
+ ../../../../src/imports/pathitem/qquickpathitem.cpp \
+ ../../../../src/imports/pathitem/qquickpathitemgenericrenderer.cpp \
+ ../../../../src/imports/pathitem/qquickpathitemsoftwarerenderer.cpp
+
+qtConfig(opengl) {
+ HEADERS += \
+ ../../../../src/imports/pathitem/qquicknvprfunctions_p.h \
+ ../../../../src/imports/pathitem/qquicknvprfunctions_p_p.h \
+ ../../../../src/imports/pathitem/qquickpathitemnvprrenderer_p.h
+
+ SOURCES += \
+ ../../../../src/imports/pathitem/qquicknvprfunctions.cpp \
+ ../../../../src/imports/pathitem/qquickpathitemnvprrenderer.cpp
+}
+
QT += core-private gui-private qml-private quick-private testlib
qtHaveModule(widgets): QT += widgets
diff --git a/tests/auto/quick/qquickpathitem/tst_qquickpathitem.cpp b/tests/auto/quick/qquickpathitem/tst_qquickpathitem.cpp
index d18df11c96..230d82a864 100644
--- a/tests/auto/quick/qquickpathitem/tst_qquickpathitem.cpp
+++ b/tests/auto/quick/qquickpathitem/tst_qquickpathitem.cpp
@@ -33,7 +33,7 @@
#include <QtQml/qqmlcontext.h>
#include <QtQml/qqmlexpression.h>
#include <QtQml/qqmlincubator.h>
-#include <QtQuick/private/qquickpathitem_p.h>
+#include "../../../../src/imports/pathitem/qquickpathitem_p.h"
#include "../../shared/util.h"
#include "../shared/viewtestutil.h"
@@ -61,6 +61,13 @@ tst_QQuickPathItem::tst_QQuickPathItem()
{
// Force the software backend to get reliable rendering results regardless of the hw and drivers.
QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software);
+
+ const char *uri = "tst_qquickpathitem";
+ qmlRegisterType<QQuickPathItem>(uri, 1, 0, "PathItem");
+ qmlRegisterType<QQuickVisualPath>(uri, 1, 0, "VisualPath");
+ qmlRegisterType<QQuickPathGradientStop>(uri, 1, 0, "PathGradientStop");
+ qmlRegisterUncreatableType<QQuickPathGradient>(uri, 1, 0, "PathGradient", QQuickPathGradient::tr("PathGradient is an abstract base class"));
+ qmlRegisterType<QQuickPathLinearGradient>(uri, 1, 0, "PathLinearGradient");
}
void tst_QQuickPathItem::initValues()
diff --git a/tests/manual/pathitem/pathitemtest.qml b/tests/manual/pathitem/pathitemtest.qml
index 53fe0ed452..2327464614 100644
--- a/tests/manual/pathitem/pathitemtest.qml
+++ b/tests/manual/pathitem/pathitemtest.qml
@@ -48,7 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.9 // to get PathItem
+import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Rectangle {
id: root
diff --git a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_arc.qml b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_arc.qml
index 6b714caf51..797aa9ca46 100644
--- a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_arc.qml
+++ b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_arc.qml
@@ -1,4 +1,5 @@
import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Item {
width: 320
diff --git a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_arc_fill.qml b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_arc_fill.qml
index b1e1ed741b..5e22ebbf53 100644
--- a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_arc_fill.qml
+++ b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_arc_fill.qml
@@ -1,4 +1,5 @@
import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Item {
width: 320
diff --git a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_cubic.qml b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_cubic.qml
index f2e2247bb9..4b7d68ac3a 100644
--- a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_cubic.qml
+++ b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_cubic.qml
@@ -1,4 +1,5 @@
import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Item {
width: 320
diff --git a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_linear_gradient.qml b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_linear_gradient.qml
index a8a27a6bf7..30b33094fa 100644
--- a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_linear_gradient.qml
+++ b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_linear_gradient.qml
@@ -1,4 +1,5 @@
import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Item {
width: 320
diff --git a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_lines.qml b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_lines.qml
index e6480b37c5..44e243b00f 100644
--- a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_lines.qml
+++ b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_lines.qml
@@ -1,4 +1,5 @@
import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Item {
width: 320
diff --git a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_quad.qml b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_quad.qml
index 8953505786..26ee8439a7 100644
--- a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_quad.qml
+++ b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_quad.qml
@@ -1,4 +1,5 @@
import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Item {
width: 320
diff --git a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_spread.qml b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_spread.qml
index 912c3d62f0..536e3b1898 100644
--- a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_spread.qml
+++ b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_spread.qml
@@ -1,4 +1,5 @@
import QtQuick 2.9
+import Qt.labs.pathitem 1.0
Item {
width: 320