From 7d756ed7186f80d700eac5b963b63d4290d08fcd Mon Sep 17 00:00:00 2001 From: Eckhart Koppen Date: Fri, 13 May 2011 13:15:04 +0300 Subject: [PATCH 1/6] Updated data stream version for Qt 4.9 and 5.0 For now, using the same version as 4.8. This needs to be corrected when the actual data stream version is known. --- src/corelib/io/qdatastream.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/corelib/io/qdatastream.h b/src/corelib/io/qdatastream.h index d19fcc5377..6a14e7c410 100644 --- a/src/corelib/io/qdatastream.h +++ b/src/corelib/io/qdatastream.h @@ -86,10 +86,11 @@ public: Qt_4_5 = 11, Qt_4_6 = 12, Qt_4_7 = Qt_4_6, - Qt_4_8 = Qt_4_7 -#if QT_VERSION >= 0x040900 + Qt_4_8 = Qt_4_7, + Qt_4_9 = Qt_4_8, + Qt_5_0 = Qt_4_8 +#if QT_VERSION >= 0x050100 #error Add the datastream version for this Qt version - Qt_4_9 = Qt_4_8 #endif }; From 23d98f70b9303777c880e5caf1e2c1a30ec1885e Mon Sep 17 00:00:00 2001 From: Eckhart Koppen Date: Fri, 13 May 2011 13:22:30 +0300 Subject: [PATCH 2/6] Updated Qt and QtBase module version number to 5.0.0 Updated version in qglobal.h as well as the module version itself --- src/corelib/global/qglobal.h | 4 ++-- src/modules/qt_core.pri | 6 +++--- src/modules/qt_dbus.pri | 6 +++--- src/modules/qt_gui.pri | 6 +++--- src/modules/qt_network.pri | 6 +++--- src/modules/qt_opengl.pri | 6 +++--- src/modules/qt_openvg.pri | 6 +++--- src/modules/qt_sql.pri | 6 +++--- src/modules/qt_testlib.pri | 6 +++--- src/modules/qt_uilib.pri | 6 +++--- src/modules/qt_uitools.pri | 6 +++--- src/modules/qt_xml.pri | 6 +++--- 12 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 35edcdb1a1..a16bf2599d 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -44,11 +44,11 @@ #include -#define QT_VERSION_STR "4.8.0" +#define QT_VERSION_STR "5.0.0" /* QT_VERSION is (major << 16) + (minor << 8) + patch. */ -#define QT_VERSION 0x040800 +#define QT_VERSION 0x050000 /* can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)) */ diff --git a/src/modules/qt_core.pri b/src/modules/qt_core.pri index bf013432a5..e6e5df9d27 100644 --- a/src/modules/qt_core.pri +++ b/src/modules/qt_core.pri @@ -1,6 +1,6 @@ -QT.core.VERSION = 4.8.0 -QT.core.MAJOR_VERSION = 4 -QT.core.MINOR_VERSION = 8 +QT.core.VERSION = 5.0.0 +QT.core.MAJOR_VERSION = 5 +QT.core.MINOR_VERSION = 0 QT.core.PATCH_VERSION = 0 QT.core.name = QtCore diff --git a/src/modules/qt_dbus.pri b/src/modules/qt_dbus.pri index 9aefab9b82..d57160eb77 100644 --- a/src/modules/qt_dbus.pri +++ b/src/modules/qt_dbus.pri @@ -1,6 +1,6 @@ -QT.dbus.VERSION = 4.8.0 -QT.dbus.MAJOR_VERSION = 4 -QT.dbus.MINOR_VERSION = 8 +QT.dbus.VERSION = 5.0.0 +QT.dbus.MAJOR_VERSION = 5 +QT.dbus.MINOR_VERSION = 0 QT.dbus.PATCH_VERSION = 0 QT.dbus.name = QtDBus diff --git a/src/modules/qt_gui.pri b/src/modules/qt_gui.pri index 1ef3697db6..0d1b2109f8 100644 --- a/src/modules/qt_gui.pri +++ b/src/modules/qt_gui.pri @@ -1,6 +1,6 @@ -QT.gui.VERSION = 4.8.0 -QT.gui.MAJOR_VERSION = 4 -QT.gui.MINOR_VERSION = 8 +QT.gui.VERSION = 5.0.0 +QT.gui.MAJOR_VERSION = 5 +QT.gui.MINOR_VERSION = 0 QT.gui.PATCH_VERSION = 0 QT.gui.name = QtGui diff --git a/src/modules/qt_network.pri b/src/modules/qt_network.pri index 44326c2b2d..76b462286f 100644 --- a/src/modules/qt_network.pri +++ b/src/modules/qt_network.pri @@ -1,6 +1,6 @@ -QT.network.VERSION = 4.8.0 -QT.network.MAJOR_VERSION = 4 -QT.network.MINOR_VERSION = 8 +QT.network.VERSION = 5.0.0 +QT.network.MAJOR_VERSION = 5 +QT.network.MINOR_VERSION = 0 QT.network.PATCH_VERSION = 0 QT.network.name = QtNetwork diff --git a/src/modules/qt_opengl.pri b/src/modules/qt_opengl.pri index b767a3ce12..2cc9b8682c 100644 --- a/src/modules/qt_opengl.pri +++ b/src/modules/qt_opengl.pri @@ -1,6 +1,6 @@ -QT.opengl.VERSION = 4.8.0 -QT.opengl.MAJOR_VERSION = 4 -QT.opengl.MINOR_VERSION = 8 +QT.opengl.VERSION = 5.0.0 +QT.opengl.MAJOR_VERSION = 5 +QT.opengl.MINOR_VERSION = 0 QT.opengl.PATCH_VERSION = 0 QT.opengl.name = QtOpenGL diff --git a/src/modules/qt_openvg.pri b/src/modules/qt_openvg.pri index 2ff477c013..a773eb0cca 100644 --- a/src/modules/qt_openvg.pri +++ b/src/modules/qt_openvg.pri @@ -1,6 +1,6 @@ -QT.openvg.VERSION = 4.8.0 -QT.openvg.MAJOR_VERSION = 4 -QT.openvg.MINOR_VERSION = 8 +QT.openvg.VERSION = 5.0.0 +QT.openvg.MAJOR_VERSION = 5 +QT.openvg.MINOR_VERSION = 0 QT.openvg.PATCH_VERSION = 0 QT.openvg.name = QtOpenVG diff --git a/src/modules/qt_sql.pri b/src/modules/qt_sql.pri index 14d2422989..02f48d2a6b 100644 --- a/src/modules/qt_sql.pri +++ b/src/modules/qt_sql.pri @@ -1,6 +1,6 @@ -QT.sql.VERSION = 4.8.0 -QT.sql.MAJOR_VERSION = 4 -QT.sql.MINOR_VERSION = 8 +QT.sql.VERSION = 5.0.0 +QT.sql.MAJOR_VERSION = 5 +QT.sql.MINOR_VERSION = 0 QT.sql.PATCH_VERSION = 0 QT.sql.name = QtSql diff --git a/src/modules/qt_testlib.pri b/src/modules/qt_testlib.pri index 9fd9b2e446..923fb27df3 100644 --- a/src/modules/qt_testlib.pri +++ b/src/modules/qt_testlib.pri @@ -1,6 +1,6 @@ -QT.testlib.VERSION = 4.8.0 -QT.testlib.MAJOR_VERSION = 4 -QT.testlib.MINOR_VERSION = 8 +QT.testlib.VERSION = 5.0.0 +QT.testlib.MAJOR_VERSION = 5 +QT.testlib.MINOR_VERSION = 0 QT.testlib.PATCH_VERSION = 0 QT.testlib.name = QtTest diff --git a/src/modules/qt_uilib.pri b/src/modules/qt_uilib.pri index 5973216921..04616ac6af 100644 --- a/src/modules/qt_uilib.pri +++ b/src/modules/qt_uilib.pri @@ -1,6 +1,6 @@ -QT.uilib.VERSION = 4.8.0 -QT.uilib.MAJOR_VERSION = 4 -QT.uilib.MINOR_VERSION = 8 +QT.uilib.VERSION = 5.0.0 +QT.uilib.MAJOR_VERSION = 5 +QT.uilib.MINOR_VERSION = 0 QT.uilib.PATCH_VERSION = 0 QT.uilib.name = QtUiLib diff --git a/src/modules/qt_uitools.pri b/src/modules/qt_uitools.pri index d30c8b845b..128a20cfd7 100644 --- a/src/modules/qt_uitools.pri +++ b/src/modules/qt_uitools.pri @@ -1,6 +1,6 @@ -QT.uitools.VERSION = 4.8.0 -QT.uitools.MAJOR_VERSION = 4 -QT.uitools.MINOR_VERSION = 8 +QT.uitools.VERSION = 5.0.0 +QT.uitools.MAJOR_VERSION = 5 +QT.uitools.MINOR_VERSION = 0 QT.uitools.PATCH_VERSION = 0 QT.uitools.name = QtUiTools diff --git a/src/modules/qt_xml.pri b/src/modules/qt_xml.pri index e7db6365eb..ea831236e6 100644 --- a/src/modules/qt_xml.pri +++ b/src/modules/qt_xml.pri @@ -1,6 +1,6 @@ -QT.xml.VERSION = 4.8.0 -QT.xml.MAJOR_VERSION = 4 -QT.xml.MINOR_VERSION = 8 +QT.xml.VERSION = 5.0.0 +QT.xml.MAJOR_VERSION = 5 +QT.xml.MINOR_VERSION = 0 QT.xml.PATCH_VERSION = 0 QT.xml.name = QtXml From 36c29abc0dee755366c327bb68166c0b1877b4ff Mon Sep 17 00:00:00 2001 From: Eckhart Koppen Date: Fri, 13 May 2011 13:47:56 +0300 Subject: [PATCH 3/6] Removed deprecated functions in QList Removed detach, detach2, detach3 and append which were marked as required only up to 4.5.x --- src/corelib/tools/qlist.cpp | 91 ------------------------------------- 1 file changed, 91 deletions(-) diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp index 1501daf5a9..90ed7293fd 100644 --- a/src/corelib/tools/qlist.cpp +++ b/src/corelib/tools/qlist.cpp @@ -113,64 +113,6 @@ QListData::Data *QListData::detach_grow(int *idx, int num) return x; } -#if QT_VERSION >= 0x050000 -# error "Remove QListData::detach(), it is only required for binary compatibility for 4.0.x to 4.2.x" -#endif -QListData::Data *QListData::detach() -{ - Data *x = static_cast(qMalloc(DataHeaderSize + d->alloc * sizeof(void *))); - Q_CHECK_PTR(x); - - x->ref = 1; - x->sharable = true; - x->alloc = d->alloc; - if (!x->alloc) { - x->begin = 0; - x->end = 0; - } else { - x->begin = d->begin; - x->end = d->end; - } - - qSwap(d, x); - if (!x->ref.deref()) - return x; - return 0; -} - -/*! - * Detaches the QListData by reallocating new memory. - * Returns the old (shared) data, it is up to the caller to deref() and free() - * For the new data node_copy needs to be called. - * - * \internal - */ -#if QT_VERSION >= 0x050000 -# error "Remove QListData::detach2(), it is only required for binary compatibility for 4.3.x to 4.5.x" -#endif -QListData::Data *QListData::detach2() -{ - Data *x = d; - Data* t = static_cast(qMalloc(DataHeaderSize + x->alloc * sizeof(void *))); - Q_CHECK_PTR(t); - - ::memcpy(t, d, DataHeaderSize + d->alloc * sizeof(void *)); - - t->ref = 1; - t->sharable = true; - t->alloc = x->alloc; - if (!t->alloc) { - t->begin = 0; - t->end = 0; - } else { - t->begin = x->begin; - t->end = x->end; - } - d = t; - - return x; -} - /*! * Detaches the QListData by allocating new memory for a list which possibly * has a different size than the copied one. @@ -200,21 +142,6 @@ QListData::Data *QListData::detach(int alloc) return x; } -/*! - * Detaches the QListData by reallocating new memory. - * Returns the old (shared) data, it is up to the caller to deref() and free() - * For the new data node_copy needs to be called. - * - * \internal - */ -#if QT_VERSION >= 0x050000 -# error "Remove QListData::detach3(), it is only required for binary compatibility for 4.5.x to 4.6.x" -#endif -QListData::Data *QListData::detach3() -{ - return detach(d->alloc); -} - void QListData::realloc(int alloc) { Q_ASSERT(d->ref == 1); @@ -253,24 +180,6 @@ void **QListData::append() return append(1); } -// ensures that enough space is available to append the list -#if QT_VERSION >= 0x050000 -# error "Remove QListData::append(), it is only required for binary compatibility up to 4.5.x" -#endif -void **QListData::append(const QListData& l) -{ - Q_ASSERT(d->ref == 1); - int e = d->end; - int n = l.d->end - l.d->begin; - if (n) { - if (e + n > d->alloc) - realloc(grow(e + n)); - ::memcpy(d->array + d->end, l.d->array + l.d->begin, n*sizeof(void*)); - d->end += n; - } - return d->array + e; -} - // ensures that enough space is available to append the list void **QListData::append2(const QListData& l) { From a9c2c15487d634796c8c9041c156f59ad6131fe9 Mon Sep 17 00:00:00 2001 From: Eckhart Koppen Date: Fri, 13 May 2011 15:38:00 +0300 Subject: [PATCH 4/6] Updated default Qt version to 5.0.0 Changed default version in qbase.pri and qpluginbase.pri in case no version is given at all. --- src/plugins/qpluginbase.pri | 2 +- src/qbase.pri | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/qpluginbase.pri b/src/plugins/qpluginbase.pri index bcf473f1fe..2dd96bf7f2 100644 --- a/src/plugins/qpluginbase.pri +++ b/src/plugins/qpluginbase.pri @@ -1,6 +1,6 @@ TEMPLATE = lib isEmpty(QT_MAJOR_VERSION) { - VERSION=4.8.0 + VERSION=5.0.0 } else { VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} } diff --git a/src/qbase.pri b/src/qbase.pri index 6336aa9f5c..03f85cf931 100644 --- a/src/qbase.pri +++ b/src/qbase.pri @@ -12,7 +12,7 @@ INCLUDEPATH *= $$MODULE_INCLUDES $$MODULE_INCLUDES/.. #just for today to have so isEmpty(QT_ARCH):!isEmpty(ARCH):QT_ARCH=$$ARCH #another compat that will rot for change #215700 TEMPLATE = lib isEmpty(QT_MAJOR_VERSION) { - VERSION=4.8.0 + VERSION=5.0.0 } else { VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} } From f3341fd555b19ddfaf9484b84a366fa12c966f6a Mon Sep 17 00:00:00 2001 From: Eckhart Koppen Date: Fri, 13 May 2011 15:38:50 +0300 Subject: [PATCH 5/6] Updated version references in autotests Tests now refer to version 5.0.0 --- tests/arthur/baselineserver/src/baselineserver.cpp | 2 +- tests/auto/selftests/expected_cmptest.txt | 2 +- tests/auto/selftests/expected_crashes_3.txt | 2 +- tests/auto/selftests/expected_longstring.txt | 2 +- tests/auto/selftests/expected_maxwarnings.txt | 2 +- tests/auto/selftests/expected_skip.txt | 2 +- tests/auto/uic/baseline/gridalignment.ui.h | 2 +- tests/auto/uic/baseline/icontheme.ui.h | 2 +- tests/benchmarks/corelib/tools/qhash/qhash_string.cpp | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/arthur/baselineserver/src/baselineserver.cpp b/tests/arthur/baselineserver/src/baselineserver.cpp index 97ee80ce7c..d546f1c9dd 100644 --- a/tests/arthur/baselineserver/src/baselineserver.cpp +++ b/tests/arthur/baselineserver/src/baselineserver.cpp @@ -512,7 +512,7 @@ void BaselineHandler::testPathMapping() item.imageChecksums << 0x0123456789abcdefULL; item.itemChecksum = 0x0123; - plat.insert(PI_QtVersion, QLS("4.8.0")); + plat.insert(PI_QtVersion, QLS("5.0.0")); plat.insert(PI_BuildKey, QLS("(nobuildkey)")); plat.insert(PI_QMakeSpec, QLS("linux-g++")); plat.insert(PI_PulseGitBranch, QLS("somebranch")); diff --git a/tests/auto/selftests/expected_cmptest.txt b/tests/auto/selftests/expected_cmptest.txt index 0beb46b26c..df46703afa 100644 --- a/tests/auto/selftests/expected_cmptest.txt +++ b/tests/auto/selftests/expected_cmptest.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Cmptest ********* -Config: Using QTest library 4.8.0, Qt 4.8.0 +Config: Using QTest library 5.0.0, Qt 5.0.0 PASS : tst_Cmptest::initTestCase() PASS : tst_Cmptest::compare_boolfuncs() PASS : tst_Cmptest::compare_pointerfuncs() diff --git a/tests/auto/selftests/expected_crashes_3.txt b/tests/auto/selftests/expected_crashes_3.txt index b7f462a1eb..1735aeba23 100644 --- a/tests/auto/selftests/expected_crashes_3.txt +++ b/tests/auto/selftests/expected_crashes_3.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Crashes ********* -Config: Using QTest library 4.8.0, Qt 4.8.0 +Config: Using QTest library 5.0.0, Qt 5.0.0 PASS : tst_Crashes::initTestCase() QFATAL : tst_Crashes::crash() Received signal 11 FAIL! : tst_Crashes::crash() Received a fatal error. diff --git a/tests/auto/selftests/expected_longstring.txt b/tests/auto/selftests/expected_longstring.txt index 99809a8f9e..443c6572b0 100644 --- a/tests/auto/selftests/expected_longstring.txt +++ b/tests/auto/selftests/expected_longstring.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_LongString ********* -Config: Using QTest library 4.8.0, Qt 4.8.0 +Config: Using QTest library 5.0.0, Qt 5.0.0 PASS : tst_LongString::initTestCase() FAIL! : tst_LongString::failWithLongString() Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. diff --git a/tests/auto/selftests/expected_maxwarnings.txt b/tests/auto/selftests/expected_maxwarnings.txt index 165bdda81f..901350b741 100644 --- a/tests/auto/selftests/expected_maxwarnings.txt +++ b/tests/auto/selftests/expected_maxwarnings.txt @@ -1,5 +1,5 @@ ********* Start testing of MaxWarnings ********* -Config: Using QTest library 4.8.0, Qt 4.8.0 +Config: Using QTest library 5.0.0, Qt 5.0.0 PASS : MaxWarnings::initTestCase() QWARN : MaxWarnings::warn() 0 QWARN : MaxWarnings::warn() 1 diff --git a/tests/auto/selftests/expected_skip.txt b/tests/auto/selftests/expected_skip.txt index 4b53a43543..42f89a7cda 100644 --- a/tests/auto/selftests/expected_skip.txt +++ b/tests/auto/selftests/expected_skip.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Skip ********* -Config: Using QTest library 4.8.0, Qt 4.8.0 +Config: Using QTest library 5.0.0, Qt 5.0.0 PASS : tst_Skip::initTestCase() SKIP : tst_Skip::test() skipping all Loc: [/home/user/depot/qt-git/mainline/tests/auto/selftests/skip/tst_skip.cpp(68)] diff --git a/tests/auto/uic/baseline/gridalignment.ui.h b/tests/auto/uic/baseline/gridalignment.ui.h index 8386190eb0..b49a5aa74d 100644 --- a/tests/auto/uic/baseline/gridalignment.ui.h +++ b/tests/auto/uic/baseline/gridalignment.ui.h @@ -2,7 +2,7 @@ ** Form generated from reading UI file 'gridalignment.ui' ** ** Created: Fri Oct 22 14:33:59 2010 -** by: Qt User Interface Compiler version 4.8.0 +** by: Qt User Interface Compiler version 5.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ diff --git a/tests/auto/uic/baseline/icontheme.ui.h b/tests/auto/uic/baseline/icontheme.ui.h index 946fff9f49..e51be85bfb 100644 --- a/tests/auto/uic/baseline/icontheme.ui.h +++ b/tests/auto/uic/baseline/icontheme.ui.h @@ -2,7 +2,7 @@ ** Form generated from reading UI file 'icontheme.ui' ** ** Created: Thu Sep 2 10:28:19 2010 -** by: Qt User Interface Compiler version 4.8.0 +** by: Qt User Interface Compiler version 5.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ diff --git a/tests/benchmarks/corelib/tools/qhash/qhash_string.cpp b/tests/benchmarks/corelib/tools/qhash/qhash_string.cpp index d9e62cca00..9bbea300ea 100644 --- a/tests/benchmarks/corelib/tools/qhash/qhash_string.cpp +++ b/tests/benchmarks/corelib/tools/qhash/qhash_string.cpp @@ -51,7 +51,7 @@ string is a good idea. //////////////////////////////////////////////////////////////////// ********* Start testing of tst_QHash ********* -Config: Using QTest library 4.8.0, Qt 4.8.0 +Config: Using QTest library 5.0.0, Qt 5.0.0 PASS : tst_QHash::initTestCase() RESULT : tst_QHash::qhash_qt4(): 0.041 msecs per iteration (total: 85, iterations: 2048) From bf6534bad54e5d1a4f15b933f3c08ebbda74881f Mon Sep 17 00:00:00 2001 From: Eckhart Koppen Date: Fri, 13 May 2011 17:28:20 +0300 Subject: [PATCH 6/6] Temporarily changed autotest behaviour to ignore Qt version Version past 5.0.0 was checked, but the test failed to compile in that configuration. --- tests/auto/qset/tst_qset.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/auto/qset/tst_qset.cpp b/tests/auto/qset/tst_qset.cpp index c28b68320e..2c3403ae33 100644 --- a/tests/auto/qset/tst_qset.cpp +++ b/tests/auto/qset/tst_qset.cpp @@ -715,12 +715,12 @@ void tst_QSet::stlMutableIterator() QVERIFY(set2.isEmpty()); QVERIFY(set3.isEmpty()); -#if QT_VERSION >= 0x050000 - i = set2.insert("foo"); -#else +// #if QT_VERSION >= 0x050000 +// i = set2.insert("foo"); +// #else QSet::const_iterator k = set2.insert("foo"); i = reinterpret_cast::iterator &>(k); -#endif +// #endif QVERIFY(*i == "foo"); } }