From 9fcae3df40335b97a50836ffb07a5ffbc4f40673 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Sun, 8 Feb 2015 15:21:55 +0100 Subject: QQuickView/QQuickWidget: Improve diagnostics message for non-QQuickItem root fallback case. We don't want to recommend qmlscene, and QtQuick1 is being deprecated, so there's no need to spell it out anymore either. Change-Id: Ia4b87d1a4b3afdae9ea9c13a89ac5cb78c85f06d Reviewed-by: Alan Alpert --- src/quick/items/qquickview.cpp | 7 ++----- src/quickwidgets/qquickwidget.cpp | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/quick/items/qquickview.cpp b/src/quick/items/qquickview.cpp index 9bc512b80b..6582e3ad40 100644 --- a/src/quick/items/qquickview.cpp +++ b/src/quick/items/qquickview.cpp @@ -515,11 +515,8 @@ void QQuickViewPrivate::setRootObject(QObject *obj) } else { qWarning() << "QQuickView only supports loading of root objects that derive from QQuickItem." << endl << endl - << "If your example is using QML 2, (such as qmlscene) and the .qml file you" << endl - << "loaded has 'import QtQuick 1.0' or 'import Qt 4.7', this error will occur." << endl - << endl - << "To load files with 'import QtQuick 1.0' or 'import Qt 4.7', use the" << endl - << "QDeclarativeView class in the Qt Quick 1 module." << endl; + << "Ensure your QML code is written for QtQuick 2, and uses a root that is or" << endl + << "inherits from QtQuick's Item (not a Timer, QtObject, etc)." << endl; delete obj; root = 0; } diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp index 4dae6e6aef..298d7e2c37 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -833,11 +833,8 @@ void QQuickWidgetPrivate::setRootObject(QObject *obj) } else { qWarning() << "QQuickWidget only supports loading of root objects that derive from QQuickItem." << endl << endl - << "If your example is using QML 2, (such as qmlscene) and the .qml file you" << endl - << "loaded has 'import QtQuick 1.0' or 'import Qt 4.7', this error will occur." << endl - << endl - << "To load files with 'import QtQuick 1.0' or 'import Qt 4.7', use the" << endl - << "QDeclarativeView class in the Qt Quick 1 module." << endl; + << "Ensure your QML code is written for QtQuick 2, and uses a root that is or" << endl + << "inherits from QtQuick's Item (not a Timer, QtObject, etc)." << endl; delete obj; root = 0; } -- cgit v1.2.3