diff options
author | Andrei Golubev <andrei.golubev@qt.io> | 2022-01-27 16:29:39 +0100 |
---|---|---|
committer | Andrei Golubev <andrei.golubev@qt.io> | 2022-01-31 17:57:19 +0100 |
commit | 0ad51325c7432c8a8da38580d26721455252e64f (patch) | |
tree | 3d67de49fb2111b5cfad5ca43163ac1438ed8fe3 /src/qml/doc/snippets | |
parent | 8d3ba425ae7a571e3311cdb2e71324dfd037de76 (diff) |
Improve the structure of the output generated by qmltc
Make an effort to separate user-visible APIs from internal code relevant
to qmltc
In the process of doing it, make tst_qmltc_examples::helloWorld() test
less brittle by using QMap instead of QHash when dumping C++ member
functions of the type. QHash does not guarantee that the keys are
ordered while QMap does (via operator "<")
Pick-to: 6.3
Change-Id: I1495e1755d3fd77950acb3820ad2b9c5e3cdee33
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/doc/snippets')
-rw-r--r-- | src/qml/doc/snippets/qmltc/special/HelloWorld.qml.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/doc/snippets/qmltc/special/HelloWorld.qml.cpp b/src/qml/doc/snippets/qmltc/special/HelloWorld.qml.cpp index f0a2e7ba39..ddbf3baaaa 100644 --- a/src/qml/doc/snippets/qmltc/special/HelloWorld.qml.cpp +++ b/src/qml/doc/snippets/qmltc/special/HelloWorld.qml.cpp @@ -67,18 +67,19 @@ class HelloWorld : public QObject Q_OBJECT QML_ELEMENT Q_PROPERTY(QString hello WRITE setHello READ hello BINDABLE bindableHello) + public: HelloWorld(QQmlEngine * engine, QObject * parent = nullptr); -signals: - void created(); public: void setHello(const QString& hello_); QString hello(); QBindable<QString> bindableHello(); - Q_INVOKABLE void printHello(QString prefix, QString suffix); +signals: + void created(); + // ... }; //! [qmltc-hello-world-generated] |