aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/doc/src/qmlfunctions.qdoc2
-rw-r--r--src/qml/qml/qqml.h5
-rw-r--r--src/quick/items/qquickwindow.cpp87
-rw-r--r--src/quick/scenegraph/coreapi/qsgtexture.cpp8
-rw-r--r--src/quick/scenegraph/qsgcontext.cpp3
-rw-r--r--src/quick/scenegraph/qsgcontext_p.h2
-rw-r--r--src/quick/scenegraph/qsgdefaultrendercontext.cpp9
-rw-r--r--src/quick/scenegraph/qsgdefaultrendercontext_p.h2
-rw-r--r--tests/auto/qml/qmllint/data/Cycle1.qml2
-rw-r--r--tests/auto/qml/qmllint/data/Cycle2.qml2
-rw-r--r--tests/auto/qml/qmllint/data/Cycle3.qml2
-rw-r--r--tests/auto/qml/qmllint/tst_qmllint.cpp4
-rw-r--r--tests/auto/quick/drawingmodes/tst_drawingmodes.cpp14
-rw-r--r--tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp2
-rw-r--r--tests/auto/quick/qquickimage/tst_qquickimage.cpp10
-rw-r--r--tests/auto/quick/qquickitem2/tst_qquickitem.cpp2
-rw-r--r--tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp8
-rw-r--r--tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp2
-rw-r--r--tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp2
-rw-r--r--tests/auto/quick/qquickshape/tst_qquickshape.cpp18
-rw-r--r--tests/auto/quick/qquicktext/tst_qquicktext.cpp6
-rw-r--r--tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp2
-rw-r--r--tests/auto/quick/qquickwindow/tst_qquickwindow.cpp4
-rw-r--r--tests/auto/quick/rendernode/tst_rendernode.cpp6
-rw-r--r--tests/auto/quick/scenegraph/tst_scenegraph.cpp2
-rw-r--r--tools/qmllint/findunqualified.cpp17
26 files changed, 174 insertions, 49 deletions
diff --git a/src/qml/doc/src/qmlfunctions.qdoc b/src/qml/doc/src/qmlfunctions.qdoc
index 04d907f168..0ff0de1ef9 100644
--- a/src/qml/doc/src/qmlfunctions.qdoc
+++ b/src/qml/doc/src/qmlfunctions.qdoc
@@ -906,7 +906,7 @@
*/
/*!
- \fn template<typename T> auto qmlRegisterSingletonInstance(const char *uri, int versionMajor, int versionMinor, const char *typeName, T *cppObject)
+ \fn int qmlRegisterSingletonInstance(const char *uri, int versionMajor, int versionMinor, const char *typeName, QObject *cppObject)
\relates QQmlEngine
\since 5.14
diff --git a/src/qml/qml/qqml.h b/src/qml/qml/qqml.h
index 7404a62d23..524af7181c 100644
--- a/src/qml/qml/qqml.h
+++ b/src/qml/qml/qqml.h
@@ -736,9 +736,14 @@ inline int qmlRegisterSingletonType(const char *uri, int versionMajor, int versi
return QQmlPrivate::qmlregister(QQmlPrivate::SingletonRegistration, &api);
}
+#ifdef Q_QDOC
+int qmlRegisterSingletonInstance(const char *uri, int versionMajor, int versionMinor,
+ const char *typeName, QObject *cppObject)
+#else
template<typename T>
inline auto qmlRegisterSingletonInstance(const char *uri, int versionMajor, int versionMinor,
const char *typeName, T *cppObject) -> typename std::enable_if<std::is_base_of<QObject, T>::value, int>::type
+#endif
{
QQmlPrivate::SingletonFunctor registrationFunctor;
registrationFunctor.m_object = cppObject;
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 81eabe0591..acf6fd68c8 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -433,7 +433,7 @@ void QQuickWindowPrivate::syncSceneGraph()
if (renderTargetId && !QQuickRenderControl::renderWindowFor(q))
devicePixelRatio = 1;
- context->prepareSync(devicePixelRatio);
+ context->prepareSync(devicePixelRatio, rhi ? swapchain->currentFrameCommandBuffer() : nullptr);
animationController->beforeNodeSync();
@@ -3872,6 +3872,13 @@ bool QQuickWindow::isSceneGraphInitialized() const
This signal will be emitted from the scene graph rendering thread.
*/
+/*!
+ \qmlsignal QtQuick.Window::Window::frameSwapped()
+
+ This signal is emitted when a frame has been queued for presenting. With
+ vertical synchronization enabled the signal is emitted at most once per
+ vsync interval in a continuously animating scene.
+ */
/*!
\fn void QQuickWindow::sceneGraphInitialized()
@@ -3879,9 +3886,12 @@ bool QQuickWindow::isSceneGraphInitialized() const
This signal is emitted when the scene graph has been initialized.
This signal will be emitted from the scene graph rendering thread.
-
*/
+/*!
+ \qmlsignal QtQuick.Window::Window::sceneGraphInitialized()
+ \internal
+ */
/*!
\fn void QQuickWindow::sceneGraphInvalidated()
@@ -3901,6 +3911,11 @@ bool QQuickWindow::isSceneGraphInitialized() const
*/
/*!
+ \qmlsignal QtQuick.Window::Window::sceneGraphInvalidated()
+ \internal
+ */
+
+/*!
\fn void QQuickWindow::sceneGraphError(SceneGraphError error, const QString &message)
This signal is emitted when an \a error occurred during scene graph initialization.
@@ -3916,6 +3931,19 @@ bool QQuickWindow::isSceneGraphInitialized() const
*/
/*!
+ \qmlsignal QtQuick.Window::Window::sceneGraphError(SceneGraphError error, QString message)
+
+ This signal is emitted when an \a error occurred during scene graph initialization.
+
+ You can implement onSceneGraphError(error, message) to handle errors,
+ such as graphics context creation failures, in a custom way.
+ If no handler is connected to this signal, Quick will print the \a message,
+ or show a message box, and terminate the application.
+
+ \since 5.3
+ */
+
+/*!
\class QQuickCloseEvent
\internal
\since 5.1
@@ -4260,6 +4288,11 @@ QQmlIncubationController *QQuickWindow::incubationController() const
*/
/*!
+ \qmlsignal QtQuick.Window::Window::beforeSynchronizing()
+ \internal
+*/
+
+/*!
\fn void QQuickWindow::afterSynchronizing()
This signal is emitted after the scene graph is synchronized with the QML state.
@@ -4283,6 +4316,12 @@ QQmlIncubationController *QQuickWindow::incubationController() const
*/
/*!
+ \qmlsignal QtQuick.Window::Window::afterSynchronizing()
+ \internal
+ \since 5.3
+ */
+
+/*!
\fn void QQuickWindow::beforeRendering()
This signal is emitted before the scene starts rendering.
@@ -4318,6 +4357,11 @@ QQmlIncubationController *QQuickWindow::incubationController() const
*/
/*!
+ \qmlsignal QtQuick.Window::Window::beforeRendering()
+ \internal
+*/
+
+/*!
\fn void QQuickWindow::afterRendering()
This signal is emitted after the scene has completed rendering, before swapbuffers is called.
@@ -4351,6 +4395,11 @@ QQmlIncubationController *QQuickWindow::incubationController() const
*/
/*!
+ \qmlsignal QtQuick.Window::Window::afterRendering()
+ \internal
+ */
+
+/*!
\fn void QQuickWindow::beforeRenderPassRecording()
This signal is emitted before the scenegraph starts recording commands for
@@ -4383,6 +4432,12 @@ QQmlIncubationController *QQuickWindow::incubationController() const
*/
/*!
+ \qmlsignal QtQuick.Window::Window::beforeRenderPassRecording()
+ \internal
+ \since 5.14
+*/
+
+/*!
\fn void QQuickWindow::afterRenderPassRecording()
This signal is emitted after the scenegraph has recorded the commands for
@@ -4414,6 +4469,12 @@ QQmlIncubationController *QQuickWindow::incubationController() const
*/
/*!
+ \qmlsignal QtQuick.Window::Window::afterRenderPassRecording()
+ \internal
+ \since 5.14
+*/
+
+/*!
\fn void QQuickWindow::afterAnimating()
This signal is emitted on the gui thread before requesting the render thread to
@@ -4428,6 +4489,17 @@ QQmlIncubationController *QQuickWindow::incubationController() const
*/
/*!
+ \qmlsignal QtQuick.Window::Window::afterAnimating()
+
+ This signal is emitted on the gui thread before requesting the render thread to
+ perform the synchronization of the scene graph.
+
+ You can implement onAfterAnimating to do additional processing after each animation step.
+
+ \since 5.3
+ */
+
+/*!
\fn void QQuickWindow::openglContextCreated(QOpenGLContext *context)
This signal is emitted on the gui thread when the OpenGL \a context
@@ -4450,6 +4522,12 @@ QQmlIncubationController *QQuickWindow::incubationController() const
*/
/*!
+ \qmlsignal QtQuick.Window::Window::openglContextCreated()
+ \internal
+ \since 5.3
+ */
+
+/*!
\fn void QQuickWindow::sceneGraphAboutToStop()
This signal is emitted on the render thread when the scene graph is
@@ -4472,6 +4550,11 @@ QQmlIncubationController *QQuickWindow::incubationController() const
\since 5.3
*/
+/*!
+ \qmlsignal QtQuick.Window::Window::sceneGraphAboutToStop()
+ \internal
+ \since 5.3
+ */
/*!
Sets whether the scene graph rendering of QML should clear the color buffer
diff --git a/src/quick/scenegraph/coreapi/qsgtexture.cpp b/src/quick/scenegraph/coreapi/qsgtexture.cpp
index 486fe50190..df6f5cffe6 100644
--- a/src/quick/scenegraph/coreapi/qsgtexture.cpp
+++ b/src/quick/scenegraph/coreapi/qsgtexture.cpp
@@ -842,11 +842,15 @@ void QSGTexturePrivate::updateRhiTexture(QRhi *rhi, QRhiResourceUpdateBatch *res
/*!
\fn bool QSGDynamicTexture::updateTexture()
- Call this function to explicitly update the dynamic texture. Calling bind() will bind
- the content that was previously updated.
+ Call this function to explicitly update the dynamic texture.
The function returns true if the texture was changed as a resul of the update; otherwise
returns false.
+
+ \note This function is typically called from QQuickItem::updatePaintNode()
+ or QSGNode::preprocess(), meaning during the \c{synchronization} or the
+ \c{node preprocessing} phases of the scenegraph. Calling it at other times
+ is discouraged and can lead to unexpected behavior.
*/
/*!
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp
index 17eb1e312c..e3c951e5ed 100644
--- a/src/quick/scenegraph/qsgcontext.cpp
+++ b/src/quick/scenegraph/qsgcontext.cpp
@@ -341,9 +341,10 @@ void QSGRenderContext::invalidate()
{
}
-void QSGRenderContext::prepareSync(qreal devicePixelRatio)
+void QSGRenderContext::prepareSync(qreal devicePixelRatio, QRhiCommandBuffer *cb)
{
Q_UNUSED(devicePixelRatio);
+ Q_UNUSED(cb);
}
void QSGRenderContext::beginNextFrame(QSGRenderer *renderer,
diff --git a/src/quick/scenegraph/qsgcontext_p.h b/src/quick/scenegraph/qsgcontext_p.h
index 244bcfabd1..d389420907 100644
--- a/src/quick/scenegraph/qsgcontext_p.h
+++ b/src/quick/scenegraph/qsgcontext_p.h
@@ -174,7 +174,7 @@ public:
using RenderPassCallback = void (*)(void *);
- virtual void prepareSync(qreal devicePixelRatio);
+ virtual void prepareSync(qreal devicePixelRatio, QRhiCommandBuffer *cb);
virtual void beginNextFrame(QSGRenderer *renderer,
RenderPassCallback mainPassRecordingStart,
RenderPassCallback mainPassRecordingEnd,
diff --git a/src/quick/scenegraph/qsgdefaultrendercontext.cpp b/src/quick/scenegraph/qsgdefaultrendercontext.cpp
index ae227a0106..14314b2c94 100644
--- a/src/quick/scenegraph/qsgdefaultrendercontext.cpp
+++ b/src/quick/scenegraph/qsgdefaultrendercontext.cpp
@@ -200,9 +200,14 @@ void QSGDefaultRenderContext::invalidate()
emit invalidated();
}
-void QSGDefaultRenderContext::prepareSync(qreal devicePixelRatio)
+void QSGDefaultRenderContext::prepareSync(qreal devicePixelRatio, QRhiCommandBuffer *cb)
{
m_currentDevicePixelRatio = devicePixelRatio;
+
+ // we store the command buffer already here, in case there is something in
+ // an updatePaintNode() implementation that leads to needing it (for
+ // example, an updateTexture() call on a QSGRhiLayer)
+ m_currentFrameCommandBuffer = cb;
}
static QBasicMutex qsg_framerender_mutex;
@@ -244,7 +249,7 @@ void QSGDefaultRenderContext::beginNextRhiFrame(QSGRenderer *renderer, QRhiRende
renderer->setCommandBuffer(cb);
renderer->setRenderPassRecordingCallbacks(mainPassRecordingStart, mainPassRecordingEnd, callbackUserData);
- m_currentFrameCommandBuffer = cb;
+ m_currentFrameCommandBuffer = cb; // usually the same as what was passed to prepareSync() but cannot count on that having been called
m_currentFrameRenderPass = rp;
}
diff --git a/src/quick/scenegraph/qsgdefaultrendercontext_p.h b/src/quick/scenegraph/qsgdefaultrendercontext_p.h
index 2fdb3a48dd..97ed681f9a 100644
--- a/src/quick/scenegraph/qsgdefaultrendercontext_p.h
+++ b/src/quick/scenegraph/qsgdefaultrendercontext_p.h
@@ -104,7 +104,7 @@ public:
void initialize(const QSGRenderContext::InitParams *params) override;
void invalidate() override;
- void prepareSync(qreal devicePixelRatio) override;
+ void prepareSync(qreal devicePixelRatio, QRhiCommandBuffer *cb) override;
void beginNextFrame(QSGRenderer *renderer,
RenderPassCallback mainPassRecordingStart,
RenderPassCallback mainPassRecordingEnd,
diff --git a/tests/auto/qml/qmllint/data/Cycle1.qml b/tests/auto/qml/qmllint/data/Cycle1.qml
new file mode 100644
index 0000000000..8095e9f732
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/Cycle1.qml
@@ -0,0 +1,2 @@
+import QtQml 2.0
+Cycle2 {}
diff --git a/tests/auto/qml/qmllint/data/Cycle2.qml b/tests/auto/qml/qmllint/data/Cycle2.qml
new file mode 100644
index 0000000000..90c376fcda
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/Cycle2.qml
@@ -0,0 +1,2 @@
+import QtQml 2.0
+Cycle3 {}
diff --git a/tests/auto/qml/qmllint/data/Cycle3.qml b/tests/auto/qml/qmllint/data/Cycle3.qml
new file mode 100644
index 0000000000..f4cba68653
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/Cycle3.qml
@@ -0,0 +1,2 @@
+import QtQml 2.0
+Cycle1 {}
diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp
index ed968d6623..8697495a6f 100644
--- a/tests/auto/qml/qmllint/tst_qmllint.cpp
+++ b/tests/auto/qml/qmllint/tst_qmllint.cpp
@@ -164,6 +164,10 @@ void TestQmllint::dirtyQmlCode_data()
<< QStringLiteral("incompleteQmltypes.qml")
<< QString("Warning: Type \"QPalette\" of member \"palette\" not found at 5:26")
<< QString();
+ QTest::newRow("inheritanceCylce")
+ << QStringLiteral("Cycle1.qml")
+ << QString("Warning: Cycle2 is part of an inheritance cycle: Cycle2 -> Cycle3 -> Cycle1 -> Cycle2")
+ << QString();
}
void TestQmllint::dirtyQmlCode()
diff --git a/tests/auto/quick/drawingmodes/tst_drawingmodes.cpp b/tests/auto/quick/drawingmodes/tst_drawingmodes.cpp
index 39f4c3c70a..e982410f89 100644
--- a/tests/auto/quick/drawingmodes/tst_drawingmodes.cpp
+++ b/tests/auto/quick/drawingmodes/tst_drawingmodes.cpp
@@ -154,7 +154,7 @@ void tst_drawingmodes::points()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
#ifdef Q_OS_WIN
if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES)
@@ -197,7 +197,7 @@ void tst_drawingmodes::lines()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
QImage fb = runTest("DrawingModes.qml");
@@ -228,7 +228,7 @@ void tst_drawingmodes::lineStrip()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
QImage fb = runTest("DrawingModes.qml");
@@ -261,7 +261,7 @@ void tst_drawingmodes::lineLoop()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
if (isRunningOnRhi())
QSKIP("Line loops are not supported by some modern graphics APIs - skipping test");
@@ -297,7 +297,7 @@ void tst_drawingmodes::triangles()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
QImage fb = runTest("DrawingModes.qml");
@@ -326,7 +326,7 @@ void tst_drawingmodes::triangleStrip()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
QImage fb = runTest("DrawingModes.qml");
@@ -354,7 +354,7 @@ void tst_drawingmodes::triangleFan()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
if (isRunningOnRhi())
QSKIP("Triangle fans are not supported by some modern graphics APIs - skipping test");
diff --git a/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp b/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp
index dc3a783600..858a685796 100644
--- a/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp
+++ b/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp
@@ -619,7 +619,7 @@ void tst_qquickborderimage::multiFrame()
{
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
QFETCH(QString, qmlfile);
QFETCH(bool, asynchronous);
diff --git a/tests/auto/quick/qquickimage/tst_qquickimage.cpp b/tests/auto/quick/qquickimage/tst_qquickimage.cpp
index 5dca698cfe..a9defe7b70 100644
--- a/tests/auto/quick/qquickimage/tst_qquickimage.cpp
+++ b/tests/auto/quick/qquickimage/tst_qquickimage.cpp
@@ -341,7 +341,7 @@ void tst_qquickimage::mirror()
{
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
QMap<QQuickImage::FillMode, QImage> screenshots;
QList<QQuickImage::FillMode> fillModes;
@@ -556,7 +556,7 @@ void tst_qquickimage::tiling_QTBUG_6716()
{
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
QFETCH(QString, source);
@@ -930,7 +930,7 @@ void tst_qquickimage::sourceClipRect()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
QImage contents = window->grabWindow();
if (contents.width() < sourceClipRect.width())
QSKIP("Skipping due to grabWindow not functional");
@@ -1159,7 +1159,7 @@ void tst_qquickimage::hugeImages()
{
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
QQuickView view;
view.setSource(testFileUrl("hugeImages.qml"));
@@ -1217,7 +1217,7 @@ void tst_qquickimage::multiFrame()
{
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
QFETCH(QString, qmlfile);
QFETCH(bool, asynchronous);
diff --git a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
index 45ecbfde11..f01b3e25f1 100644
--- a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
+++ b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
@@ -3399,7 +3399,7 @@ void tst_QQuickItem::grab()
{
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabToImage not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabToImage not functional on offscreen/minimal platforms");
QQuickView view;
view.setSource(testFileUrl("grabToImage.qml"));
diff --git a/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp b/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp
index b45aa5d61c..c5d05585e0 100644
--- a/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp
+++ b/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp
@@ -149,7 +149,7 @@ void tst_QQuickItemLayer::layerSmooth()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
QImage fb = runTest("Smooth.qml");
QVERIFY(!fb.size().isEmpty());
@@ -174,7 +174,7 @@ void tst_QQuickItemLayer::layerEnabled()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
QImage fb = runTest("Enabled.qml");
QVERIFY(!fb.size().isEmpty());
@@ -210,7 +210,7 @@ void tst_QQuickItemLayer::layerEffect()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
QImage fb = runTest("Effect.qml");
QVERIFY(!fb.size().isEmpty());
@@ -475,7 +475,7 @@ void tst_QQuickItemLayer::rectangleEffect()
{
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
QImage fb = runTest("RectangleEffect.qml");
QVERIFY(!fb.size().isEmpty());
diff --git a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
index 6efa2e6b3a..3503e8a9fd 100644
--- a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
+++ b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
@@ -1335,7 +1335,7 @@ void tst_QQuickMouseArea::hoverVisible()
{
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
QQuickView window;
QByteArray errorMessage;
diff --git a/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp b/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp
index e4d790f466..536280337a 100644
--- a/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp
+++ b/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp
@@ -73,7 +73,7 @@ void tst_qquickrectangle::color()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimimal platforms", Abort);
+ QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimal platforms", Abort);
QImage image = view.grabWindow();
QVERIFY(image.pixel(0,0) == QColor("#020202").rgba());
diff --git a/tests/auto/quick/qquickshape/tst_qquickshape.cpp b/tests/auto/quick/qquickshape/tst_qquickshape.cpp
index 851475e2cd..578d8d4e3a 100644
--- a/tests/auto/quick/qquickshape/tst_qquickshape.cpp
+++ b/tests/auto/quick/qquickshape/tst_qquickshape.cpp
@@ -283,7 +283,7 @@ void tst_QQuickShape::render()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimimal platforms", Abort);
+ QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimal platforms", Abort);
QImage img = window->grabWindow();
QVERIFY(!img.isNull());
@@ -307,7 +307,7 @@ void tst_QQuickShape::renderWithMultipleSp()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimimal platforms", Abort);
+ QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimal platforms", Abort);
QImage img = window->grabWindow();
QVERIFY(!img.isNull());
@@ -331,7 +331,7 @@ void tst_QQuickShape::radialGrad()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimimal platforms", Abort);
+ QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimal platforms", Abort);
QImage img = window->grabWindow();
QVERIFY(!img.isNull());
@@ -355,7 +355,7 @@ void tst_QQuickShape::conicalGrad()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimimal platforms", Abort);
+ QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimal platforms", Abort);
QImage img = window->grabWindow();
QVERIFY(!img.isNull());
@@ -379,7 +379,7 @@ void tst_QQuickShape::renderPolyline()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimimal platforms", Abort);
+ QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimal platforms", Abort);
QImage img = window->grabWindow();
QVERIFY(!img.isNull());
@@ -408,7 +408,7 @@ void tst_QQuickShape::renderMultiline()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimimal platforms", Abort);
+ QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimal platforms", Abort);
QImage img = window->grabWindow();
QVERIFY(!img.isNull());
@@ -474,7 +474,7 @@ void tst_QQuickShape::polylineDataTypes()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimimal platforms", Abort);
+ QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimal platforms", Abort);
QImage img = window->grabWindow();
QVERIFY(!img.isNull());
@@ -625,7 +625,7 @@ void tst_QQuickShape::multilineDataTypes()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimimal platforms", Abort);
+ QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimal platforms", Abort);
QImage img = window->grabWindow();
QVERIFY(!img.isNull());
@@ -673,7 +673,7 @@ void tst_QQuickShape::multilineStronglyTyped()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimimal platforms", Abort);
+ QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimal platforms", Abort);
QImage img = window->grabWindow();
QVERIFY(!img.isNull());
diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp
index 19a33f1861..1f132ee266 100644
--- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp
+++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp
@@ -1039,7 +1039,7 @@ void tst_qquicktext::hAlignImplicitWidth()
{
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimimal platforms", Abort);
+ QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimal platforms", Abort);
// Left Align
QImage image = view.grabWindow();
@@ -4493,7 +4493,7 @@ void tst_qquicktext::transparentBackground()
{
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabToImage not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabToImage not functional on offscreen/minimal platforms");
QScopedPointer<QQuickView> window(new QQuickView);
window->setSource(testFileUrl("transparentBackground.qml"));
@@ -4514,7 +4514,7 @@ void tst_qquicktext::displaySuperscriptedTag()
{
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabToImage not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabToImage not functional on offscreen/minimal platforms");
QScopedPointer<QQuickView> window(new QQuickView);
window->setSource(testFileUrl("displaySuperscriptedTag.qml"));
diff --git a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
index 85342d4c1e..8ea2ce3bfb 100644
--- a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
+++ b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
@@ -927,7 +927,7 @@ void tst_qquicktextedit::hAlignVisual()
{
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimimal platforms", Abort);
+ QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimal platforms", Abort);
// Left Align
QImage image = view.grabWindow();
diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
index 82814bd078..604ac0e12e 100644
--- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
+++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
@@ -1481,7 +1481,7 @@ void tst_qquickwindow::grab()
{
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
QFETCH(bool, visible);
QFETCH(bool, alpha);
@@ -2533,7 +2533,7 @@ void tst_qquickwindow::testRenderJob()
QTRY_COMPARE(RenderJob::deleted, 1);
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QEXPECT_FAIL("", "NoStage job fails on offscreen/minimimal platforms", Continue);
+ QEXPECT_FAIL("", "NoStage job fails on offscreen/minimal platforms", Continue);
QCOMPARE(completedJobs.size(), 1);
#if QT_CONFIG(opengl)
diff --git a/tests/auto/quick/rendernode/tst_rendernode.cpp b/tests/auto/quick/rendernode/tst_rendernode.cpp
index 961531db6d..87d710ee47 100644
--- a/tests/auto/quick/rendernode/tst_rendernode.cpp
+++ b/tests/auto/quick/rendernode/tst_rendernode.cpp
@@ -218,7 +218,7 @@ void tst_rendernode::renderOrder()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
if (isRunningOnRhi())
QSKIP("Render nodes not yet supported with QRhi");
@@ -251,7 +251,7 @@ void tst_rendernode::messUpState()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
if (isRunningOnRhi())
QSKIP("Render nodes not yet supported with QRhi");
@@ -312,7 +312,7 @@ void tst_rendernode::matrix()
{
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
if (isRunningOnRhi())
QSKIP("Render nodes not yet supported with QRhi");
diff --git a/tests/auto/quick/scenegraph/tst_scenegraph.cpp b/tests/auto/quick/scenegraph/tst_scenegraph.cpp
index 3f605348c3..12f7efb7d5 100644
--- a/tests/auto/quick/scenegraph/tst_scenegraph.cpp
+++ b/tests/auto/quick/scenegraph/tst_scenegraph.cpp
@@ -241,7 +241,7 @@ void tst_SceneGraph::manyWindows()
{
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
- QSKIP("Skipping due to grabWindow not functional on offscreen/minimimal platforms");
+ QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
QFETCH(QString, file);
QFETCH(bool, toplevel);
diff --git a/tools/qmllint/findunqualified.cpp b/tools/qmllint/findunqualified.cpp
index 305dd65c66..96921ecdc5 100644
--- a/tools/qmllint/findunqualified.cpp
+++ b/tools/qmllint/findunqualified.cpp
@@ -367,11 +367,28 @@ void FindUnqualifiedIDVisitor::importFileOrDirectory(const QString &fileOrDirect
void FindUnqualifiedIDVisitor::importExportedNames(const QStringRef &prefix, QString name)
{
+ QList<ScopeTree::ConstPtr> scopes;
for (;;) {
ScopeTree::ConstPtr scope = m_exportedName2Scope.value(m_exportedName2Scope.contains(name)
? name
: prefix + QLatin1Char('.') + name);
if (scope) {
+ if (scopes.contains(scope)) {
+ QString inheritenceCycle = name;
+ for (const auto seen: qAsConst(scopes)) {
+ inheritenceCycle.append(QLatin1String(" -> "));
+ inheritenceCycle.append(seen->superclassName());
+ }
+
+ m_colorOut.write(QLatin1String("Warning: "), Warning);
+ m_colorOut.write(QString::fromLatin1("%1 is part of an inheritance cycle: %2\n")
+ .arg(name)
+ .arg(inheritenceCycle));
+ m_unknownImports.insert(name);
+ m_visitFailed = true;
+ break;
+ }
+ scopes.append(scope);
const auto properties = scope->properties();
for (auto property : properties) {
property.setType(m_exportedName2Scope.value(property.typeName()).get());