[clazy] [Bug 401015] New: Check that the name of the types exported to QML with qmlRegisterType starts uppercase
martonmiklos
bugzilla_noreply at kde.org
Tue Nov 13 19:43:39 GMT 2018
https://bugs.kde.org/show_bug.cgi?id=401015
Bug ID: 401015
Summary: Check that the name of the types exported to QML with
qmlRegisterType starts uppercase
Product: clazy
Version: unspecified
Platform: unspecified
OS: All
Status: REPORTED
Severity: wishlist
Priority: NOR
Component: general
Assignee: unassigned-bugs at kde.org
Reporter: martonmiklosqdev at gmail.com
CC: smartins at kde.org
Target Milestone: ---
SUMMARY
The name of the types exported to QML shall start with upper case letter, see:
http://doc.qt.io/
qt-5/qtqml-typesystem-objecttypes.html
"... the type name must begin with an uppercase letter in order to be declared
as a QML object type in a QML file." It would be useful if the clazy would
catch these errors and optionally would offer a quickfix. I have wasted 3
evenings on debugging such an issue and I was not the only one who faced
similar issue.
STEPS TO REPRODUCE
1. Create a QML plugin with the QtCreator's Qt Quick 2 Extension project wizard
and select a lower case Class name
2. Ensure that the generated qmlRegisterType<asdasd>(uri, 1, 0, "asdasd");
exports with lower case
3. Run clazy
OBSERVED RESULT
clazy did not reports any error
EXPECTED RESULT
clazy should report error
SOFTWARE/OS VERSIONS
Windows: all
MacOS: all
Linux/KDE Plasma: all
(available in About System)
KDE Plasma Version: n/a
KDE Frameworks Version: n/a
Qt Version: n/a
ADDITIONAL INFORMATION
Fix for the QtCreator's wizard is on it's way:
https://codereview.qt-project.org/#/c/245440/
With some guidance I can came up with a patch to clazy as well.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Unassigned-bugs
mailing list