From 2599f07d153852b28b5f9df66f6a8ca19fb43e6a Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 9 Jul 2019 15:02:52 +0200 Subject: Fix Qt6 build Change-Id: Ia263fc2fa86c8e304e52eac81087e2377e6ec1d5 Reviewed-by: Qt CI Bot Reviewed-by: Simon Hausmann --- tools/repc/repcodegenerator.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/repc/repcodegenerator.cpp b/tools/repc/repcodegenerator.cpp index e9e7d18..952b1fc 100644 --- a/tools/repc/repcodegenerator.cpp +++ b/tools/repc/repcodegenerator.cpp @@ -36,6 +36,8 @@ #include #include +using namespace Qt; + QT_BEGIN_NAMESPACE template -- cgit v1.2.3 From 65e3020ba826a26b1ef4c233ec58df59d8f4276c Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 10 Jul 2019 18:33:30 +0200 Subject: Bump Qt version to Qt 6 Change-Id: I36feff0e7acc9eba7c444cc20e27a5bb190b38f5 Reviewed-by: Qt CI Bot Reviewed-by: Simon Hausmann --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index bfeba00..3f7ee38 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -3,6 +3,6 @@ CONFIG += qt_example_installs DEFINES += QT_NO_JAVA_STYLE_ITERATORS -MODULE_VERSION = 5.14.0 +MODULE_VERSION = 6.0.0 QTRO_SOURCE_TREE = $$PWD -- cgit v1.2.3 From 8e79ec32f81aa65ac9ce1ad42ad1ee5452d42341 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 25 Jul 2019 18:37:13 +0200 Subject: Fix tests when building with Qt 6 Change-Id: I5cf4c75337f1bac02f170b845561ba3ce293ef02 Reviewed-by: Qt CI Bot Reviewed-by: Simon Hausmann --- tests/auto/repparser/tst_parser.cpp | 70 ++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/tests/auto/repparser/tst_parser.cpp b/tests/auto/repparser/tst_parser.cpp index b749a15..e082a1a 100644 --- a/tests/auto/repparser/tst_parser.cpp +++ b/tests/auto/repparser/tst_parser.cpp @@ -82,7 +82,7 @@ void tst_Parser::testBasic() QTemporaryFile file; file.open(); QTextStream stream(&file); - stream << content << endl; + stream << content << Qt::endl; file.seek(0); RepParser parser(file); @@ -142,10 +142,10 @@ void tst_Parser::testProperties() QTemporaryFile file; file.open(); QTextStream stream(&file); - stream << "class TestClass" << endl; - stream << "{" << endl; - stream << propertyDeclaration << endl; - stream << "};" << endl; + stream << "class TestClass" << Qt::endl; + stream << "{" << Qt::endl; + stream << propertyDeclaration << Qt::endl; + stream << "};" << Qt::endl; file.seek(0); RepParser parser(file); @@ -195,10 +195,10 @@ void tst_Parser::testSlots() QTemporaryFile file; file.open(); QTextStream stream(&file); - stream << "class TestClass" << endl; - stream << "{" << endl; - stream << slotDeclaration << endl; - stream << "};" << endl; + stream << "class TestClass" << Qt::endl; + stream << "{" << Qt::endl; + stream << slotDeclaration << Qt::endl; + stream << "};" << Qt::endl; file.seek(0); if (voidWarning) @@ -237,10 +237,10 @@ void tst_Parser::testSignals() QTemporaryFile file; file.open(); QTextStream stream(&file); - stream << "class TestClass" << endl; - stream << "{" << endl; - stream << signalDeclaration << endl; - stream << "};" << endl; + stream << "class TestClass" << Qt::endl; + stream << "{" << Qt::endl; + stream << signalDeclaration << Qt::endl; + stream << "};" << Qt::endl; file.seek(0); RepParser parser(file); @@ -283,10 +283,10 @@ void tst_Parser::testPods() QTemporaryFile file; file.open(); QTextStream stream(&file); - stream << podsdeclaration << endl; - stream << "class TestClass" << endl; - stream << "{" << endl; - stream << "};" << endl; + stream << podsdeclaration << Qt::endl; + stream << "class TestClass" << Qt::endl; + stream << "{" << Qt::endl; + stream << "};" << Qt::endl; file.seek(0); RepParser parser(file); @@ -347,12 +347,12 @@ void tst_Parser::testEnums() file.open(); QTextStream stream(&file); if (!inclass) - stream << enumdeclaration << endl; - stream << "class TestClass" << endl; - stream << "{" << endl; + stream << enumdeclaration << Qt::endl; + stream << "class TestClass" << Qt::endl; + stream << "{" << Qt::endl; if (inclass) - stream << enumdeclaration << endl; - stream << "};" << endl; + stream << enumdeclaration << Qt::endl; + stream << "};" << Qt::endl; file.seek(0); RepParser parser(file); @@ -399,10 +399,10 @@ void tst_Parser::testModels() QTemporaryFile file; file.open(); QTextStream stream(&file); - stream << "class TestClass" << endl; - stream << "{" << endl; - stream << modelDeclaration << endl; - stream << "};" << endl; + stream << "class TestClass" << Qt::endl; + stream << "{" << Qt::endl; + stream << modelDeclaration << Qt::endl; + stream << "};" << Qt::endl; file.seek(0); RepParser parser(file); @@ -439,14 +439,14 @@ void tst_Parser::testClasses() QTemporaryFile file; file.open(); QTextStream stream(&file); - stream << "class subObject" << endl; - stream << "{" << endl; - stream << " PROP(int value)" << endl; - stream << "};" << endl; - stream << "class parentObject" << endl; - stream << "{" << endl; - stream << classDeclaration << endl; - stream << "};" << endl; + stream << "class subObject" << Qt::endl; + stream << "{" << Qt::endl; + stream << " PROP(int value)" << Qt::endl; + stream << "};" << Qt::endl; + stream << "class parentObject" << Qt::endl; + stream << "{" << Qt::endl; + stream << classDeclaration << Qt::endl; + stream << "};" << Qt::endl; file.seek(0); RepParser parser(file); @@ -495,7 +495,7 @@ void tst_Parser::testInvalid() QTemporaryFile file; file.open(); QTextStream stream(&file); - stream << content << endl; + stream << content << Qt::endl; file.seek(0); RepParser parser(file); -- cgit v1.2.3 From 4f943eda910e3f7864cc0ca44113ae017fa5f92b Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 6 Aug 2019 16:24:14 +0200 Subject: Fix Qt6 build Modify all the qmlRegisterModule calls to use minor version 15 because minor version zero from 6.0.0 would make tests fail. This is similar to what was done in qtdeclarative in c147b20a2c1299b2d659fe7c9472ae3866b6a425. Change-Id: If82b1fe16e1c9ad5a42de23c2126f5c200c7ca92 Reviewed-by: Simon Hausmann --- src/imports/remoteobjects/plugin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/imports/remoteobjects/plugin.cpp b/src/imports/remoteobjects/plugin.cpp index 0bec1a9..f6b5b11 100644 --- a/src/imports/remoteobjects/plugin.cpp +++ b/src/imports/remoteobjects/plugin.cpp @@ -52,7 +52,9 @@ class QtRemoteObjectsPlugin : public QQmlExtensionPlugin public: void registerTypes(const char *uri) override { - qmlRegisterModule(uri, 5, QT_VERSION_MINOR); + // The minor version used to be the current Qt 5 minor. For compatibility it is the last + // Qt 5 release. + qmlRegisterModule(uri, 5, 15); qmlRegisterUncreatableType(uri, 5, 12, "PersistedStore", "Cannot create PersistedStore"); -- cgit v1.2.3