diff options
132 files changed, 515 insertions, 275 deletions
diff --git a/mkspecs/common/qnx/qplatformdefs.h b/mkspecs/common/qnx/qplatformdefs.h new file mode 100644 index 0000000000..4baa93b642 --- /dev/null +++ b/mkspecs/common/qnx/qplatformdefs.h @@ -0,0 +1,109 @@ +/**************************************************************************** +** +** Copyright (C) 2014 BlackBerry Limited. All rights reserved. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef Q_QNX_PLATFORMDEFS_H +#define Q_QNX_PLATFORMDEFS_H + +// Get Qt defines/settings + +#include "qglobal.h" + +// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs + +#include <unistd.h> + +#define __STDC_CONSTANT_MACROS + +// We are hot - unistd.h should have turned on the specific APIs we requested + + +#include <pthread.h> +#include <dirent.h> +#include <fcntl.h> +#include <grp.h> +#include <pwd.h> +#include <signal.h> + +#include <sys/types.h> +#include <sys/ioctl.h> +#include <sys/ipc.h> +#include <sys/time.h> +// QNX doesn't have the System V <sys/shm.h> header. This is not a standard +// POSIX header, it's only documented in the Single UNIX Specification. +// The preferred POSIX compliant way to share memory is to use the functions +// in <sys/mman.h> that comply with the POSIX Real Time Interface (1003.1b). +#include <sys/mman.h> +#include <sys/socket.h> +#include <sys/stat.h> +#include <sys/wait.h> +#include <netinet/in.h> +#ifndef QT_NO_IPV6IFNAME +#include <net/if.h> +#endif + +// for htonl +#include <arpa/inet.h> + +#define QT_USE_XOPEN_LFS_EXTENSIONS +#if !defined(__EXT_QNX__READDIR64_R) +#define QT_NO_READDIR64 +#endif +#include "../posix/qplatformdefs.h" +#if defined(__EXT_QNX__READDIR64_R) +#define QT_EXT_QNX_READDIR_R ::_readdir64_r +#elif defined(__EXT_QNX__READDIR_R) +#define QT_EXT_QNX_READDIR_R ::_readdir_r +#endif + +#define QT_SNPRINTF ::snprintf +#define QT_VSNPRINTF ::vsnprintf + +// QNX6 doesn't have getpagesize() +inline int getpagesize() +{ + return ::sysconf(_SC_PAGESIZE); +} + +#include <stdlib.h> + +#define QT_QWS_TEMP_DIR QString::fromLatin1(qgetenv("TMP")) + +#endif // Q_QNX_PLATFORMDEFS_H diff --git a/mkspecs/qnx-armv7le-qcc/qplatformdefs.h b/mkspecs/qnx-armv7le-qcc/qplatformdefs.h index b47aecde0d..e8590f2e3e 100644 --- a/mkspecs/qnx-armv7le-qcc/qplatformdefs.h +++ b/mkspecs/qnx-armv7le-qcc/qplatformdefs.h @@ -1,9 +1,9 @@ /**************************************************************************** ** -** Copyright (C) 2012 Research In Motion Limited. <blackberry-qt@qnx.com> +** Copyright (C) 2012 - 2014 BlackBerry Limited. All rights reserved. ** Contact: http://www.qt-project.org/legal ** -** This file is part of the QtCore module of the Qt Toolkit. +** This file is part of the qmake spec of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage @@ -42,68 +42,6 @@ #ifndef QPLATFORMDEFS_H #define QPLATFORMDEFS_H -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include <unistd.h> - -#define __STDC_CONSTANT_MACROS - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include <pthread.h> -#include <dirent.h> -#include <fcntl.h> -#include <grp.h> -#include <pwd.h> -#include <signal.h> - -#include <sys/types.h> -#include <sys/ioctl.h> -#include <sys/ipc.h> -#include <sys/time.h> -// QNX doesn't have the System V <sys/shm.h> header. This is not a standard -// POSIX header, it's only documented in the Single UNIX Specification. -// The preferred POSIX compliant way to share memory is to use the functions -// in <sys/mman.h> that comply with the POSIX Real Time Interface (1003.1b). -#include <sys/mman.h> -#include <sys/socket.h> -#include <sys/stat.h> -#include <sys/wait.h> -#include <netinet/in.h> -#ifndef QT_NO_IPV6IFNAME -#include <net/if.h> -#endif - -// for htonl -#include <arpa/inet.h> - -#define QT_USE_XOPEN_LFS_EXTENSIONS -#if !defined(__EXT_QNX__READDIR64_R) -#define QT_NO_READDIR64 -#endif -#include "../common/posix/qplatformdefs.h" -#if defined(__EXT_QNX__READDIR64_R) -#define QT_EXT_QNX_READDIR_R ::_readdir64_r -#elif defined(__EXT_QNX__READDIR_R) -#define QT_EXT_QNX_READDIR_R ::_readdir_r -#endif - -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf - -// QNX6 doesn't have getpagesize() -inline int getpagesize() -{ - return ::sysconf(_SC_PAGESIZE); -} - -#include <stdlib.h> - -#define QT_QWS_TEMP_DIR QString::fromLatin1(qgetenv("TMP")) +#include "../common/qnx/qplatformdefs.h" #endif // QPLATFORMDEFS_H diff --git a/mkspecs/qnx-x86-qcc/qplatformdefs.h b/mkspecs/qnx-x86-qcc/qplatformdefs.h index b47aecde0d..e8590f2e3e 100644 --- a/mkspecs/qnx-x86-qcc/qplatformdefs.h +++ b/mkspecs/qnx-x86-qcc/qplatformdefs.h @@ -1,9 +1,9 @@ /**************************************************************************** ** -** Copyright (C) 2012 Research In Motion Limited. <blackberry-qt@qnx.com> +** Copyright (C) 2012 - 2014 BlackBerry Limited. All rights reserved. ** Contact: http://www.qt-project.org/legal ** -** This file is part of the QtCore module of the Qt Toolkit. +** This file is part of the qmake spec of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage @@ -42,68 +42,6 @@ #ifndef QPLATFORMDEFS_H #define QPLATFORMDEFS_H -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include <unistd.h> - -#define __STDC_CONSTANT_MACROS - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include <pthread.h> -#include <dirent.h> -#include <fcntl.h> -#include <grp.h> -#include <pwd.h> -#include <signal.h> - -#include <sys/types.h> -#include <sys/ioctl.h> -#include <sys/ipc.h> -#include <sys/time.h> -// QNX doesn't have the System V <sys/shm.h> header. This is not a standard -// POSIX header, it's only documented in the Single UNIX Specification. -// The preferred POSIX compliant way to share memory is to use the functions -// in <sys/mman.h> that comply with the POSIX Real Time Interface (1003.1b). -#include <sys/mman.h> -#include <sys/socket.h> -#include <sys/stat.h> -#include <sys/wait.h> -#include <netinet/in.h> -#ifndef QT_NO_IPV6IFNAME -#include <net/if.h> -#endif - -// for htonl -#include <arpa/inet.h> - -#define QT_USE_XOPEN_LFS_EXTENSIONS -#if !defined(__EXT_QNX__READDIR64_R) -#define QT_NO_READDIR64 -#endif -#include "../common/posix/qplatformdefs.h" -#if defined(__EXT_QNX__READDIR64_R) -#define QT_EXT_QNX_READDIR_R ::_readdir64_r -#elif defined(__EXT_QNX__READDIR_R) -#define QT_EXT_QNX_READDIR_R ::_readdir_r -#endif - -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf - -// QNX6 doesn't have getpagesize() -inline int getpagesize() -{ - return ::sysconf(_SC_PAGESIZE); -} - -#include <stdlib.h> - -#define QT_QWS_TEMP_DIR QString::fromLatin1(qgetenv("TMP")) +#include "../common/qnx/qplatformdefs.h" #endif // QPLATFORMDEFS_H diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index b2f9e29b44..7789461a1c 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -45,11 +45,11 @@ #include <stddef.h> -#define QT_VERSION_STR "5.3.0" +#define QT_VERSION_STR "5.4.0" /* QT_VERSION is (major << 16) + (minor << 8) + patch. */ -#define QT_VERSION 0x050300 +#define QT_VERSION 0x050400 /* can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)) */ @@ -858,22 +858,37 @@ Q_CORE_EXPORT void qFreeAligned(void *ptr); # endif #endif -#if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_RVCT) -/* make use of typeof-extension */ +#if defined(Q_COMPILER_DECLTYPE) || (defined(Q_CC_GNU) && !defined(Q_CC_RVCT)) +/* make use of decltype or GCC's __typeof__ extension */ template <typename T> class QForeachContainer { public: - inline QForeachContainer(const T& t) : c(t), brk(0), i(c.begin()), e(c.end()) { } + inline QForeachContainer(const T& t) : c(t), i(c.begin()), e(c.end()), control(1) { } const T c; - int brk; typename T::const_iterator i, e; + int control; }; -#define Q_FOREACH(variable, container) \ -for (QForeachContainer<__typeof__((container))> _container_((container)); \ - !_container_.brk && _container_.i != _container_.e; \ - __extension__ ({ ++_container_.brk; ++_container_.i; })) \ - for (variable = *_container_.i;; __extension__ ({--_container_.brk; break;})) +# ifdef Q_COMPILER_DECLTYPE +# define QT_FOREACH_DECLTYPE(x) typename QtPrivate::remove_reference<decltype(x)>::type +# else +# define QT_FOREACH_DECLTYPE(x) __typeof__((x)) +# endif + +// Explanation of the control word: +// - it's initialized to 1 +// - that means both the inner and outer loops start +// - if there were no breaks, at the end of the inner loop, it's set to 0, which +// causes it to exit (the inner loop is run exactly once) +// - at the end of the outer loop, it's inverted, so it becomes 1 again, allowing +// the outer loop to continue executing +// - if there was a break inside the inner loop, it will exit with control still +// set to 1; in that case, the outer loop will invert it to 0 and will exit too +# define Q_FOREACH(variable, container) \ +for (QForeachContainer<QT_FOREACH_DECLTYPE(container)> _container_((container)); \ + _container_.control && _container_.i != _container_.e; \ + ++_container_.i, _container_.control ^= 1) \ + for (variable = *_container_.i; _container_.control; _container_.control = 0) #else diff --git a/src/corelib/io/qdatastream.cpp b/src/corelib/io/qdatastream.cpp index a6fbffee7e..a4c4dbf5ff 100644 --- a/src/corelib/io/qdatastream.cpp +++ b/src/corelib/io/qdatastream.cpp @@ -251,7 +251,7 @@ QT_BEGIN_NAMESPACE return retVal; enum { - DefaultStreamVersion = QDataStream::Qt_5_3 + DefaultStreamVersion = QDataStream::Qt_5_4 }; /*! @@ -542,6 +542,7 @@ void QDataStream::setByteOrder(ByteOrder bo) \value Qt_5_1 Version 14 (Qt 5.1) \value Qt_5_2 Version 15 (Qt 5.2) \value Qt_5_3 Same as Qt_5_2 + \value Qt_5_4 Same as Qt_5_2 \sa setVersion(), version() */ diff --git a/src/corelib/io/qdatastream.h b/src/corelib/io/qdatastream.h index 28f1d51a12..fb8dce0641 100644 --- a/src/corelib/io/qdatastream.h +++ b/src/corelib/io/qdatastream.h @@ -88,8 +88,9 @@ public: Qt_5_0 = 13, Qt_5_1 = 14, Qt_5_2 = 15, - Qt_5_3 = Qt_5_2 -#if QT_VERSION >= 0x050400 + Qt_5_3 = Qt_5_2, + Qt_5_4 = Qt_5_3 +#if QT_VERSION >= 0x050500 #error Add the datastream version for this Qt version #endif }; diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp index 4241fe08ca..3e303e529c 100644 --- a/src/corelib/itemmodels/qabstractitemmodel.cpp +++ b/src/corelib/itemmodels/qabstractitemmodel.cpp @@ -990,9 +990,9 @@ void QAbstractItemModel::resetInternalData() */ /*! - \fn void *QModelIndex::internalId() const + \fn quintptr QModelIndex::internalId() const - Returns a \c{qint64} used by the model to associate + Returns a \c{quintptr} used by the model to associate the index with the internal data structure. \sa QAbstractItemModel::createIndex() diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index 83801a20c5..a2f203bf7a 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -889,11 +889,11 @@ struct ContainerAPI<QVector<T> > : CapabilitiesImpl<QVector<T> > template<typename T> struct ContainerAPI<std::vector<T> > : CapabilitiesImpl<std::vector<T> > -{ static int size(const std::vector<T> *t) { return t->size(); } }; +{ static int size(const std::vector<T> *t) { return int(t->size()); } }; template<typename T> struct ContainerAPI<std::list<T> > : CapabilitiesImpl<std::list<T> > -{ static int size(const std::list<T> *t) { return t->size(); } }; +{ static int size(const std::list<T> *t) { return int(t->size()); } }; class QSequentialIterableImpl { diff --git a/src/corelib/tools/qarraydata.cpp b/src/corelib/tools/qarraydata.cpp index 825b3289c7..45587b1214 100644 --- a/src/corelib/tools/qarraydata.cpp +++ b/src/corelib/tools/qarraydata.cpp @@ -68,7 +68,7 @@ static const QArrayData &qt_array_empty = qt_array[0]; static const QArrayData &qt_array_unsharable_empty = qt_array[1]; QArrayData *QArrayData::allocate(size_t objectSize, size_t alignment, - size_t capacity, AllocationOptions options) + size_t capacity, AllocationOptions options) Q_DECL_NOTHROW { // Alignment is a power of two Q_ASSERT(alignment >= Q_ALIGNOF(QArrayData) @@ -111,7 +111,7 @@ QArrayData *QArrayData::allocate(size_t objectSize, size_t alignment, } void QArrayData::deallocate(QArrayData *data, size_t objectSize, - size_t alignment) + size_t alignment) Q_DECL_NOTHROW { // Alignment is a power of two Q_ASSERT(alignment >= Q_ALIGNOF(QArrayData) diff --git a/src/corelib/tools/qarraydata.h b/src/corelib/tools/qarraydata.h index ffb2b8765e..534f310d36 100644 --- a/src/corelib/tools/qarraydata.h +++ b/src/corelib/tools/qarraydata.h @@ -116,9 +116,9 @@ struct Q_CORE_EXPORT QArrayData static QArrayData *allocate(size_t objectSize, size_t alignment, size_t capacity, AllocationOptions options = Default) - Q_REQUIRED_RESULT; + Q_DECL_NOTHROW Q_REQUIRED_RESULT; static void deallocate(QArrayData *data, size_t objectSize, - size_t alignment); + size_t alignment) Q_DECL_NOTHROW; static const QArrayData shared_null[2]; static QArrayData *sharedNull() { return const_cast<QArrayData*>(shared_null); } diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index 73fd6369a7..52207dcd4e 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -67,7 +67,7 @@ int qFindByteArray( const char *needle0, int needleLen); -int qAllocMore(int alloc, int extra) +int qAllocMore(int alloc, int extra) Q_DECL_NOTHROW { Q_ASSERT(alloc >= 0 && extra >= 0); Q_ASSERT_X(alloc < (1 << 30) - extra, "qAllocMore", "Requested size is too large!"); diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h index d4bf8df442..409774a76d 100644 --- a/src/corelib/tools/qhash.h +++ b/src/corelib/tools/qhash.h @@ -297,7 +297,7 @@ public: inline QHash(std::initializer_list<std::pair<Key,T> > list) : d(const_cast<QHashData *>(&QHashData::shared_null)) { - reserve(list.size()); + reserve(int(list.size())); for (typename std::initializer_list<std::pair<Key,T> >::const_iterator it = list.begin(); it != list.end(); ++it) insert(it->first, it->second); } @@ -973,7 +973,7 @@ public: #ifdef Q_COMPILER_INITIALIZER_LISTS inline QMultiHash(std::initializer_list<std::pair<Key,T> > list) { - this->reserve(list.size()); + this->reserve(int(list.size())); for (typename std::initializer_list<std::pair<Key,T> >::const_iterator it = list.begin(); it != list.end(); ++it) insert(it->first, it->second); } diff --git a/src/corelib/tools/qset.h b/src/corelib/tools/qset.h index ad2f91b983..291c8fe4f9 100644 --- a/src/corelib/tools/qset.h +++ b/src/corelib/tools/qset.h @@ -60,7 +60,7 @@ public: #ifdef Q_COMPILER_INITIALIZER_LISTS inline QSet(std::initializer_list<T> list) { - reserve(list.size()); + reserve(int(list.size())); for (typename std::initializer_list<T>::const_iterator it = list.begin(); it != list.end(); ++it) insert(*it); } diff --git a/src/corelib/tools/qtools_p.h b/src/corelib/tools/qtools_p.h index b00343dd39..38073a6e30 100644 --- a/src/corelib/tools/qtools_p.h +++ b/src/corelib/tools/qtools_p.h @@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE // implemented in qbytearray.cpp -int Q_CORE_EXPORT qAllocMore(int alloc, int extra); +int Q_CORE_EXPORT qAllocMore(int alloc, int extra) Q_DECL_NOTHROW; QT_END_NAMESPACE diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index aa2b9bea54..7a29bb87b4 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -1644,7 +1644,8 @@ QList<QPolygonF> QPainterPath::toFillPolygons(const QTransform &matrix) const if (count == 0) return polys; - QList<QRectF> bounds; + QVector<QRectF> bounds; + bounds.reserve(count); for (int i=0; i<count; ++i) bounds += subpaths.at(i).boundingRect(); diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 6d568220e2..2421de3f0c 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -1186,7 +1186,7 @@ QHttpNetworkConnection::QHttpNetworkConnection(const QString &hostName, quint16 : QObject(*(new QHttpNetworkConnectionPrivate(hostName, port, encrypt, connectionType)), parent) { Q_D(QHttpNetworkConnection); - d->networkSession = networkSession; + d->networkSession = qMove(networkSession); d->init(); } @@ -1198,7 +1198,7 @@ QHttpNetworkConnection::QHttpNetworkConnection(quint16 connectionCount, const QS connectionType)), parent) { Q_D(QHttpNetworkConnection); - d->networkSession = networkSession; + d->networkSession = qMove(networkSession); d->init(); } #else @@ -1322,7 +1322,7 @@ QSharedPointer<QSslContext> QHttpNetworkConnection::sslContext() void QHttpNetworkConnection::setSslContext(QSharedPointer<QSslContext> context) { Q_D(QHttpNetworkConnection); - d->sslContext = context; + d->sslContext = qMove(context); } void QHttpNetworkConnection::ignoreSslErrors(int channel) diff --git a/src/network/access/qhttpthreaddelegate.cpp b/src/network/access/qhttpthreaddelegate.cpp index e03dcb8ead..7b5ad1e2f1 100644 --- a/src/network/access/qhttpthreaddelegate.cpp +++ b/src/network/access/qhttpthreaddelegate.cpp @@ -188,7 +188,7 @@ public: QHttpNetworkConnection::ConnectionType connectionType, QSharedPointer<QNetworkSession> networkSession) : QHttpNetworkConnection(hostName, port, encrypt, connectionType, /*parent=*/0, - networkSession) + qMove(networkSession)) #endif { setExpires(true); diff --git a/src/plugins/platforms/xcb/qxcbclipboard.cpp b/src/plugins/platforms/xcb/qxcbclipboard.cpp index e7f8510706..3b30274f25 100644 --- a/src/plugins/platforms/xcb/qxcbclipboard.cpp +++ b/src/plugins/platforms/xcb/qxcbclipboard.cpp @@ -135,9 +135,10 @@ protected: (void)formats(); // trigger update of format list - QList<xcb_atom_t> atoms; + QVector<xcb_atom_t> atoms; xcb_atom_t *targets = (xcb_atom_t *) format_atoms.data(); int size = format_atoms.size() / sizeof(xcb_atom_t); + atoms.reserve(size); for (int i = 0; i < size; ++i) atoms.append(targets[i]); @@ -524,7 +525,7 @@ xcb_atom_t QXcbClipboard::sendTargetsSelection(QMimeData *d, xcb_window_t window QVector<xcb_atom_t> types; QStringList formats = QInternalMimeData::formatsHelper(d); for (int i = 0; i < formats.size(); ++i) { - QList<xcb_atom_t> atoms = QXcbMime::mimeAtomsForFormat(connection(), formats.at(i)); + QVector<xcb_atom_t> atoms = QXcbMime::mimeAtomsForFormat(connection(), formats.at(i)); for (int j = 0; j < atoms.size(); ++j) { if (!types.contains(atoms.at(j))) types.append(atoms.at(j)); diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp index 61dfe8ac17..6042ec0f87 100644 --- a/src/plugins/platforms/xcb/qxcbdrag.cpp +++ b/src/plugins/platforms/xcb/qxcbdrag.cpp @@ -183,7 +183,7 @@ void QXcbDrag::startDrag() QStringList fmts = QXcbMime::formatsHelper(drag()->mimeData()); for (int i = 0; i < fmts.size(); ++i) { - QList<xcb_atom_t> atoms = QXcbMime::mimeAtomsForFormat(connection(), fmts.at(i)); + QVector<xcb_atom_t> atoms = QXcbMime::mimeAtomsForFormat(connection(), fmts.at(i)); for (int j = 0; j < atoms.size(); ++j) { if (!drag_types.contains(atoms.at(j))) drag_types.append(atoms.at(j)); @@ -1211,7 +1211,7 @@ QVariant QXcbDropData::xdndObtainData(const QByteArray &format, QVariant::Type r return result; } - QList<xcb_atom_t> atoms = drag->xdnd_types; + QVector<xcb_atom_t> atoms = drag->xdnd_types; QByteArray encoding; xcb_atom_t a = mimeAtomForFormat(c, QLatin1String(format), requestedType, atoms, &encoding); if (a == XCB_NONE) diff --git a/src/plugins/platforms/xcb/qxcbdrag.h b/src/plugins/platforms/xcb/qxcbdrag.h index 5648f70d9e..537898db48 100644 --- a/src/plugins/platforms/xcb/qxcbdrag.h +++ b/src/plugins/platforms/xcb/qxcbdrag.h @@ -46,7 +46,6 @@ #include <private/qsimpledrag_p.h> #include <qxcbobject.h> #include <xcb/xcb.h> -#include <qlist.h> #include <qpoint.h> #include <qrect.h> #include <qsharedpointer.h> @@ -127,7 +126,7 @@ private: // the types in this drop. 100 is no good, but at least it's big. enum { xdnd_max_type = 100 }; - QList<xcb_atom_t> xdnd_types; + QVector<xcb_atom_t> xdnd_types; // timestamp from XdndPosition and XdndDroptime for retrieving the data xcb_timestamp_t target_time; @@ -160,7 +159,7 @@ private: QDrag *drag; QTime time; }; - QList<Transaction> transactions; + QVector<Transaction> transactions; int transaction_expiry_timer; void restartDropExpiryTimer(); diff --git a/src/plugins/platforms/xcb/qxcbmime.cpp b/src/plugins/platforms/xcb/qxcbmime.cpp index b205a63267..c0f6745e7f 100644 --- a/src/plugins/platforms/xcb/qxcbmime.cpp +++ b/src/plugins/platforms/xcb/qxcbmime.cpp @@ -136,9 +136,10 @@ bool QXcbMime::mimeDataForAtom(QXcbConnection *connection, xcb_atom_t a, QMimeDa return ret; } -QList<xcb_atom_t> QXcbMime::mimeAtomsForFormat(QXcbConnection *connection, const QString &format) +QVector<xcb_atom_t> QXcbMime::mimeAtomsForFormat(QXcbConnection *connection, const QString &format) { - QList<xcb_atom_t> atoms; + QVector<xcb_atom_t> atoms; + atoms.reserve(7); atoms.append(connection->internAtom(format.toLatin1())); // special cases for strings @@ -240,7 +241,7 @@ QVariant QXcbMime::mimeConvertToFormat(QXcbConnection *connection, xcb_atom_t a, } xcb_atom_t QXcbMime::mimeAtomForFormat(QXcbConnection *connection, const QString &format, QVariant::Type requestedType, - const QList<xcb_atom_t> &atoms, QByteArray *requestedEncoding) + const QVector<xcb_atom_t> &atoms, QByteArray *requestedEncoding) { requestedEncoding->clear(); diff --git a/src/plugins/platforms/xcb/qxcbmime.h b/src/plugins/platforms/xcb/qxcbmime.h index 4a69a35ced..563716a75b 100644 --- a/src/plugins/platforms/xcb/qxcbmime.h +++ b/src/plugins/platforms/xcb/qxcbmime.h @@ -59,14 +59,14 @@ public: QXcbMime(); ~QXcbMime(); - static QList<xcb_atom_t> mimeAtomsForFormat(QXcbConnection *connection, const QString &format); + static QVector<xcb_atom_t> mimeAtomsForFormat(QXcbConnection *connection, const QString &format); static QString mimeAtomToString(QXcbConnection *connection, xcb_atom_t a); static bool mimeDataForAtom(QXcbConnection *connection, xcb_atom_t a, QMimeData *mimeData, QByteArray *data, xcb_atom_t *atomFormat, int *dataFormat); static QVariant mimeConvertToFormat(QXcbConnection *connection, xcb_atom_t a, const QByteArray &data, const QString &format, QVariant::Type requestedType, const QByteArray &encoding); static xcb_atom_t mimeAtomForFormat(QXcbConnection *connection, const QString &format, QVariant::Type requestedType, - const QList<xcb_atom_t> &atoms, QByteArray *requestedEncoding); + const QVector<xcb_atom_t> &atoms, QByteArray *requestedEncoding); }; #endif // !(defined(QT_NO_DRAGANDDROP) && defined(QT_NO_CLIPBOARD)) diff --git a/src/testlib/qplaintestlogger.cpp b/src/testlib/qplaintestlogger.cpp index 39580f22d4..774f2cc4fb 100644 --- a/src/testlib/qplaintestlogger.cpp +++ b/src/testlib/qplaintestlogger.cpp @@ -51,21 +51,29 @@ #include <stdlib.h> #include <string.h> -#ifdef Q_OS_WIN -#include <windows.h> -#endif - #ifdef Q_OS_WINCE #include <QtCore/QString> #endif +#ifdef min // windows.h without NOMINMAX is included by the benchmark headers. +# undef min +#endif +#ifdef max +# undef max +#endif + #include <QtCore/QByteArray> #include <QtCore/qmath.h> +#include <QtCore/QLibraryInfo> #ifdef Q_OS_ANDROID # include <android/log.h> #endif +#ifdef Q_OS_WIN +# include <qt_windows.h> +#endif + QT_BEGIN_NAMESPACE namespace QTest { @@ -334,7 +342,7 @@ void QPlainTestLogger::startLogging() qsnprintf(buf, sizeof(buf), "********* Start testing of %s *********\n" "Config: Using QtTest library " QTEST_VERSION_STR - ", Qt %s\n", QTestResult::currentTestObjectName(), qVersion()); + ", %s\n", QTestResult::currentTestObjectName(), QLibraryInfo::build()); } outputMessage(buf); } diff --git a/src/testlib/qxmltestlogger.cpp b/src/testlib/qxmltestlogger.cpp index 3fff753c5c..5ea28bd46d 100644 --- a/src/testlib/qxmltestlogger.cpp +++ b/src/testlib/qxmltestlogger.cpp @@ -42,6 +42,7 @@ #include <stdio.h> #include <string.h> #include <QtCore/qglobal.h> +#include <QtCore/qlibraryinfo.h> #include <QtTest/private/qxmltestlogger_p.h> #include <QtTest/private/qtestresult_p.h> @@ -115,11 +116,15 @@ void QXmlTestLogger::startLogging() outputString(buf.constData()); } + QTestCharBuffer quotedBuild; + xmlQuote("edBuild, QLibraryInfo::build()); + QTest::qt_asprintf(&buf, "<Environment>\n" " <QtVersion>%s</QtVersion>\n" + " <QtBuild>%s</QtBuild>\n" " <QTestVersion>" QTEST_VERSION_STR "</QTestVersion>\n" - "</Environment>\n", qVersion()); + "</Environment>\n", qVersion(), quotedBuild.constData()); outputString(buf.constData()); m_totalTime.start(); } diff --git a/src/testlib/qxunittestlogger.cpp b/src/testlib/qxunittestlogger.cpp index a47f77ae49..fe5b13eeeb 100644 --- a/src/testlib/qxunittestlogger.cpp +++ b/src/testlib/qxunittestlogger.cpp @@ -46,6 +46,15 @@ #include <QtTest/private/qtestresult_p.h> #include <QtTest/private/qbenchmark_p.h> +#ifdef min // windows.h without NOMINMAX is included by the benchmark headers. +# undef min +#endif +#ifdef max +# undef max +#endif + +#include <QtCore/qlibraryinfo.h> + #include <string.h> QT_BEGIN_NAMESPACE @@ -108,6 +117,11 @@ void QXunitTestLogger::stopLogging() property->addAttribute(QTest::AI_PropertyValue, qVersion()); properties->addLogElement(property); + property = new QTestElement(QTest::LET_Property); + property->addAttribute(QTest::AI_Name, "QtBuild"); + property->addAttribute(QTest::AI_PropertyValue, QLibraryInfo::build()); + properties->addLogElement(property); + currentLogElement->addLogElement(properties); currentLogElement->addLogElement(iterator); diff --git a/src/widgets/util/qsystemtrayicon.cpp b/src/widgets/util/qsystemtrayicon.cpp index f1a69e6b36..fa318f3233 100644 --- a/src/widgets/util/qsystemtrayicon.cpp +++ b/src/widgets/util/qsystemtrayicon.cpp @@ -672,6 +672,74 @@ void QBalloonTip::timerEvent(QTimerEvent *e) QWidget::timerEvent(e); } +////////////////////////////////////////////////////////////////////// +void QSystemTrayIconPrivate::install_sys_qpa() +{ + qpa_sys->init(); + QObject::connect(qpa_sys, SIGNAL(activated(QPlatformSystemTrayIcon::ActivationReason)), + q_func(), SLOT(_q_emitActivated(QPlatformSystemTrayIcon::ActivationReason))); + QObject::connect(qpa_sys, &QPlatformSystemTrayIcon::messageClicked, + q_func(), &QSystemTrayIcon::messageClicked); + updateMenu_sys(); + updateIcon_sys(); + updateToolTip_sys(); +} + +void QSystemTrayIconPrivate::remove_sys_qpa() +{ + qpa_sys->cleanup(); +} + +QRect QSystemTrayIconPrivate::geometry_sys_qpa() const +{ + return qpa_sys->geometry(); +} + +void QSystemTrayIconPrivate::updateIcon_sys_qpa() +{ + qpa_sys->updateIcon(icon); +} + +void QSystemTrayIconPrivate::updateMenu_sys_qpa() +{ + if (menu) { + if (!menu->platformMenu()) { + QPlatformMenu *platformMenu = qpa_sys->createMenu(); + if (platformMenu) + menu->setPlatformMenu(platformMenu); + } + qpa_sys->updateMenu(menu->platformMenu()); + } +} + +void QSystemTrayIconPrivate::updateToolTip_sys_qpa() +{ + qpa_sys->updateToolTip(toolTip); +} + +void QSystemTrayIconPrivate::showMessage_sys_qpa(const QString &message, + const QString &title, + QSystemTrayIcon::MessageIcon icon, + int msecs) +{ + QIcon notificationIcon; + switch (icon) { + case QSystemTrayIcon::Information: + notificationIcon = QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation); + break; + case QSystemTrayIcon::Warning: + notificationIcon = QApplication::style()->standardIcon(QStyle::SP_MessageBoxWarning); + break; + case QSystemTrayIcon::Critical: + notificationIcon = QApplication::style()->standardIcon(QStyle::SP_MessageBoxCritical); + break; + default: + break; + } + qpa_sys->showMessage(message, title, notificationIcon, + static_cast<QPlatformSystemTrayIcon::MessageIcon>(icon), msecs); +} + QT_END_NAMESPACE #endif // QT_NO_SYSTEMTRAYICON diff --git a/src/widgets/util/qsystemtrayicon_p.h b/src/widgets/util/qsystemtrayicon_p.h index 211ef308f1..317664a365 100644 --- a/src/widgets/util/qsystemtrayicon_p.h +++ b/src/widgets/util/qsystemtrayicon_p.h @@ -98,6 +98,15 @@ public: QSystemTrayIconSys *sys; QPlatformSystemTrayIcon *qpa_sys; bool visible; + +private: + void install_sys_qpa(); + void remove_sys_qpa(); + void updateIcon_sys_qpa(); + void updateToolTip_sys_qpa(); + void updateMenu_sys_qpa(); + QRect geometry_sys_qpa() const; + void showMessage_sys_qpa(const QString &msg, const QString &title, QSystemTrayIcon::MessageIcon icon, int secs); }; class QBalloonTip : public QWidget diff --git a/src/widgets/util/qsystemtrayicon_qpa.cpp b/src/widgets/util/qsystemtrayicon_qpa.cpp index f98aeaf678..045641c509 100644 --- a/src/widgets/util/qsystemtrayicon_qpa.cpp +++ b/src/widgets/util/qsystemtrayicon_qpa.cpp @@ -65,28 +65,20 @@ QSystemTrayIconPrivate::~QSystemTrayIconPrivate() void QSystemTrayIconPrivate::install_sys() { - if (qpa_sys) { - qpa_sys->init(); - QObject::connect(qpa_sys, SIGNAL(activated(QPlatformSystemTrayIcon::ActivationReason)), - q_func(), SLOT(_q_emitActivated(QPlatformSystemTrayIcon::ActivationReason))); - QObject::connect(qpa_sys, SIGNAL(messageClicked()), - q_func(), SIGNAL(messageClicked())); - updateMenu_sys(); - updateIcon_sys(); - updateToolTip_sys(); - } + if (qpa_sys) + install_sys_qpa(); } void QSystemTrayIconPrivate::remove_sys() { if (qpa_sys) - qpa_sys->cleanup(); + remove_sys_qpa(); } QRect QSystemTrayIconPrivate::geometry_sys() const { if (qpa_sys) - return qpa_sys->geometry(); + return geometry_sys_qpa(); else return QRect(); } @@ -94,25 +86,19 @@ QRect QSystemTrayIconPrivate::geometry_sys() const void QSystemTrayIconPrivate::updateIcon_sys() { if (qpa_sys) - qpa_sys->updateIcon(icon); + updateIcon_sys_qpa(); } void QSystemTrayIconPrivate::updateMenu_sys() { - if (qpa_sys && menu) { - if (!menu->platformMenu()) { - QPlatformMenu *platformMenu = qpa_sys->createMenu(); - if (platformMenu) - menu->setPlatformMenu(platformMenu); - } - qpa_sys->updateMenu(menu->platformMenu()); - } + if (qpa_sys) + updateMenu_sys_qpa(); } void QSystemTrayIconPrivate::updateToolTip_sys() { if (qpa_sys) - qpa_sys->updateToolTip(toolTip); + updateToolTip_sys_qpa(); } bool QSystemTrayIconPrivate::isSystemTrayAvailable_sys() @@ -138,25 +124,8 @@ void QSystemTrayIconPrivate::showMessage_sys(const QString &message, QSystemTrayIcon::MessageIcon icon, int msecs) { - if (!qpa_sys) - return; - - QIcon notificationIcon; - switch (icon) { - case QSystemTrayIcon::Information: - notificationIcon = QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation); - break; - case QSystemTrayIcon::Warning: - notificationIcon = QApplication::style()->standardIcon(QStyle::SP_MessageBoxWarning); - break; - case QSystemTrayIcon::Critical: - notificationIcon = QApplication::style()->standardIcon(QStyle::SP_MessageBoxCritical); - break; - default: - break; - } - qpa_sys->showMessage(message, title, notificationIcon, - static_cast<QPlatformSystemTrayIcon::MessageIcon>(icon), msecs); + if (qpa_sys) + showMessage_sys_qpa(message, title, icon, msecs); } QT_END_NAMESPACE diff --git a/src/widgets/util/qsystemtrayicon_x11.cpp b/src/widgets/util/qsystemtrayicon_x11.cpp index 347e5701c0..27d0418dff 100644 --- a/src/widgets/util/qsystemtrayicon_x11.cpp +++ b/src/widgets/util/qsystemtrayicon_x11.cpp @@ -55,6 +55,9 @@ #include <qscreen.h> #include <qbackingstore.h> #include <qpa/qplatformnativeinterface.h> +#include <qpa/qplatformsystemtrayicon.h> +#include <qpa/qplatformtheme.h> +#include <private/qguiapplication_p.h> #include <qdebug.h> #ifndef QT_NO_SYSTEMTRAYICON @@ -209,16 +212,22 @@ void QSystemTrayIconSys::paintEvent(QPaintEvent *) QSystemTrayIconPrivate::QSystemTrayIconPrivate() : sys(0), + qpa_sys(QGuiApplicationPrivate::platformTheme()->createPlatformSystemTrayIcon()), visible(false) { } QSystemTrayIconPrivate::~QSystemTrayIconPrivate() { + delete qpa_sys; } void QSystemTrayIconPrivate::install_sys() { + if (qpa_sys) { + install_sys_qpa(); + return; + } Q_Q(QSystemTrayIcon); if (!sys && locateSystemTray()) { sys = new QSystemTrayIconSys(q); @@ -229,6 +238,8 @@ void QSystemTrayIconPrivate::install_sys() QRect QSystemTrayIconPrivate::geometry_sys() const { + if (qpa_sys) + return geometry_sys_qpa(); if (!sys) return QRect(); return sys->globalGeometry(); @@ -236,6 +247,10 @@ QRect QSystemTrayIconPrivate::geometry_sys() const void QSystemTrayIconPrivate::remove_sys() { + if (qpa_sys) { + remove_sys_qpa(); + return; + } if (!sys) return; QBalloonTip::hideBalloon(); @@ -246,17 +261,26 @@ void QSystemTrayIconPrivate::remove_sys() void QSystemTrayIconPrivate::updateIcon_sys() { + if (qpa_sys) { + updateIcon_sys_qpa(); + return; + } if (sys) sys->updateIcon(); } void QSystemTrayIconPrivate::updateMenu_sys() { - + if (qpa_sys) + updateMenu_sys_qpa(); } void QSystemTrayIconPrivate::updateToolTip_sys() { + if (qpa_sys) { + updateToolTip_sys_qpa(); + return; + } if (!sys) return; #ifndef QT_NO_TOOLTIP @@ -266,6 +290,11 @@ void QSystemTrayIconPrivate::updateToolTip_sys() bool QSystemTrayIconPrivate::isSystemTrayAvailable_sys() { + QScopedPointer<QPlatformSystemTrayIcon> sys(QGuiApplicationPrivate::platformTheme()->createPlatformSystemTrayIcon()); + if (sys) + return sys->isSystemTrayAvailable(); + + // no QPlatformSystemTrayIcon so fall back to default xcb platform behavior const QString platform = QGuiApplication::platformName(); if (platform.compare(QStringLiteral("xcb"), Qt::CaseInsensitive) == 0) return locateSystemTray(); @@ -274,12 +303,21 @@ bool QSystemTrayIconPrivate::isSystemTrayAvailable_sys() bool QSystemTrayIconPrivate::supportsMessages_sys() { + QScopedPointer<QPlatformSystemTrayIcon> sys(QGuiApplicationPrivate::platformTheme()->createPlatformSystemTrayIcon()); + if (sys) + return sys->supportsMessages(); + + // no QPlatformSystemTrayIcon so fall back to default xcb platform behavior return true; } void QSystemTrayIconPrivate::showMessage_sys(const QString &message, const QString &title, QSystemTrayIcon::MessageIcon icon, int msecs) { + if (qpa_sys) { + showMessage_sys_qpa(message, title, icon, msecs); + return; + } if (!sys) return; const QPoint g = sys->globalGeometry().topLeft(); diff --git a/src/widgets/widgets/qmdiarea.cpp b/src/widgets/widgets/qmdiarea.cpp index 600d9b536f..d0488d5955 100644 --- a/src/widgets/widgets/qmdiarea.cpp +++ b/src/widgets/widgets/qmdiarea.cpp @@ -169,7 +169,7 @@ #include <QResizeEvent> #include <QScrollBar> #include <QtAlgorithms> -#include <QMutableListIterator> +#include <QMutableVectorIterator> #include <QPainter> #include <QFontMetrics> #include <QStyleOption> @@ -413,7 +413,7 @@ void IconTiler::rearrange(QList<QWidget *> &widgets, const QRect &domain) const \internal Calculates the accumulated overlap (intersection area) between 'source' and 'rects'. */ -int MinOverlapPlacer::accumulatedOverlap(const QRect &source, const QList<QRect> &rects) +int MinOverlapPlacer::accumulatedOverlap(const QRect &source, const QVector<QRect> &rects) { int accOverlap = 0; foreach (const QRect &rect, rects) { @@ -429,7 +429,7 @@ int MinOverlapPlacer::accumulatedOverlap(const QRect &source, const QList<QRect> Finds among 'source' the rectangle with the minimum accumulated overlap with the rectangles in 'rects'. */ -QRect MinOverlapPlacer::findMinOverlapRect(const QList<QRect> &source, const QList<QRect> &rects) +QRect MinOverlapPlacer::findMinOverlapRect(const QVector<QRect> &source, const QVector<QRect> &rects) { int minAccOverlap = -1; QRect minAccOverlapRect; @@ -447,28 +447,37 @@ QRect MinOverlapPlacer::findMinOverlapRect(const QList<QRect> &source, const QLi \internal Gets candidates for the final placement. */ -void MinOverlapPlacer::getCandidatePlacements(const QSize &size, const QList<QRect> &rects, - const QRect &domain,QList<QRect> &candidates) +QVector<QRect> MinOverlapPlacer::getCandidatePlacements(const QSize &size, const QVector<QRect> &rects, + const QRect &domain) { - QSet<int> xset; - QSet<int> yset; - xset << domain.left() << domain.right() - size.width() + 1; - yset << domain.top(); + QVector<QRect> result; + + QVector<int> xlist; + xlist.reserve(2 + rects.size()); + xlist << domain.left() << domain.right() - size.width() + 1; + + QVector<int> ylist; + ylist.reserve(2 + rects.size()); + ylist << domain.top(); if (domain.bottom() - size.height() + 1 >= 0) - yset << domain.bottom() - size.height() + 1; + ylist << domain.bottom() - size.height() + 1; + foreach (const QRect &rect, rects) { - xset << rect.right() + 1; - yset << rect.bottom() + 1; + xlist << rect.right() + 1; + ylist << rect.bottom() + 1; } - QList<int> xlist = xset.values(); std::sort(xlist.begin(), xlist.end()); - QList<int> ylist = yset.values(); + xlist.erase(std::unique(xlist.begin(), xlist.end()), xlist.end()); + std::sort(ylist.begin(), ylist.end()); + ylist.erase(std::unique(ylist.begin(), ylist.end()), ylist.end()); + result.reserve(ylist.size() * xlist.size()); foreach (int y, ylist) foreach (int x, xlist) - candidates << QRect(QPoint(x, y), size); + result << QRect(QPoint(x, y), size); + return result; } /*! @@ -476,10 +485,12 @@ void MinOverlapPlacer::getCandidatePlacements(const QSize &size, const QList<QRe Finds all rectangles in 'source' not completely inside 'domain'. The result is stored in 'result' and also removed from 'source'. */ -void MinOverlapPlacer::findNonInsiders(const QRect &domain, QList<QRect> &source, - QList<QRect> &result) +QVector<QRect> MinOverlapPlacer::findNonInsiders(const QRect &domain, QVector<QRect> &source) { - QMutableListIterator<QRect> it(source); + QVector<QRect> result; + result.reserve(source.size()); + + QMutableVectorIterator<QRect> it(source); while (it.hasNext()) { const QRect srcRect = it.next(); if (!domain.contains(srcRect)) { @@ -487,6 +498,8 @@ void MinOverlapPlacer::findNonInsiders(const QRect &domain, QList<QRect> &source it.remove(); } } + + return result; } /*! @@ -494,9 +507,11 @@ void MinOverlapPlacer::findNonInsiders(const QRect &domain, QList<QRect> &source Finds all rectangles in 'source' that overlaps 'domain' by the maximum overlap area between 'domain' and any rectangle in 'source'. The result is stored in 'result'. */ -void MinOverlapPlacer::findMaxOverlappers(const QRect &domain, const QList<QRect> &source, - QList<QRect> &result) +QVector<QRect> MinOverlapPlacer::findMaxOverlappers(const QRect &domain, const QVector<QRect> &source) { + QVector<QRect> result; + result.reserve(source.size()); + int maxOverlap = -1; foreach (const QRect &srcRect, source) { QRect intersection = domain.intersected(srcRect); @@ -509,6 +524,8 @@ void MinOverlapPlacer::findMaxOverlappers(const QRect &domain, const QList<QRect result << srcRect; } } + + return result; } /*! @@ -517,17 +534,15 @@ void MinOverlapPlacer::findMaxOverlappers(const QRect &domain, const QList<QRect placement that overlaps the rectangles in 'rects' as little as possible while at the same time being as much as possible inside 'domain'. */ -QPoint MinOverlapPlacer::findBestPlacement(const QRect &domain, const QList<QRect> &rects, - QList<QRect> &source) +QPoint MinOverlapPlacer::findBestPlacement(const QRect &domain, const QVector<QRect> &rects, + QVector<QRect> &source) { - QList<QRect> nonInsiders; - findNonInsiders(domain, source, nonInsiders); + const QVector<QRect> nonInsiders = findNonInsiders(domain, source); if (!source.empty()) return findMinOverlapRect(source, rects).topLeft(); - QList<QRect> maxOverlappers; - findMaxOverlappers(domain, nonInsiders, maxOverlappers); + QVector<QRect> maxOverlappers = findMaxOverlappers(domain, nonInsiders); return findMinOverlapRect(maxOverlappers, rects).topLeft(); } @@ -538,7 +553,7 @@ QPoint MinOverlapPlacer::findBestPlacement(const QRect &domain, const QList<QRec overlaps 'rects' as little as possible and 'domain' as much as possible. Returns the position of the resulting rectangle. */ -QPoint MinOverlapPlacer::place(const QSize &size, const QList<QRect> &rects, +QPoint MinOverlapPlacer::place(const QSize &size, const QVector<QRect> &rects, const QRect &domain) const { if (size.isEmpty() || !domain.isValid()) @@ -548,8 +563,7 @@ QPoint MinOverlapPlacer::place(const QSize &size, const QList<QRect> &rects, return QPoint(); } - QList<QRect> candidates; - getCandidatePlacements(size, rects, domain, candidates); + QVector<QRect> candidates = getCandidatePlacements(size, rects, domain); return findBestPlacement(domain, rects, candidates); } @@ -882,7 +896,8 @@ void QMdiAreaPrivate::place(Placer *placer, QMdiSubWindow *child) return; } - QList<QRect> rects; + QVector<QRect> rects; + rects.reserve(childWindows.size()); QRect parentRect = q->rect(); foreach (QMdiSubWindow *window, childWindows) { if (!sanityCheck(window, "QMdiArea::place") || window == child || !window->isVisibleTo(q) diff --git a/src/widgets/widgets/qmdiarea_p.h b/src/widgets/widgets/qmdiarea_p.h index 90db55438a..360ed2508c 100644 --- a/src/widgets/widgets/qmdiarea_p.h +++ b/src/widgets/widgets/qmdiarea_p.h @@ -59,6 +59,7 @@ #ifndef QT_NO_MDIAREA #include <QList> +#include <QVector> #include <QRect> #include <QPoint> #include <QtWidgets/qapplication.h> @@ -116,24 +117,19 @@ public: // Places the rectangle defined by 'size' relative to 'rects' and 'domain'. // Returns the position of the resulting rectangle. virtual QPoint place( - const QSize &size, const QList<QRect> &rects, const QRect &domain) const = 0; + const QSize &size, const QVector<QRect> &rects, const QRect &domain) const = 0; virtual ~Placer() {} }; class MinOverlapPlacer : public Placer { - QPoint place(const QSize &size, const QList<QRect> &rects, const QRect &domain) const; - static int accumulatedOverlap(const QRect &source, const QList<QRect> &rects); - static QRect findMinOverlapRect(const QList<QRect> &source, const QList<QRect> &rects); - static void getCandidatePlacements( - const QSize &size, const QList<QRect> &rects, const QRect &domain, - QList<QRect> &candidates); - static QPoint findBestPlacement( - const QRect &domain, const QList<QRect> &rects, QList<QRect> &source); - static void findNonInsiders( - const QRect &domain, QList<QRect> &source, QList<QRect> &result); - static void findMaxOverlappers( - const QRect &domain, const QList<QRect> &source, QList<QRect> &result); + QPoint place(const QSize &size, const QVector<QRect> &rects, const QRect &domain) const; + static int accumulatedOverlap(const QRect &source, const QVector<QRect> &rects); + static QRect findMinOverlapRect(const QVector<QRect> &source, const QVector<QRect> &rects); + static QVector<QRect> getCandidatePlacements(const QSize &size, const QVector<QRect> &rects, const QRect &domain); + static QPoint findBestPlacement(const QRect &domain, const QVector<QRect> &rects, QVector<QRect> &source); + static QVector<QRect> findNonInsiders(const QRect &domain, QVector<QRect> &source); + static QVector<QRect> findMaxOverlappers(const QRect &domain, const QVector<QRect> &source); }; } // namespace QMdi diff --git a/tests/auto/testlib/selftests/expected_assert.lightxml b/tests/auto/testlib/selftests/expected_assert.lightxml index d2d4ae5153..b40ff41da3 100644 --- a/tests/auto/testlib/selftests/expected_assert.lightxml +++ b/tests/auto/testlib/selftests/expected_assert.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_assert.xml b/tests/auto/testlib/selftests/expected_assert.xml index 9e5ea760ae..9770b3cd57 100644 --- a/tests/auto/testlib/selftests/expected_assert.xml +++ b/tests/auto/testlib/selftests/expected_assert.xml @@ -2,6 +2,7 @@ <TestCase name="tst_Assert"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_assert.xunitxml b/tests/auto/testlib/selftests/expected_assert.xunitxml index 0aebe72745..96daa33dcf 100644 --- a/tests/auto/testlib/selftests/expected_assert.xunitxml +++ b/tests/auto/testlib/selftests/expected_assert.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="pass" name="testNumber1"/> diff --git a/tests/auto/testlib/selftests/expected_badxml.lightxml b/tests/auto/testlib/selftests/expected_badxml.lightxml index e4c79e3bb0..94f479a79a 100644 --- a/tests/auto/testlib/selftests/expected_badxml.lightxml +++ b/tests/auto/testlib/selftests/expected_badxml.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_badxml.xml b/tests/auto/testlib/selftests/expected_badxml.xml index 0811db0f3a..c1266bfeed 100644 --- a/tests/auto/testlib/selftests/expected_badxml.xml +++ b/tests/auto/testlib/selftests/expected_badxml.xml @@ -2,6 +2,7 @@ <TestCase name="tst_BadXml"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_badxml.xunitxml b/tests/auto/testlib/selftests/expected_badxml.xunitxml index a696da58c9..49048fdad6 100644 --- a/tests/auto/testlib/selftests/expected_badxml.xunitxml +++ b/tests/auto/testlib/selftests/expected_badxml.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="fail" name="badDataTag"> diff --git a/tests/auto/testlib/selftests/expected_benchlibcounting.lightxml b/tests/auto/testlib/selftests/expected_benchlibcounting.lightxml index 08872be733..6fe511462c 100644 --- a/tests/auto/testlib/selftests/expected_benchlibcounting.lightxml +++ b/tests/auto/testlib/selftests/expected_benchlibcounting.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_benchlibcounting.xml b/tests/auto/testlib/selftests/expected_benchlibcounting.xml index ee6fd98ef2..d945511eec 100644 --- a/tests/auto/testlib/selftests/expected_benchlibcounting.xml +++ b/tests/auto/testlib/selftests/expected_benchlibcounting.xml @@ -2,6 +2,7 @@ <TestCase name="tst_BenchlibCounting"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_benchlibcounting.xunitxml b/tests/auto/testlib/selftests/expected_benchlibcounting.xunitxml index 83e429aa3a..05d1da9874 100644 --- a/tests/auto/testlib/selftests/expected_benchlibcounting.xunitxml +++ b/tests/auto/testlib/selftests/expected_benchlibcounting.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="pass" name="passingBenchmark"> diff --git a/tests/auto/testlib/selftests/expected_benchlibeventcounter.lightxml b/tests/auto/testlib/selftests/expected_benchlibeventcounter.lightxml index cba91a374f..0bc00569e9 100644 --- a/tests/auto/testlib/selftests/expected_benchlibeventcounter.lightxml +++ b/tests/auto/testlib/selftests/expected_benchlibeventcounter.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_benchlibeventcounter.xml b/tests/auto/testlib/selftests/expected_benchlibeventcounter.xml index 7d28975ead..f543e2775c 100644 --- a/tests/auto/testlib/selftests/expected_benchlibeventcounter.xml +++ b/tests/auto/testlib/selftests/expected_benchlibeventcounter.xml @@ -2,6 +2,7 @@ <TestCase name="tst_BenchlibEventCounter"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_benchlibeventcounter.xunitxml b/tests/auto/testlib/selftests/expected_benchlibeventcounter.xunitxml index 60dca28d4f..ce0a81110d 100644 --- a/tests/auto/testlib/selftests/expected_benchlibeventcounter.xunitxml +++ b/tests/auto/testlib/selftests/expected_benchlibeventcounter.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="pass" name="events"> diff --git a/tests/auto/testlib/selftests/expected_benchlibtickcounter.lightxml b/tests/auto/testlib/selftests/expected_benchlibtickcounter.lightxml index 97422240d9..11296ad9c2 100644 --- a/tests/auto/testlib/selftests/expected_benchlibtickcounter.lightxml +++ b/tests/auto/testlib/selftests/expected_benchlibtickcounter.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_benchlibtickcounter.xml b/tests/auto/testlib/selftests/expected_benchlibtickcounter.xml index 24c2e51084..3dd56b4af7 100644 --- a/tests/auto/testlib/selftests/expected_benchlibtickcounter.xml +++ b/tests/auto/testlib/selftests/expected_benchlibtickcounter.xml @@ -2,6 +2,7 @@ <TestCase name="tst_BenchlibTickCounter"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_benchlibtickcounter.xunitxml b/tests/auto/testlib/selftests/expected_benchlibtickcounter.xunitxml index 28c8f11143..779d3bdcbc 100644 --- a/tests/auto/testlib/selftests/expected_benchlibtickcounter.xunitxml +++ b/tests/auto/testlib/selftests/expected_benchlibtickcounter.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="pass" name="threeBillionTicks"> diff --git a/tests/auto/testlib/selftests/expected_benchlibwalltime.lightxml b/tests/auto/testlib/selftests/expected_benchlibwalltime.lightxml index b2e819b26d..c75a6c944d 100644 --- a/tests/auto/testlib/selftests/expected_benchlibwalltime.lightxml +++ b/tests/auto/testlib/selftests/expected_benchlibwalltime.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_benchlibwalltime.xml b/tests/auto/testlib/selftests/expected_benchlibwalltime.xml index 6ae355783a..a2f0edecc6 100644 --- a/tests/auto/testlib/selftests/expected_benchlibwalltime.xml +++ b/tests/auto/testlib/selftests/expected_benchlibwalltime.xml @@ -2,6 +2,7 @@ <TestCase name="tst_BenchlibWalltime"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_benchlibwalltime.xunitxml b/tests/auto/testlib/selftests/expected_benchlibwalltime.xunitxml index e4ffca4d09..6a0510c4c9 100644 --- a/tests/auto/testlib/selftests/expected_benchlibwalltime.xunitxml +++ b/tests/auto/testlib/selftests/expected_benchlibwalltime.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="pass" name="waitForOneThousand"> diff --git a/tests/auto/testlib/selftests/expected_cmptest.lightxml b/tests/auto/testlib/selftests/expected_cmptest.lightxml index 3a776ea7cb..4a376b5c8b 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.lightxml +++ b/tests/auto/testlib/selftests/expected_cmptest.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_cmptest.xml b/tests/auto/testlib/selftests/expected_cmptest.xml index 970544e4b6..aefb1b5f4c 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.xml +++ b/tests/auto/testlib/selftests/expected_cmptest.xml @@ -2,6 +2,7 @@ <TestCase name="tst_Cmptest"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_cmptest.xunitxml b/tests/auto/testlib/selftests/expected_cmptest.xunitxml index 7874c6c52e..7502d3cc54 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.xunitxml +++ b/tests/auto/testlib/selftests/expected_cmptest.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="pass" name="compare_boolfuncs"/> diff --git a/tests/auto/testlib/selftests/expected_commandlinedata.lightxml b/tests/auto/testlib/selftests/expected_commandlinedata.lightxml index c11017f022..894ae7ae23 100644 --- a/tests/auto/testlib/selftests/expected_commandlinedata.lightxml +++ b/tests/auto/testlib/selftests/expected_commandlinedata.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_commandlinedata.xml b/tests/auto/testlib/selftests/expected_commandlinedata.xml index 20dc0c6a7c..b2aa98f6a7 100644 --- a/tests/auto/testlib/selftests/expected_commandlinedata.xml +++ b/tests/auto/testlib/selftests/expected_commandlinedata.xml @@ -2,6 +2,7 @@ <TestCase name="tst_DataTable"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_commandlinedata.xunitxml b/tests/auto/testlib/selftests/expected_commandlinedata.xunitxml index 45b833cf19..5072a7e6f4 100644 --- a/tests/auto/testlib/selftests/expected_commandlinedata.xunitxml +++ b/tests/auto/testlib/selftests/expected_commandlinedata.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="pass" name="fiveTablePasses"> diff --git a/tests/auto/testlib/selftests/expected_counting.lightxml b/tests/auto/testlib/selftests/expected_counting.lightxml index e5fe1ee3cf..836c35fb85 100644 --- a/tests/auto/testlib/selftests/expected_counting.lightxml +++ b/tests/auto/testlib/selftests/expected_counting.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_counting.xml b/tests/auto/testlib/selftests/expected_counting.xml index e015dddcc6..892fd762c6 100644 --- a/tests/auto/testlib/selftests/expected_counting.xml +++ b/tests/auto/testlib/selftests/expected_counting.xml @@ -2,6 +2,7 @@ <TestCase name="tst_Counting"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_counting.xunitxml b/tests/auto/testlib/selftests/expected_counting.xunitxml index 72bf047ba8..cb3a7815af 100644 --- a/tests/auto/testlib/selftests/expected_counting.xunitxml +++ b/tests/auto/testlib/selftests/expected_counting.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="pass" name="testPassPass"/> diff --git a/tests/auto/testlib/selftests/expected_datatable.lightxml b/tests/auto/testlib/selftests/expected_datatable.lightxml index 6cc2d1c46f..c14a6a1940 100644 --- a/tests/auto/testlib/selftests/expected_datatable.lightxml +++ b/tests/auto/testlib/selftests/expected_datatable.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_datatable.xml b/tests/auto/testlib/selftests/expected_datatable.xml index 79963db0a4..297cb0d5de 100644 --- a/tests/auto/testlib/selftests/expected_datatable.xml +++ b/tests/auto/testlib/selftests/expected_datatable.xml @@ -2,6 +2,7 @@ <TestCase name="tst_DataTable"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_datatable.xunitxml b/tests/auto/testlib/selftests/expected_datatable.xunitxml index 6bac80e0a2..89fc7ee819 100644 --- a/tests/auto/testlib/selftests/expected_datatable.xunitxml +++ b/tests/auto/testlib/selftests/expected_datatable.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="pass" name="singleTestFunction1"/> diff --git a/tests/auto/testlib/selftests/expected_datetime.lightxml b/tests/auto/testlib/selftests/expected_datetime.lightxml index 02c60d04f9..48ad0933f7 100644 --- a/tests/auto/testlib/selftests/expected_datetime.lightxml +++ b/tests/auto/testlib/selftests/expected_datetime.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_datetime.xml b/tests/auto/testlib/selftests/expected_datetime.xml index 03aec4430e..30afde60ec 100644 --- a/tests/auto/testlib/selftests/expected_datetime.xml +++ b/tests/auto/testlib/selftests/expected_datetime.xml @@ -2,6 +2,7 @@ <TestCase name="tst_DateTime"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_datetime.xunitxml b/tests/auto/testlib/selftests/expected_datetime.xunitxml index 00bd43f904..901462b6bf 100644 --- a/tests/auto/testlib/selftests/expected_datetime.xunitxml +++ b/tests/auto/testlib/selftests/expected_datetime.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="fail" name="dateTime"> diff --git a/tests/auto/testlib/selftests/expected_exceptionthrow.lightxml b/tests/auto/testlib/selftests/expected_exceptionthrow.lightxml index 6c9675a2aa..2b802aabaf 100644 --- a/tests/auto/testlib/selftests/expected_exceptionthrow.lightxml +++ b/tests/auto/testlib/selftests/expected_exceptionthrow.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> @@ -7,7 +8,7 @@ <Duration msecs="0"/> </TestFunction> <TestFunction name="throwException"> -<Incident type="fail" file="/home/frederik/dev/qt/qt-src-dev/qtbase/src/testlib/qtestcase.cpp" line="2229"> +<Incident type="fail" file="qtestcase.cpp" line="2235"> <Description><![CDATA[Caught unhandled exception]]></Description> </Incident> <Duration msecs="0"/> diff --git a/tests/auto/testlib/selftests/expected_exceptionthrow.xml b/tests/auto/testlib/selftests/expected_exceptionthrow.xml index 87d9d2d431..a265d5ba5f 100644 --- a/tests/auto/testlib/selftests/expected_exceptionthrow.xml +++ b/tests/auto/testlib/selftests/expected_exceptionthrow.xml @@ -2,6 +2,7 @@ <TestCase name="tst_Exception"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> @@ -9,7 +10,7 @@ <Duration msecs="0"/> </TestFunction> <TestFunction name="throwException"> -<Incident type="fail" file="/home/frederik/dev/qt/qt-src-dev/qtbase/src/testlib/qtestcase.cpp" line="2229"> +<Incident type="fail" file="qtestcase.cpp" line="2235"> <Description><![CDATA[Caught unhandled exception]]></Description> </Incident> <Duration msecs="0"/> diff --git a/tests/auto/testlib/selftests/expected_exceptionthrow.xunitxml b/tests/auto/testlib/selftests/expected_exceptionthrow.xunitxml index ab0d379255..7d10bf6f04 100644 --- a/tests/auto/testlib/selftests/expected_exceptionthrow.xunitxml +++ b/tests/auto/testlib/selftests/expected_exceptionthrow.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="fail" name="throwException"> diff --git a/tests/auto/testlib/selftests/expected_expectfail.lightxml b/tests/auto/testlib/selftests/expected_expectfail.lightxml index e5fcca5875..cd5ab78fbe 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.lightxml +++ b/tests/auto/testlib/selftests/expected_expectfail.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_expectfail.xml b/tests/auto/testlib/selftests/expected_expectfail.xml index 14fee2129e..a98b97810c 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.xml +++ b/tests/auto/testlib/selftests/expected_expectfail.xml @@ -2,6 +2,7 @@ <TestCase name="tst_ExpectFail"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_expectfail.xunitxml b/tests/auto/testlib/selftests/expected_expectfail.xunitxml index 45c260c77f..47483d71bf 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.xunitxml +++ b/tests/auto/testlib/selftests/expected_expectfail.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="xfail" name="xfailAndContinue"> diff --git a/tests/auto/testlib/selftests/expected_failcleanup.lightxml b/tests/auto/testlib/selftests/expected_failcleanup.lightxml index cfc18ef5da..b2db64c4e2 100644 --- a/tests/auto/testlib/selftests/expected_failcleanup.lightxml +++ b/tests/auto/testlib/selftests/expected_failcleanup.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_failcleanup.xml b/tests/auto/testlib/selftests/expected_failcleanup.xml index 3aa7aa265d..476e56c4f4 100644 --- a/tests/auto/testlib/selftests/expected_failcleanup.xml +++ b/tests/auto/testlib/selftests/expected_failcleanup.xml @@ -2,6 +2,7 @@ <TestCase name="tst_FailCleanup"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_failcleanup.xunitxml b/tests/auto/testlib/selftests/expected_failcleanup.xunitxml index 6e35566be8..813e284ee0 100644 --- a/tests/auto/testlib/selftests/expected_failcleanup.xunitxml +++ b/tests/auto/testlib/selftests/expected_failcleanup.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="pass" name="aTestFunction"/> diff --git a/tests/auto/testlib/selftests/expected_failinit.lightxml b/tests/auto/testlib/selftests/expected_failinit.lightxml index c0d193998d..5a940fc36b 100644 --- a/tests/auto/testlib/selftests/expected_failinit.lightxml +++ b/tests/auto/testlib/selftests/expected_failinit.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_failinit.xml b/tests/auto/testlib/selftests/expected_failinit.xml index 70ad613f3f..51e1a7fce4 100644 --- a/tests/auto/testlib/selftests/expected_failinit.xml +++ b/tests/auto/testlib/selftests/expected_failinit.xml @@ -2,6 +2,7 @@ <TestCase name="tst_FailInit"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_failinit.xunitxml b/tests/auto/testlib/selftests/expected_failinit.xunitxml index 3c2e31be29..3715725ea5 100644 --- a/tests/auto/testlib/selftests/expected_failinit.xunitxml +++ b/tests/auto/testlib/selftests/expected_failinit.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="fail" name="initTestCase"> <failure message="'false' returned FALSE. ()" result="fail"/> diff --git a/tests/auto/testlib/selftests/expected_failinitdata.lightxml b/tests/auto/testlib/selftests/expected_failinitdata.lightxml index 285471470f..f9da42c060 100644 --- a/tests/auto/testlib/selftests/expected_failinitdata.lightxml +++ b/tests/auto/testlib/selftests/expected_failinitdata.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_failinitdata.xml b/tests/auto/testlib/selftests/expected_failinitdata.xml index e86e102202..e843863bfc 100644 --- a/tests/auto/testlib/selftests/expected_failinitdata.xml +++ b/tests/auto/testlib/selftests/expected_failinitdata.xml @@ -2,6 +2,7 @@ <TestCase name="tst_FailInitData"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_failinitdata.xunitxml b/tests/auto/testlib/selftests/expected_failinitdata.xunitxml index f32ccd5e81..d245bc0dff 100644 --- a/tests/auto/testlib/selftests/expected_failinitdata.xunitxml +++ b/tests/auto/testlib/selftests/expected_failinitdata.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="fail" name="initTestCase"> <failure message="'false' returned FALSE. ()" result="fail"/> diff --git a/tests/auto/testlib/selftests/expected_fetchbogus.lightxml b/tests/auto/testlib/selftests/expected_fetchbogus.lightxml index c5587cf031..c62a93eb49 100644 --- a/tests/auto/testlib/selftests/expected_fetchbogus.lightxml +++ b/tests/auto/testlib/selftests/expected_fetchbogus.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_fetchbogus.xml b/tests/auto/testlib/selftests/expected_fetchbogus.xml index 40295bdebc..c20de137a2 100644 --- a/tests/auto/testlib/selftests/expected_fetchbogus.xml +++ b/tests/auto/testlib/selftests/expected_fetchbogus.xml @@ -2,6 +2,7 @@ <TestCase name="tst_FetchBogus"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_fetchbogus.xunitxml b/tests/auto/testlib/selftests/expected_fetchbogus.xunitxml index fe31b4b600..77ccbd896a 100644 --- a/tests/auto/testlib/selftests/expected_fetchbogus.xunitxml +++ b/tests/auto/testlib/selftests/expected_fetchbogus.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="fail" name="fetchBogus"> diff --git a/tests/auto/testlib/selftests/expected_findtestdata.lightxml b/tests/auto/testlib/selftests/expected_findtestdata.lightxml index 4c1c7298ed..e3c3cea7bc 100644 --- a/tests/auto/testlib/selftests/expected_findtestdata.lightxml +++ b/tests/auto/testlib/selftests/expected_findtestdata.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_findtestdata.xml b/tests/auto/testlib/selftests/expected_findtestdata.xml index b1f33abaf6..6abaa15103 100644 --- a/tests/auto/testlib/selftests/expected_findtestdata.xml +++ b/tests/auto/testlib/selftests/expected_findtestdata.xml @@ -2,6 +2,7 @@ <TestCase name="FindTestData"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_findtestdata.xunitxml b/tests/auto/testlib/selftests/expected_findtestdata.xunitxml index 60283a1064..c1138da6cb 100644 --- a/tests/auto/testlib/selftests/expected_findtestdata.xunitxml +++ b/tests/auto/testlib/selftests/expected_findtestdata.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="pass" name="paths"> diff --git a/tests/auto/testlib/selftests/expected_globaldata.lightxml b/tests/auto/testlib/selftests/expected_globaldata.lightxml index fd128d2c61..7d4c43905c 100644 --- a/tests/auto/testlib/selftests/expected_globaldata.lightxml +++ b/tests/auto/testlib/selftests/expected_globaldata.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_globaldata.xml b/tests/auto/testlib/selftests/expected_globaldata.xml index 0867619fde..5e5d4d8922 100644 --- a/tests/auto/testlib/selftests/expected_globaldata.xml +++ b/tests/auto/testlib/selftests/expected_globaldata.xml @@ -2,6 +2,7 @@ <TestCase name="tst_globaldata"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_globaldata.xunitxml b/tests/auto/testlib/selftests/expected_globaldata.xunitxml index e8cd03a59c..bdd7e3f00a 100644 --- a/tests/auto/testlib/selftests/expected_globaldata.xunitxml +++ b/tests/auto/testlib/selftests/expected_globaldata.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"> <!-- message="initTestCase initTestCase (null)" type="qdebug" --> diff --git a/tests/auto/testlib/selftests/expected_longstring.lightxml b/tests/auto/testlib/selftests/expected_longstring.lightxml index 45c6d3f78d..f8796bed4a 100644 --- a/tests/auto/testlib/selftests/expected_longstring.lightxml +++ b/tests/auto/testlib/selftests/expected_longstring.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_longstring.xml b/tests/auto/testlib/selftests/expected_longstring.xml index efc29d6def..6623b7cd88 100644 --- a/tests/auto/testlib/selftests/expected_longstring.xml +++ b/tests/auto/testlib/selftests/expected_longstring.xml @@ -2,6 +2,7 @@ <TestCase name="tst_LongString"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_longstring.xunitxml b/tests/auto/testlib/selftests/expected_longstring.xunitxml index 6486817dbb..269c06fe08 100644 --- a/tests/auto/testlib/selftests/expected_longstring.xunitxml +++ b/tests/auto/testlib/selftests/expected_longstring.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="fail" name="failWithLongString"> diff --git a/tests/auto/testlib/selftests/expected_maxwarnings.lightxml b/tests/auto/testlib/selftests/expected_maxwarnings.lightxml index ce6d828eb2..49db189352 100644 --- a/tests/auto/testlib/selftests/expected_maxwarnings.lightxml +++ b/tests/auto/testlib/selftests/expected_maxwarnings.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_maxwarnings.xml b/tests/auto/testlib/selftests/expected_maxwarnings.xml index 758af9d6d5..614b054fad 100644 --- a/tests/auto/testlib/selftests/expected_maxwarnings.xml +++ b/tests/auto/testlib/selftests/expected_maxwarnings.xml @@ -2,6 +2,7 @@ <TestCase name="MaxWarnings"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_maxwarnings.xunitxml b/tests/auto/testlib/selftests/expected_maxwarnings.xunitxml index b1b0215cef..329fae5f1d 100644 --- a/tests/auto/testlib/selftests/expected_maxwarnings.xunitxml +++ b/tests/auto/testlib/selftests/expected_maxwarnings.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="pass" name="warn"> diff --git a/tests/auto/testlib/selftests/expected_singleskip.lightxml b/tests/auto/testlib/selftests/expected_singleskip.lightxml index 685396a243..ce09c0a9ad 100644 --- a/tests/auto/testlib/selftests/expected_singleskip.lightxml +++ b/tests/auto/testlib/selftests/expected_singleskip.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_singleskip.xml b/tests/auto/testlib/selftests/expected_singleskip.xml index c10626ca41..0c5cdade3d 100644 --- a/tests/auto/testlib/selftests/expected_singleskip.xml +++ b/tests/auto/testlib/selftests/expected_singleskip.xml @@ -2,6 +2,7 @@ <TestCase name="tst_SingleSkip"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_singleskip.xunitxml b/tests/auto/testlib/selftests/expected_singleskip.xunitxml index 70968fa1c4..2b2da2f504 100644 --- a/tests/auto/testlib/selftests/expected_singleskip.xunitxml +++ b/tests/auto/testlib/selftests/expected_singleskip.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase name="myTest"> diff --git a/tests/auto/testlib/selftests/expected_skip.lightxml b/tests/auto/testlib/selftests/expected_skip.lightxml index 408bc44871..ee83d263b5 100644 --- a/tests/auto/testlib/selftests/expected_skip.lightxml +++ b/tests/auto/testlib/selftests/expected_skip.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_skip.xml b/tests/auto/testlib/selftests/expected_skip.xml index b220722b6c..2c830bc9fb 100644 --- a/tests/auto/testlib/selftests/expected_skip.xml +++ b/tests/auto/testlib/selftests/expected_skip.xml @@ -2,6 +2,7 @@ <TestCase name="tst_Skip"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_skip.xunitxml b/tests/auto/testlib/selftests/expected_skip.xunitxml index 956d51f531..63e582f96a 100644 --- a/tests/auto/testlib/selftests/expected_skip.xunitxml +++ b/tests/auto/testlib/selftests/expected_skip.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase name="test"> diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.lightxml b/tests/auto/testlib/selftests/expected_skipcleanup.lightxml index 49c9d148f5..dbbc30c0db 100644 --- a/tests/auto/testlib/selftests/expected_skipcleanup.lightxml +++ b/tests/auto/testlib/selftests/expected_skipcleanup.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.xml b/tests/auto/testlib/selftests/expected_skipcleanup.xml index 0bf1fe53a3..7b787ebb3d 100644 --- a/tests/auto/testlib/selftests/expected_skipcleanup.xml +++ b/tests/auto/testlib/selftests/expected_skipcleanup.xml @@ -2,6 +2,7 @@ <TestCase name="tst_SkipCleanup"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.xunitxml b/tests/auto/testlib/selftests/expected_skipcleanup.xunitxml index b8f67e2d07..9934584ec5 100644 --- a/tests/auto/testlib/selftests/expected_skipcleanup.xunitxml +++ b/tests/auto/testlib/selftests/expected_skipcleanup.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="pass" name="aTestFunction"/> diff --git a/tests/auto/testlib/selftests/expected_skipinit.lightxml b/tests/auto/testlib/selftests/expected_skipinit.lightxml index e06c745205..3682068825 100644 --- a/tests/auto/testlib/selftests/expected_skipinit.lightxml +++ b/tests/auto/testlib/selftests/expected_skipinit.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_skipinit.xml b/tests/auto/testlib/selftests/expected_skipinit.xml index 6a62b93614..9d6a38b82f 100644 --- a/tests/auto/testlib/selftests/expected_skipinit.xml +++ b/tests/auto/testlib/selftests/expected_skipinit.xml @@ -2,6 +2,7 @@ <TestCase name="tst_SkipInit"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_skipinit.xunitxml b/tests/auto/testlib/selftests/expected_skipinit.xunitxml index f62df71d96..bab08c375c 100644 --- a/tests/auto/testlib/selftests/expected_skipinit.xunitxml +++ b/tests/auto/testlib/selftests/expected_skipinit.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase name="initTestCase"> <!-- message="Skip inside initTestCase. This should skip all tests in the class." type="skip" --> diff --git a/tests/auto/testlib/selftests/expected_skipinitdata.lightxml b/tests/auto/testlib/selftests/expected_skipinitdata.lightxml index 41abd5dccd..26afcb4ab1 100644 --- a/tests/auto/testlib/selftests/expected_skipinitdata.lightxml +++ b/tests/auto/testlib/selftests/expected_skipinitdata.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_skipinitdata.xml b/tests/auto/testlib/selftests/expected_skipinitdata.xml index 8efe12195e..9ab84f21a1 100644 --- a/tests/auto/testlib/selftests/expected_skipinitdata.xml +++ b/tests/auto/testlib/selftests/expected_skipinitdata.xml @@ -2,6 +2,7 @@ <TestCase name="tst_SkipInitData"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_skipinitdata.xunitxml b/tests/auto/testlib/selftests/expected_skipinitdata.xunitxml index 699d50f7a7..e61d50b06b 100644 --- a/tests/auto/testlib/selftests/expected_skipinitdata.xunitxml +++ b/tests/auto/testlib/selftests/expected_skipinitdata.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase name="initTestCase"> <!-- message="Skip inside initTestCase_data. This should skip all tests in the class." type="skip" --> diff --git a/tests/auto/testlib/selftests/expected_strcmp.lightxml b/tests/auto/testlib/selftests/expected_strcmp.lightxml index f0d266d400..298e910be8 100644 --- a/tests/auto/testlib/selftests/expected_strcmp.lightxml +++ b/tests/auto/testlib/selftests/expected_strcmp.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_strcmp.xml b/tests/auto/testlib/selftests/expected_strcmp.xml index 20ffee0611..29208f9a87 100644 --- a/tests/auto/testlib/selftests/expected_strcmp.xml +++ b/tests/auto/testlib/selftests/expected_strcmp.xml @@ -2,6 +2,7 @@ <TestCase name="tst_StrCmp"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_strcmp.xunitxml b/tests/auto/testlib/selftests/expected_strcmp.xunitxml index dde9ff5299..14bef9ec47 100644 --- a/tests/auto/testlib/selftests/expected_strcmp.xunitxml +++ b/tests/auto/testlib/selftests/expected_strcmp.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="pass" name="compareCharStars"/> diff --git a/tests/auto/testlib/selftests/expected_subtest.lightxml b/tests/auto/testlib/selftests/expected_subtest.lightxml index 467fabb7ac..2e484aafef 100644 --- a/tests/auto/testlib/selftests/expected_subtest.lightxml +++ b/tests/auto/testlib/selftests/expected_subtest.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_subtest.xml b/tests/auto/testlib/selftests/expected_subtest.xml index 1107bcb070..f011489ec8 100644 --- a/tests/auto/testlib/selftests/expected_subtest.xml +++ b/tests/auto/testlib/selftests/expected_subtest.xml @@ -2,6 +2,7 @@ <TestCase name="tst_Subtest"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_subtest.xunitxml b/tests/auto/testlib/selftests/expected_subtest.xunitxml index 753711f837..b49c006940 100644 --- a/tests/auto/testlib/selftests/expected_subtest.xunitxml +++ b/tests/auto/testlib/selftests/expected_subtest.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"> <!-- message="initTestCase initTestCase (null)" type="qdebug" --> diff --git a/tests/auto/testlib/selftests/expected_verbose1.lightxml b/tests/auto/testlib/selftests/expected_verbose1.lightxml index 45dca139fa..6d7ce13ea0 100644 --- a/tests/auto/testlib/selftests/expected_verbose1.lightxml +++ b/tests/auto/testlib/selftests/expected_verbose1.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_verbose1.xml b/tests/auto/testlib/selftests/expected_verbose1.xml index 7a182183c1..b5ae1286cb 100644 --- a/tests/auto/testlib/selftests/expected_verbose1.xml +++ b/tests/auto/testlib/selftests/expected_verbose1.xml @@ -2,6 +2,7 @@ <TestCase name="tst_Counting"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_verbose1.xunitxml b/tests/auto/testlib/selftests/expected_verbose1.xunitxml index 72bf047ba8..cb3a7815af 100644 --- a/tests/auto/testlib/selftests/expected_verbose1.xunitxml +++ b/tests/auto/testlib/selftests/expected_verbose1.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="pass" name="testPassPass"/> diff --git a/tests/auto/testlib/selftests/expected_verbose2.lightxml b/tests/auto/testlib/selftests/expected_verbose2.lightxml index 0ead76884c..85f9ec45af 100644 --- a/tests/auto/testlib/selftests/expected_verbose2.lightxml +++ b/tests/auto/testlib/selftests/expected_verbose2.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_verbose2.xml b/tests/auto/testlib/selftests/expected_verbose2.xml index 6d592f4a52..94fef3eed7 100644 --- a/tests/auto/testlib/selftests/expected_verbose2.xml +++ b/tests/auto/testlib/selftests/expected_verbose2.xml @@ -2,6 +2,7 @@ <TestCase name="tst_Counting"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_verbose2.xunitxml b/tests/auto/testlib/selftests/expected_verbose2.xunitxml index 6dabbd34fc..6764a5564f 100644 --- a/tests/auto/testlib/selftests/expected_verbose2.xunitxml +++ b/tests/auto/testlib/selftests/expected_verbose2.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="pass" name="testPassPass"> diff --git a/tests/auto/testlib/selftests/expected_verifyexceptionthrown.lightxml b/tests/auto/testlib/selftests/expected_verifyexceptionthrown.lightxml index fb8f61503e..d38363fb6e 100644 --- a/tests/auto/testlib/selftests/expected_verifyexceptionthrown.lightxml +++ b/tests/auto/testlib/selftests/expected_verifyexceptionthrown.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_verifyexceptionthrown.xml b/tests/auto/testlib/selftests/expected_verifyexceptionthrown.xml index a89528cfb8..8c57fe5c0f 100644 --- a/tests/auto/testlib/selftests/expected_verifyexceptionthrown.xml +++ b/tests/auto/testlib/selftests/expected_verifyexceptionthrown.xml @@ -2,6 +2,7 @@ <TestCase name="tst_VerifyExceptionThrown"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_verifyexceptionthrown.xunitxml b/tests/auto/testlib/selftests/expected_verifyexceptionthrown.xunitxml index f49746a9af..003a31a1cc 100644 --- a/tests/auto/testlib/selftests/expected_verifyexceptionthrown.xunitxml +++ b/tests/auto/testlib/selftests/expected_verifyexceptionthrown.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="pass" name="testCorrectStdTypes"/> diff --git a/tests/auto/testlib/selftests/expected_warnings.lightxml b/tests/auto/testlib/selftests/expected_warnings.lightxml index bbc96b7010..31b3d842aa 100644 --- a/tests/auto/testlib/selftests/expected_warnings.lightxml +++ b/tests/auto/testlib/selftests/expected_warnings.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_warnings.xml b/tests/auto/testlib/selftests/expected_warnings.xml index acb80e4f2a..a3821f84df 100644 --- a/tests/auto/testlib/selftests/expected_warnings.xml +++ b/tests/auto/testlib/selftests/expected_warnings.xml @@ -2,6 +2,7 @@ <TestCase name="tst_Warnings"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_warnings.xunitxml b/tests/auto/testlib/selftests/expected_warnings.xunitxml index 7be47174c6..7ea66522c6 100644 --- a/tests/auto/testlib/selftests/expected_warnings.xunitxml +++ b/tests/auto/testlib/selftests/expected_warnings.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="pass" name="testWarnings"> diff --git a/tests/auto/testlib/selftests/expected_xunit.lightxml b/tests/auto/testlib/selftests/expected_xunit.lightxml index 6660cf4e7a..95ab8f03f0 100644 --- a/tests/auto/testlib/selftests/expected_xunit.lightxml +++ b/tests/auto/testlib/selftests/expected_xunit.lightxml @@ -1,5 +1,6 @@ <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_xunit.xml b/tests/auto/testlib/selftests/expected_xunit.xml index af9fe1f502..f56ca947be 100644 --- a/tests/auto/testlib/selftests/expected_xunit.xml +++ b/tests/auto/testlib/selftests/expected_xunit.xml @@ -2,6 +2,7 @@ <TestCase name="tst_Xunit"> <Environment> <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> diff --git a/tests/auto/testlib/selftests/expected_xunit.xunitxml b/tests/auto/testlib/selftests/expected_xunit.xunitxml index 7d133da7a5..395b6efdd9 100644 --- a/tests/auto/testlib/selftests/expected_xunit.xunitxml +++ b/tests/auto/testlib/selftests/expected_xunit.xunitxml @@ -3,6 +3,7 @@ <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + <property value="" name="QtBuild"/> </properties> <testcase result="pass" name="initTestCase"/> <testcase result="pass" name="testFunc1"> diff --git a/tests/auto/testlib/selftests/generate_expected_output.py b/tests/auto/testlib/selftests/generate_expected_output.py index 1c09faf4db..8c1de0d8b4 100755 --- a/tests/auto/testlib/selftests/generate_expected_output.py +++ b/tests/auto/testlib/selftests/generate_expected_output.py @@ -56,8 +56,11 @@ isWindows = sys.platform == 'win32' replacements = [ (qtver, r'@INSERT_QT_VERSION_HERE@'), + (r'Config: Using QtTest library.*', r'Config: Using QtTest library'), # Build string in text logs (rootPath.encode('unicode-escape').decode('utf-8'), r''), (r'( *)<Duration msecs="[\d\.]+"/>', r'\1<Duration msecs="0"/>'), + (r'( *)<QtBuild>[^<]+</QtBuild>', r'\1<QtBuild/>'), # Build element in xml, lightxml + (r'<property value="[^"]+" name="QtBuild"/>', r'<property value="" name="QtBuild"/>') # Build in xunitxml ] extraArgs = { diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index 8167a96eaa..e73bdc5223 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -169,12 +169,17 @@ QString tst_Selftests::logName(const QString &logger) const return (logger.startsWith("stdout") ? "" : QString(tempDir.path() + "/test_output." + logger)); } +static QString expectedFileNameFromTest(const QString &subdir, const QString &logger) +{ + return QStringLiteral("expected_") + subdir + QLatin1Char('.') + logFormat(logger); +} + // Load the expected test output for the nominated test (subdir) and logger // as an array of lines. If there is no expected output file, return an // empty array. -static QList<QByteArray> expectedResult(const QString &subdir, const QString &logger) +static QList<QByteArray> expectedResult(const QString &fileName) { - QFile file(":/expected_" + subdir + "." + logFormat(logger)); + QFile file(QStringLiteral(":/") + fileName); if (!file.open(QIODevice::ReadOnly)) return QList<QByteArray>(); return splitLines(file.readAll()); @@ -619,7 +624,8 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge for (int n = 0; n < loggers.count(); ++n) { QString logger = loggers[n]; QList<QByteArray> res = splitLines(actualOutputs[n]); - QList<QByteArray> exp = expectedResult(subdir, logger); + const QString expectedFileName = expectedFileNameFromTest(subdir, logger); + QList<QByteArray> exp = expectedResult(expectedFileName); #if defined (Q_CC_MSVC) || defined(Q_CC_MINGW) // MSVC, MinGW format double numbers differently if (n == 0 && subdir == QStringLiteral("float")) { @@ -638,7 +644,7 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge QList<QByteArray> tmp; int i = 1; do { - tmp = expectedResult(subdir + QString("_%1").arg(i++), logger); + tmp = expectedResult(expectedFileNameFromTest(subdir + QLatin1Char('_') + QString::number(i++), logger)); if (tmp.count()) expArr += tmp; } while (tmp.count()); @@ -667,8 +673,8 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge qDebug() << ">>>>>>"; QVERIFY2(res.count() == exp.count(), - qPrintable(QString::fromLatin1("Mismatch in line count: %1 != %2 (%3).") - .arg(res.count()).arg(exp.count()).arg(loggers.at(n)))); + qPrintable(QString::fromLatin1("Mismatch in line count: %1 != %2 (%3, %4).") + .arg(res.count()).arg(exp.count()).arg(loggers.at(n), expectedFileName))); } } @@ -711,6 +717,12 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge if (line.endsWith(" : failure location")) continue; + if (line.startsWith("Config: Using QtTest library") // Text build string + || line.startsWith(" <QtBuild") // XML, Light XML build string + || (line.startsWith(" <property value=") && line.endsWith("name=\"QtBuild\"/>"))) { // XUNIT-XML build string + continue; + } + const QString output(QString::fromLatin1(line)); const QString expected(QString::fromLatin1(exp.at(i)).replace("@INSERT_QT_VERSION_HERE@", QT_VERSION_STR)); @@ -740,8 +752,8 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge .arg(i).arg(loggers.at(n), output))); } else { QVERIFY2(output == expected, - qPrintable(QString::fromLatin1("Mismatch at line %1 (%2): '%3' != '%4'") - .arg(i).arg(loggers.at(n), output, expected))); + qPrintable(QString::fromLatin1("Mismatch at line %1 (%2, %3): '%4' != '%5'") + .arg(i + 1).arg(loggers.at(n), expectedFileName, output, expected))); } benchmark = line.startsWith("RESULT : "); |