aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/snippets/qmltc
diff options
context:
space:
mode:
authorOlivier De Cannière <olivier.decanniere@qt.io>2024-11-28 15:35:18 +0100
committerOlivier De Cannière <olivier.decanniere@qt.io>2025-01-14 19:15:40 +0100
commit405fb70437a1a576e032dda61d880e49f10f6f9b (patch)
treedb0e676089203402c402c55611037f6cce040869 /src/qml/doc/snippets/qmltc
parent86e4eecb6ab95eb681184f9f8fc6591392379d9b (diff)
qmltc: Add READ before WRITE in generated Q_PROPERTYs
We currently have two orderings for the READ and WRITE elements of the macro depending on whether we compile a property or an alias. Make them uniform by having READ before WRITE in both cases. Change-Id: I1dd308c921b8948347029c603bc3bca2be87abda Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/doc/snippets/qmltc')
-rw-r--r--src/qml/doc/snippets/qmltc/special/HelloWorld.qml.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/doc/snippets/qmltc/special/HelloWorld.qml.cpp b/src/qml/doc/snippets/qmltc/special/HelloWorld.qml.cpp
index 0afbcbf0bf..6f30defef3 100644
--- a/src/qml/doc/snippets/qmltc/special/HelloWorld.qml.cpp
+++ b/src/qml/doc/snippets/qmltc/special/HelloWorld.qml.cpp
@@ -19,7 +19,7 @@ class HelloWorld : public QObject
{
Q_OBJECT
QML_ELEMENT
- Q_PROPERTY(QString hello WRITE setHello READ hello BINDABLE bindableHello)
+ Q_PROPERTY(QString hello READ hello WRITE setHello BINDABLE bindableHello)
public:
HelloWorld(QQmlEngine* engine, QObject* parent = nullptr, [[maybe_unused]] qxp::function_ref<void(PropertyInitializer&)> initializer = [](PropertyInitializer&){});
@@ -28,8 +28,8 @@ Q_SIGNALS:
void created();
public:
- void setHello(const QString& hello_);
QString hello();
+ void setHello(const QString& hello_);
QBindable<QString> bindableHello();
Q_INVOKABLE void printHello(passByConstRefOrValue<QString> prefix, passByConstRefOrValue<QString> suffix);