From 3342e25c616588779ab80b37b5d91d983b5f9595 Mon Sep 17 00:00:00 2001 From: Andrei Golubev Date: Thu, 27 Jan 2022 16:29:39 +0100 Subject: 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 "<") Change-Id: I1495e1755d3fd77950acb3820ad2b9c5e3cdee33 Reviewed-by: Ulf Hermann (cherry picked from commit 0ad51325c7432c8a8da38580d26721455252e64f) Reviewed-by: Qt Cherry-pick Bot --- src/qml/doc/snippets/qmltc/special/HelloWorld.qml.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/doc') diff --git a/src/qml/doc/snippets/qmltc/special/HelloWorld.qml.cpp b/src/qml/doc/snippets/qmltc/special/HelloWorld.qml.cpp index ca1d438d2c..ddbf3baaaa 100644 --- a/src/qml/doc/snippets/qmltc/special/HelloWorld.qml.cpp +++ b/src/qml/doc/snippets/qmltc/special/HelloWorld.qml.cpp @@ -67,6 +67,7 @@ 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); @@ -74,7 +75,6 @@ public: void setHello(const QString& hello_); QString hello(); QBindable bindableHello(); - Q_INVOKABLE void printHello(QString prefix, QString suffix); signals: -- cgit v1.2.3