Commit Graph

13 Commits

Author SHA1 Message Date
Semih Yavuz a7f88b1893 Doc: update QML codestyle guidelines to prefer multi-line style
Favor multi-line declarations for qmlformat consistency and readability.

Pick-to: 6.9 6.8 6.5
Fixes: QTBUG-116765
Change-Id: If87d121cb7da4082114647b2002d5375f852a4f5
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2025-02-19 10:33:20 +01:00
Lucie Gérard 6f57506953 Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
License files are organized under LICENSES directory.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: Idfd176b7f7b077a5b7c66b7738dc9bcac94ab290
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-06-07 18:23:52 +02:00
Maximilian Goldstein 5d32ab4189 qmlapp/codingconventions: Recommend using type annotations
Pick-to: 6.2
Task-number: QTBUG-96150
Change-Id: Iaeaff2558935ca1008fb19416ec4852b6ee51549
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-09-01 09:35:37 +02:00
Maximilian Goldstein 0c6f907b27 qmlapp/codingconventions: Encourage using named signal parameters
Pick-to: 6.2
Task-number: QTBUG-92970
Change-Id: I11bf37cae634434a8ad950a902518a9001bf02bb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-07-29 09:20:36 +02:00
Maximilian Goldstein 33da36326d qmlapp/codingconventions: Encourage using required properties
Pick-to: 6.2
Task-number: QTBUG-92970
Change-Id: I6e22a0185990b0c2157d2d64299762edf61df0c5
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-07-29 06:54:38 +00:00
Maximilian Goldstein b20d38b6e1 qmlapp/codingconventions: Warn about unqualified access
Pick-to: 6.2
Task-number: QTBUG-92970
Change-Id: Ia6c331707f04b02d30fb10b676396eec613cd27a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2021-07-28 14:35:49 +02:00
Maximilian Goldstein 90cb1091b3 qmlapp/codingconventions: Treat states and transitions as properties
States and transitions are not special on a language level.
They should be written along with other object properties.

Also updates the example to no longer use the undesirable syntax for Lists.

Change-Id: Ib20eb768bd9f6c96b6850cd714f47cda45ce69b9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-10-22 15:24:13 +02:00
Maximilian Goldstein 5c1956d122 Remove Lists section from the QML coding conventions
Assigning a single item to a List property without braces makes it ambiguous whether the property is a list or scalar.
It should therefore not be encouraged to use this syntax.

Change-Id: I1e681ae654b45c830823072a03dca93be674d917
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-03-20 15:20:37 +01:00
Mitch Curtis 71ce0bfe45 Doc: link to best practices doc on coding conventions page
Change-Id: Ic00dfd7f6ab3833f092b2d56d8b405d9dc03de39
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-16 09:33:11 +00:00
Mitch Curtis 2c2150c613 Update QML Coding Conventions to mention semicolon usage
The concensus to use semicolons for blocks of code was reached on the
mailing list:

http://lists.qt-project.org/pipermail/development/2016-October/027441.html

Change-Id: I98ce87c623c189bdfac8cfac5c0fa80e5a831c18
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-10-06 11:40:48 +00:00
Antti Kokko 75890b9c86 Unify license header usage
Updated FDL license.

Change-Id: I2d7982175d2cf5b309902946a92b8e627d2a4f54
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2016-02-04 09:40:25 +00:00
Antti Kokko ebd19207b9 Update copyright headers
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.

Change-Id: Iedecec76f88fcf709d31bf7bfc5fe817302ecae1
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-02-17 10:18:46 +00:00
Jerome Pasion 8c8b826d62 Doc: Adding "QML Application Developer Resources" guide.
-ported from qtdeclarative.git
-fixed snippet and image paths to doc/snippets and doc/images

Because this guide will need to cover more than Qt QML and Qt Quick,
this guide does not need to be in qtdeclarative.

Change-Id: Id6a47420a1e73b5c55b7233571557e3558e82043
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
2013-04-29 14:32:59 +02:00