summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/image/qicoimageformat/qicoimageformat.pro1
-rw-r--r--tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp79
-rw-r--r--tests/auto/gui/image/qicon/icons/themeparent/icon-theme.cachebin0 -> 280 bytes
-rw-r--r--tests/auto/gui/image/qicon/qicon.pro1
-rw-r--r--tests/auto/gui/image/qicon/tst_qicon.cpp120
-rw-r--r--tests/auto/gui/image/qicon/tst_qicon.qrc1
-rw-r--r--tests/auto/gui/image/qimage/qimage.pro3
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp129
-rw-r--r--tests/auto/gui/image/qimageiohandler/qimageiohandler.pro1
-rw-r--r--tests/auto/gui/image/qimageiohandler/tst_qimageiohandler.cpp29
-rw-r--r--tests/auto/gui/image/qimagereader/qimagereader.pro2
-rw-r--r--tests/auto/gui/image/qimagereader/tst_qimagereader.cpp37
-rw-r--r--tests/auto/gui/image/qimagewriter/qimagewriter.pro2
-rw-r--r--tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp52
-rw-r--r--tests/auto/gui/image/qmovie/qmovie.pro1
-rw-r--r--tests/auto/gui/image/qmovie/tst_qmovie.cpp29
-rw-r--r--tests/auto/gui/image/qpicture/qpicture.pro1
-rw-r--r--tests/auto/gui/image/qpicture/tst_qpicture.cpp29
-rw-r--r--tests/auto/gui/image/qpixmap/tst_qpixmap.cpp58
-rw-r--r--tests/auto/gui/image/qpixmapcache/qpixmapcache.pro1
-rw-r--r--tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp41
-rw-r--r--tests/auto/gui/itemmodels/qstandarditem/qstandarditem.pro1
-rw-r--r--tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp66
-rw-r--r--tests/auto/gui/itemmodels/qstandarditemmodel/qstandarditemmodel.pro7
-rw-r--r--tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp116
-rw-r--r--tests/auto/gui/kernel/noqteventloop/tst_noqteventloop.cpp39
-rw-r--r--tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp29
-rw-r--r--tests/auto/gui/kernel/qclipboard/copier/main.cpp29
-rw-r--r--tests/auto/gui/kernel/qclipboard/paster/main.cpp29
-rw-r--r--tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp29
-rw-r--r--tests/auto/gui/kernel/qdrag/qdrag.pro1
-rw-r--r--tests/auto/gui/kernel/qdrag/tst_qdrag.cpp29
-rw-r--r--tests/auto/gui/kernel/qevent/qevent.pro1
-rw-r--r--tests/auto/gui/kernel/qevent/tst_qevent.cpp29
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp29
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp29
-rw-r--r--tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp45
-rw-r--r--tests/auto/gui/kernel/qguimetatype/qguimetatype.pro1
-rw-r--r--tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp29
-rw-r--r--tests/auto/gui/kernel/qguitimer/qguitimer.pro1
-rw-r--r--tests/auto/gui/kernel/qguivariant/no_application/main.cpp29
-rw-r--r--tests/auto/gui/kernel/qguivariant/no_application/no_application.pro1
-rw-r--r--tests/auto/gui/kernel/qguivariant/test/test.pro1
-rw-r--r--tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp31
-rw-r--r--tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp29
-rw-r--r--tests/auto/gui/kernel/qkeysequence/qkeysequence.pro2
-rw-r--r--tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp33
-rw-r--r--tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp50
-rw-r--r--tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp55
-rw-r--r--tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro2
-rw-r--r--tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp29
-rw-r--r--tests/auto/gui/kernel/qpalette/qpalette.pro1
-rw-r--r--tests/auto/gui/kernel/qpalette/tst_qpalette.cpp29
-rw-r--r--tests/auto/gui/kernel/qpixelformat/tst_qpixelformat.cpp29
-rw-r--r--tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp29
-rw-r--r--tests/auto/gui/kernel/qscreen/qscreen.pro1
-rw-r--r--tests/auto/gui/kernel/qscreen/tst_qscreen.cpp29
-rw-r--r--tests/auto/gui/kernel/qsurfaceformat/qsurfaceformat.pro1
-rw-r--r--tests/auto/gui/kernel/qsurfaceformat/tst_qsurfaceformat.cpp29
-rw-r--r--tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp29
-rw-r--r--tests/auto/gui/kernel/qwindow/BLACKLIST4
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp264
-rw-r--r--tests/auto/gui/math3d/qmatrixnxn/qmatrixnxn.pro1
-rw-r--r--tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp29
-rw-r--r--tests/auto/gui/math3d/qquaternion/qquaternion.pro1
-rw-r--r--tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp41
-rw-r--r--tests/auto/gui/math3d/qvectornd/qvectornd.pro1
-rw-r--r--tests/auto/gui/math3d/qvectornd/tst_qvectornd.cpp29
-rw-r--r--tests/auto/gui/painting/qbrush/qbrush.pro1
-rw-r--r--tests/auto/gui/painting/qbrush/tst_qbrush.cpp29
-rw-r--r--tests/auto/gui/painting/qcolor/qcolor.pro1
-rw-r--r--tests/auto/gui/painting/qcolor/tst_qcolor.cpp29
-rw-r--r--tests/auto/gui/painting/qpagelayout/qpagelayout.pro2
-rw-r--r--tests/auto/gui/painting/qpagelayout/tst_qpagelayout.cpp27
-rw-r--r--tests/auto/gui/painting/qpagesize/qpagesize.pro2
-rw-r--r--tests/auto/gui/painting/qpagesize/tst_qpagesize.cpp29
-rw-r--r--tests/auto/gui/painting/qpaintengine/qpaintengine.pro1
-rw-r--r--tests/auto/gui/painting/qpaintengine/tst_qpaintengine.cpp29
-rw-r--r--tests/auto/gui/painting/qpainter/qpainter.pro4
-rw-r--r--tests/auto/gui/painting/qpainter/tst_qpainter.cpp107
-rw-r--r--tests/auto/gui/painting/qpainter/utils/createImages/main.cpp29
-rw-r--r--tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp37
-rw-r--r--tests/auto/gui/painting/qpainterpathstroker/qpainterpathstroker.pro1
-rw-r--r--tests/auto/gui/painting/qpainterpathstroker/tst_qpainterpathstroker.cpp29
-rw-r--r--tests/auto/gui/painting/qpathclipper/pathcompare.h29
-rw-r--r--tests/auto/gui/painting/qpathclipper/paths.cpp29
-rw-r--r--tests/auto/gui/painting/qpathclipper/paths.h29
-rw-r--r--tests/auto/gui/painting/qpathclipper/qpathclipper.pro3
-rw-r--r--tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp29
-rw-r--r--tests/auto/gui/painting/qpdfwriter/qpdfwriter.pro2
-rw-r--r--tests/auto/gui/painting/qpdfwriter/tst_qpdfwriter.cpp29
-rw-r--r--tests/auto/gui/painting/qpen/qpen.pro1
-rw-r--r--tests/auto/gui/painting/qpen/tst_qpen.cpp29
-rw-r--r--tests/auto/gui/painting/qpolygon/qpolygon.pro3
-rw-r--r--tests/auto/gui/painting/qpolygon/tst_qpolygon.cpp29
-rw-r--r--tests/auto/gui/painting/qregion/qregion.pro1
-rw-r--r--tests/auto/gui/painting/qregion/tst_qregion.cpp52
-rw-r--r--tests/auto/gui/painting/qtransform/qtransform.pro3
-rw-r--r--tests/auto/gui/painting/qtransform/tst_qtransform.cpp55
-rw-r--r--tests/auto/gui/painting/qwmatrix/qwmatrix.pro3
-rw-r--r--tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp56
-rw-r--r--tests/auto/gui/qopengl/qopengl.pro3
-rw-r--r--tests/auto/gui/qopengl/tst_qopengl.cpp29
-rw-r--r--tests/auto/gui/qopenglconfig/qopenglconfig.pro1
-rw-r--r--tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp29
-rw-r--r--tests/auto/gui/text/qabstracttextdocumentlayout/qabstracttextdocumentlayout.pro2
-rw-r--r--tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp29
-rw-r--r--tests/auto/gui/text/qcssparser/qcssparser.pro1
-rw-r--r--tests/auto/gui/text/qcssparser/tst_qcssparser.cpp70
-rw-r--r--tests/auto/gui/text/qfont/qfont.pro4
-rw-r--r--tests/auto/gui/text/qfont/tst_qfont.cpp219
-rw-r--r--tests/auto/gui/text/qfontcache/qfontcache.pro1
-rw-r--r--tests/auto/gui/text/qfontcache/tst_qfontcache.cpp29
-rw-r--r--tests/auto/gui/text/qfontdatabase/qfontdatabase.pro1
-rw-r--r--tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp52
-rw-r--r--tests/auto/gui/text/qfontmetrics/qfontmetrics.pro1
-rw-r--r--tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp54
-rw-r--r--tests/auto/gui/text/qglyphrun/qglyphrun.pro3
-rw-r--r--tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp29
-rw-r--r--tests/auto/gui/text/qrawfont/qrawfont.pro1
-rw-r--r--tests/auto/gui/text/qrawfont/tst_qrawfont.cpp63
-rw-r--r--tests/auto/gui/text/qstatictext/qstatictext.pro2
-rw-r--r--tests/auto/gui/text/qstatictext/tst_qstatictext.cpp64
-rw-r--r--tests/auto/gui/text/qsyntaxhighlighter/qsyntaxhighlighter.pro1
-rw-r--r--tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp35
-rw-r--r--tests/auto/gui/text/qtextblock/qtextblock.pro1
-rw-r--r--tests/auto/gui/text/qtextblock/tst_qtextblock.cpp39
-rw-r--r--tests/auto/gui/text/qtextcursor/qtextcursor.pro1
-rw-r--r--tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp44
-rw-r--r--tests/auto/gui/text/qtextdocument/common.h29
-rw-r--r--tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp131
-rw-r--r--tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp35
-rw-r--r--tests/auto/gui/text/qtextdocumentlayout/qtextdocumentlayout.pro1
-rw-r--r--tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp36
-rw-r--r--tests/auto/gui/text/qtextformat/qtextformat.pro1
-rw-r--r--tests/auto/gui/text/qtextformat/tst_qtextformat.cpp29
-rw-r--r--tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp42
-rw-r--r--tests/auto/gui/text/qtextlist/qtextlist.pro1
-rw-r--r--tests/auto/gui/text/qtextlist/tst_qtextlist.cpp39
-rw-r--r--tests/auto/gui/text/qtextobject/qtextobject.pro1
-rw-r--r--tests/auto/gui/text/qtextobject/tst_qtextobject.cpp29
-rw-r--r--tests/auto/gui/text/qtextodfwriter/tst_qtextodfwriter.cpp31
-rw-r--r--tests/auto/gui/text/qtextpiecetable/tst_qtextpiecetable.cpp29
-rw-r--r--tests/auto/gui/text/qtextscriptengine/generate/main.cpp29
-rw-r--r--tests/auto/gui/text/qtextscriptengine/qtextscriptengine.pro1
-rw-r--r--tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp80
-rw-r--r--tests/auto/gui/text/qtexttable/qtexttable.pro1
-rw-r--r--tests/auto/gui/text/qtexttable/tst_qtexttable.cpp39
-rw-r--r--tests/auto/gui/text/qzip/tst_qzip.cpp29
-rw-r--r--tests/auto/gui/util/qdesktopservices/qdesktopservices.pro1
-rw-r--r--tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp51
-rw-r--r--tests/auto/gui/util/qdoublevalidator/qdoublevalidator.pro1
-rw-r--r--tests/auto/gui/util/qdoublevalidator/tst_qdoublevalidator.cpp86
-rw-r--r--tests/auto/gui/util/qintvalidator/qintvalidator.pro1
-rw-r--r--tests/auto/gui/util/qintvalidator/tst_qintvalidator.cpp29
-rw-r--r--tests/auto/gui/util/qregexpvalidator/qregexpvalidator.pro1
-rw-r--r--tests/auto/gui/util/qregexpvalidator/tst_qregexpvalidator.cpp56
-rw-r--r--tests/auto/gui/util/qregularexpressionvalidator/qregularexpressionvalidator.pro2
-rw-r--r--tests/auto/gui/util/qregularexpressionvalidator/tst_qregularexpressionvalidator.cpp29
159 files changed, 1914 insertions, 2468 deletions
diff --git a/tests/auto/gui/image/qicoimageformat/qicoimageformat.pro b/tests/auto/gui/image/qicoimageformat/qicoimageformat.pro
index 7ed69ce1d1..485472c70c 100644
--- a/tests/auto/gui/image/qicoimageformat/qicoimageformat.pro
+++ b/tests/auto/gui/image/qicoimageformat/qicoimageformat.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qicoimageformat
SOURCES+= tst_qicoimageformat.cpp
QT += testlib
diff --git a/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp b/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp
index 6d2ed6d304..2dbb078ae0 100644
--- a/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp
+++ b/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -38,17 +33,8 @@ class tst_QIcoImageFormat : public QObject
{
Q_OBJECT
-public:
- tst_QIcoImageFormat();
- virtual ~tst_QIcoImageFormat();
-
-
-public slots:
- void initTestCase();
- void cleanupTestCase();
- void init();
- void cleanup();
private slots:
+ void initTestCase();
void format();
void canRead_data();
void canRead();
@@ -71,26 +57,6 @@ private:
QString m_IconPath;
};
-
-tst_QIcoImageFormat::tst_QIcoImageFormat()
-{
-}
-
-tst_QIcoImageFormat::~tst_QIcoImageFormat()
-{
-
-}
-
-void tst_QIcoImageFormat::init()
-{
-
-}
-
-void tst_QIcoImageFormat::cleanup()
-{
-
-}
-
void tst_QIcoImageFormat::initTestCase()
{
m_IconPath = QFINDTESTDATA("icons");
@@ -98,11 +64,6 @@ void tst_QIcoImageFormat::initTestCase()
QFAIL("Cannot find icons directory containing testdata!");
}
-void tst_QIcoImageFormat::cleanupTestCase()
-{
-
-}
-
void tst_QIcoImageFormat::format()
{
{
@@ -143,7 +104,7 @@ void tst_QIcoImageFormat::canRead()
QFETCH(QString, fileName);
QFETCH(int, isValid);
- QImageReader reader(m_IconPath + "/" + fileName);
+ QImageReader reader(m_IconPath + QLatin1Char('/') + fileName);
QCOMPARE(reader.canRead(), (isValid == 0 ? false : true));
}
@@ -177,7 +138,7 @@ void tst_QIcoImageFormat::SequentialFile()
QFETCH(QString, fileName);
QFETCH(int, isValid);
- QSequentialFile *file = new QSequentialFile(m_IconPath + "/" + fileName);
+ QSequentialFile *file = new QSequentialFile(m_IconPath + QLatin1Char('/') + fileName);
QVERIFY(file);
QVERIFY(file->open(QFile::ReadOnly));
QImageReader reader(file);
@@ -214,7 +175,7 @@ void tst_QIcoImageFormat::imageCount()
QFETCH(QString, fileName);
QFETCH(int, count);
- QImageReader reader(m_IconPath + "/" + fileName);
+ QImageReader reader(m_IconPath + QLatin1Char('/') + fileName);
QCOMPARE(reader.imageCount(), count);
}
@@ -242,7 +203,7 @@ void tst_QIcoImageFormat::jumpToNextImage()
QFETCH(QString, fileName);
QFETCH(int, count);
- QImageReader reader(m_IconPath + "/" + fileName);
+ QImageReader reader(m_IconPath + QLatin1Char('/') + fileName);
bool bJumped = reader.jumpToImage(0);
while (bJumped) {
count--;
@@ -265,7 +226,7 @@ void tst_QIcoImageFormat::loopCount()
QFETCH(QString, fileName);
QFETCH(int, count);
- QImageReader reader(m_IconPath + "/" + fileName);
+ QImageReader reader(m_IconPath + QLatin1Char('/') + fileName);
QCOMPARE(reader.loopCount(), count);
}
@@ -293,7 +254,7 @@ void tst_QIcoImageFormat::nextImageDelay()
QFETCH(QString, fileName);
QFETCH(int, count);
- QImageReader reader(m_IconPath + "/" + fileName);
+ QImageReader reader(m_IconPath + QLatin1Char('/') + fileName);
if (count == -1) {
QCOMPARE(reader.nextImageDelay(), 0);
} else {
@@ -322,7 +283,7 @@ void tst_QIcoImageFormat::pngCompression()
QFETCH(int, width);
QFETCH(int, height);
- QImageReader reader(m_IconPath + "/" + fileName);
+ QImageReader reader(m_IconPath + QLatin1Char('/') + fileName);
QImage image;
reader.jumpToImage(index);
diff --git a/tests/auto/gui/image/qicon/icons/themeparent/icon-theme.cache b/tests/auto/gui/image/qicon/icons/themeparent/icon-theme.cache
new file mode 100644
index 0000000000..a323875989
--- /dev/null
+++ b/tests/auto/gui/image/qicon/icons/themeparent/icon-theme.cache
Binary files differ
diff --git a/tests/auto/gui/image/qicon/qicon.pro b/tests/auto/gui/image/qicon/qicon.pro
index 6ff20ec8fa..f5570c2497 100644
--- a/tests/auto/gui/image/qicon/qicon.pro
+++ b/tests/auto/gui/image/qicon/qicon.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qicon
QT += testlib
diff --git a/tests/auto/gui/image/qicon/tst_qicon.cpp b/tests/auto/gui/image/qicon/tst_qicon.cpp
index 7333dd739f..a0914b7700 100644
--- a/tests/auto/gui/image/qicon/tst_qicon.cpp
+++ b/tests/auto/gui/image/qicon/tst_qicon.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -36,6 +31,7 @@
#include <QImageReader>
#include <qicon.h>
#include <qiconengine.h>
+#include <QtCore/QStandardPaths>
#include <algorithm>
@@ -64,6 +60,7 @@ private slots:
void streamAvailableSizes_data();
void streamAvailableSizes();
void fromTheme();
+ void fromThemeCache();
#ifndef QT_NO_WIDGETS
void task184901_badCache();
@@ -646,8 +643,97 @@ void tst_QIcon::fromTheme()
QIcon::setThemeName("");
abIcon = QIcon::fromTheme("address-book-new");
QVERIFY(abIcon.isNull());
+
+ // Passing a full path to fromTheme is not very useful, but should work anyway
+ QIcon fullPathIcon = QIcon::fromTheme(m_pngImageFileName);
+ QVERIFY(!fullPathIcon.isNull());
+}
+
+static inline QString findGtkUpdateIconCache()
+{
+ QString binary = QLatin1String("gtk-update-icon-cache");
+#ifdef Q_OS_WIN
+ binary += QLatin1String(".exe");
+#endif
+ return QStandardPaths::findExecutable(binary);
}
+void tst_QIcon::fromThemeCache()
+{
+ QTemporaryDir dir;
+ QVERIFY2(dir.isValid(), qPrintable(dir.errorString()));
+
+ QVERIFY(QDir().mkpath(dir.path() + QLatin1String("/testcache/16x16/actions")));
+ QVERIFY(QFile(QStringLiteral(":/styles/commonstyle/images/standardbutton-open-16.png"))
+ .copy( dir.path() + QLatin1String("/testcache/16x16/actions/button-open.png")));
+
+ {
+ QFile index(dir.path() + QLatin1String("/testcache/index.theme"));
+ QVERIFY(index.open(QFile::WriteOnly));
+ index.write("[Icon Theme]\nDirectories=16x16/actions\n[16x16/actions]\nSize=16\nContext=Actions\nType=Fixed\n");
+ }
+ QIcon::setThemeSearchPaths(QStringList() << dir.path());
+ QIcon::setThemeName("testcache");
+
+ // We just created a theme with that icon, it must exist
+ QVERIFY(!QIcon::fromTheme("button-open").isNull());
+
+ QString cacheName = dir.path() + QLatin1String("/testcache/icon-theme.cache");
+
+ // An invalid cache should not prevent lookup
+ {
+ QFile cacheFile(cacheName);
+ QVERIFY(cacheFile.open(QFile::WriteOnly));
+ QDataStream(&cacheFile) << quint16(1) << quint16(0) << "invalid corrupted stuff in there\n";
+ }
+ QIcon::setThemeSearchPaths(QStringList() << dir.path()); // reload themes
+ QVERIFY(!QIcon::fromTheme("button-open").isNull());
+
+ // An empty cache should prevent the lookup
+ {
+ QFile cacheFile(cacheName);
+ QVERIFY(cacheFile.open(QFile::WriteOnly));
+ QDataStream ds(&cacheFile);
+ ds << quint16(1) << quint16(0); // 0: version
+ ds << quint32(12) << quint32(20); // 4: hash offset / dir list offset
+ ds << quint32(1) << quint32(0xffffffff); // 12: one empty bucket
+ ds << quint32(1) << quint32(28); // 20: list with one element
+ ds.writeRawData("16x16/actions", sizeof("16x16/actions")); // 28
+ }
+ QIcon::setThemeSearchPaths(QStringList() << dir.path()); // reload themes
+ QVERIFY(QIcon::fromTheme("button-open").isNull()); // The icon was not in the cache, it should not be found
+
+ // Adding an icon should be changing the modification date of one sub directory which should make the cache ignored
+ QTest::qWait(1000); // wait enough to have a different modification time in seconds
+ QVERIFY(QFile(QStringLiteral(":/styles/commonstyle/images/standardbutton-save-16.png"))
+ .copy(dir.path() + QLatin1String("/testcache/16x16/actions/button-save.png")));
+ QVERIFY(QFileInfo(cacheName).lastModified() < QFileInfo(dir.path() + QLatin1String("/testcache/16x16/actions")).lastModified());
+ QIcon::setThemeSearchPaths(QStringList() << dir.path()); // reload themes
+ QVERIFY(!QIcon::fromTheme("button-open").isNull());
+
+ // Try to run the actual gtk-update-icon-cache and make sure that icons are still found
+ const QString gtkUpdateIconCache = findGtkUpdateIconCache();
+ if (gtkUpdateIconCache.isEmpty()) {
+ QIcon::setThemeSearchPaths(QStringList());
+ QSKIP("gtk-update-icon-cache not run (binary not found)");
+ }
+#ifndef QT_NO_PROCESS
+ QProcess process;
+ process.start(gtkUpdateIconCache,
+ QStringList() << QStringLiteral("-f") << QStringLiteral("-t") << (dir.path() + QLatin1String("/testcache")));
+ QVERIFY2(process.waitForStarted(), qPrintable(QLatin1String("Unable to start: ")
+ + gtkUpdateIconCache + QLatin1String(": ")
+ + process.errorString()));
+ QVERIFY(process.waitForFinished());
+ QCOMPARE(process.exitStatus(), QProcess::NormalExit);
+ QCOMPARE(process.exitCode(), 0);
+#endif // QT_NO_PROCESS
+ QVERIFY(QFileInfo(cacheName).lastModified() >= QFileInfo(dir.path() + QLatin1String("/testcache/16x16/actions")).lastModified());
+ QIcon::setThemeSearchPaths(QStringList() << dir.path()); // reload themes
+ QVERIFY(!QIcon::fromTheme("button-open").isNull());
+ QVERIFY(!QIcon::fromTheme("button-open-fallback").isNull());
+ QVERIFY(QIcon::fromTheme("notexist-fallback").isNull());
+}
void tst_QIcon::task223279_inconsistentAddFile()
{
diff --git a/tests/auto/gui/image/qicon/tst_qicon.qrc b/tests/auto/gui/image/qicon/tst_qicon.qrc
index 1505ca925b..3c8fbba7c2 100644
--- a/tests/auto/gui/image/qicon/tst_qicon.qrc
+++ b/tests/auto/gui/image/qicon/tst_qicon.qrc
@@ -15,6 +15,7 @@
<file>./icons/themeparent/32x32/actions/address-book-new.png</file>
<file>./icons/themeparent/32x32/actions/appointment-new.png</file>
<file>./icons/themeparent/index.theme</file>
+<file>./icons/themeparent/icon-theme.cache</file>
<file>./icons/themeparent/scalable/actions/address-book-new.svg</file>
<file>./icons/themeparent/scalable/actions/appointment-new.svg</file>
<file>./styles/commonstyle/images/standardbutton-open-16.png</file>
diff --git a/tests/auto/gui/image/qimage/qimage.pro b/tests/auto/gui/image/qimage/qimage.pro
index 42280d3bd4..36d64a275f 100644
--- a/tests/auto/gui/image/qimage/qimage.pro
+++ b/tests/auto/gui/image/qimage/qimage.pro
@@ -1,11 +1,10 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qimage
SOURCES += tst_qimage.cpp
QT += core-private gui-private testlib
contains(QT_CONFIG, c++11): CONFIG += c++11
-android:!android-no-sdk:RESOURCES+=qimage.qrc
+android: RESOURCES+=qimage.qrc
TESTDATA += images/*
diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp
index 6f088bea24..85d258de5b 100644
--- a/tests/auto/gui/image/qimage/tst_qimage.cpp
+++ b/tests/auto/gui/image/qimage/tst_qimage.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -114,6 +109,7 @@ private slots:
void smoothScale2_data();
void smoothScale2();
void smoothScale3();
+ void smoothScale4();
void smoothScaleBig();
void smoothScaleAlpha();
@@ -975,13 +971,17 @@ void tst_QImage::createAlphaMask_data()
int alphas[] = { 0, 127, 255 };
for (unsigned a1 = 0; a1 < sizeof(alphas) / sizeof(int); ++a1) {
+ const QByteArray a1B = QByteArray::number(alphas[a1]);
for (unsigned a2 = 0; a2 < sizeof(alphas) / sizeof(int); ++a2) {
if (a1 == a2)
continue;
+ const QByteArray a2B = QByteArray::number(alphas[a2]);
for (int x=10; x<18; x+=3) {
+ const QByteArray xB = QByteArray::number(x);
for (int y=100; y<108; y+=3) {
- QTest::newRow(qPrintable(QString::fromLatin1("x=%1, y=%2, a1=%3, a2=%4").arg(x).arg(y).arg(alphas[a1]).arg(alphas[a2])))
- << x << y << alphas[a1] << alphas[a2];
+ const QByteArray testName = "x=" + xB + ", y=" + QByteArray::number(y)
+ + ", a1=" + a1B + ", a2=" + a2B;
+ QTest::newRow(testName.constData()) << x << y << alphas[a1] << alphas[a2];
}
}
}
@@ -1078,34 +1078,34 @@ void tst_QImage::rotate_data()
degrees << 0 << 90 << 180 << 270;
foreach (int d, degrees) {
- QString title = QString("%1 %2").arg(d);
- QTest::newRow(qPrintable(title.arg("Format_RGB32")))
+ const QByteArray dB = QByteArray::number(d);
+ QTest::newRow((dB + " Format_RGB32").constData())
<< QImage::Format_RGB32 << d;
- QTest::newRow(qPrintable(title.arg("Format_ARGB32")))
+ QTest::newRow((dB + " Format_ARGB32").constData())
<< QImage::Format_ARGB32 << d;
- QTest::newRow(qPrintable(title.arg("Format_ARGB32_Premultiplied")))
+ QTest::newRow((dB + " Format_ARGB32_Premultiplied").constData())
<< QImage::Format_ARGB32_Premultiplied << d;
- QTest::newRow(qPrintable(title.arg("Format_RGB16")))
+ QTest::newRow((dB + " Format_RGB16").constData())
<< QImage::Format_RGB16 << d;
- QTest::newRow(qPrintable(title.arg("Format_ARGB8565_Premultiplied")))
+ QTest::newRow((dB + " Format_ARGB8565_Premultiplied").constData())
<< QImage::Format_ARGB8565_Premultiplied << d;
- QTest::newRow(qPrintable(title.arg("Format_RGB666")))
+ QTest::newRow((dB + " Format_RGB666").constData())
<< QImage::Format_RGB666 << d;
- QTest::newRow(qPrintable(title.arg("Format_RGB555")))
+ QTest::newRow((dB + " Format_RGB555").constData())
<< QImage::Format_RGB555 << d;
- QTest::newRow(qPrintable(title.arg("Format_ARGB8555_Premultiplied")))
+ QTest::newRow((dB + " Format_ARGB8555_Premultiplied").constData())
<< QImage::Format_ARGB8555_Premultiplied << d;
- QTest::newRow(qPrintable(title.arg("Format_RGB888")))
+ QTest::newRow((dB + " Format_RGB888").constData())
<< QImage::Format_RGB888 << d;
- QTest::newRow(qPrintable(title.arg("Format_Indexed8")))
+ QTest::newRow((dB + " Format_Indexed8").constData())
<< QImage::Format_Indexed8 << d;
- QTest::newRow(qPrintable(title.arg("Format_RGBX8888")))
+ QTest::newRow((dB + " Format_RGBX8888").constData())
<< QImage::Format_RGBX8888 << d;
- QTest::newRow(qPrintable(title.arg("Format_RGBA8888_Premultiplied")))
+ QTest::newRow((dB + " Format_RGBA8888_Premultiplied").constData())
<< QImage::Format_RGBA8888_Premultiplied << d;
- QTest::newRow(qPrintable(title.arg("Format_Alpha8")))
+ QTest::newRow((dB + " Format_Alpha8").constData())
<< QImage::Format_Alpha8 << d;
- QTest::newRow(qPrintable(title.arg("Format_Grayscale8")))
+ QTest::newRow((dB + " Format_Grayscale8").constData())
<< QImage::Format_Grayscale8 << d;
}
}
@@ -1661,9 +1661,11 @@ void tst_QImage::smoothScale2_data()
int sizes[] = { 2, 3, 4, 6, 7, 8, 10, 16, 20, 32, 40, 64, 100, 101, 128, 0 };
QImage::Format formats[] = { QImage::Format_RGB32, QImage::Format_ARGB32_Premultiplied, QImage::Format_Invalid };
for (int j = 0; formats[j] != QImage::Format_Invalid; ++j) {
- QString formatstr = formats[j] == QImage::Format_RGB32 ? QStringLiteral("rgb32") : QStringLiteral("argb32pm");
+ QByteArray formatstr = formats[j] == QImage::Format_RGB32 ? QByteArrayLiteral("rgb32") : QByteArrayLiteral("argb32pm");
for (int i = 0; sizes[i] != 0; ++i) {
- QTest::newRow(QString("%1 %2x%2").arg(formatstr).arg(sizes[i]).toUtf8()) << (int)formats[j] << sizes[i];
+ const QByteArray sizeB = QByteArray::number(sizes[i]);
+ QTest::newRow((formatstr + ' ' + sizeB + 'x' + sizeB).constData())
+ << (int)formats[j] << sizes[i];
}
}
}
@@ -1706,6 +1708,30 @@ void tst_QImage::smoothScale2()
QCOMPARE(qBlue(pixel), qBlue(expected));
}
+ // scale x up
+ scaled = img.scaled(QSize(size, size * 2), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+ for (int y = 0; y < scaled.height(); ++y) {
+ for (int x = 0; x < scaled.width(); ++x) {
+ pixel = scaled.pixel(x, y);
+ QCOMPARE(qAlpha(pixel), qAlpha(expected));
+ QCOMPARE(qRed(pixel), qRed(expected));
+ QCOMPARE(qGreen(pixel), qGreen(expected));
+ QCOMPARE(qBlue(pixel), qBlue(expected));
+ }
+ }
+
+ // scale y up
+ scaled = img.scaled(QSize(size * 2, size), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+ for (int y = 0; y < scaled.height(); ++y) {
+ for (int x = 0; x < scaled.width(); ++x) {
+ pixel = scaled.pixel(x, y);
+ QCOMPARE(qAlpha(pixel), qAlpha(expected));
+ QCOMPARE(qRed(pixel), qRed(expected));
+ QCOMPARE(qGreen(pixel), qGreen(expected));
+ QCOMPARE(qBlue(pixel), qBlue(expected));
+ }
+ }
+
// scale x up, y up
scaled = img.scaled(QSize(size * 2, size * 2), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
for (int y = 0; y < scaled.height(); ++y) {
@@ -1771,6 +1797,26 @@ void tst_QImage::smoothScale3()
}
}
+// Tests smooth upscale is smooth
+void tst_QImage::smoothScale4()
+{
+ QImage img(4, 4, QImage::Format_RGB32);
+ for (int y = 0; y < 4; ++y) {
+ for (int x = 0; x < 4; ++x) {
+ img.setPixel(x, y, qRgb(x * 255 / 3, y * 255 / 3, 0));
+ }
+ }
+ QImage scaled = img.scaled(37, 23, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+ for (int y = 0; y < scaled.height(); ++y) {
+ for (int x = 0; x < scaled.width(); ++x) {
+ if (x > 0)
+ QVERIFY(qRed(scaled.pixel(x, y)) >= qRed(scaled.pixel(x - 1, y)));
+ if (y > 0)
+ QVERIFY(qGreen(scaled.pixel(x, y)) >= qGreen(scaled.pixel(x, y - 1)));
+ }
+ }
+}
+
void tst_QImage::smoothScaleBig()
{
#if defined(Q_OS_WINCE)
@@ -2693,10 +2739,11 @@ void tst_QImage::genericRgbConversion_data()
QTest::addColumn<QImage::Format>("dest_format");
for (int i = QImage::Format_RGB32; i < QImage::Format_Alpha8; ++i) {
+ const QString formatI = formatToString(QImage::Format(i));
for (int j = QImage::Format_RGB32; j < QImage::Format_Alpha8; ++j) {
if (i == j)
continue;
- QString test = QString::fromLatin1("%1 -> %2").arg(formatToString(QImage::Format(i))).arg(formatToString(QImage::Format(j)));
+ const QString test = formatI + QLatin1String(" -> ") + formatToString(QImage::Format(j));
QTest::newRow(qPrintable(test)) << QImage::Format(i) << QImage::Format(j);
}
}
@@ -3137,6 +3184,14 @@ void tst_QImage::pixelColor()
QImage t = argb32.convertToFormat(QImage::Format_ARGB32_Premultiplied);
QCOMPARE(t.pixel(0,0), argb32pm.pixel(0,0));
+
+ // Try specifying an invalid position.
+ QTest::ignoreMessage(QtWarningMsg, "QImage::setPixelColor: coordinate (-1,-1) out of range");
+ argb32.setPixelColor(-1, -1, QColor(Qt::red));
+
+ // Try setting an invalid color.
+ QTest::ignoreMessage(QtWarningMsg, "QImage::setPixelColor: color is invalid");
+ argb32.setPixelColor(0, 0, QColor());
}
void tst_QImage::pixel()
diff --git a/tests/auto/gui/image/qimageiohandler/qimageiohandler.pro b/tests/auto/gui/image/qimageiohandler/qimageiohandler.pro
index bbcf8d23c9..428ff62959 100644
--- a/tests/auto/gui/image/qimageiohandler/qimageiohandler.pro
+++ b/tests/auto/gui/image/qimageiohandler/qimageiohandler.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qimageiohandler
QT += testlib
diff --git a/tests/auto/gui/image/qimageiohandler/tst_qimageiohandler.cpp b/tests/auto/gui/image/qimageiohandler/tst_qimageiohandler.cpp
index 552df30b56..e24ba4fa81 100644
--- a/tests/auto/gui/image/qimageiohandler/tst_qimageiohandler.cpp
+++ b/tests/auto/gui/image/qimageiohandler/tst_qimageiohandler.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/image/qimagereader/qimagereader.pro b/tests/auto/gui/image/qimagereader/qimagereader.pro
index 2ab06abe83..3d35bf59da 100644
--- a/tests/auto/gui/image/qimagereader/qimagereader.pro
+++ b/tests/auto/gui/image/qimagereader/qimagereader.pro
@@ -5,7 +5,7 @@ MOC_DIR=tmp
QT += core-private gui-private network testlib
RESOURCES += qimagereader.qrc
-android: !android-no-sdk {
+android {
RESOURCES += android_testdata.qrc
}
diff --git a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
index ff15dc5b6d..bd02dc6255 100644
--- a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -174,7 +169,7 @@ private:
// helper to skip an autotest when the given image format is not supported
#define SKIP_IF_UNSUPPORTED(format) do { \
if (!QByteArray(format).isEmpty() && !QImageReader::supportedImageFormats().contains(format)) \
- QSKIP("\"" + QByteArray(format) + "\" images are not supported"); \
+ QSKIP('"' + QByteArray(format) + "\" images are not supported"); \
} while (0)
// Testing get/set functions
@@ -802,7 +797,7 @@ void tst_QImageReader::animatedGif()
QVERIFY(!image.isNull());
int i = 0;
while(!image.isNull()){
- QString frameName = QString(":images/qt%1.gif").arg(++i);
+ QString frameName = QLatin1String(":images/qt") + QString::number(++i) + QLatin1String(".gif");
QCOMPARE(image, QImage(frameName));
image = io.read();
}
@@ -1654,14 +1649,14 @@ void tst_QImageReader::pixelCompareWithBaseline()
// least one file succeeded we know that the plugin was built.
// The other failures are then real failures.
QImage icoImg;
- const QString inputFileName(QString::fromLatin1("images/%1").arg(fileName));
+ const QString inputFileName(QLatin1String("images/") + fileName);
QFileInfo fi(inputFileName);
++enteredCount;
// might fail if the plugin does not exist, which is ok.
if (icoImg.load(inputFileName)) {
icoImg = icoImg.convertToFormat(QImage::Format_ARGB32_Premultiplied);
- const QString baselineFileName(QString::fromLatin1("baseline/%1.png").arg(fi.baseName()));
+ const QString baselineFileName(QLatin1String("baseline/") + fi.baseName() + QLatin1String(".png"));
#if 0
icoImg.save(baselineFileName);
#else
diff --git a/tests/auto/gui/image/qimagewriter/qimagewriter.pro b/tests/auto/gui/image/qimagewriter/qimagewriter.pro
index 31184bffdb..34adedd187 100644
--- a/tests/auto/gui/image/qimagewriter/qimagewriter.pro
+++ b/tests/auto/gui/image/qimagewriter/qimagewriter.pro
@@ -3,5 +3,5 @@ TARGET = tst_qimagewriter
QT += testlib
SOURCES += tst_qimagewriter.cpp
MOC_DIR=tmp
-android:!android-no-sdk:RESOURCES+= qimagewriter.qrc
+android: RESOURCES+= qimagewriter.qrc
TESTDATA += images/*
diff --git a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
index dfefd6f036..7a94217641 100644
--- a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
+++ b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -60,13 +55,8 @@ class tst_QImageWriter : public QObject
{
Q_OBJECT
-public:
- tst_QImageWriter();
-
public slots:
- void init();
void initTestCase();
- void cleanup();
private slots:
void getSetCheck();
@@ -96,7 +86,7 @@ private:
// helper to skip an autotest when the given image format is not supported
#define SKIP_IF_UNSUPPORTED(format) do { \
if (!QByteArray(format).isEmpty() && !QImageReader::supportedImageFormats().contains(format)) \
- QSKIP("\"" + QByteArray(format) + "\" images are not supported"); \
+ QSKIP('"' + QByteArray(format) + "\" images are not supported"); \
} while (0)
static void initializePadding(QImage *image)
@@ -162,18 +152,6 @@ void tst_QImageWriter::getSetCheck()
QCOMPARE(1.1f, obj1.gamma());
}
-tst_QImageWriter::tst_QImageWriter()
-{
-}
-
-void tst_QImageWriter::init()
-{
-}
-
-void tst_QImageWriter::cleanup()
-{
-}
-
void tst_QImageWriter::writeImage_data()
{
QTest::addColumn<QString>("fileName");
@@ -259,8 +237,8 @@ void tst_QImageWriter::writeImage2_data()
QImage image = image0.convertToFormat(imgFormat);
initializePadding(&image);
foreach (const QString format, formats) {
- const QString fileName = QString("solidcolor_%1.%2").arg(imgFormat)
- .arg(format);
+ const QString fileName = QLatin1String("solidcolor_")
+ + QString::number(imgFormat) + QLatin1Char('.') + format;
QTest::newRow(fileName.toLatin1()) << fileName
<< format.toLatin1()
<< image;
diff --git a/tests/auto/gui/image/qmovie/qmovie.pro b/tests/auto/gui/image/qmovie/qmovie.pro
index 4e7030b1f7..a04ad73b80 100644
--- a/tests/auto/gui/image/qmovie/qmovie.pro
+++ b/tests/auto/gui/image/qmovie/qmovie.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qmovie
QT += testlib
qtHaveModule(widgets): QT += widgets
diff --git a/tests/auto/gui/image/qmovie/tst_qmovie.cpp b/tests/auto/gui/image/qmovie/tst_qmovie.cpp
index b8c99ca324..bcaa759faa 100644
--- a/tests/auto/gui/image/qmovie/tst_qmovie.cpp
+++ b/tests/auto/gui/image/qmovie/tst_qmovie.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/image/qpicture/qpicture.pro b/tests/auto/gui/image/qpicture/qpicture.pro
index a24b8ec481..0fc851ce11 100644
--- a/tests/auto/gui/image/qpicture/qpicture.pro
+++ b/tests/auto/gui/image/qpicture/qpicture.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qpicture
QT += testlib
qtHaveModule(widgets): QT += widgets
diff --git a/tests/auto/gui/image/qpicture/tst_qpicture.cpp b/tests/auto/gui/image/qpicture/tst_qpicture.cpp
index 5406284c05..5c812fd1b2 100644
--- a/tests/auto/gui/image/qpicture/tst_qpicture.cpp
+++ b/tests/auto/gui/image/qpicture/tst_qpicture.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
index 286f00c111..8dc6f901e6 100644
--- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -64,12 +59,8 @@ class tst_QPixmap : public QObject
public:
tst_QPixmap();
- virtual ~tst_QPixmap();
-
public slots:
- void init();
- void cleanup();
void initTestCase();
void cleanupTestCase();
@@ -213,18 +204,6 @@ tst_QPixmap::tst_QPixmap()
{
}
-tst_QPixmap::~tst_QPixmap()
-{
-}
-
-void tst_QPixmap::init()
-{
-}
-
-void tst_QPixmap::cleanup()
-{
-}
-
void tst_QPixmap::initTestCase()
{
QVERIFY(!m_prefix.isEmpty());
@@ -446,7 +425,8 @@ void tst_QPixmap::scroll()
else
QVERIFY(pixmap.cacheKey() != oldKey);
- QString fileName = QString(":/images/%1.png").arg(QTest::currentDataTag());
+ const QString fileName = QLatin1String(":/images/") + QLatin1String(QTest::currentDataTag())
+ + QLatin1String(".png");
QPixmap output(fileName);
QCOMPARE(input.isNull(), output.isNull());
QVERIFY(lenientCompare(pixmap, output));
@@ -459,7 +439,7 @@ void tst_QPixmap::fill_data()
QTest::addColumn<bool>("syscolor");
QTest::addColumn<bool>("bitmap");
for (int color = Qt::black; color < Qt::darkYellow; ++color)
- QTest::newRow(QString("syscolor_%1").arg(color).toLatin1())
+ QTest::newRow(("syscolor_" + QByteArray::number(color)).constData())
<< uint(color) << true << false;
#if defined (Q_OS_WINCE)
@@ -1001,7 +981,9 @@ void tst_QPixmap::toWinHICON()
HBITMAP bitmap = qt_pixmapToWinHBITMAP(empty, Alpha);
SelectObject(bitmap_dc, bitmap);
- QImage imageFromFile(image + QString(QLatin1String("_%1x%2.png")).arg(width).arg(height));
+ const QString fileName = image + QLatin1Char('_') + QString::number(width) + QLatin1Char('x')
+ + QString::number(height) + QLatin1String(".png");
+ QImage imageFromFile(fileName);
imageFromFile = imageFromFile.convertToFormat(QImage::Format_ARGB32_Premultiplied);
HICON icon = qt_pixmapToWinHICON(QPixmap::fromImage(imageFromFile));
@@ -1037,7 +1019,9 @@ void tst_QPixmap::fromWinHICON()
QImage imageFromHICON = qt_pixmapFromWinHICON(icon).toImage();
DestroyIcon(icon);
- QImage imageFromFile(image + QString(QLatin1String("_%1x%2.png")).arg(width).arg(height));
+ const QString fileName = image + QLatin1Char('_') + QString::number(width) + QLatin1Char('x')
+ + QString::number(height) + QLatin1String(".png");
+ QImage imageFromFile(fileName);
imageFromFile = imageFromFile.convertToFormat(QImage::Format_ARGB32_Premultiplied);
// fuzzy comparison must be used, as the pixel values change slightly during conversion
diff --git a/tests/auto/gui/image/qpixmapcache/qpixmapcache.pro b/tests/auto/gui/image/qpixmapcache/qpixmapcache.pro
index a81712ba23..fe3b5a2db3 100644
--- a/tests/auto/gui/image/qpixmapcache/qpixmapcache.pro
+++ b/tests/auto/gui/image/qpixmapcache/qpixmapcache.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qpixmapcache
QT += gui-private testlib
SOURCES += tst_qpixmapcache.cpp
diff --git a/tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp b/tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp
index a3cf66da18..8dcf104035 100644
--- a/tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp
+++ b/tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -147,7 +142,7 @@ void tst_QPixmapCache::setCacheLimit()
QVERIFY(QPixmapCache::find(key, p1) == 0);
QPixmapCache::setCacheLimit(1000);
key = QPixmapCache::insert(*p1);
- QCOMPARE(getPrivate(key)->isValid, true);
+ QVERIFY(key.isValid());
QCOMPARE(getPrivate(key)->key, 1);
delete p1;
@@ -189,7 +184,7 @@ void tst_QPixmapCache::setCacheLimit()
key2 = QPixmapCache::insert(*p1);
QCOMPARE(getPrivate(key2)->key, 1);
//This old key is not valid anymore after the flush
- QCOMPARE(getPrivate(key)->isValid, false);
+ QVERIFY(!key.isValid());
QVERIFY(QPixmapCache::find(key, &p2) == 0);
delete p1;
}
@@ -233,7 +228,7 @@ void tst_QPixmapCache::find()
//at that time the first key has been erase because no more place in the cache
QVERIFY(QPixmapCache::find(key, &p1) == 0);
- QCOMPARE(getPrivate(key)->isValid, false);
+ QVERIFY(!key.isValid());
}
void tst_QPixmapCache::insert()
@@ -313,7 +308,7 @@ void tst_QPixmapCache::replace()
p2.fill(Qt::yellow);
QPixmapCache::Key key = QPixmapCache::insert(p1);
- QCOMPARE(getPrivate(key)->isValid, true);
+ QVERIFY(key.isValid());
QPixmap p3;
QVERIFY(QPixmapCache::find(key, &p3) == 1);
@@ -321,7 +316,7 @@ void tst_QPixmapCache::replace()
QPixmapCache::replace(key, p2);
QVERIFY(QPixmapCache::find(key, &p3) == 1);
- QCOMPARE(getPrivate(key)->isValid, true);
+ QVERIFY(key.isValid());
QCOMPARE(getPrivate(key)->key, 1);
QCOMPARE(p3.width(), 10);
@@ -438,7 +433,7 @@ void tst_QPixmapCache::clear()
for (int k = 0; k < numberOfKeys; ++k) {
QVERIFY(QPixmapCache::find(keys.at(k), &p1) == 0);
- QCOMPARE(getPrivate(keys[k])->isValid, false);
+ QVERIFY(!keys[k].isValid());
}
}
diff --git a/tests/auto/gui/itemmodels/qstandarditem/qstandarditem.pro b/tests/auto/gui/itemmodels/qstandarditem/qstandarditem.pro
index b85d475e97..50426612dc 100644
--- a/tests/auto/gui/itemmodels/qstandarditem/qstandarditem.pro
+++ b/tests/auto/gui/itemmodels/qstandarditem/qstandarditem.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qstandarditem
QT += testlib
SOURCES += tst_qstandarditem.cpp
diff --git a/tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp b/tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp
index ff263c166a..b7d57dea55 100644
--- a/tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp
+++ b/tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -40,14 +35,6 @@ class tst_QStandardItem : public QObject
{
Q_OBJECT
-public:
- tst_QStandardItem();
- virtual ~tst_QStandardItem();
-
-public slots:
- void init();
- void cleanup();
-
private slots:
void ctor();
void textCtor();
@@ -84,22 +71,6 @@ private slots:
void lessThan();
};
-tst_QStandardItem::tst_QStandardItem()
-{
-}
-
-tst_QStandardItem::~tst_QStandardItem()
-{
-}
-
-void tst_QStandardItem::init()
-{
-}
-
-void tst_QStandardItem::cleanup()
-{
-}
-
void tst_QStandardItem::ctor()
{
QStandardItem item;
@@ -140,7 +111,8 @@ void tst_QStandardItem::getSetData()
QStandardItem item;
for (int x = 0; x < 2; ++x) {
for (int i = 1; i <= 2; ++i) {
- QString text = QString("text %0").arg(i);
+ const QString iS = QString::number(i);
+ QString text = QLatin1String("text ") + iS;
item.setText(text);
QCOMPARE(item.text(), text);
@@ -150,15 +122,15 @@ void tst_QStandardItem::getSetData()
item.setIcon(icon);
QCOMPARE(item.icon(), icon);
- QString toolTip = QString("toolTip %0").arg(i);
+ QString toolTip = QLatin1String("toolTip ") + iS;
item.setToolTip(toolTip);
QCOMPARE(item.toolTip(), toolTip);
- QString statusTip = QString("statusTip %0").arg(i);
+ QString statusTip = QLatin1String("statusTip ") + iS;
item.setStatusTip(statusTip);
QCOMPARE(item.statusTip(), statusTip);
- QString whatsThis = QString("whatsThis %0").arg(i);
+ QString whatsThis = QLatin1String("whatsThis ") + iS;
item.setWhatsThis(whatsThis);
QCOMPARE(item.whatsThis(), whatsThis);
@@ -188,11 +160,11 @@ void tst_QStandardItem::getSetData()
item.setCheckState(checkState);
QCOMPARE(item.checkState(), checkState);
- QString accessibleText = QString("accessibleText %0").arg(i);
+ QString accessibleText = QLatin1String("accessibleText ") + iS;
item.setAccessibleText(accessibleText);
QCOMPARE(item.accessibleText(), accessibleText);
- QString accessibleDescription = QString("accessibleDescription %0").arg(i);
+ QString accessibleDescription = QLatin1String("accessibleDescription ") + iS;
item.setAccessibleDescription(accessibleDescription);
QCOMPARE(item.accessibleDescription(), accessibleDescription);
diff --git a/tests/auto/gui/itemmodels/qstandarditemmodel/qstandarditemmodel.pro b/tests/auto/gui/itemmodels/qstandarditemmodel/qstandarditemmodel.pro
index 71ef4acb88..3c12a83f5a 100644
--- a/tests/auto/gui/itemmodels/qstandarditemmodel/qstandarditemmodel.pro
+++ b/tests/auto/gui/itemmodels/qstandarditemmodel/qstandarditemmodel.pro
@@ -1,10 +1,13 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qstandarditemmodel
QT += widgets widgets-private testlib
QT += core-private gui-private
-SOURCES += tst_qstandarditemmodel.cpp
+mtdir = ../../../other/modeltest
+INCLUDEPATH += $${mtdir}
+
+SOURCES += $${mtdir}/modeltest.cpp tst_qstandarditemmodel.cpp
+HEADERS += $${mtdir}/modeltest.h
diff --git a/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp b/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp
index ae47b2053b..dca718a6d8 100644
--- a/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp
+++ b/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -37,6 +32,7 @@
#include <qstandarditemmodel.h>
#include <QTreeView>
#include <private/qtreeview_p.h>
+#include "modeltest.h"
class tst_QStandardItemModel : public QObject
{
@@ -44,7 +40,6 @@ class tst_QStandardItemModel : public QObject
public:
tst_QStandardItemModel();
- virtual ~tst_QStandardItemModel();
enum ModelChanged {
RowsAboutToBeInserted,
@@ -151,10 +146,8 @@ Q_DECLARE_METATYPE(Qt::Orientation)
tst_QStandardItemModel::tst_QStandardItemModel() : m_model(0), rcParent(8), rcFirst(8,0), rcLast(8,0)
{
-}
-
-tst_QStandardItemModel::~tst_QStandardItemModel()
-{
+ qRegisterMetaType<QStandardItem*>("QStandardItem*");
+ qRegisterMetaType<Qt::Orientation>("Qt::Orientation");
}
/*
@@ -169,9 +162,6 @@ tst_QStandardItemModel::~tst_QStandardItemModel()
*/
void tst_QStandardItemModel::init()
{
- qRegisterMetaType<QStandardItem*>("QStandardItem*");
- qRegisterMetaType<Qt::Orientation>("Qt::Orientation");
-
m_model = new QStandardItemModel(defaultSize, defaultSize);
connect(m_model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
this, SLOT(rowsAboutToBeInserted(QModelIndex,int,int)));
@@ -256,7 +246,7 @@ void tst_QStandardItemModel::insertRow()
QCOMPARE(rcLast[RowsInserted], expectedRow);
//check that the inserted item has different DisplayRole than initial items
- QVERIFY(m_model->data(m_model->index(expectedRow, 0), Qt::DisplayRole).toString() != "initialitem");
+ QVERIFY(m_model->data(m_model->index(expectedRow, 0), Qt::DisplayRole).toString() != QLatin1String("initialitem"));
} else {
// We inserted something outside the bounds, do nothing
QCOMPARE(m_model->rowCount(), defaultSize);
@@ -300,7 +290,7 @@ void tst_QStandardItemModel::insertRowsItems()
QStandardItemModel *m = qobject_cast<QStandardItemModel*>(m_model);
QStandardItem *hiddenRoot = m->invisibleRootItem();
for (int i = 0; i < 3; ++i)
- items.append(new QStandardItem(QString("%1").arg(i + 10)));
+ items.append(new QStandardItem(QString::number(i + 10)));
hiddenRoot->appendRows(items);
QCOMPARE(m_model->rowCount(), rowCount + 3);
QCOMPARE(m_model->index(rowCount + 0, 0).data().toInt(), 10);
@@ -365,7 +355,7 @@ void tst_QStandardItemModel::insertColumn()
QCOMPARE(rcLast[ColumnsInserted], expectedColumn);
//check that the inserted item has different DisplayRole than initial items
- QVERIFY(m_model->data(m_model->index(0, expectedColumn), Qt::DisplayRole).toString() != "initialitem");
+ QVERIFY(m_model->data(m_model->index(0, expectedColumn), Qt::DisplayRole).toString() != QLatin1String("initialitem"));
} else {
// We inserted something outside the bounds, do nothing
QCOMPARE(m_model->columnCount(), defaultSize);
@@ -729,8 +719,8 @@ void tst_QStandardItemModel::data()
}
}
- QVERIFY(m_model->data(m_model->index(0, 0), Qt::DisplayRole).toString() == "initialitem");
- QVERIFY(m_model->data(m_model->index(0, 0), Qt::ToolTipRole).toString() == "tooltip");
+ QCOMPARE(m_model->data(m_model->index(0, 0), Qt::DisplayRole).toString(), QLatin1String("initialitem"));
+ QCOMPARE(m_model->data(m_model->index(0, 0), Qt::ToolTipRole).toString(), QLatin1String("tooltip"));
}
@@ -745,6 +735,9 @@ void tst_QStandardItemModel::clear()
QSignalSpy modelResetSpy(&model, SIGNAL(modelReset()));
QSignalSpy layoutChangedSpy(&model, SIGNAL(layoutChanged()));
QSignalSpy rowsRemovedSpy(&model, SIGNAL(rowsRemoved(QModelIndex,int,int)));
+
+ ModelTest mt(&model);
+
model.clear();
QCOMPARE(modelResetSpy.count(), 1);
@@ -874,7 +867,7 @@ void tst_QStandardItemModel::sort_data()
<< "zulu");
QStringList list;
for (int i=1000; i < 2000; ++i)
- list.append(QString("Number: %1").arg(i));
+ list.append(QStringLiteral("Number: ") + QString::number(i));
QTest::newRow("large set ascending") << static_cast<int>(Qt::AscendingOrder) << list << list;
}
@@ -1336,7 +1329,7 @@ void tst_QStandardItemModel::useCase3()
// create the tree structure first
QStandardItem *childItem = 0;
for (int i = 0; i < 100; ++i) {
- QStandardItem *item = new QStandardItem(QString("item %0").arg(i));
+ QStandardItem *item = new QStandardItem(QStringLiteral("item ") + QString::number(i));
if (childItem)
item->appendRow(childItem);
childItem = item;
@@ -1466,55 +1459,48 @@ struct FriendlyTreeView : public QTreeView
#endif
#ifdef QT_BUILD_INTERNAL
-void tst_QStandardItemModel::treeDragAndDrop()
-{
- const int nRow = 5;
- const int nCol = 3;
-
- QStandardItemModel model;
- QStandardItemModel checkModel;
+static void populateDragAndDropModel(QStandardItemModel &model, int nRow, int nCol)
+{
+ const QString item = QStringLiteral("item ");
+ const QString dash = QStringLiteral(" - ");
for (int i = 0; i < nRow; ++i) {
+ const QString iS = QString::number(i);
QList<QStandardItem *> colItems1;
for (int c = 0 ; c < nCol; c ++)
- colItems1 << new QStandardItem(QString("item %1 - %0").arg(c).arg(i));
+ colItems1 << new QStandardItem(item + iS + dash + QString::number(c));
model.appendRow(colItems1);
for (int j = 0; j < nRow; ++j) {
+ const QString jS = QString::number(j);
QList<QStandardItem *> colItems2;
for (int c = 0 ; c < nCol; c ++)
- colItems2 << new QStandardItem(QString("item %1/%2 - %0").arg(c).arg(i).arg(j));
+ colItems2 << new QStandardItem(item + iS + QLatin1Char('/') + jS + dash + QString::number(c));
colItems1.at(0)->appendRow(colItems2);
for (int k = 0; k < nRow; ++k) {
QList<QStandardItem *> colItems3;
+ const QString kS = QString::number(k);
for (int c = 0 ; c < nCol; c ++)
- colItems3 << new QStandardItem(QString("item %1/%2/%3 - %0").arg(c).arg(i).arg(j).arg(k));
+ colItems3 << new QStandardItem(item + iS + QLatin1Char('/') + jS
+ + QLatin1Char('/') + kS
+ + dash + QString::number(c));
colItems2.at(0)->appendRow(colItems3);
}
}
}
+}
- for (int i = 0; i < nRow; ++i) {
- QList<QStandardItem *> colItems1;
- for (int c = 0 ; c < nCol; c ++)
- colItems1 << new QStandardItem(QString("item %1 - %0").arg(c).arg(i));
- checkModel.appendRow(colItems1);
+void tst_QStandardItemModel::treeDragAndDrop()
+{
+ const int nRow = 5;
+ const int nCol = 3;
- for (int j = 0; j < nRow; ++j) {
- QList<QStandardItem *> colItems2;
- for (int c = 0 ; c < nCol; c ++)
- colItems2 << new QStandardItem(QString("item %1/%2 - %0").arg(c).arg(i).arg(j));
- colItems1.at(0)->appendRow(colItems2);
+ QStandardItemModel model;
+ QStandardItemModel checkModel;
- for (int k = 0; k < nRow; ++k) {
- QList<QStandardItem *> colItems3;
- for (int c = 0 ; c < nCol; c ++)
- colItems3 << new QStandardItem(QString("item %1/%2/%3 - %0").arg(c).arg(i).arg(j).arg(k));
- colItems2.at(0)->appendRow(colItems3);
- }
- }
- }
+ populateDragAndDropModel(model, nRow, nCol);
+ populateDragAndDropModel(checkModel, nRow, nCol);
QVERIFY(compareModels(&model, &checkModel));
@@ -1613,14 +1599,14 @@ void tst_QStandardItemModel::removeRowsAndColumns()
#define VERIFY_MODEL \
for (int c = 0; c < col_list.count(); c++) \
for (int r = 0; r < row_list.count(); r++) \
- QCOMPARE(model.item(r,c)->text() , row_list[r] + "x" + col_list[c]);
+ QCOMPARE(model.item(r,c)->text() , row_list[r] + QLatin1Char('x') + col_list[c]);
QVector<QString> row_list = QString("1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20").split(',').toVector();
QVector<QString> col_list = row_list;
QStandardItemModel model;
for (int c = 0; c < col_list.count(); c++)
for (int r = 0; r < row_list.count(); r++)
- model.setItem(r, c, new QStandardItem(row_list[r] + "x" + col_list[c]));
+ model.setItem(r, c, new QStandardItem(row_list[r] + QLatin1Char('x') + col_list[c]));
VERIFY_MODEL
row_list.remove(3);
@@ -1642,14 +1628,14 @@ void tst_QStandardItemModel::removeRowsAndColumns()
QList<QStandardItem *> row_taken = model.takeRow(6);
QCOMPARE(row_taken.count(), col_list.count());
for (int c = 0; c < col_list.count(); c++)
- QCOMPARE(row_taken[c]->text() , row_list[6] + "x" + col_list[c]);
+ QCOMPARE(row_taken[c]->text() , row_list[6] + QLatin1Char('x') + col_list[c]);
row_list.remove(6);
VERIFY_MODEL
QList<QStandardItem *> col_taken = model.takeColumn(10);
QCOMPARE(col_taken.count(), row_list.count());
for (int r = 0; r < row_list.count(); r++)
- QCOMPARE(col_taken[r]->text() , row_list[r] + "x" + col_list[10]);
+ QCOMPARE(col_taken[r]->text() , row_list[r] + QLatin1Char('x') + col_list[10]);
col_list.remove(10);
VERIFY_MODEL
}
@@ -1661,7 +1647,7 @@ void tst_QStandardItemModel::itemRoleNames()
QStandardItemModel model;
for (int c = 0; c < col_list.count(); c++)
for (int r = 0; r < row_list.count(); r++)
- model.setItem(r, c, new QStandardItem(row_list[r] + "x" + col_list[c]));
+ model.setItem(r, c, new QStandardItem(row_list[r] + QLatin1Char('x') + col_list[c]));
VERIFY_MODEL
QHash<int, QByteArray> newRoleNames;
diff --git a/tests/auto/gui/kernel/noqteventloop/tst_noqteventloop.cpp b/tests/auto/gui/kernel/noqteventloop/tst_noqteventloop.cpp
index 735d23b137..52183efb82 100644
--- a/tests/auto/gui/kernel/noqteventloop/tst_noqteventloop.cpp
+++ b/tests/auto/gui/kernel/noqteventloop/tst_noqteventloop.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -47,21 +42,11 @@ class tst_NoQtEventLoop : public QObject
Q_OBJECT
private slots:
- void initTestCase();
- void cleanup();
void consumeMouseEvents();
void consumeSocketEvents();
};
-void tst_NoQtEventLoop::initTestCase()
-{
-}
-
-void tst_NoQtEventLoop::cleanup()
-{
-}
-
class Window : public QWindow
{
public:
diff --git a/tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp b/tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp
index 1d61311065..fb4f80f085 100644
--- a/tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp
+++ b/tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/kernel/qclipboard/copier/main.cpp b/tests/auto/gui/kernel/qclipboard/copier/main.cpp
index 07cae790af..22f2aa3bb8 100644
--- a/tests/auto/gui/kernel/qclipboard/copier/main.cpp
+++ b/tests/auto/gui/kernel/qclipboard/copier/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/kernel/qclipboard/paster/main.cpp b/tests/auto/gui/kernel/qclipboard/paster/main.cpp
index a9d04a73ae..c96d903fb7 100644
--- a/tests/auto/gui/kernel/qclipboard/paster/main.cpp
+++ b/tests/auto/gui/kernel/qclipboard/paster/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
index ca551d62b2..6bad45fefe 100644
--- a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
+++ b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/kernel/qdrag/qdrag.pro b/tests/auto/gui/kernel/qdrag/qdrag.pro
index d4a7bc2705..ac3fde8028 100644
--- a/tests/auto/gui/kernel/qdrag/qdrag.pro
+++ b/tests/auto/gui/kernel/qdrag/qdrag.pro
@@ -3,7 +3,6 @@
############################################################
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qdrag
QT += testlib
SOURCES += tst_qdrag.cpp
diff --git a/tests/auto/gui/kernel/qdrag/tst_qdrag.cpp b/tests/auto/gui/kernel/qdrag/tst_qdrag.cpp
index 53e8e96aaf..68852f5a3f 100644
--- a/tests/auto/gui/kernel/qdrag/tst_qdrag.cpp
+++ b/tests/auto/gui/kernel/qdrag/tst_qdrag.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/kernel/qevent/qevent.pro b/tests/auto/gui/kernel/qevent/qevent.pro
index 09d4395f4d..2959089ce3 100644
--- a/tests/auto/gui/kernel/qevent/qevent.pro
+++ b/tests/auto/gui/kernel/qevent/qevent.pro
@@ -2,4 +2,3 @@ CONFIG += testcase
TARGET = tst_qevent
SOURCES += tst_qevent.cpp
QT = core testlib
-CONFIG += parallel_test
diff --git a/tests/auto/gui/kernel/qevent/tst_qevent.cpp b/tests/auto/gui/kernel/qevent/tst_qevent.cpp
index a2675655e1..50710a0475 100644
--- a/tests/auto/gui/kernel/qevent/tst_qevent.cpp
+++ b/tests/auto/gui/kernel/qevent/tst_qevent.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp
index 2af9486f08..0cbb744ade 100644
--- a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp
+++ b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp b/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp
index a11d6ae841..9d42ae5850 100644
--- a/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp
+++ b/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
index d18f9664fc..32d0aa504c 100644
--- a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
+++ b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -63,6 +58,7 @@ private slots:
void initTestCase();
void cleanup();
void displayName();
+ void desktopFileName();
void firstWindowTitle();
void windowIcon();
void focusObject();
@@ -117,6 +113,21 @@ void tst_QGuiApplication::displayName()
QCOMPARE(QGuiApplication::applicationDisplayName(), QString::fromLatin1("The GUI Application"));
}
+void tst_QGuiApplication::desktopFileName()
+{
+ int argc = 1;
+ char *argv[] = { const_cast<char*>("tst_qguiapplication") };
+ QGuiApplication app(argc, argv);
+
+ QCOMPARE(QGuiApplication::desktopFileName(), QString());
+
+ QGuiApplication::setDesktopFileName("io.qt.QGuiApplication.desktop");
+ QCOMPARE(QGuiApplication::desktopFileName(), QString::fromLatin1("io.qt.QGuiApplication.desktop"));
+
+ QGuiApplication::setDesktopFileName(QString());
+ QCOMPARE(QGuiApplication::desktopFileName(), QString());
+}
+
void tst_QGuiApplication::firstWindowTitle()
{
int argc = 3;
diff --git a/tests/auto/gui/kernel/qguimetatype/qguimetatype.pro b/tests/auto/gui/kernel/qguimetatype/qguimetatype.pro
index 914142404b..331295bab9 100644
--- a/tests/auto/gui/kernel/qguimetatype/qguimetatype.pro
+++ b/tests/auto/gui/kernel/qguimetatype/qguimetatype.pro
@@ -2,4 +2,3 @@ CONFIG += testcase
TARGET = tst_qguimetatype
SOURCES += tst_qguimetatype.cpp
QT = core gui testlib
-CONFIG += parallel_test
diff --git a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
index 73a2f83bac..8002303723 100644
--- a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
+++ b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/kernel/qguitimer/qguitimer.pro b/tests/auto/gui/kernel/qguitimer/qguitimer.pro
index 15793d6e70..8a71e48007 100644
--- a/tests/auto/gui/kernel/qguitimer/qguitimer.pro
+++ b/tests/auto/gui/kernel/qguitimer/qguitimer.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qguitimer
QT = core gui testlib
SOURCES += ../../../corelib/kernel/qtimer/tst_qtimer.cpp
diff --git a/tests/auto/gui/kernel/qguivariant/no_application/main.cpp b/tests/auto/gui/kernel/qguivariant/no_application/main.cpp
index 1294751224..4a50c1f7da 100644
--- a/tests/auto/gui/kernel/qguivariant/no_application/main.cpp
+++ b/tests/auto/gui/kernel/qguivariant/no_application/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/kernel/qguivariant/no_application/no_application.pro b/tests/auto/gui/kernel/qguivariant/no_application/no_application.pro
index cc72c225a3..ada3817e55 100644
--- a/tests/auto/gui/kernel/qguivariant/no_application/no_application.pro
+++ b/tests/auto/gui/kernel/qguivariant/no_application/no_application.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = no_application
SOURCES += main.cpp
QT += testlib
diff --git a/tests/auto/gui/kernel/qguivariant/test/test.pro b/tests/auto/gui/kernel/qguivariant/test/test.pro
index c4123797d2..39e4b3b71f 100644
--- a/tests/auto/gui/kernel/qguivariant/test/test.pro
+++ b/tests/auto/gui/kernel/qguivariant/test/test.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qguivariant
SOURCES += tst_qguivariant.cpp
RESOURCES = tst_qguivariant.qrc
diff --git a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp
index 0a704b9f64..8be7227c54 100644
--- a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp
+++ b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -390,7 +385,7 @@ void tst_QGuiVariant::toString_data()
#ifndef Q_OS_MAC
<< QString( "Ctrl+A" );
#else
- << QString(QChar(0x2318)) + "A";
+ << QString(QChar(0x2318)) + QLatin1Char('A');
#endif
QFont font( "times", 12 );
diff --git a/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp b/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp
index e3b71e40d1..d024538ee0 100644
--- a/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp
+++ b/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro b/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro
index 7c1e8d52de..9f79fe9ab7 100644
--- a/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro
+++ b/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qkeysequence
QT += testlib
@@ -8,4 +7,3 @@ QT += core-private gui-private
SOURCES += tst_qkeysequence.cpp
RESOURCES += qkeysequence.qrc
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
index 1793dc5ff5..0d0b6ae81e 100644
--- a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
+++ b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -249,7 +244,7 @@ void tst_QKeySequence::operatorQString()
seq = QKeySequence( modifiers | keycode );
- QCOMPARE( (QString)seq, keystring );
+ QCOMPARE( seq.toString(QKeySequence::NativeText), keystring );
}
// this verifies that the constructors can handle the same strings in and out
@@ -259,7 +254,7 @@ void tst_QKeySequence::symetricConstructors()
QFETCH( int, keycode );
QKeySequence seq1( modifiers | keycode );
- QKeySequence seq2( (QString)seq1 );
+ QKeySequence seq2( seq1.toString(QKeySequence::NativeText) );
QVERIFY( seq1 == seq2 );
}
diff --git a/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp b/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp
index e6aa579ecd..6af6738bdb 100644
--- a/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp
+++ b/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -75,16 +70,10 @@ class tst_QMouseEvent : public QObject
{
Q_OBJECT
-public:
- tst_QMouseEvent();
- virtual ~tst_QMouseEvent();
-
-
public slots:
void initTestCase();
void cleanupTestCase();
void init();
- void cleanup();
private slots:
void checkMousePressEvent_data();
void checkMousePressEvent();
@@ -95,17 +84,6 @@ private:
MouseEventWidget* testMouseWidget;
};
-
-
-tst_QMouseEvent::tst_QMouseEvent()
-{
-}
-
-tst_QMouseEvent::~tst_QMouseEvent()
-{
-
-}
-
void tst_QMouseEvent::initTestCase()
{
testMouseWidget = new MouseEventWidget(0);
@@ -129,10 +107,6 @@ void tst_QMouseEvent::init()
testMouseWidget->mouseReleaseModifiers = 0;
}
-void tst_QMouseEvent::cleanup()
-{
-}
-
void tst_QMouseEvent::checkMousePressEvent_data()
{
QTest::addColumn<int>("buttonPressed");
diff --git a/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp b/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp
index 4fae6fa096..8e6ca486d5 100644
--- a/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp
+++ b/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -51,17 +46,9 @@ class tst_qmouseevent_modal : public QObject
{
Q_OBJECT
-public:
- tst_qmouseevent_modal();
- virtual ~tst_qmouseevent_modal();
-
-
-public slots:
+private slots:
void initTestCase();
void cleanupTestCase();
- void init();
- void cleanup();
-private slots:
void mousePressRelease();
private:
@@ -97,14 +84,6 @@ private:
int c;
};
-tst_qmouseevent_modal::tst_qmouseevent_modal()
-{
-}
-
-tst_qmouseevent_modal::~tst_qmouseevent_modal()
-{
-}
-
void tst_qmouseevent_modal::initTestCase()
{
w = new TstWidget;
@@ -117,14 +96,6 @@ void tst_qmouseevent_modal::cleanupTestCase()
w = 0;
}
-void tst_qmouseevent_modal::init()
-{
-}
-
-void tst_qmouseevent_modal::cleanup()
-{
-}
-
/*
Test for task 22500
*/
diff --git a/tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro b/tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro
index 43a62b4811..d09af5084b 100644
--- a/tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro
+++ b/tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro
@@ -5,4 +5,4 @@ QT += core-private gui-private testlib
SOURCES += tst_qopenglwindow.cpp
-win32:CONFIG+=insignificant_test # QTBUG-28264
+win32:CONFIG+=insignificant_test # QTBUG-46452, QTBUG-49630
diff --git a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
index 1fc4967b12..b130210447 100644
--- a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
+++ b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/kernel/qpalette/qpalette.pro b/tests/auto/gui/kernel/qpalette/qpalette.pro
index de87e8fafe..9dd3f3e715 100644
--- a/tests/auto/gui/kernel/qpalette/qpalette.pro
+++ b/tests/auto/gui/kernel/qpalette/qpalette.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qpalette
QT += testlib
SOURCES += tst_qpalette.cpp
diff --git a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
index b6a012b85b..f43e8d8ee6 100644
--- a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
+++ b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/kernel/qpixelformat/tst_qpixelformat.cpp b/tests/auto/gui/kernel/qpixelformat/tst_qpixelformat.cpp
index a5f86c6c09..c02d7cd165 100644
--- a/tests/auto/gui/kernel/qpixelformat/tst_qpixelformat.cpp
+++ b/tests/auto/gui/kernel/qpixelformat/tst_qpixelformat.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp b/tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp
index e0674d95d5..41fcdf9f30 100644
--- a/tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp
+++ b/tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/kernel/qscreen/qscreen.pro b/tests/auto/gui/kernel/qscreen/qscreen.pro
index b2c98a9dfd..b631f4cf37 100644
--- a/tests/auto/gui/kernel/qscreen/qscreen.pro
+++ b/tests/auto/gui/kernel/qscreen/qscreen.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qscreen
QT += core-private gui-private testlib
diff --git a/tests/auto/gui/kernel/qscreen/tst_qscreen.cpp b/tests/auto/gui/kernel/qscreen/tst_qscreen.cpp
index 4eb794044b..c01ebabcf8 100644
--- a/tests/auto/gui/kernel/qscreen/tst_qscreen.cpp
+++ b/tests/auto/gui/kernel/qscreen/tst_qscreen.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/kernel/qsurfaceformat/qsurfaceformat.pro b/tests/auto/gui/kernel/qsurfaceformat/qsurfaceformat.pro
index 9a705f443e..97d9d69fb7 100644
--- a/tests/auto/gui/kernel/qsurfaceformat/qsurfaceformat.pro
+++ b/tests/auto/gui/kernel/qsurfaceformat/qsurfaceformat.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qsurfaceformat
QT += core-private gui-private testlib
diff --git a/tests/auto/gui/kernel/qsurfaceformat/tst_qsurfaceformat.cpp b/tests/auto/gui/kernel/qsurfaceformat/tst_qsurfaceformat.cpp
index 056656d7a9..6fd768022c 100644
--- a/tests/auto/gui/kernel/qsurfaceformat/tst_qsurfaceformat.cpp
+++ b/tests/auto/gui/kernel/qsurfaceformat/tst_qsurfaceformat.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
index d754e0b3c3..74fd64bf59 100644
--- a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
+++ b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the $MODULE$ of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/kernel/qwindow/BLACKLIST b/tests/auto/gui/kernel/qwindow/BLACKLIST
index 427d63b845..93b7310d10 100644
--- a/tests/auto/gui/kernel/qwindow/BLACKLIST
+++ b/tests/auto/gui/kernel/qwindow/BLACKLIST
@@ -4,7 +4,11 @@ ubuntu-14.04
ubuntu-14.04
[modalWithChildWindow]
ubuntu-14.04
+[setVisible]
+ubuntu-14.04
[modalWindowEnterEventOnHide_QTBUG35109]
ubuntu-14.04
[modalDialogClosingOneOfTwoModal]
osx
+[modalWindowModallity]
+osx
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
index d904d48376..e0010fb8be 100644
--- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
+++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -58,12 +53,18 @@ class tst_QWindow: public QObject
Q_OBJECT
private slots:
+ void create();
+ void setParent();
+ void setVisible();
void eventOrderOnShow();
void resizeEventAfterResize();
+ void exposeEventOnShrink_QTBUG54040();
void mapGlobal();
void positioning_data();
void positioning();
void positioningDuringMinimized();
+ void childWindowPositioning_data();
+ void childWindowPositioning();
void platformSurface();
void isExposed();
void isActive();
@@ -129,6 +130,111 @@ void tst_QWindow::cleanup()
QVERIFY(QGuiApplication::allWindows().isEmpty());
}
+void tst_QWindow::create()
+{
+ QWindow a;
+ QVERIFY2(!a.handle(), "QWindow should lazy init the platform window");
+
+ a.create();
+ QVERIFY2(a.handle(), "Explicitly creating a platform window should never fail");
+
+ QWindow b;
+ QWindow c(&b);
+ b.create();
+ QVERIFY(b.handle());
+ QVERIFY2(!c.handle(), "Creating a parent window should not automatically create children");
+
+ QWindow d;
+ QWindow e(&d);
+ e.create();
+ QVERIFY(e.handle());
+ QVERIFY2(d.handle(), "Creating a child window should automatically create parents");
+
+ QWindow f;
+ QWindow g(&f);
+ f.create();
+ QVERIFY(f.handle());
+ QPlatformWindow *platformWindow = f.handle();
+ g.create();
+ QVERIFY(g.handle());
+ QVERIFY2(f.handle() == platformWindow, "Creating a child window should not affect parent if already created");
+}
+
+void tst_QWindow::setParent()
+{
+ QWindow a;
+ QWindow b(&a);
+ QVERIFY2(b.parent() == &a, "Setting parent at construction time should work");
+ QVERIFY2(a.children().contains(&b), "Parent should have child in list of children");
+
+ QWindow c;
+ QWindow d;
+ d.setParent(&c);
+ QVERIFY2(d.parent() == &c, "Setting parent after construction should work");
+ QVERIFY2(c.children().contains(&d), "Parent should have child in list of children");
+
+ a.create();
+ b.setParent(0);
+ QVERIFY2(!b.handle(), "Making window top level shouild not automatically create it");
+
+ QWindow e;
+ c.create();
+ e.setParent(&c);
+ QVERIFY2(!e.handle(), "Making window a child of a created window should not automatically create it");
+
+ QWindow f;
+ QWindow g;
+ g.create();
+ QVERIFY(g.handle());
+ g.setParent(&f);
+ QVERIFY2(f.handle(), "Making a created window a child of a non-created window should automatically create it");
+}
+
+void tst_QWindow::setVisible()
+{
+ QWindow a;
+ QWindow b(&a);
+ a.setVisible(true);
+ QVERIFY2(!b.handle(), "Making a top level window visible doesn't create its children");
+ QVERIFY2(!b.isVisible(), "Making a top level window visible doesn't make its children visible");
+ QVERIFY(QTest::qWaitForWindowExposed(&a));
+
+ QWindow c;
+ QWindow d(&c);
+ d.setVisible(true);
+ QVERIFY2(!c.handle(), "Making a child window visible doesn't create parent window if parent is hidden");
+ QVERIFY2(!c.isVisible(), "Making a child window visible doesn't make its parent visible");
+
+ QVERIFY2(!d.handle(), "Making a child window visible doesn't create platform window if parent is hidden");
+
+ c.create();
+ QVERIFY(c.handle());
+ QVERIFY2(d.handle(), "Creating a parent window should automatically create children if they are visible");
+ QVERIFY2(!c.isVisible(), "Creating a parent window should not make it visible just because it has visible children");
+
+ QWindow e;
+ QWindow f(&e);
+ f.setVisible(true);
+ QVERIFY(!f.handle());
+ QVERIFY(!e.handle());
+ f.setParent(0);
+ QVERIFY2(f.handle(), "Making a visible but not created child window top level should create it");
+ QVERIFY(QTest::qWaitForWindowExposed(&f));
+
+ QWindow g;
+ QWindow h;
+ QWindow i(&g);
+ i.setVisible(true);
+ h.setVisible(true);
+ QVERIFY(QTest::qWaitForWindowExposed(&h));
+ QVERIFY(!i.handle());
+ QVERIFY(!g.handle());
+ QVERIFY(h.handle());
+ i.setParent(&h);
+ QVERIFY2(i.handle(), "Making a visible but not created child window child of a created window should create it");
+ QVERIFY(QTest::qWaitForWindowExposed(&i));
+}
+
void tst_QWindow::mapGlobal()
{
QWindow a;
@@ -217,6 +323,19 @@ private:
QPlatformSurfaceEvent::SurfaceEventType m_surfaceventType;
};
+class ColoredWindow : public QRasterWindow {
+public:
+ explicit ColoredWindow(const QColor &color, QWindow *parent = 0) : QRasterWindow(parent), m_color(color) {}
+ void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE
+ {
+ QPainter p(this);
+ p.fillRect(QRect(QPoint(0, 0), size()), m_color);
+ }
+
+private:
+ const QColor m_color;
+};
+
void tst_QWindow::eventOrderOnShow()
{
// Some platforms enforce minimum widths for windows, which can cause extra resize
@@ -252,12 +371,25 @@ void tst_QWindow::resizeEventAfterResize()
// Make sure we get a resizeEvent after calling resize
window.resize(m_testWindowSize);
-#if defined(Q_OS_BLACKBERRY) // "window" is the "root" window and will always be shown fullscreen
- // so we only expect one resize event
- QTRY_COMPARE(window.received(QEvent::Resize), 1);
-#else
QTRY_COMPARE(window.received(QEvent::Resize), 2);
-#endif
+}
+
+void tst_QWindow::exposeEventOnShrink_QTBUG54040()
+{
+ Window window;
+ window.setGeometry(QRect(m_availableTopLeft + QPoint(80, 80), m_testWindowSize));
+ window.setTitle(QTest::currentTestFunction());
+ window.showNormal();
+
+ QVERIFY(QTest::qWaitForWindowExposed(&window));
+
+ const int initialExposeCount = window.received(QEvent::Expose);
+ window.resize(window.width(), window.height() - 5);
+ QTRY_COMPARE(window.received(QEvent::Expose), initialExposeCount + 1);
+ window.resize(window.width() - 5, window.height());
+ QTRY_COMPARE(window.received(QEvent::Expose), initialExposeCount + 2);
+ window.resize(window.width() - 5, window.height() - 5);
+ QTRY_COMPARE(window.received(QEvent::Expose), initialExposeCount + 3);
}
void tst_QWindow::positioning_data()
@@ -341,21 +473,15 @@ void tst_QWindow::positioning()
window.reset();
window.setWindowState(Qt::WindowFullScreen);
QCoreApplication::processEvents();
- // On BB10 the window is the root window and fullscreen, so nothing is resized.
-#if !defined(Q_OS_BLACKBERRY)
- QTRY_VERIFY(window.received(QEvent::Resize) > 0);
-#endif
+ QTRY_VERIFY(window.received(QEvent::Resize) > 0);
QTest::qWait(2000);
window.reset();
window.setWindowState(Qt::WindowNoState);
QCoreApplication::processEvents();
- // On BB10 the window is the root window and fullscreen, so nothing is resized.
-#if !defined(Q_OS_BLACKBERRY)
- QTRY_VERIFY(window.received(QEvent::Resize) > 0);
-#endif
+ QTRY_VERIFY(window.received(QEvent::Resize) > 0);
QTest::qWait(2000);
QTRY_COMPARE(originalPos, window.position());
@@ -418,6 +544,61 @@ void tst_QWindow::positioningDuringMinimized()
QTRY_COMPARE(window.geometry(), newGeometry);
}
+void tst_QWindow::childWindowPositioning_data()
+{
+ QTest::addColumn<bool>("showInsteadOfCreate");
+
+ QTest::newRow("create") << false;
+ QTest::newRow("show") << true;
+}
+
+void tst_QWindow::childWindowPositioning()
+{
+ const QPoint topLeftOrigin(0, 0);
+
+ ColoredWindow topLevelWindowFirst(Qt::green);
+ topLevelWindowFirst.setObjectName("topLevelWindowFirst");
+ ColoredWindow childWindowAfter(Qt::yellow, &topLevelWindowFirst);
+ childWindowAfter.setObjectName("childWindowAfter");
+
+ topLevelWindowFirst.setFramePosition(m_availableTopLeft);
+ childWindowAfter.setFramePosition(topLeftOrigin);
+
+ ColoredWindow topLevelWindowAfter(Qt::green);
+ topLevelWindowAfter.setObjectName("topLevelWindowAfter");
+ ColoredWindow childWindowFirst(Qt::yellow, &topLevelWindowAfter);
+ childWindowFirst.setObjectName("childWindowFirst");
+
+ topLevelWindowAfter.setFramePosition(m_availableTopLeft);
+ childWindowFirst.setFramePosition(topLeftOrigin);
+
+ QFETCH(bool, showInsteadOfCreate);
+
+ QWindow* windows[] = { &topLevelWindowFirst, &childWindowAfter, &childWindowFirst, &topLevelWindowAfter, 0 };
+ for (int i = 0; windows[i]; ++i) {
+ QWindow *window = windows[i];
+ if (showInsteadOfCreate) {
+ window->showNormal();
+ } else {
+ window->create();
+ }
+ }
+
+ if (showInsteadOfCreate) {
+ QVERIFY(QTest::qWaitForWindowExposed(&topLevelWindowFirst));
+ QVERIFY(QTest::qWaitForWindowExposed(&topLevelWindowAfter));
+ }
+
+ // Creation order shouldn't affect the geometry
+ // Use try compare since on X11 the window manager may still re-position the window after expose
+ QTRY_COMPARE(topLevelWindowFirst.geometry(), topLevelWindowAfter.geometry());
+ QTRY_COMPARE(childWindowAfter.geometry(), childWindowFirst.geometry());
+
+ // Creation order shouldn't affect the child ending up at 0,0
+ QCOMPARE(childWindowFirst.framePosition(), topLeftOrigin);
+ QCOMPARE(childWindowAfter.framePosition(), topLeftOrigin);
+}
+
// QTBUG-49709: Verify that the normal geometry is correctly restored
// when executing a sequence of window state changes. So far, Windows
// only where state changes have immediate effect.
@@ -1601,12 +1782,7 @@ void tst_QWindow::initialSize()
Window w;
w.setWidth(m_testWindowSize.width());
w.showNormal();
-#if defined(Q_OS_BLACKBERRY) // "window" is the "root" window and will always be shown fullscreen
- // so we only expect one resize event
- QTRY_COMPARE(w.width(), qGuiApp->primaryScreen()->availableGeometry().width());
-#else
QTRY_COMPARE(w.width(), m_testWindowSize.width());
-#endif
QTRY_VERIFY(w.height() > 0);
}
{
@@ -1615,12 +1791,7 @@ void tst_QWindow::initialSize()
w.resize(testSize);
w.showNormal();
-#if defined(Q_OS_BLACKBERRY) // "window" is the "root" window and will always be shown fullscreen
- // so we only expect one resize event
- const QSize expectedSize = QGuiApplication::primaryScreen()->availableGeometry().size();
-#else
const QSize expectedSize = testSize;
-#endif
QTRY_COMPARE(w.size(), expectedSize);
}
}
@@ -1943,19 +2114,6 @@ void tst_QWindow::modalWindowEnterEventOnHide_QTBUG35109()
}
#endif
-class ColoredWindow : public QRasterWindow {
-public:
- explicit ColoredWindow(const QColor &color, QWindow *parent = 0) : QRasterWindow(parent), m_color(color) {}
- void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE
- {
- QPainter p(this);
- p.fillRect(QRect(QPoint(0, 0), size()), m_color);
- }
-
-private:
- const QColor m_color;
-};
-
static bool isNativeWindowVisible(const QWindow *window)
{
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
diff --git a/tests/auto/gui/math3d/qmatrixnxn/qmatrixnxn.pro b/tests/auto/gui/math3d/qmatrixnxn/qmatrixnxn.pro
index 3302535dda..1401619cd0 100644
--- a/tests/auto/gui/math3d/qmatrixnxn/qmatrixnxn.pro
+++ b/tests/auto/gui/math3d/qmatrixnxn/qmatrixnxn.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qmatrixnxn
SOURCES += tst_qmatrixnxn.cpp
QT += testlib
diff --git a/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp b/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp
index 463322ff2a..aea97a916e 100644
--- a/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp
+++ b/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/math3d/qquaternion/qquaternion.pro b/tests/auto/gui/math3d/qquaternion/qquaternion.pro
index d20719fd11..f578a38580 100644
--- a/tests/auto/gui/math3d/qquaternion/qquaternion.pro
+++ b/tests/auto/gui/math3d/qquaternion/qquaternion.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qquaternion
SOURCES += tst_qquaternion.cpp
QT += testlib
diff --git a/tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp b/tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp
index 1fbad5b829..53af65e010 100644
--- a/tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp
+++ b/tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -999,16 +994,16 @@ static QByteArray testnameForAxis(const QVector3D &axis)
testname = "null";
} else {
if (axis.x()) {
- testname += axis.x() < 0 ? "-" : "+";
- testname += "X";
+ testname += axis.x() < 0 ? '-' : '+';
+ testname += 'X';
}
if (axis.y()) {
- testname += axis.y() < 0 ? "-" : "+";
- testname += "Y";
+ testname += axis.y() < 0 ? '-' : '+';
+ testname += 'Y';
}
if (axis.z()) {
- testname += axis.z() < 0 ? "-" : "+";
- testname += "Z";
+ testname += axis.z() < 0 ? '-' : '+';
+ testname += 'Z';
}
}
return testname;
diff --git a/tests/auto/gui/math3d/qvectornd/qvectornd.pro b/tests/auto/gui/math3d/qvectornd/qvectornd.pro
index 9504b4a02b..9e5155aa6f 100644
--- a/tests/auto/gui/math3d/qvectornd/qvectornd.pro
+++ b/tests/auto/gui/math3d/qvectornd/qvectornd.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qvectornd
SOURCES += tst_qvectornd.cpp
QT += testlib
diff --git a/tests/auto/gui/math3d/qvectornd/tst_qvectornd.cpp b/tests/auto/gui/math3d/qvectornd/tst_qvectornd.cpp
index eeff2c3bae..2199f6c1e1 100644
--- a/tests/auto/gui/math3d/qvectornd/tst_qvectornd.cpp
+++ b/tests/auto/gui/math3d/qvectornd/tst_qvectornd.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/painting/qbrush/qbrush.pro b/tests/auto/gui/painting/qbrush/qbrush.pro
index 0cb11398dc..5016267e66 100644
--- a/tests/auto/gui/painting/qbrush/qbrush.pro
+++ b/tests/auto/gui/painting/qbrush/qbrush.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qbrush
QT += testlib gui-private
SOURCES += tst_qbrush.cpp
diff --git a/tests/auto/gui/painting/qbrush/tst_qbrush.cpp b/tests/auto/gui/painting/qbrush/tst_qbrush.cpp
index 30982f1e24..a2f7a3aa07 100644
--- a/tests/auto/gui/painting/qbrush/tst_qbrush.cpp
+++ b/tests/auto/gui/painting/qbrush/tst_qbrush.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/painting/qcolor/qcolor.pro b/tests/auto/gui/painting/qcolor/qcolor.pro
index 44d65bb50b..c8aab4ab75 100644
--- a/tests/auto/gui/painting/qcolor/qcolor.pro
+++ b/tests/auto/gui/painting/qcolor/qcolor.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qcolor
SOURCES += tst_qcolor.cpp
QT += testlib gui-private core-private
diff --git a/tests/auto/gui/painting/qcolor/tst_qcolor.cpp b/tests/auto/gui/painting/qcolor/tst_qcolor.cpp
index 289b06fc62..00e7436c0f 100644
--- a/tests/auto/gui/painting/qcolor/tst_qcolor.cpp
+++ b/tests/auto/gui/painting/qcolor/tst_qcolor.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/painting/qpagelayout/qpagelayout.pro b/tests/auto/gui/painting/qpagelayout/qpagelayout.pro
index 38a1064357..21fc8e0bb7 100644
--- a/tests/auto/gui/painting/qpagelayout/qpagelayout.pro
+++ b/tests/auto/gui/painting/qpagelayout/qpagelayout.pro
@@ -1,9 +1,7 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qpagelayout
SOURCES += tst_qpagelayout.cpp
QT += gui-private testlib
DEFINES += QT_USE_USING_NAMESPACE
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/gui/painting/qpagelayout/tst_qpagelayout.cpp b/tests/auto/gui/painting/qpagelayout/tst_qpagelayout.cpp
index 0f2f51d9b6..478b482064 100644
--- a/tests/auto/gui/painting/qpagelayout/tst_qpagelayout.cpp
+++ b/tests/auto/gui/painting/qpagelayout/tst_qpagelayout.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2014 John Layt <jlayt@kde.org>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/painting/qpagesize/qpagesize.pro b/tests/auto/gui/painting/qpagesize/qpagesize.pro
index 5836dc9ba0..5e1cdb64eb 100644
--- a/tests/auto/gui/painting/qpagesize/qpagesize.pro
+++ b/tests/auto/gui/painting/qpagesize/qpagesize.pro
@@ -1,9 +1,7 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qpagesize
SOURCES += tst_qpagesize.cpp
QT += testlib
DEFINES += QT_USE_USING_NAMESPACE
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/gui/painting/qpagesize/tst_qpagesize.cpp b/tests/auto/gui/painting/qpagesize/tst_qpagesize.cpp
index b7a50c84e1..6b49a14ddf 100644
--- a/tests/auto/gui/painting/qpagesize/tst_qpagesize.cpp
+++ b/tests/auto/gui/painting/qpagesize/tst_qpagesize.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/painting/qpaintengine/qpaintengine.pro b/tests/auto/gui/painting/qpaintengine/qpaintengine.pro
index 1cf79af0a7..810dd81311 100644
--- a/tests/auto/gui/painting/qpaintengine/qpaintengine.pro
+++ b/tests/auto/gui/painting/qpaintengine/qpaintengine.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qpaintengine
SOURCES += tst_qpaintengine.cpp
QT += testlib
diff --git a/tests/auto/gui/painting/qpaintengine/tst_qpaintengine.cpp b/tests/auto/gui/painting/qpaintengine/tst_qpaintengine.cpp
index da004d4ab0..64a6ce2939 100644
--- a/tests/auto/gui/painting/qpaintengine/tst_qpaintengine.cpp
+++ b/tests/auto/gui/painting/qpaintengine/tst_qpaintengine.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/painting/qpainter/qpainter.pro b/tests/auto/gui/painting/qpainter/qpainter.pro
index e90b516ef2..0d3899ee92 100644
--- a/tests/auto/gui/painting/qpainter/qpainter.pro
+++ b/tests/auto/gui/painting/qpainter/qpainter.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qpainter
QT += testlib gui-private core-private
@@ -9,9 +8,8 @@ SOURCES += tst_qpainter.cpp
TESTDATA += drawEllipse/* drawLine_rop_bitmap/* drawPixmap_rop/* drawPixmap_rop_bitmap/* \
task217400.png
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-android: !android-no-sdk {
+android {
RESOURCES += \
testdata.qrc
}
diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
index 2c0012497d..bb7e2dca35 100644
--- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -81,14 +76,9 @@ Q_OBJECT
public:
tst_QPainter();
- virtual ~tst_QPainter();
-
-public slots:
- void init();
- void cleanup();
- void cleanupTestCase();
private slots:
+ void cleanupTestCase();
void getSetCheck();
#ifndef QT_NO_WIDGETS
void drawPixmap_comp_data();
@@ -396,18 +386,6 @@ tst_QPainter::tst_QPainter()
QGuiApplication::setDesktopSettingsAware(true);
}
-tst_QPainter::~tst_QPainter()
-{
-}
-
-void tst_QPainter::init()
-{
-}
-
-void tst_QPainter::cleanup()
-{
-}
-
void tst_QPainter::cleanupTestCase()
{
QFile::remove(QLatin1String("dest.png"));
@@ -667,7 +645,7 @@ QColor tst_QPainter::baseColor( int k, int intensity )
QImage tst_QPainter::getResImage( const QString &dir, const QString &addition, const QString &extension )
{
QImage res;
- QString resFilename = dir + QString( "/res_%1." ).arg( addition ) + extension;
+ QString resFilename = dir + QLatin1String("/res_") + addition + QLatin1Char('.') + extension;
if ( !res.load( resFilename ) ) {
QWARN(QString("Could not load result data %s %1").arg(resFilename).toLatin1());
return QImage();
@@ -678,14 +656,14 @@ QImage tst_QPainter::getResImage( const QString &dir, const QString &addition, c
QBitmap tst_QPainter::getBitmap( const QString &dir, const QString &filename, bool mask )
{
QBitmap bm;
- QString bmFilename = dir + QString( "/%1.xbm" ).arg( filename );
+ QString bmFilename = dir + QLatin1Char('/') + filename + QLatin1String(".xbm");
if ( !bm.load( bmFilename ) ) {
QWARN(QString("Could not load bitmap '%1'").arg(bmFilename).toLatin1());
return QBitmap();
}
if ( mask ) {
QBitmap mask;
- QString maskFilename = dir + QString( "/%1-mask.xbm" ).arg( filename );
+ QString maskFilename = dir + QLatin1Char('/') + filename + QLatin1String("-mask.xbm");
if (!mask.load(maskFilename)) {
QWARN(QString("Could not load mask '%1'").arg(maskFilename).toLatin1());
return QBitmap();
@@ -1525,10 +1503,11 @@ void tst_QPainter::drawEllipse_data()
// ratio between width and hight is too large/small (task 114874). Those
// ratios are therefore currently avoided.
for (int w = 10; w < 128; w += 7) {
+ const QByteArray wB = QByteArray::number(w);
for (int h = w/2; h < qMin(2*w, 128); h += 13) {
- QString s = QString("%1x%2").arg(w).arg(h);
- QTest::newRow(QString("%1 with pen").arg(s).toLatin1()) << QSize(w, h) << true;
- QTest::newRow(QString("%1 no pen").arg(s).toLatin1()) << QSize(w, h) << false;
+ const QByteArray sB = wB + 'x' + QByteArray::number(h);
+ QTest::newRow((sB + " with pen").constData()) << QSize(w, h) << true;
+ QTest::newRow((sB + " no pen").constData()) << QSize(w, h) << false;
}
}
}
@@ -1566,16 +1545,17 @@ void tst_QPainter::drawClippedEllipse_data()
QTest::addColumn<QRect>("rect");
for (int w = 20; w < 128; w += 7) {
+ const QByteArray wB = QByteArray::number(w);
for (int h = w/2; h < qMin(2*w, 128); h += 13) {
- QString s = QString("%1x%2").arg(w).arg(h);
- QTest::newRow(QString("%1 top").arg(s).toLatin1()) << QRect(0, -h/2, w, h);
- QTest::newRow(QString("%1 topright").arg(s).toLatin1()) << QRect(w/2, -h/2, w, h);
- QTest::newRow(QString("%1 right").arg(s).toLatin1()) << QRect(w/2, 0, w, h);
- QTest::newRow(QString("%1 bottomright").arg(s).toLatin1()) << QRect(w/2, h/2, w, h);
- QTest::newRow(QString("%1 bottom").arg(s).toLatin1()) << QRect(0, h/2, w, h);
- QTest::newRow(QString("%1 bottomleft").arg(s).toLatin1()) << QRect(-w/2, h/2, w, h);
- QTest::newRow(QString("%1 left").arg(s).toLatin1()) << QRect(-w/2, 0, w, h);
- QTest::newRow(QString("%1 topleft").arg(s).toLatin1()) << QRect(-w/2, -h/2, w, h);
+ const QByteArray sB = wB + 'x' + QByteArray::number(h);
+ QTest::newRow((sB + " top").constData()) << QRect(0, -h/2, w, h);
+ QTest::newRow((sB + " topright").constData()) << QRect(w/2, -h/2, w, h);
+ QTest::newRow((sB + " right").constData()) << QRect(w/2, 0, w, h);
+ QTest::newRow((sB + " bottomright").constData()) << QRect(w/2, h/2, w, h);
+ QTest::newRow((sB + " bottom").constData()) << QRect(0, h/2, w, h);
+ QTest::newRow((sB + " bottomleft").constData()) << QRect(-w/2, h/2, w, h);
+ QTest::newRow((sB + " left").constData()) << QRect(-w/2, 0, w, h);
+ QTest::newRow((sB + " topleft").constData()) << QRect(-w/2, -h/2, w, h);
}
}
}
@@ -1682,13 +1662,14 @@ void tst_QPainter::fillData()
QTest::addColumn<bool>("usePen");
for (int w = 3; w < 50; w += 7) {
+ const QByteArray wB = QByteArray::number(w);
for (int h = 3; h < 50; h += 11) {
int x = w/2 + 5;
int y = h/2 + 5;
- QTest::newRow(QString("rect(%1, %2, %3, %4) with pen").arg(x).arg(y).arg(w).arg(h).toLatin1())
- << QRect(x, y, w, h) << true;
- QTest::newRow(QString("rect(%1, %2, %3, %4) no pen").arg(x).arg(y).arg(w).arg(h).toLatin1())
- << QRect(x, y, w, h) << false;
+ const QByteArray rB = "rect(" + QByteArray::number(x) + ", " + QByteArray::number(y)
+ + ", " + QByteArray::number(w) + ", " + QByteArray::number(h) + ')';
+ QTest::newRow((rB + " with pen").constData()) << QRect(x, y, w, h) << true;
+ QTest::newRow((rB + " no pen").constData()) << QRect(x, y, w, h) << false;
}
}
}
@@ -2171,21 +2152,23 @@ void tst_QPainter::clippedLines_data()
<< QLineF(15, 50, 66, 50);
foreach (QLineF line, lines) {
- QString desc = QString("line (%1, %2, %3, %4) %5").arg(line.x1())
- .arg(line.y1()).arg(line.x2()).arg(line.y2());
- QTest::newRow(qPrintable(desc.arg(0))) << QSize(100, 100) << line
+ const QByteArray desc = "line (" + QByteArray::number(line.x1())
+ + ", " + QByteArray::number(line.y1()) + ", "
+ + QByteArray::number(line.x2()) + ", " + QByteArray::number(line.y2())
+ + ") ";
+ QTest::newRow((desc + '0').constData()) << QSize(100, 100) << line
<< QRect(15, 15, 49, 49)
<< QPen(Qt::black);
- QTest::newRow(qPrintable(desc.arg(1))) << QSize(100, 100) << line
+ QTest::newRow((desc + '1').constData()) << QSize(100, 100) << line
<< QRect(15, 15, 50, 50)
<< QPen(Qt::black);
- QTest::newRow(qPrintable(desc.arg(2))) << QSize(100, 100) << line
+ QTest::newRow((desc + '2').constData()) << QSize(100, 100) << line
<< QRect(15, 15, 51, 51)
<< QPen(Qt::black);
- QTest::newRow(qPrintable(desc.arg(3))) << QSize(100, 100) << line
+ QTest::newRow((desc + '3').constData()) << QSize(100, 100) << line
<< QRect(15, 15, 51, 51)
<< QPen(Qt::NoPen);
- QTest::newRow(qPrintable(desc.arg(4))) << QSize(100, 100) << line
+ QTest::newRow((desc + '4').constData()) << QSize(100, 100) << line
<< QRect(15, 15, 51, 51)
<< pen2;
}
@@ -4491,7 +4474,7 @@ void tst_QPainter::QTBUG5939_attachPainterPrivate()
TestWidget *widget = new TestWidget();
proxy->setWidget(widget);
scene->addItem(proxy);
- proxy->rotate(45);
+ proxy->setTransform(QTransform().rotate(45));
w->resize(scene->sceneRect().size().toSize());
w->show();
diff --git a/tests/auto/gui/painting/qpainter/utils/createImages/main.cpp b/tests/auto/gui/painting/qpainter/utils/createImages/main.cpp
index 8434e73701..53ea3ce9fb 100644
--- a/tests/auto/gui/painting/qpainter/utils/createImages/main.cpp
+++ b/tests/auto/gui/painting/qpainter/utils/createImages/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp
index ae30719ee7..0261f60479 100644
--- a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp
+++ b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -270,13 +265,13 @@ void tst_QPainterPath::contains_QPointF_data()
inside.addEllipse(base_rect.adjusted(5, 5, -5, -5));
QPolygonF inside_poly = inside.toFillPolygon();
for (int i=0; i<inside_poly.size(); ++i)
- QTest::newRow(qPrintable(QString("inside_ellipse %1").arg(i))) << path << inside_poly.at(i) << true;
+ QTest::newRow(("inside_ellipse " + QByteArray::number(i)).constData()) << path << inside_poly.at(i) << true;
QPainterPath outside;
outside.addEllipse(base_rect.adjusted(-5, -5, 5, 5));
QPolygonF outside_poly = outside.toFillPolygon();
for (int i=0; i<outside_poly.size(); ++i)
- QTest::newRow(qPrintable(QString("outside_ellipse %1").arg(i))) << path << outside_poly.at(i) << false;
+ QTest::newRow(("outside_ellipse " + QByteArray::number(i)).constData()) << path << outside_poly.at(i) << false;
path = QPainterPath();
base_rect = QRectF(50, 50, 200, 200);
@@ -852,8 +847,10 @@ void tst_QPainterPath::testArcMoveTo_data()
<< QRectF(100, 100, -100, -100);
for (int domain=0; domain<rects.size(); ++domain) {
+ const QByteArray dB = QByteArray::number(domain);
for (int i=-360; i<=360; ++i) {
- QTest::newRow(qPrintable(QString("test %1 %2").arg(domain).arg(i))) << rects.at(domain) << (qreal) i;
+ QTest::newRow(("test " + dB + ' ' + QByteArray::number(i)).constData())
+ << rects.at(domain) << (qreal) i;
}
// test low angles
diff --git a/tests/auto/gui/painting/qpainterpathstroker/qpainterpathstroker.pro b/tests/auto/gui/painting/qpainterpathstroker/qpainterpathstroker.pro
index 8ad476b498..218183da3d 100644
--- a/tests/auto/gui/painting/qpainterpathstroker/qpainterpathstroker.pro
+++ b/tests/auto/gui/painting/qpainterpathstroker/qpainterpathstroker.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qpainterpathstroker
SOURCES += tst_qpainterpathstroker.cpp
QT += testlib
diff --git a/tests/auto/gui/painting/qpainterpathstroker/tst_qpainterpathstroker.cpp b/tests/auto/gui/painting/qpainterpathstroker/tst_qpainterpathstroker.cpp
index 2234045f0d..f0bb9a880a 100644
--- a/tests/auto/gui/painting/qpainterpathstroker/tst_qpainterpathstroker.cpp
+++ b/tests/auto/gui/painting/qpainterpathstroker/tst_qpainterpathstroker.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/painting/qpathclipper/pathcompare.h b/tests/auto/gui/painting/qpathclipper/pathcompare.h
index c20a810e6e..4f855194a4 100644
--- a/tests/auto/gui/painting/qpathclipper/pathcompare.h
+++ b/tests/auto/gui/painting/qpathclipper/pathcompare.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/painting/qpathclipper/paths.cpp b/tests/auto/gui/painting/qpathclipper/paths.cpp
index 36a909f226..077527e1a0 100644
--- a/tests/auto/gui/painting/qpathclipper/paths.cpp
+++ b/tests/auto/gui/painting/qpathclipper/paths.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/painting/qpathclipper/paths.h b/tests/auto/gui/painting/qpathclipper/paths.h
index 392ee76521..61daa0c3a4 100644
--- a/tests/auto/gui/painting/qpathclipper/paths.h
+++ b/tests/auto/gui/painting/qpathclipper/paths.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/painting/qpathclipper/qpathclipper.pro b/tests/auto/gui/painting/qpathclipper/qpathclipper.pro
index b90bca8df3..e153460bf2 100644
--- a/tests/auto/gui/painting/qpathclipper/qpathclipper.pro
+++ b/tests/auto/gui/painting/qpathclipper/qpathclipper.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qpathclipper
INCLUDEPATH += .
HEADERS += paths.h
@@ -8,4 +7,4 @@ QT += gui-private testlib
requires(contains(QT_CONFIG,private_tests))
-unix:!mac:!haiku:LIBS+=-lm
+unix:!darwin:!haiku:!integrity: LIBS += -lm
diff --git a/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp b/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp
index 30a3fe4eaa..e3f8f0fbac 100644
--- a/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp
+++ b/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/painting/qpdfwriter/qpdfwriter.pro b/tests/auto/gui/painting/qpdfwriter/qpdfwriter.pro
index fda0fad3b5..4d2dd70e26 100644
--- a/tests/auto/gui/painting/qpdfwriter/qpdfwriter.pro
+++ b/tests/auto/gui/painting/qpdfwriter/qpdfwriter.pro
@@ -1,9 +1,7 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qpdfwriter
SOURCES += tst_qpdfwriter.cpp
QT += gui-private testlib
DEFINES += QT_USE_USING_NAMESPACE
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/gui/painting/qpdfwriter/tst_qpdfwriter.cpp b/tests/auto/gui/painting/qpdfwriter/tst_qpdfwriter.cpp
index 5eaee1192a..00e00ecd6b 100644
--- a/tests/auto/gui/painting/qpdfwriter/tst_qpdfwriter.cpp
+++ b/tests/auto/gui/painting/qpdfwriter/tst_qpdfwriter.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/painting/qpen/qpen.pro b/tests/auto/gui/painting/qpen/qpen.pro
index cafec29947..762b8f47d4 100644
--- a/tests/auto/gui/painting/qpen/qpen.pro
+++ b/tests/auto/gui/painting/qpen/qpen.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qpen
SOURCES += tst_qpen.cpp
QT += testlib
diff --git a/tests/auto/gui/painting/qpen/tst_qpen.cpp b/tests/auto/gui/painting/qpen/tst_qpen.cpp
index 0a827b655c..ef65d653ce 100644
--- a/tests/auto/gui/painting/qpen/tst_qpen.cpp
+++ b/tests/auto/gui/painting/qpen/tst_qpen.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/painting/qpolygon/qpolygon.pro b/tests/auto/gui/painting/qpolygon/qpolygon.pro
index 4783e4b5d4..6bda0f8709 100644
--- a/tests/auto/gui/painting/qpolygon/qpolygon.pro
+++ b/tests/auto/gui/painting/qpolygon/qpolygon.pro
@@ -1,9 +1,8 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qpolygon
QT += testlib
SOURCES += tst_qpolygon.cpp
-unix:!mac:!haiku:LIBS+=-lm
+unix:!darwin:!haiku:!integrity: LIBS += -lm
diff --git a/tests/auto/gui/painting/qpolygon/tst_qpolygon.cpp b/tests/auto/gui/painting/qpolygon/tst_qpolygon.cpp
index 4f3a13f40c..4d6f52bf8a 100644
--- a/tests/auto/gui/painting/qpolygon/tst_qpolygon.cpp
+++ b/tests/auto/gui/painting/qpolygon/tst_qpolygon.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/painting/qregion/qregion.pro b/tests/auto/gui/painting/qregion/qregion.pro
index 01eb9dd937..e9dff9a32e 100644
--- a/tests/auto/gui/painting/qregion/qregion.pro
+++ b/tests/auto/gui/painting/qregion/qregion.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qregion
QT += gui-private testlib
diff --git a/tests/auto/gui/painting/qregion/tst_qregion.cpp b/tests/auto/gui/painting/qregion/tst_qregion.cpp
index 33f81cc10e..d24435198e 100644
--- a/tests/auto/gui/painting/qregion/tst_qregion.cpp
+++ b/tests/auto/gui/painting/qregion/tst_qregion.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -50,6 +45,7 @@ public:
tst_QRegion();
private slots:
+ void moveSemantics();
void boundingRect();
void rects();
void swap();
@@ -98,6 +94,28 @@ tst_QRegion::tst_QRegion()
{
}
+void tst_QRegion::moveSemantics()
+{
+ const QRegion rect(QRect(0, 0, 100, 100));
+
+ // move assignment
+ {
+ QRegion r1 = rect;
+ QRegion r2;
+ r2 = std::move(r1);
+ QVERIFY(r1.isNull());
+ QCOMPARE(r2, rect);
+ }
+
+ // move construction
+ {
+ QRegion r1 = rect;
+ QRegion r2 = std::move(r1);
+ QVERIFY(r1.isNull());
+ QCOMPARE(r2, rect);
+ }
+}
+
void tst_QRegion::boundingRect()
{
{
diff --git a/tests/auto/gui/painting/qtransform/qtransform.pro b/tests/auto/gui/painting/qtransform/qtransform.pro
index d59c040fb8..6af8485628 100644
--- a/tests/auto/gui/painting/qtransform/qtransform.pro
+++ b/tests/auto/gui/painting/qtransform/qtransform.pro
@@ -1,7 +1,6 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qtransform
SOURCES += tst_qtransform.cpp
QT += testlib
-unix:!mac:!haiku:LIBS+=-lm
+unix:!darwin:!haiku:!integrity: LIBS += -lm
diff --git a/tests/auto/gui/painting/qtransform/tst_qtransform.cpp b/tests/auto/gui/painting/qtransform/tst_qtransform.cpp
index 60b89aa6ab..0c089cdaa3 100644
--- a/tests/auto/gui/painting/qtransform/tst_qtransform.cpp
+++ b/tests/auto/gui/painting/qtransform/tst_qtransform.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -43,14 +38,6 @@ class tst_QTransform : public QObject
{
Q_OBJECT
-public:
- tst_QTransform();
- virtual ~tst_QTransform();
-
-
-public slots:
- void init();
- void cleanup();
private slots:
void mapRect_data();
void mapToPolygon_data();
@@ -80,24 +67,6 @@ private:
Q_DECLARE_METATYPE(QTransform)
-tst_QTransform::tst_QTransform()
-{
-}
-
-tst_QTransform::~tst_QTransform()
-{
-}
-
-void tst_QTransform::init()
-{
- // No initialisation is required
-}
-
-void tst_QTransform::cleanup()
-{
- // No cleanup is required.
-}
-
#if defined(Q_OS_WIN) && !defined(M_PI)
#define M_PI 3.14159265897932384626433832795f
#endif
diff --git a/tests/auto/gui/painting/qwmatrix/qwmatrix.pro b/tests/auto/gui/painting/qwmatrix/qwmatrix.pro
index b3bec3d4ff..de6454025c 100644
--- a/tests/auto/gui/painting/qwmatrix/qwmatrix.pro
+++ b/tests/auto/gui/painting/qwmatrix/qwmatrix.pro
@@ -1,7 +1,6 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qwmatrix
SOURCES += tst_qwmatrix.cpp
QT += testlib
-unix:!mac:!haiku:LIBS+=-lm
+unix:!darwin:!haiku:!integrity: LIBS += -lm
diff --git a/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp b/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp
index c4c4789b7a..e05d7dd022 100644
--- a/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp
+++ b/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -42,14 +37,6 @@ class tst_QWMatrix : public QObject
{
Q_OBJECT
-public:
- tst_QWMatrix();
- virtual ~tst_QWMatrix();
-
-
-public slots:
- void init();
- void cleanup();
private slots:
void mapRect_data();
void mapToPolygon_data();
@@ -65,25 +52,6 @@ private:
void mapping_data();
};
-
-tst_QWMatrix::tst_QWMatrix()
-{
-}
-
-tst_QWMatrix::~tst_QWMatrix()
-{
-}
-
-void tst_QWMatrix::init()
-{
- // No initialisation is required
-}
-
-void tst_QWMatrix::cleanup()
-{
- // No cleanup is required.
-}
-
void tst_QWMatrix::mapRect_data()
{
mapping_data();
diff --git a/tests/auto/gui/qopengl/qopengl.pro b/tests/auto/gui/qopengl/qopengl.pro
index bddccac747..a4ef016e39 100644
--- a/tests/auto/gui/qopengl/qopengl.pro
+++ b/tests/auto/gui/qopengl/qopengl.pro
@@ -3,12 +3,9 @@
############################################################
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qopengl
QT += gui-private core-private testlib
SOURCES += tst_qopengl.cpp
-win32-msvc2010:contains(QT_CONFIG, angle):CONFIG += insignificant_test # QTBUG-31611
-
linux:contains(QT_CONFIG, xcb-glx):contains(QT_CONFIG, xcb-xlib):!contains(QT_CONFIG, egl): DEFINES += USE_GLX
diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp
index 00b5da92a8..f988cdb957 100644
--- a/tests/auto/gui/qopengl/tst_qopengl.cpp
+++ b/tests/auto/gui/qopengl/tst_qopengl.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/qopenglconfig/qopenglconfig.pro b/tests/auto/gui/qopenglconfig/qopenglconfig.pro
index bcf7215eea..9b0175acea 100644
--- a/tests/auto/gui/qopenglconfig/qopenglconfig.pro
+++ b/tests/auto/gui/qopenglconfig/qopenglconfig.pro
@@ -3,7 +3,6 @@
############################################################
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qopenglconfig
QT += gui-private core-private testlib
diff --git a/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp b/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp
index e3e5397522..39f7beca6f 100644
--- a/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp
+++ b/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/text/qabstracttextdocumentlayout/qabstracttextdocumentlayout.pro b/tests/auto/gui/text/qabstracttextdocumentlayout/qabstracttextdocumentlayout.pro
index 866638f154..53fc584961 100644
--- a/tests/auto/gui/text/qabstracttextdocumentlayout/qabstracttextdocumentlayout.pro
+++ b/tests/auto/gui/text/qabstracttextdocumentlayout/qabstracttextdocumentlayout.pro
@@ -3,9 +3,7 @@
############################################################
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qabstracttextdocumentlayout
QT += testlib
SOURCES += tst_qabstracttextdocumentlayout.cpp
-linux: CONFIG += insignificant_test
diff --git a/tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp b/tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp
index 896cea9eff..d3404e335a 100644
--- a/tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp
+++ b/tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/text/qcssparser/qcssparser.pro b/tests/auto/gui/text/qcssparser/qcssparser.pro
index bb0c8c4f40..88d1fcfd2d 100644
--- a/tests/auto/gui/text/qcssparser/qcssparser.pro
+++ b/tests/auto/gui/text/qcssparser/qcssparser.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qcssparser
SOURCES += tst_qcssparser.cpp
QT += xml gui-private testlib
diff --git a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
index d283f7d9cc..244df5b899 100644
--- a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
+++ b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -185,7 +180,7 @@ static void debug(const QVector<QCss::Symbol> &symbols, int index = -1)
{
qDebug() << "all symbols:";
for (int i = 0; i < symbols.count(); ++i)
- qDebug() << "(" << i << "); Token:" << tokenName(symbols.at(i).token) << "; Lexem:" << symbols.at(i).lexem();
+ qDebug() << '(' << i << "); Token:" << tokenName(symbols.at(i).token) << "; Lexem:" << symbols.at(i).lexem();
if (index != -1)
qDebug() << "failure at index" << index;
}
@@ -917,21 +912,37 @@ void tst_QCssParser::marginValue_data()
int ex = QFontMetrics(f).xHeight();
int em = QFontMetrics(f).height();
+ const QString ex1234 = QString::number(ex) + QLatin1Char(' ') + QString::number(2 * ex)
+ + QLatin1Char(' ') + QString::number(3 * ex) + QLatin1Char(' ')
+ + QString::number(4 * ex);
+ const QString em2ex4 = QLatin1String("1 ") + QString::number(2*em) + QLatin1String(" 3 ")
+ + QString::number(4 * ex);
+
QTest::newRow("one value") << "margin: 1px" << "1 1 1 1";
QTest::newRow("two values") << "margin: 1px 2px" << "1 2 1 2";
QTest::newRow("three value") << "margin: 1px 2px 3px" << "1 2 3 2";
QTest::newRow("four values") << "margin: 1px 2px 3px 4px" << "1 2 3 4";
QTest::newRow("default px") << "margin: 1 2 3 4" << "1 2 3 4";
QTest::newRow("no unit") << "margin: 1 2 3 4" << "1 2 3 4";
- QTest::newRow("em") << "margin: 1ex 2ex 3ex 4ex" << QString("%1 %2 %3 %4").arg(ex).arg(2*ex).arg(3*ex).arg(4*ex);
- QTest::newRow("ex") << "margin: 1 2em 3px 4ex" << QString("%1 %2 %3 %4").arg(1).arg(2*em).arg(3).arg(4*ex);
+ QTest::newRow("em") << "margin: 1ex 2ex 3ex 4ex"
+ << (QString::number(ex) + QLatin1Char(' ') + QString::number(2 * ex)
+ + QLatin1Char(' ') + QString::number(3 * ex) + QLatin1Char(' ')
+ + QString::number(4 * ex));
+ QTest::newRow("ex") << "margin: 1 2em 3px 4ex"
+ << (QLatin1String("1 ") + QString::number(2 * em) + QLatin1String(" 3 ")
+ + QString::number(4 * ex));
f.setPointSize(20);
f.setBold(true);
ex = QFontMetrics(f).xHeight();
em = QFontMetrics(f).height();
- QTest::newRow("em2") << "font: bold 20pt; margin: 1ex 2ex 3ex 4ex" << QString("%1 %2 %3 %4").arg(ex).arg(2*ex).arg(3*ex).arg(4*ex);
- QTest::newRow("ex2") << "margin: 1 2em 3px 4ex; font-size: 20pt; font-weight: bold;" << QString("%1 %2 %3 %4").arg(1).arg(2*em).arg(3).arg(4*ex);
+ QTest::newRow("em2") << "font: bold 20pt; margin: 1ex 2ex 3ex 4ex"
+ << (QString::number(ex) + QLatin1Char(' ') + QString::number(2 * ex)
+ + QLatin1Char(' ') + QString::number(3 * ex) + QLatin1Char(' ')
+ + QString::number(4 * ex));
+ QTest::newRow("ex2") << "margin: 1 2em 3px 4ex; font-size: 20pt; font-weight: bold;"
+ << (QLatin1String("1 ") + QString::number(2 * em) + QLatin1String(" 3 ")
+ + QString::number(4 * ex));
QTest::newRow("crap") << "margin: crap" << "0 0 0 0";
}
@@ -964,7 +975,8 @@ void tst_QCssParser::marginValue()
int p[4];
int spacing;
v.extractBox(m, p, &spacing);
- QString str = QString("%1 %2 %3 %4").arg(m[0]).arg(m[1]).arg(m[2]).arg(m[3]);
+ QString str = QString::number(m[0]) + QLatin1Char(' ') + QString::number(m[1])
+ + QLatin1Char(' ') + QString::number(m[2]) + QLatin1Char(' ') + QString::number(m[3]);
QCOMPARE(str, expectedMargin);
}
}
@@ -1091,7 +1103,7 @@ void tst_QCssParser::styleSelector()
QFETCH(QString, xml);
QFETCH(QString, elementToCheck);
- QString css = QString("%1 { background-color: green }").arg(selector);
+ const QString css = selector + QLatin1String(" { background-color: green }");
QCss::Parser parser(css);
QCss::StyleSheet sheet;
QVERIFY(parser.parse(&sheet));
@@ -1155,7 +1167,7 @@ void tst_QCssParser::specificity()
{
QFETCH(QString, selector);
- QString css = QString("%1 { }").arg(selector);
+ QString css = selector + QLatin1String(" { }");
QCss::Parser parser(css);
QCss::StyleSheet sheet;
QVERIFY(parser.parse(&sheet));
@@ -1341,7 +1353,7 @@ void tst_QCssParser::shorthandBackgroundProperty()
QVERIFY(doc.setContent(QLatin1String("<!DOCTYPE test><test> <dummy/> </test>")));
css.prepend("dummy {");
- css.append("}");
+ css.append(QLatin1Char('}'));
QCss::Parser parser(css);
QCss::StyleSheet sheet;
@@ -1501,7 +1513,7 @@ void tst_QCssParser::gradient()
QVERIFY(doc.setContent(QLatin1String("<!DOCTYPE test><test> <dummy/> </test>")));
css.prepend("dummy {");
- css.append("}");
+ css.append(QLatin1Char('}'));
QCss::Parser parser(css);
QCss::StyleSheet sheet;
@@ -1561,7 +1573,7 @@ void tst_QCssParser::extractFontFamily()
{
QFETCH(QString, css);
css.prepend("dummy {");
- css.append("}");
+ css.append(QLatin1Char('}'));
QCss::Parser parser(css);
QCss::StyleSheet sheet;
@@ -1619,7 +1631,7 @@ void tst_QCssParser::extractBorder()
QFETCH(QColor, expectedTopColor);
css.prepend("dummy {");
- css.append("}");
+ css.append(QLatin1Char('}'));
QCss::Parser parser(css);
QCss::StyleSheet sheet;
diff --git a/tests/auto/gui/text/qfont/qfont.pro b/tests/auto/gui/text/qfont/qfont.pro
index ced66c226c..048d952faf 100644
--- a/tests/auto/gui/text/qfont/qfont.pro
+++ b/tests/auto/gui/text/qfont/qfont.pro
@@ -1,10 +1,6 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qfont
QT += testlib
QT += core-private gui-private
qtHaveModule(widgets): QT += widgets
SOURCES += tst_qfont.cpp
-
-
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp
index 93e308b96a..d8a6afb804 100644
--- a/tests/auto/gui/text/qfont/tst_qfont.cpp
+++ b/tests/auto/gui/text/qfont/tst_qfont.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -50,13 +45,6 @@ class tst_QFont : public QObject
{
Q_OBJECT
-public:
- tst_QFont();
- virtual ~tst_QFont();
-
-public slots:
- void init();
- void cleanup();
private slots:
void getSetCheck();
void exactMatch();
@@ -115,27 +103,6 @@ void tst_QFont::getSetCheck()
QCOMPARE(QFont::StyleStrategy(QFont::OpenGLCompatible), obj1.styleStrategy());
}
-tst_QFont::tst_QFont()
-{
-}
-
-tst_QFont::~tst_QFont()
-{
-
-}
-
-void tst_QFont::init()
-{
-// TODO: Add initialization code here.
-// This will be executed immediately before each test is run.
-}
-
-void tst_QFont::cleanup()
-{
-// TODO: Add cleanup code here.
-// This will be executed immediately after each test is run.
-}
-
void tst_QFont::exactMatch()
{
QFont font;
@@ -143,158 +110,10 @@ void tst_QFont::exactMatch()
// Check if a non-existing font hasn't an exact match
font = QFont( "BogusFont", 33 );
QVERIFY( !font.exactMatch() );
-
-#ifdef Q_OS_WIN
- QSKIP("Exact matching on windows misses a lot because of the sample chars");
-#endif
-
-
- if (!QGuiApplication::platformName().compare("xcb", Qt::CaseInsensitive)) {
- QVERIFY(QFont("sans").exactMatch());
- QVERIFY(QFont("sans-serif").exactMatch());
- QVERIFY(QFont("serif").exactMatch());
- QVERIFY(QFont("monospace").exactMatch());
- }
-
- QSKIP("This test is bogus on Unix with support for font aliases in fontconfig");
-
- QFontDatabase fdb;
-
- QList<QFontDatabase::WritingSystem> systems = fdb.writingSystems();
- for (int system = 0; system < systems.count(); ++system) {
- QStringList families = fdb.families(systems[system]);
- if (families.isEmpty())
- return;
-
- QStringList::ConstIterator f_it, f_end = families.end();
- for (f_it = families.begin(); f_it != f_end; ++f_it) {
- const QString &family = *f_it;
- if (family.contains('['))
- continue;
-
- QStringList styles = fdb.styles(family);
- QVERIFY(!styles.isEmpty());
- QStringList::ConstIterator s_it, s_end = styles.end();
- for (s_it = styles.begin(); s_it != s_end; ++s_it) {
- const QString &style = *s_it;
-
- if (fdb.isSmoothlyScalable(family, style)) {
- // smoothly scalable font... don't need to load every pointsize
- font = fdb.font(family, style, 12);
- QFontInfo fontinfo(font);
-
- if (! fontinfo.exactMatch()) {
- // Unfortunately, this can fail, since
- // QFontDatabase does not fill in all font
- // properties. Check to make sure that the
- // test didn't fail for obvious reasons
-
- if (fontinfo.family().isEmpty()
- && fontinfo.pointSize() == 0) {
- // this is a box rendering engine... this can happen from
- // time to time, especially on X11 with iso10646-1 or
- // unknown font encodings
- continue;
- }
-
-#ifdef Q_OS_WIN
- if (font.family().startsWith("MS ") || fontinfo.family().startsWith("MS ")) {
- /* qDebug("Family matching skipped for MS-Alias font: %s, fontinfo: %s",
- font.family().latin1(), fontinfo.family().latin1());
- */
- } else
-#endif
- {
- if (!(font.family() == fontinfo.family()
- || fontinfo.family().contains(font.family())
- || fontinfo.family().isEmpty())) {
- qDebug("Test about to fail for font: %s, fontinfo: %s",
- font.family().toLatin1().constData(),
- fontinfo.family().toLatin1().constData());
- }
- QVERIFY(font.family() == fontinfo.family()
- || fontinfo.family().contains(font.family())
- || fontinfo.family().isEmpty());
- }
- if (font.pointSize() != -1) {
- QCOMPARE(font.pointSize(), fontinfo.pointSize());
- } else {
- QCOMPARE(font.pixelSize(), fontinfo.pixelSize());
- }
- QCOMPARE(font.italic(), fontinfo.italic());
- if (font.weight() != fontinfo.weight()) {
- qDebug("font is %s", font.toString().toLatin1().constData());
- }
- QCOMPARE(font.weight(), fontinfo.weight());
- } else {
- font.setFixedPitch(!fontinfo.fixedPitch());
- QFontInfo fontinfo1(font);
- QVERIFY( !fontinfo1.exactMatch() );
-
- font.setFixedPitch(fontinfo.fixedPitch());
- QFontInfo fontinfo2(font);
- QVERIFY( fontinfo2.exactMatch() );
- }
- }
-#if 0
- // ############## can only work if we have float point sizes in QFD
- else {
- QList<int> sizes = fdb.pointSizes(family, style);
- QVERIFY(!sizes.isEmpty());
- QList<int>::ConstIterator z_it, z_end = sizes.end();
- for (z_it = sizes.begin(); z_it != z_end; ++z_it) {
- const int size = *z_it;
-
- // Initialize the font, and check if it is an exact match
- font = fdb.font(family, style, size);
- QFontInfo fontinfo(font, (QFont::Script) script);
-
- if (! fontinfo.exactMatch()) {
- // Unfortunately, this can fail, since
- // QFontDatabase does not fill in all font
- // properties. Check to make sure that the
- // test didn't fail for obvious reasons
-
- if (fontinfo.family().isEmpty()
- && fontinfo.pointSize() == 0) {
- // this is a box rendering engine... this can happen from
- // time to time, especially on X11 with iso10646-1 or
- // unknown font encodings
- continue;
- }
-
- // no need to skip MS-fonts here it seems
- if (!(font.family() == fontinfo.family()
- || fontinfo.family().contains(font.family())
- || fontinfo.family().isEmpty())) {
- qDebug("Test about to fail for font: %s, fontinfo: %s",
- font.family().latin1(), fontinfo.family().latin1());
- }
- QVERIFY(font.family() == fontinfo.family()
- || fontinfo.family().contains(font.family())
- || fontinfo.family().isEmpty());
- if (font.pointSize() != -1) {
- QCOMPARE(font.pointSize(), fontinfo.pointSize());
- } else {
- QCOMPARE(font.pixelSize(), fontinfo.pixelSize());
- }
- QCOMPARE(font.italic(), fontinfo.italic());
- QCOMPARE(font.weight(), fontinfo.weight());
- } else {
- font.setFixedPitch(!fontinfo.fixedPitch());
- QFontInfo fontinfo1(font, (QFont::Script) script);
- QVERIFY( !fontinfo1.exactMatch() );
-
- font.setFixedPitch(fontinfo.fixedPitch());
- QFontInfo fontinfo2(font, (QFont::Script) script);
- QVERIFY( fontinfo2.exactMatch() );
- }
- }
- }
-#endif
- }
- }
- }
+ QVERIFY(!QFont("sans").exactMatch());
+ QVERIFY(!QFont("sans-serif").exactMatch());
+ QVERIFY(!QFont("serif").exactMatch());
+ QVERIFY(!QFont("monospace").exactMatch());
}
void tst_QFont::italicOblique()
@@ -504,7 +323,7 @@ void tst_QFont::isCopyOf()
void tst_QFont::insertAndRemoveSubstitutions()
{
- QFont::removeSubstitution("BogusFontFamily");
+ QFont::removeSubstitutions("BogusFontFamily");
// make sure it is empty before we start
QVERIFY(QFont::substitutes("BogusFontFamily").isEmpty());
QVERIFY(QFont::substitutes("bogusfontfamily").isEmpty());
@@ -521,7 +340,7 @@ void tst_QFont::insertAndRemoveSubstitutions()
QCOMPARE(QFont::substitutes("BogusFontFamily").count(), 3);
QCOMPARE(QFont::substitutes("bogusfontfamily").count(), 3);
- QFont::removeSubstitution("BogusFontFamily");
+ QFont::removeSubstitutions("BogusFontFamily");
// make sure it is empty again
QVERIFY(QFont::substitutes("BogusFontFamily").isEmpty());
QVERIFY(QFont::substitutes("bogusfontfamily").isEmpty());
@@ -679,7 +498,7 @@ static inline QByteArray msgNotAcceptableFont(const QString &defaultFamily, cons
{
QString res = QString::fromLatin1("Font family '%1' is not one of the following acceptable results: ").arg(defaultFamily);
Q_FOREACH (const QString &family, acceptableFamilies)
- res += QString::fromLatin1("\n %1").arg(family);
+ res += QLatin1String("\n ") + family;
return res.toLocal8Bit();
}
diff --git a/tests/auto/gui/text/qfontcache/qfontcache.pro b/tests/auto/gui/text/qfontcache/qfontcache.pro
index 5068c12cd6..bc1042a91b 100644
--- a/tests/auto/gui/text/qfontcache/qfontcache.pro
+++ b/tests/auto/gui/text/qfontcache/qfontcache.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qfontcache
QT += testlib
QT += core-private gui-private
diff --git a/tests/auto/gui/text/qfontcache/tst_qfontcache.cpp b/tests/auto/gui/text/qfontcache/tst_qfontcache.cpp
index a0bb1ebef9..54bc802cf0 100644
--- a/tests/auto/gui/text/qfontcache/tst_qfontcache.cpp
+++ b/tests/auto/gui/text/qfontcache/tst_qfontcache.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro b/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro
index 831ed1f572..5dba2fc06a 100644
--- a/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro
+++ b/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qfontdatabase
SOURCES += tst_qfontdatabase.cpp
QT += testlib core-private gui-private
diff --git a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
index 5cc27f32b3..adaf3b1f7a 100644
--- a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
+++ b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -46,13 +41,9 @@ Q_OBJECT
public:
tst_QFontDatabase();
- virtual ~tst_QFontDatabase();
-public slots:
- void initTestCase();
- void init();
- void cleanup();
private slots:
+ void initTestCase();
void styles_data();
void styles();
@@ -82,28 +73,11 @@ tst_QFontDatabase::tst_QFontDatabase()
{
}
-tst_QFontDatabase::~tst_QFontDatabase()
-{
-
-}
-
void tst_QFontDatabase::initTestCase()
{
QVERIFY(!m_testFont.isEmpty());
}
-void tst_QFontDatabase::init()
-{
-// TODO: Add initialization code here.
-// This will be executed immediately before each test is run.
-}
-
-void tst_QFontDatabase::cleanup()
-{
-// TODO: Add cleanup code here.
-// This will be executed immediately after each test is run.
-}
-
void tst_QFontDatabase::styles_data()
{
QTest::addColumn<QString>("font");
diff --git a/tests/auto/gui/text/qfontmetrics/qfontmetrics.pro b/tests/auto/gui/text/qfontmetrics/qfontmetrics.pro
index 7286c53d74..5dfabadd1a 100644
--- a/tests/auto/gui/text/qfontmetrics/qfontmetrics.pro
+++ b/tests/auto/gui/text/qfontmetrics/qfontmetrics.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qfontmetrics
QT += testlib core-private gui-private
SOURCES += tst_qfontmetrics.cpp
diff --git a/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp b/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
index ec62bafd6c..6192e3cd8d 100644
--- a/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
+++ b/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -44,13 +39,6 @@ class tst_QFontMetrics : public QObject
{
Q_OBJECT
-public:
- tst_QFontMetrics();
- virtual ~tst_QFontMetrics();
-
-public slots:
- void init();
- void cleanup();
private slots:
void same();
void metrics();
@@ -68,24 +56,6 @@ private slots:
void leadingBelowLine();
};
-tst_QFontMetrics::tst_QFontMetrics()
-
-{
-}
-
-tst_QFontMetrics::~tst_QFontMetrics()
-{
-
-}
-
-void tst_QFontMetrics::init()
-{
-}
-
-void tst_QFontMetrics::cleanup()
-{
-}
-
void tst_QFontMetrics::same()
{
QFont font;
diff --git a/tests/auto/gui/text/qglyphrun/qglyphrun.pro b/tests/auto/gui/text/qglyphrun/qglyphrun.pro
index b7d9f164c9..3abca8ce89 100644
--- a/tests/auto/gui/text/qglyphrun/qglyphrun.pro
+++ b/tests/auto/gui/text/qglyphrun/qglyphrun.pro
@@ -1,10 +1,7 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qglyphrun
QT = core gui testlib
-linux: CONFIG += insignificant_test
-
SOURCES += \
tst_qglyphrun.cpp
diff --git a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp
index 78cb06986f..7c60c8c9f8 100644
--- a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp
+++ b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/text/qrawfont/qrawfont.pro b/tests/auto/gui/text/qrawfont/qrawfont.pro
index 20da2e9a22..47e760e1da 100644
--- a/tests/auto/gui/text/qrawfont/qrawfont.pro
+++ b/tests/auto/gui/text/qrawfont/qrawfont.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qrawfont
QT = core core-private gui gui-private testlib
diff --git a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
index c12acf65cc..471b32dd50 100644
--- a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
+++ b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -93,6 +88,8 @@ private slots:
void multipleRawFontsFromData();
void rawFontFromInvalidData();
+
+ void kernedAdvances();
private:
QString testFont;
QString testFontBoldItalic;
@@ -954,6 +951,38 @@ void tst_QRawFont::rawFontFromInvalidData()
QVERIFY(!font.isValid());
}
+#define FUZZY_LTEQ(X, Y) (X < Y || qFuzzyCompare(X, Y))
+
+void tst_QRawFont::kernedAdvances()
+{
+ const int emSquareSize = 1000;
+ const qreal pixelSize = 16.0;
+ const int underScoreAW = 500;
+ const int underscoreTwoKerning = -500;
+ const qreal errorMargin = 1.0 / 16.0; // Fixed point error margin
+
+ QRawFont font(testFont, pixelSize);
+ QVERIFY(font.isValid());
+
+ QVector<quint32> glyphIndexes = font.glyphIndexesForString(QStringLiteral("__"));
+ QCOMPARE(glyphIndexes.size(), 2);
+
+ QVector<QPointF> advances = font.advancesForGlyphIndexes(glyphIndexes, QRawFont::KernedAdvances);
+ QCOMPARE(advances.size(), 2);
+
+ qreal expectedAdvanceWidth = pixelSize * underScoreAW / emSquareSize;
+ QVERIFY(FUZZY_LTEQ(qAbs(advances.at(0).x() - expectedAdvanceWidth), errorMargin));
+
+ glyphIndexes = font.glyphIndexesForString(QStringLiteral("_2"));
+ QCOMPARE(glyphIndexes.size(), 2);
+
+ advances = font.advancesForGlyphIndexes(glyphIndexes, QRawFont::KernedAdvances);
+ QCOMPARE(advances.size(), 2);
+
+ expectedAdvanceWidth = pixelSize * (underScoreAW + underscoreTwoKerning) / emSquareSize;
+ QVERIFY(FUZZY_LTEQ(qAbs(advances.at(0).x() - expectedAdvanceWidth), errorMargin));
+}
+
#endif // QT_NO_RAWFONT
QTEST_MAIN(tst_QRawFont)
diff --git a/tests/auto/gui/text/qstatictext/qstatictext.pro b/tests/auto/gui/text/qstatictext/qstatictext.pro
index acffbe700b..0f4906ce4d 100644
--- a/tests/auto/gui/text/qstatictext/qstatictext.pro
+++ b/tests/auto/gui/text/qstatictext/qstatictext.pro
@@ -1,6 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
-linux: CONFIG += insignificant_test
TARGET = tst_qstatictext
QT += testlib
diff --git a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
index 121584b87f..ec30cc8b67 100644
--- a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
+++ b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -45,18 +40,22 @@
// #define DEBUG_SAVE_IMAGE
+static inline QImage blankSquare()
+{
+ // a "blank" square; we compare against in our testfunctions to verify
+ // that we have actually painted something
+ QPixmap pm(1000, 1000);
+ pm.fill(Qt::white);
+ return pm.toImage();
+}
+
class tst_QStaticText: public QObject
{
Q_OBJECT
public:
- tst_QStaticText() {}
+ tst_QStaticText() : m_whiteSquare(blankSquare()) {}
private slots:
- void initTestCase();
-
- void init();
- void cleanup();
-
void constructionAndDestruction();
void drawToPoint_data();
void drawToPoint();
@@ -100,28 +99,11 @@ private slots:
private:
bool supportsTransformations() const;
- QImage const m_whiteSquare;
+ const QImage m_whiteSquare;
};
Q_DECLARE_METATYPE(QImage::Format);
-void tst_QStaticText::initTestCase()
-{
- // a "blank" square; we compare against in our testfunctions to verify
- // that we have actually painted something
- QPixmap pm(1000, 1000);
- pm.fill(Qt::white);
- const_cast<QImage&>(m_whiteSquare) = pm.toImage();
-}
-
-void tst_QStaticText::init()
-{
-}
-
-void tst_QStaticText::cleanup()
-{
-}
-
void tst_QStaticText::constructionAndDestruction()
{
QStaticText text("My text");
diff --git a/tests/auto/gui/text/qsyntaxhighlighter/qsyntaxhighlighter.pro b/tests/auto/gui/text/qsyntaxhighlighter/qsyntaxhighlighter.pro
index a8dd6437ba..a78c429433 100644
--- a/tests/auto/gui/text/qsyntaxhighlighter/qsyntaxhighlighter.pro
+++ b/tests/auto/gui/text/qsyntaxhighlighter/qsyntaxhighlighter.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qsyntaxhighlighter
SOURCES += tst_qsyntaxhighlighter.cpp
QT += testlib
diff --git a/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp b/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp
index 06448d11fe..0a2e024701 100644
--- a/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp
+++ b/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -69,14 +64,10 @@ public:
class tst_QSyntaxHighlighter : public QObject
{
Q_OBJECT
-public:
- inline tst_QSyntaxHighlighter() {}
-public slots:
+private slots:
void init();
void cleanup();
-
-private slots:
void basic();
void basicTwo();
void removeFormatsOnDelete();
diff --git a/tests/auto/gui/text/qtextblock/qtextblock.pro b/tests/auto/gui/text/qtextblock/qtextblock.pro
index 6048361f7a..cf3456bbf6 100644
--- a/tests/auto/gui/text/qtextblock/qtextblock.pro
+++ b/tests/auto/gui/text/qtextblock/qtextblock.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qtextblock
QT += testlib
diff --git a/tests/auto/gui/text/qtextblock/tst_qtextblock.cpp b/tests/auto/gui/text/qtextblock/tst_qtextblock.cpp
index 49300871d9..a9004edfc0 100644
--- a/tests/auto/gui/text/qtextblock/tst_qtextblock.cpp
+++ b/tests/auto/gui/text/qtextblock/tst_qtextblock.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -48,14 +43,9 @@ class tst_QTextBlock : public QObject
{
Q_OBJECT
-public:
- tst_QTextBlock();
-
-
-public slots:
+private slots:
void init();
void cleanup();
-private slots:
void fragmentOverBlockBoundaries();
void excludeParagraphSeparatorFragment();
void backwardsBlockIterator();
@@ -67,9 +57,6 @@ private:
QTextCursor cursor;
};
-tst_QTextBlock::tst_QTextBlock()
-{}
-
void tst_QTextBlock::init()
{
doc = new QTextDocument;
diff --git a/tests/auto/gui/text/qtextcursor/qtextcursor.pro b/tests/auto/gui/text/qtextcursor/qtextcursor.pro
index d984b30fbb..1660ecf35d 100644
--- a/tests/auto/gui/text/qtextcursor/qtextcursor.pro
+++ b/tests/auto/gui/text/qtextcursor/qtextcursor.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qtextcursor
SOURCES += tst_qtextcursor.cpp
QT += core-private gui-private testlib
diff --git a/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp b/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp
index 423d87591a..d2c4adb888 100644
--- a/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp
+++ b/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -52,14 +47,9 @@ class tst_QTextCursor : public QObject
{
Q_OBJECT
-public:
- tst_QTextCursor();
-
-
-public slots:
+private slots:
void init();
void cleanup();
-private slots:
void navigation1();
void navigation2_data();
void navigation2();
@@ -155,10 +145,6 @@ private:
QTextCursor cursor;
};
-
-tst_QTextCursor::tst_QTextCursor()
-{}
-
void tst_QTextCursor::init()
{
doc = new QTextDocument;
@@ -176,7 +162,7 @@ void tst_QTextCursor::navigation1()
{
cursor.insertText("Hello World");
- QVERIFY(doc->toPlainText() == "Hello World");
+ QCOMPARE(doc->toPlainText(), QLatin1String("Hello World"));
cursor.movePosition(QTextCursor::End);
QCOMPARE(cursor.position(), 11);
@@ -206,7 +192,7 @@ void tst_QTextCursor::navigation1()
doc->undo();
doc->undo();
- QVERIFY(doc->toPlainText() == "Hello World");
+ QCOMPARE(doc->toPlainText(), QLatin1String("Hello World"));
cursor.movePosition(QTextCursor::Start);
cursor.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, 6);
diff --git a/tests/auto/gui/text/qtextdocument/common.h b/tests/auto/gui/text/qtextdocument/common.h
index 887859fee9..33afb98c61 100644
--- a/tests/auto/gui/text/qtextdocument/common.h
+++ b/tests/auto/gui/text/qtextdocument/common.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
index 3c9de9d211..aba5b301be 100644
--- a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
+++ b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -64,13 +59,11 @@ class tst_QTextDocument : public QObject
public:
tst_QTextDocument();
- virtual ~tst_QTextDocument();
-public slots:
+private slots:
void init();
void cleanup();
void cleanupTestCase();
-private slots:
void getSetCheck();
void isEmpty();
void find_data();
@@ -190,6 +183,8 @@ private slots:
void textCursorUsageWithinContentsChange();
void cssInheritance();
+
+ void lineHeightType();
private:
void backgroundImage_checkExpectedHtml(const QTextDocument &doc);
void buildRegExpData();
@@ -218,8 +213,8 @@ public:
QString tst_QTextDocument::cssFontSizeString(const QFont &font)
{
return font.pointSize() >= 0
- ? QStringLiteral("%1pt").arg(font.pointSizeF())
- : QStringLiteral("%1px").arg(font.pixelSize());
+ ? QString::number(font.pointSizeF()) + QStringLiteral("pt")
+ : QString::number(font.pixelSize()) + QStringLiteral("px");
}
// Testing get/set functions
@@ -249,10 +244,6 @@ tst_QTextDocument::tst_QTextDocument()
img.save("foo.png");
}
-tst_QTextDocument::~tst_QTextDocument()
-{
-}
-
void tst_QTextDocument::init()
{
doc = new QTextDocument;
@@ -3128,7 +3119,7 @@ void tst_QTextDocument::baseUrl()
document.setBaseUrl(base);
QCOMPARE(document.baseUrl(), base);
- document.setHtml(QString("<img src='%1'/>").arg(resource.toString()));
+ document.setHtml(QLatin1String("<img src='") + resource.toString() + QLatin1String("'/>"));
document.resource(QTextDocument::ImageResource, resource);
QCOMPARE(document.loadedResource(), loaded);
}
@@ -3222,7 +3213,7 @@ void tst_QTextDocument::cssInheritance()
"<p style=\"line-height: 40px\">Foo</p><p>Bar</p><p>Baz</p></body></html>");
QTextBlock block = td.begin();
QTextBlockFormat fmt = block.blockFormat();
- QCOMPARE(fmt.lineHeightType(), int(QTextBlockFormat::FixedHeight));
+ QCOMPARE(fmt.lineHeightType(), int(QTextBlockFormat::MinimumHeight));
QCOMPARE(fmt.lineHeight(), qreal(40));
block = block.next();
fmt = block.blockFormat();
@@ -3307,5 +3298,89 @@ void tst_QTextDocument::cssInheritance()
}
}
+void tst_QTextDocument::lineHeightType()
+{
+ {
+ QTextDocument td;
+ td.setHtml("<html><body>Foobar</body></html>");
+ QTextBlock block = td.begin();
+ QTextBlockFormat format = block.blockFormat();
+ QCOMPARE(int(format.lineHeightType()), int(QTextBlockFormat::SingleHeight));
+ QCOMPARE(format.lineHeight(), 0.0);
+ }
+
+ {
+ QTextDocument td;
+ td.setHtml("<html><head><style type=\"text/css\">body { line-height: 40px; }</style></head><body>Foobar</body></html>");
+ QTextBlock block = td.begin();
+ QTextBlockFormat format = block.blockFormat();
+ QCOMPARE(int(format.lineHeightType()), int(QTextBlockFormat::MinimumHeight));
+ QCOMPARE(format.lineHeight(), 40.0);
+ }
+
+ {
+ QTextDocument td;
+ td.setHtml("<html><head><style type=\"text/css\">body { line-height: 200%; }</style></head><body>Foobar</body></html>");
+ QTextBlock block = td.begin();
+ QTextBlockFormat format = block.blockFormat();
+ QCOMPARE(int(format.lineHeightType()), int(QTextBlockFormat::ProportionalHeight));
+ QCOMPARE(format.lineHeight(), 200.0);
+ }
+
+ {
+ QTextDocument td;
+ td.setHtml("<html><head><style type=\"text/css\">body { line-height: 200%; -qt-line-height-type: single; }</style></head><body>Foobar</body></html>");
+ QTextBlock block = td.begin();
+ QTextBlockFormat format = block.blockFormat();
+ QCOMPARE(int(format.lineHeightType()), int(QTextBlockFormat::SingleHeight));
+ QCOMPARE(format.lineHeight(), 200.0);
+ }
+
+ {
+ QTextDocument td;
+ td.setHtml("<html><head><style type=\"text/css\">body { line-height: 40px; -qt-line-height-type: proportional; }</style></head><body>Foobar</body></html>");
+ QTextBlock block = td.begin();
+ QTextBlockFormat format = block.blockFormat();
+ QCOMPARE(int(format.lineHeightType()), int(QTextBlockFormat::ProportionalHeight));
+ QCOMPARE(format.lineHeight(), 40.0);
+ }
+
+ {
+ QTextDocument td;
+ td.setHtml("<html><head><style type=\"text/css\">body { line-height: 10; -qt-line-height-type: fixed; }</style></head><body>Foobar</body></html>");
+ QTextBlock block = td.begin();
+ QTextBlockFormat format = block.blockFormat();
+ QCOMPARE(int(format.lineHeightType()), int(QTextBlockFormat::FixedHeight));
+ QCOMPARE(format.lineHeight(), 10.0);
+ }
+
+ {
+ QTextDocument td;
+ td.setHtml("<html><head><style type=\"text/css\">body { line-height: 33; -qt-line-height-type: minimum; }</style></head><body>Foobar</body></html>");
+ QTextBlock block = td.begin();
+ QTextBlockFormat format = block.blockFormat();
+ QCOMPARE(int(format.lineHeightType()), int(QTextBlockFormat::MinimumHeight));
+ QCOMPARE(format.lineHeight(), 33.0);
+ }
+
+ {
+ QTextDocument td;
+ td.setHtml("<html><head><style type=\"text/css\">body { -qt-line-height-type: fixed; line-height: 200%; }</style></head><body>Foobar</body></html>");
+ QTextBlock block = td.begin();
+ QTextBlockFormat format = block.blockFormat();
+ QCOMPARE(int(format.lineHeightType()), int(QTextBlockFormat::FixedHeight));
+ QCOMPARE(format.lineHeight(), 200.0);
+ }
+
+ {
+ QTextDocument td;
+ td.setHtml("<html><head><style type=\"text/css\">body { -qt-line-height-type: fixed; line-height: 200px; }</style></head><body>Foobar</body></html>");
+ QTextBlock block = td.begin();
+ QTextBlockFormat format = block.blockFormat();
+ QCOMPARE(int(format.lineHeightType()), int(QTextBlockFormat::FixedHeight));
+ QCOMPARE(format.lineHeight(), 200.0);
+ }
+}
+
QTEST_MAIN(tst_QTextDocument)
#include "tst_qtextdocument.moc"
diff --git a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
index 1cd9d9bcbe..ed69802d95 100644
--- a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
+++ b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -1177,9 +1172,11 @@ void tst_QTextDocumentFragment::copySubTable()
fmt.setColumnWidthConstraints(constraints);
QTextTable *table = cursor.insertTable(4, 4, fmt);
- for (int row = 0; row < 4; ++row)
+ for (int row = 0; row < 4; ++row) {
+ const QString rowS = QString::number(row) + QLatin1Char('/');
for (int col = 0; col < 4; ++col)
- table->cellAt(row, col).firstCursorPosition().insertText(QString("%1/%2").arg(row).arg(col));
+ table->cellAt(row, col).firstCursorPosition().insertText(rowS + QString::number(col));
+ }
QCOMPARE(table->format().columnWidthConstraints().count(), table->columns());
diff --git a/tests/auto/gui/text/qtextdocumentlayout/qtextdocumentlayout.pro b/tests/auto/gui/text/qtextdocumentlayout/qtextdocumentlayout.pro
index 42c6406fdb..5d31ee3930 100644
--- a/tests/auto/gui/text/qtextdocumentlayout/qtextdocumentlayout.pro
+++ b/tests/auto/gui/text/qtextdocumentlayout/qtextdocumentlayout.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qtextdocumentlayout
QT += testlib
qtHaveModule(widgets) QT += widgets
diff --git a/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp b/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp
index 6a14928219..082d16f62d 100644
--- a/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp
+++ b/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -47,16 +42,11 @@
class tst_QTextDocumentLayout : public QObject
{
Q_OBJECT
-public:
- inline tst_QTextDocumentLayout() {}
- virtual ~tst_QTextDocumentLayout() {}
-public slots:
+private slots:
void init();
void cleanup();
void cleanupTestCase();
-
-private slots:
void defaultPageSizeHandling();
void idealWidth();
void lineSeparatorFollowingTable();
diff --git a/tests/auto/gui/text/qtextformat/qtextformat.pro b/tests/auto/gui/text/qtextformat/qtextformat.pro
index c64d266916..bf909bafd2 100644
--- a/tests/auto/gui/text/qtextformat/qtextformat.pro
+++ b/tests/auto/gui/text/qtextformat/qtextformat.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qtextformat
QT += testlib core-private gui-private
SOURCES += tst_qtextformat.cpp
diff --git a/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp b/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp
index 5a401031e2..71ee980de1 100644
--- a/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp
+++ b/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
index 84d58191c0..0d1d0f1ae1 100644
--- a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -59,13 +54,10 @@ class tst_QTextLayout : public QObject
public:
tst_QTextLayout();
- virtual ~tst_QTextLayout();
-
-public slots:
+private slots:
void init();
void cleanup();
-private slots:
void getSetCheck();
void lineBreaking();
#ifdef QT_BUILD_INTERNAL
@@ -201,10 +193,6 @@ tst_QTextLayout::tst_QTextLayout()
#endif
}
-tst_QTextLayout::~tst_QTextLayout()
-{
-}
-
void tst_QTextLayout::init()
{
testFont = QFont();
@@ -1125,10 +1113,10 @@ void tst_QTextLayout::boundingRectTopLeft()
void tst_QTextLayout::graphemeBoundaryForSurrogatePairs()
{
QString txt;
- txt.append("a");
+ txt.append(QLatin1Char('a'));
txt.append(0xd87e);
txt.append(0xdc25);
- txt.append("b");
+ txt.append(QLatin1Char('b'));
QTextLayout layout(txt);
QTextEngine *engine = layout.engine();
const QCharAttributes *attrs = engine->attributes();
diff --git a/tests/auto/gui/text/qtextlist/qtextlist.pro b/tests/auto/gui/text/qtextlist/qtextlist.pro
index b837f1f81b..e9ca3ad0a0 100644
--- a/tests/auto/gui/text/qtextlist/qtextlist.pro
+++ b/tests/auto/gui/text/qtextlist/qtextlist.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qtextlist
QT += core-private gui-private testlib
diff --git a/tests/auto/gui/text/qtextlist/tst_qtextlist.cpp b/tests/auto/gui/text/qtextlist/tst_qtextlist.cpp
index 03e557d8dd..d623ce4044 100644
--- a/tests/auto/gui/text/qtextlist/tst_qtextlist.cpp
+++ b/tests/auto/gui/text/qtextlist/tst_qtextlist.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -45,14 +40,9 @@ class tst_QTextList : public QObject
{
Q_OBJECT
-public:
- tst_QTextList();
-
-
-public slots:
+private slots:
void init();
void cleanup();
-private slots:
void item();
void autoNumbering();
void autoNumberingRTL();
@@ -78,9 +68,6 @@ private:
QTestDocumentLayout *layout;
};
-tst_QTextList::tst_QTextList()
-{}
-
void tst_QTextList::init()
{
doc = new QTextDocument();
diff --git a/tests/auto/gui/text/qtextobject/qtextobject.pro b/tests/auto/gui/text/qtextobject/qtextobject.pro
index b2bf793e8e..3c69757410 100644
--- a/tests/auto/gui/text/qtextobject/qtextobject.pro
+++ b/tests/auto/gui/text/qtextobject/qtextobject.pro
@@ -3,7 +3,6 @@
############################################################
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qtextobject
QT += testlib
qtHaveModule(widgets): QT += widgets
diff --git a/tests/auto/gui/text/qtextobject/tst_qtextobject.cpp b/tests/auto/gui/text/qtextobject/tst_qtextobject.cpp
index 325e6d4be4..57373a77b3 100644
--- a/tests/auto/gui/text/qtextobject/tst_qtextobject.cpp
+++ b/tests/auto/gui/text/qtextobject/tst_qtextobject.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/text/qtextodfwriter/tst_qtextodfwriter.cpp b/tests/auto/gui/text/qtextodfwriter/tst_qtextodfwriter.cpp
index f12bbbdd7e..fb92b5a20f 100644
--- a/tests/auto/gui/text/qtextodfwriter/tst_qtextodfwriter.cpp
+++ b/tests/auto/gui/text/qtextodfwriter/tst_qtextodfwriter.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -135,7 +130,7 @@ void tst_QTextOdfWriter::testWriteParagraph_data()
"<text:p text:style-name=\"p1\"><text:span text:style-name=\"c0\">foobar <text:s text:c=\"2\"/>word<text:tab/>tab x</text:span></text:p>";
QTest::newRow("misc2") << "\t \tFoo" <<
"<text:p text:style-name=\"p1\"><text:span text:style-name=\"c0\"><text:tab/> <text:s text:c=\"4\"/><text:tab/>Foo</text:span></text:p>";
- QTest::newRow("linefeed") << QString("line1%1line2").arg(QChar(0x2028)) <<
+ QTest::newRow("linefeed") << (QStringLiteral("line1") + QChar(0x2028) + QStringLiteral("line2")) <<
"<text:p text:style-name=\"p1\"><text:span text:style-name=\"c0\">line1<text:line-break/>line2</text:span></text:p>";
QTest::newRow("spaces") << "The quick brown fox jumped over the lazy dog" <<
"<text:p text:style-name=\"p1\"><text:span text:style-name=\"c0\">The quick brown fox jumped over the lazy dog</text:span></text:p>";
diff --git a/tests/auto/gui/text/qtextpiecetable/tst_qtextpiecetable.cpp b/tests/auto/gui/text/qtextpiecetable/tst_qtextpiecetable.cpp
index cd43849729..ca01e83dbe 100644
--- a/tests/auto/gui/text/qtextpiecetable/tst_qtextpiecetable.cpp
+++ b/tests/auto/gui/text/qtextpiecetable/tst_qtextpiecetable.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/text/qtextscriptengine/generate/main.cpp b/tests/auto/gui/text/qtextscriptengine/generate/main.cpp
index af9cfb655f..708864521a 100644
--- a/tests/auto/gui/text/qtextscriptengine/generate/main.cpp
+++ b/tests/auto/gui/text/qtextscriptengine/generate/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/text/qtextscriptengine/qtextscriptengine.pro b/tests/auto/gui/text/qtextscriptengine/qtextscriptengine.pro
index 2179fcbdf8..756073e171 100644
--- a/tests/auto/gui/text/qtextscriptengine/qtextscriptengine.pro
+++ b/tests/auto/gui/text/qtextscriptengine/qtextscriptengine.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qtextscriptengine
QT += core-private gui-private testlib
diff --git a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
index 2595bba2a9..0beea6528b 100644
--- a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
+++ b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -44,14 +39,9 @@ class tst_QTextScriptEngine : public QObject
public:
tst_QTextScriptEngine();
- virtual ~tst_QTextScriptEngine();
-
-public slots:
- void initTestCase();
- void init();
- void cleanup();
private slots:
+ void initTestCase();
void devanagari_data();
void devanagari();
void bengali_data();
@@ -97,10 +87,6 @@ tst_QTextScriptEngine::tst_QTextScriptEngine()
{
}
-tst_QTextScriptEngine::~tst_QTextScriptEngine()
-{
-}
-
void tst_QTextScriptEngine::initTestCase()
{
if (!haveTestFonts) {
@@ -114,14 +100,6 @@ void tst_QTextScriptEngine::initTestCase()
}
}
-void tst_QTextScriptEngine::init()
-{
-}
-
-void tst_QTextScriptEngine::cleanup()
-{
-}
-
struct ShapeTable {
unsigned short unicode[16];
unsigned short glyphs[16];
@@ -130,7 +108,7 @@ struct ShapeTable {
static void prepareShapingTest(const QFont &font, const ShapeTable *shape_table)
{
for (const ShapeTable *s = shape_table; s->unicode[0]; ++s) {
- QByteArray testName = font.family().toLatin1() + ":";
+ QByteArray testName = font.family().toLatin1() + ':';
QString string;
for (const ushort *u = s->unicode; *u; ++u) {
string.append(QChar(*u));
@@ -1097,8 +1075,6 @@ void tst_QTextScriptEngine::mirroredChars()
void tst_QTextScriptEngine::controlInSyllable_qtbug14204()
{
- QSKIP("Result differs for HarfBuzz-NG, skip test.");
-
QFontDatabase db;
if (!db.families().contains(QStringLiteral("Aparajita")))
QSKIP("couldn't find 'Aparajita' font");
@@ -1123,13 +1099,13 @@ void tst_QTextScriptEngine::controlInSyllable_qtbug14204()
QCOMPARE(fe->fontDef.family, font.family());
e->shape(0);
- QCOMPARE(e->layoutData->items[0].num_glyphs, ushort(2));
+ QCOMPARE(e->layoutData->items[0].num_glyphs, ushort(3));
const ushort *log_clusters = e->logClusters(&e->layoutData->items[0]);
QCOMPARE(log_clusters[0], ushort(0));
QCOMPARE(log_clusters[1], ushort(0));
- QCOMPARE(log_clusters[2], ushort(0));
- QCOMPARE(log_clusters[3], ushort(0));
+ QCOMPARE(log_clusters[2], ushort(1));
+ QCOMPARE(log_clusters[3], ushort(2));
}
void tst_QTextScriptEngine::combiningMarks_qtbug15675_data()
@@ -1247,29 +1223,21 @@ void tst_QTextScriptEngine::thaiWithZWJ()
QTextLayout layout(s, font);
QTextEngine *e = layout.engine();
e->itemize();
- QCOMPARE(e->layoutData->items.size(), 11);
+ QCOMPARE(e->layoutData->items.size(), 3);
for (int item = 0; item < e->layoutData->items.size(); ++item)
e->shape(item);
- QCOMPARE(e->layoutData->items[0].num_glyphs, ushort(7)); // Thai: The ZWJ and ZWNJ characters are inherited, so should be part of the thai script
- QCOMPARE(e->layoutData->items[1].num_glyphs, ushort(1)); // Common: The smart quotes cannot be handled by thai, so should be a separate item
- QCOMPARE(e->layoutData->items[2].num_glyphs, ushort(1)); // Thai: Thai character
- QCOMPARE(e->layoutData->items[3].num_glyphs, ushort(1)); // Common: Ellipsis
- QCOMPARE(e->layoutData->items[4].num_glyphs, ushort(1)); // Thai: Thai character
- QCOMPARE(e->layoutData->items[5].num_glyphs, ushort(1)); // Common: Smart quote
- QCOMPARE(e->layoutData->items[6].num_glyphs, ushort(1)); // Thai: Thai character
- QCOMPARE(e->layoutData->items[7].num_glyphs, ushort(1)); // Common: \xA0 = non-breaking space. Could be useful to have in thai, but not currently implemented
- QCOMPARE(e->layoutData->items[8].num_glyphs, ushort(1)); // Thai: Thai character
- QCOMPARE(e->layoutData->items[9].num_glyphs, ushort(1)); // Japanese: Kanji for tree
- QCOMPARE(e->layoutData->items[10].num_glyphs, ushort(2)); // Thai: Thai character followed by superscript "a" which is of inherited type
+ QCOMPARE(e->layoutData->items[0].num_glyphs, ushort(15)); // Thai, Inherited and Common
+ QCOMPARE(e->layoutData->items[1].num_glyphs, ushort(1)); // Japanese: Kanji for tree
+ QCOMPARE(e->layoutData->items[2].num_glyphs, ushort(2)); // Thai: Thai character followed by superscript "a" which is of inherited type
//A quick sanity check - check all the characters are individual clusters
unsigned short *logClusters = e->layoutData->logClustersPtr;
- for (int i = 0; i < 7; i++)
+ for (int i = 0; i < 15; i++)
QCOMPARE(logClusters[i], ushort(i));
- for (int i = 0; i < 10; i++)
- QCOMPARE(logClusters[i+7], ushort(0));
+ for (int i = 0; i < 3; i++)
+ QCOMPARE(logClusters[i+15], ushort(0));
// A thai implementation could either remove the ZWJ and ZWNJ characters, or hide them.
// The current implementation hides them, so we test for that.
diff --git a/tests/auto/gui/text/qtexttable/qtexttable.pro b/tests/auto/gui/text/qtexttable/qtexttable.pro
index 1e7249090a..2faadfcb0d 100644
--- a/tests/auto/gui/text/qtexttable/qtexttable.pro
+++ b/tests/auto/gui/text/qtexttable/qtexttable.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qtexttable
QT += testlib
qtHaveModule(widgets): QT += widgets
diff --git a/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp b/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp
index 1c099acc56..29eef506bf 100644
--- a/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp
+++ b/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -58,14 +53,9 @@ class tst_QTextTable : public QObject
{
Q_OBJECT
-public:
- tst_QTextTable();
-
-
-public slots:
+private slots:
void init();
void cleanup();
-private slots:
void cursorPositioning();
void variousTableModifications();
void tableShrinking();
@@ -115,9 +105,6 @@ private:
QTextCursor cursor;
};
-tst_QTextTable::tst_QTextTable()
-{}
-
void tst_QTextTable::init()
{
doc = new QTextDocument;
diff --git a/tests/auto/gui/text/qzip/tst_qzip.cpp b/tests/auto/gui/text/qzip/tst_qzip.cpp
index 8381c93bc2..50e9a0f0ef 100644
--- a/tests/auto/gui/text/qzip/tst_qzip.cpp
+++ b/tests/auto/gui/text/qzip/tst_qzip.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/util/qdesktopservices/qdesktopservices.pro b/tests/auto/gui/util/qdesktopservices/qdesktopservices.pro
index 162cc796e5..f5fb11effd 100644
--- a/tests/auto/gui/util/qdesktopservices/qdesktopservices.pro
+++ b/tests/auto/gui/util/qdesktopservices/qdesktopservices.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
QT += testlib
SOURCES += tst_qdesktopservices.cpp
diff --git a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
index db4b15530c..58164f1fa1 100644
--- a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
+++ b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -41,34 +36,12 @@ class tst_qdesktopservices : public QObject
{
Q_OBJECT
-public:
- tst_qdesktopservices();
- virtual ~tst_qdesktopservices();
-
private slots:
- void init();
- void cleanup();
void openUrl();
void handlers();
void testDataLocation();
};
-tst_qdesktopservices::tst_qdesktopservices()
-{
-}
-
-tst_qdesktopservices::~tst_qdesktopservices()
-{
-}
-
-void tst_qdesktopservices::init()
-{
-}
-
-void tst_qdesktopservices::cleanup()
-{
-}
-
void tst_qdesktopservices::openUrl()
{
// At the bare minimum check that they return false for invalid url's
diff --git a/tests/auto/gui/util/qdoublevalidator/qdoublevalidator.pro b/tests/auto/gui/util/qdoublevalidator/qdoublevalidator.pro
index 9f04bdbb60..955369527f 100644
--- a/tests/auto/gui/util/qdoublevalidator/qdoublevalidator.pro
+++ b/tests/auto/gui/util/qdoublevalidator/qdoublevalidator.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qdoublevalidator
QT += testlib
SOURCES += tst_qdoublevalidator.cpp
diff --git a/tests/auto/gui/util/qdoublevalidator/tst_qdoublevalidator.cpp b/tests/auto/gui/util/qdoublevalidator/tst_qdoublevalidator.cpp
index 78ab769137..4705fc3ed7 100644
--- a/tests/auto/gui/util/qdoublevalidator/tst_qdoublevalidator.cpp
+++ b/tests/auto/gui/util/qdoublevalidator/tst_qdoublevalidator.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -43,6 +38,8 @@ class tst_QDoubleValidator : public QObject
private slots:
void validate_data();
void validate();
+ void zeroPaddedExponent_data();
+ void zeroPaddedExponent();
void validateThouSep_data();
void validateThouSep();
void validateIntEquiv_data();
@@ -240,6 +237,61 @@ void tst_QDoubleValidator::validate()
dv.setNotation(QDoubleValidator::StandardNotation);
QCOMPARE((int)dv.validate(value, dummy), (int)standard_state);
}
+
+void tst_QDoubleValidator::zeroPaddedExponent_data()
+{
+ QTest::addColumn<double>("minimum");
+ QTest::addColumn<double>("maximum");
+ QTest::addColumn<int>("decimals");
+ QTest::addColumn<QString>("value");
+ QTest::addColumn<bool>("rejectZeroPaddedExponent");
+ QTest::addColumn<QValidator::State>("state");
+
+ QTest::newRow("data01") << 1229.0 << 1231.0 << 0 << QString("123e+1") << false << ACC;
+ QTest::newRow("data02") << 12290.0 << 12310.0 << 0 << QString("123e2") << false << ACC;
+ QTest::newRow("data03") << 12.290 << 12.310 << 2 << QString("123e-") << false << ITM;
+ QTest::newRow("data04") << 12.290 << 12.310 << 2 << QString("123e-1") << false << ACC;
+ QTest::newRow("data05") << 1.2290 << 1.2310 << 3 << QString("123e-2") << false << ACC;
+
+ QTest::newRow("data11") << 1229.0 << 1231.0 << 0 << QString("123e+1") << true << ACC;
+ QTest::newRow("data12") << 12290.0 << 12310.0 << 0 << QString("123e2") << true << ACC;
+ QTest::newRow("data13") << 12.290 << 12.310 << 2 << QString("123e-") << true << ITM;
+ QTest::newRow("data14") << 12.290 << 12.310 << 2 << QString("123e-1") << true << ACC;
+ QTest::newRow("data15") << 1.2290 << 1.2310 << 3 << QString("123e-2") << true << ACC;
+
+ QTest::newRow("data21") << 1229.0 << 1231.0 << 0 << QString("123e+01") << false << ACC;
+ QTest::newRow("data22") << 12290.0 << 12310.0 << 0 << QString("123e02") << false << ACC;
+ QTest::newRow("data23") << 12.290 << 12.310 << 2 << QString("123e-0") << false << ITM;
+ QTest::newRow("data24") << 12.290 << 12.310 << 2 << QString("123e-01") << false << ACC;
+ QTest::newRow("data25") << 1.2290 << 1.2310 << 3 << QString("123e-02") << false << ACC;
+
+ QTest::newRow("data31") << 1229.0 << 1231.0 << 0 << QString("123e+01") << true << INV;
+ QTest::newRow("data32") << 12290.0 << 12310.0 << 0 << QString("123e02") << true << INV;
+ QTest::newRow("data33") << 12.290 << 12.310 << 2 << QString("123e-0") << true << INV;
+ QTest::newRow("data34") << 12.290 << 12.310 << 2 << QString("123e-01") << true << INV;
+ QTest::newRow("data35") << 1.2290 << 1.2310 << 3 << QString("123e-02") << true << INV;
+
+}
+
+void tst_QDoubleValidator::zeroPaddedExponent()
+{
+ QFETCH(double, minimum);
+ QFETCH(double, maximum);
+ QFETCH(int, decimals);
+ QFETCH(QString, value);
+ QFETCH(bool, rejectZeroPaddedExponent);
+ QFETCH(QValidator::State, state);
+
+ QLocale locale(QLocale::C);
+ if (rejectZeroPaddedExponent)
+ locale.setNumberOptions(QLocale::RejectLeadingZeroInExponent);
+
+ QDoubleValidator dv(minimum, maximum, decimals, 0);
+ dv.setLocale(locale);
+ int dummy;
+ QCOMPARE((int)dv.validate(value, dummy), (int)state);
+}
+
void tst_QDoubleValidator::notifySignals()
{
QLocale::setDefault(QLocale("C"));
diff --git a/tests/auto/gui/util/qintvalidator/qintvalidator.pro b/tests/auto/gui/util/qintvalidator/qintvalidator.pro
index 4bc35416b5..52e0b85735 100644
--- a/tests/auto/gui/util/qintvalidator/qintvalidator.pro
+++ b/tests/auto/gui/util/qintvalidator/qintvalidator.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qintvalidator
SOURCES += tst_qintvalidator.cpp
QT += testlib
diff --git a/tests/auto/gui/util/qintvalidator/tst_qintvalidator.cpp b/tests/auto/gui/util/qintvalidator/tst_qintvalidator.cpp
index a683d903df..57f55c3121 100644
--- a/tests/auto/gui/util/qintvalidator/tst_qintvalidator.cpp
+++ b/tests/auto/gui/util/qintvalidator/tst_qintvalidator.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/util/qregexpvalidator/qregexpvalidator.pro b/tests/auto/gui/util/qregexpvalidator/qregexpvalidator.pro
index 5b70d7b11d..8f1de5b747 100644
--- a/tests/auto/gui/util/qregexpvalidator/qregexpvalidator.pro
+++ b/tests/auto/gui/util/qregexpvalidator/qregexpvalidator.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qregexpvalidator
SOURCES += tst_qregexpvalidator.cpp
QT += testlib
diff --git a/tests/auto/gui/util/qregexpvalidator/tst_qregexpvalidator.cpp b/tests/auto/gui/util/qregexpvalidator/tst_qregexpvalidator.cpp
index 00876d934d..fbb4f0b4ea 100644
--- a/tests/auto/gui/util/qregexpvalidator/tst_qregexpvalidator.cpp
+++ b/tests/auto/gui/util/qregexpvalidator/tst_qregexpvalidator.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -42,38 +37,11 @@ class tst_QRegExpValidator : public QObject
{
Q_OBJECT
-public:
- tst_QRegExpValidator();
- virtual ~tst_QRegExpValidator();
-
-
- // I can think of no other way to do this for the moment
- enum State { Invalid=0, Intermediate=1, Acceptable=2 };
-public slots:
- void init();
- void cleanup();
private slots:
void validate_data();
void validate();
};
-tst_QRegExpValidator::tst_QRegExpValidator()
-{
-}
-
-tst_QRegExpValidator::~tst_QRegExpValidator()
-{
-
-}
-
-void tst_QRegExpValidator::init()
-{
-}
-
-void tst_QRegExpValidator::cleanup()
-{
-}
-
void tst_QRegExpValidator::validate_data()
{
diff --git a/tests/auto/gui/util/qregularexpressionvalidator/qregularexpressionvalidator.pro b/tests/auto/gui/util/qregularexpressionvalidator/qregularexpressionvalidator.pro
index 1e8e50563e..ab76cef3d1 100644
--- a/tests/auto/gui/util/qregularexpressionvalidator/qregularexpressionvalidator.pro
+++ b/tests/auto/gui/util/qregularexpressionvalidator/qregularexpressionvalidator.pro
@@ -1,4 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qregularexpressionvalidator
SOURCES += tst_qregularexpressionvalidator.cpp
QT += testlib
diff --git a/tests/auto/gui/util/qregularexpressionvalidator/tst_qregularexpressionvalidator.cpp b/tests/auto/gui/util/qregularexpressionvalidator/tst_qregularexpressionvalidator.cpp
index 238f906234..63aa6bd558 100644
--- a/tests/auto/gui/util/qregularexpressionvalidator/tst_qregularexpressionvalidator.cpp
+++ b/tests/auto/gui/util/qregularexpressionvalidator/tst_qregularexpressionvalidator.cpp
@@ -1,32 +1,27 @@
/****************************************************************************
**
** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**