From 6ea6bbeb32f9ae946c80d7d7f9c4cb696238c70b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amanda=20Hamblin-Tru=C3=A9?= Date: Thu, 29 Jun 2023 17:05:30 +0200 Subject: Clarify error message for QML type registration Fixes: QTBUG-114966 Change-Id: I3451cf38841cbefe0fa8d7c07ce91da372f8d184 Reviewed-by: Qt CI Bot Reviewed-by: Ulf Hermann --- src/qml/qml/qqml.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/qml/qml/qqml.cpp') diff --git a/src/qml/qml/qqml.cpp b/src/qml/qml/qqml.cpp index ce73e2461b..f951fb6a14 100644 --- a/src/qml/qml/qqml.cpp +++ b/src/qml/qml/qqml.cpp @@ -151,9 +151,10 @@ void QQmlPrivate::qmlRegistrationWarning( { switch (warning) { case UnconstructibleType: - qWarning() + qWarning().nospace() << metaType.name() - << "is neither a QObject, nor default- and copy-constructible, nor uncreatable." + << " is neither a default constructible QObject, nor a default- " + << "and copy-constructible Q_GADGET, nor marked as uncreatable.\n" << "You should not use it as a QML type."; break; case UnconstructibleSingleton: -- cgit v1.2.3