diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-10-05 09:10:25 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-10-05 15:55:04 +0200 |
commit | 6318809df12d08dd7816624457cea409fee2bc57 (patch) | |
tree | b37201b3a70c6aacb48ba36e44ffe687ae18a4ef /src/qml/qml/qqmlmetatype.cpp | |
parent | ecd018b4833863e9f7b8cecc616f681c361957b3 (diff) |
QQmlMetaType: Grudgingly accept uppercase value types
We throw a warning instead of an error.
Change-Id: I0f5886a2d46582405ae1d57879ccb3937e27950f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlmetatype.cpp')
-rw-r--r-- | src/qml/qml/qqmlmetatype.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp index b89d19b199..16b05898d1 100644 --- a/src/qml/qml/qqmlmetatype.cpp +++ b/src/qml/qml/qqmlmetatype.cpp @@ -51,6 +51,7 @@ #include <QtCore/qloggingcategory.h> Q_DECLARE_LOGGING_CATEGORY(DBG_DISK_CACHE) +Q_LOGGING_CATEGORY(lcTypeRegistration, "qt.qml.typeregistration") QT_BEGIN_NAMESPACE @@ -411,9 +412,12 @@ bool checkRegistration(QQmlType::RegistrationType typeType, QQmlMetaTypeData *da if (typeName.at(0).isUpper() && (flags & (QMetaType::IsGadget | QMetaType::PointerToGadget))) { - QString failure(QCoreApplication::translate("qmlRegisterType", "Invalid QML %1 name \"%2\"; value type names must begin with a lowercase letter")); - data->recordTypeRegFailure(failure.arg(registrationTypeString(typeType)).arg(typeName)); - return false; + qCWarning(lcTypeRegistration).noquote() + << QCoreApplication::translate( + "qmlRegisterType", + "Invalid QML %1 name \"%2\"; " + "value type names should begin with a lowercase letter") + .arg(registrationTypeString(typeType)).arg(typeName); } // There can also be types that aren't even gadgets, and there can be types for namespaces. |