diff options
author | Carl Schwan <carl@carlschwan.eu> | 2024-04-09 14:46:54 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2024-04-15 16:03:18 +0200 |
commit | f5e5e4d3e84289ed1f2af1c8397649b25aa088d4 (patch) | |
tree | f331ab05521b887a2f82b40d7e74e9e710b016ec /src/qml/qml | |
parent | ffb557ff17d45684aac159762ae4bcc8a04ba573 (diff) |
Improve error message for broken QML_SINGLETON
The current error message doesn't cover the case where the class with
the QML_SINGLETON is an abstract class. This will still compile but fail
at runtime with an error message not mentioning this case.
Change-Id: I134254b252ca3c2250e5f5bc2ac9f9d79a2658fd
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml')
-rw-r--r-- | src/qml/qml/qqml.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqml.cpp b/src/qml/qml/qqml.cpp index 82cba4e9d6..ff419b0b34 100644 --- a/src/qml/qml/qqml.cpp +++ b/src/qml/qml/qqml.cpp @@ -164,8 +164,8 @@ void QQmlPrivate::qmlRegistrationWarning( case UnconstructibleSingleton: qWarning() << "Singleton" << metaType.name() - << "needs either a default constructor or, when adding a default" - << "constructor is infeasible, a public static" + << "needs to be a concrete class with either a default constructor" + << "or, when adding a default constructor is infeasible, a public static" << "create(QQmlEngine *, QJSEngine *) method."; break; case NonQObjectWithAtached: |