summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/io')
-rw-r--r--tests/auto/corelib/io/largefile/largefile.pro1
-rw-r--r--tests/auto/corelib/io/largefile/tst_largefile.cpp29
-rw-r--r--tests/auto/corelib/io/qabstractfileengine/qabstractfileengine.pro1
-rw-r--r--tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp29
-rw-r--r--tests/auto/corelib/io/qbuffer/qbuffer.pro3
-rw-r--r--tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp31
-rw-r--r--tests/auto/corelib/io/qdatastream/qdatastream.pro3
-rw-r--r--tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp293
-rw-r--r--tests/auto/corelib/io/qdataurl/qdataurl.pro3
-rw-r--r--tests/auto/corelib/io/qdataurl/tst_qdataurl.cpp29
-rw-r--r--tests/auto/corelib/io/qdebug/qdebug.pro3
-rw-r--r--tests/auto/corelib/io/qdebug/tst_qdebug.cpp30
-rw-r--r--tests/auto/corelib/io/qdir/qdir.pro4
-rw-r--r--tests/auto/corelib/io/qdir/testdir/dir/qrc_qdir.cpp29
-rw-r--r--tests/auto/corelib/io/qdir/testdir/dir/tst_qdir.cpp29
-rw-r--r--tests/auto/corelib/io/qdir/tst_qdir.cpp55
-rw-r--r--tests/auto/corelib/io/qdiriterator/qdiriterator.pro1
-rw-r--r--tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp33
-rw-r--r--tests/auto/corelib/io/qfile/qfile.pro1
-rw-r--r--tests/auto/corelib/io/qfile/stdinprocess/main.cpp29
-rw-r--r--tests/auto/corelib/io/qfile/stdinprocess/stdinprocess.pro1
-rw-r--r--tests/auto/corelib/io/qfile/test/test.pro2
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp62
-rw-r--r--tests/auto/corelib/io/qfileinfo/qfileinfo.pro1
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp37
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+blackberry/test0
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+blackberry/test20
-rw-r--r--tests/auto/corelib/io/qfileselector/qfileselector.pro1
-rw-r--r--tests/auto/corelib/io/qfileselector/qfileselector.qrc3
-rw-r--r--tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp40
-rw-r--r--tests/auto/corelib/io/qfilesystementry/qfilesystementry.pro3
-rw-r--r--tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp29
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro3
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp36
-rw-r--r--tests/auto/corelib/io/qiodevice/qiodevice.pro3
-rw-r--r--tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp228
-rw-r--r--tests/auto/corelib/io/qipaddress/qipaddress.pro3
-rw-r--r--tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp29
-rw-r--r--tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp27
-rw-r--r--tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp29
-rw-r--r--tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp29
-rw-r--r--tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro2
-rw-r--r--tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp29
-rw-r--r--tests/auto/corelib/io/qnodebug/qnodebug.pro3
-rw-r--r--tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp34
-rw-r--r--tests/auto/corelib/io/qprocess-noapplication/qprocess-noapplication.pro1
-rw-r--r--tests/auto/corelib/io/qprocess-noapplication/tst_qprocessnoapplication.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/fileWriterProcess/fileWriterProcess.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/fileWriterProcess/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/test/test.pro2
-rw-r--r--tests/auto/corelib/io/qprocess/testDetached/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testDetached/testDetached.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testExitCodes/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testExitCodes/testExitCodes.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testForwarding/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testGuiProcess/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testGuiProcess/testGuiProcess.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessCrash/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessCrash/testProcessCrash.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEOF/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho/testProcessEcho.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho2/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho2/testProcessEcho2.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho3/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho3/testProcessEcho3.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEnvironment/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEnvironment/testProcessEnvironment.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessHang/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessNormal/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessNormal/testProcessNormal.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessOutput/testProcessOutput.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testSetWorkingDirectory/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testSpaceInName/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testSpaceInName/testSpaceInName.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/tst_qprocess.cpp96
-rw-r--r--tests/auto/corelib/io/qprocessenvironment/qprocessenvironment.pro3
-rw-r--r--tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp43
-rw-r--r--tests/auto/corelib/io/qresourceengine/qresourceengine.pro5
-rw-r--r--tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp35
-rw-r--r--tests/auto/corelib/io/qsavefile/qsavefile.pro2
-rw-r--r--tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp27
-rw-r--r--tests/auto/corelib/io/qsettings/tst_qsettings.cpp237
-rw-r--r--tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro1
-rw-r--r--tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp37
-rw-r--r--tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp47
-rw-r--r--tests/auto/corelib/io/qtemporarydir/qtemporarydir.pro1
-rw-r--r--tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp31
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro4
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp44
-rw-r--r--tests/auto/corelib/io/qtextstream/readAllStdinProcess/main.cpp29
-rw-r--r--tests/auto/corelib/io/qtextstream/readAllStdinProcess/readAllStdinProcess.pro1
-rw-r--r--tests/auto/corelib/io/qtextstream/readLineStdinProcess/main.cpp29
-rw-r--r--tests/auto/corelib/io/qtextstream/readLineStdinProcess/readLineStdinProcess.pro1
-rw-r--r--tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp29
-rw-r--r--tests/auto/corelib/io/qtextstream/stdinProcess/stdinProcess.pro1
-rw-r--r--tests/auto/corelib/io/qtextstream/test/test.pro2
-rw-r--r--tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp47
-rw-r--r--tests/auto/corelib/io/qurl/idna-test.c29
-rw-r--r--tests/auto/corelib/io/qurl/qurl.pro3
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl.cpp57
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl_mac.mm29
-rw-r--r--tests/auto/corelib/io/qurlinternal/qurlinternal.pro2
-rw-r--r--tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp33
-rw-r--r--tests/auto/corelib/io/qurlquery/qurlquery.pro3
-rw-r--r--tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp67
-rw-r--r--tests/auto/corelib/io/qwinoverlappedionotifier/qwinoverlappedionotifier.pro1
-rw-r--r--tests/auto/corelib/io/qwinoverlappedionotifier/tst_qwinoverlappedionotifier.cpp33
119 files changed, 1428 insertions, 1537 deletions
diff --git a/tests/auto/corelib/io/largefile/largefile.pro b/tests/auto/corelib/io/largefile/largefile.pro
index d9938d07d5..caef116684 100644
--- a/tests/auto/corelib/io/largefile/largefile.pro
+++ b/tests/auto/corelib/io/largefile/largefile.pro
@@ -4,4 +4,3 @@ QT = core testlib
SOURCES = tst_largefile.cpp
wince: SOURCES += $$QT_SOURCE_TREE/src/corelib/kernel/qfunctions_wince.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/largefile/tst_largefile.cpp b/tests/auto/corelib/io/largefile/tst_largefile.cpp
index afbb307f03..e448093062 100644
--- a/tests/auto/corelib/io/largefile/tst_largefile.cpp
+++ b/tests/auto/corelib/io/largefile/tst_largefile.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/corelib/io/qabstractfileengine/qabstractfileengine.pro b/tests/auto/corelib/io/qabstractfileengine/qabstractfileengine.pro
index b950f8c062..641bb7341b 100644
--- a/tests/auto/corelib/io/qabstractfileengine/qabstractfileengine.pro
+++ b/tests/auto/corelib/io/qabstractfileengine/qabstractfileengine.pro
@@ -3,4 +3,3 @@ TARGET = tst_qabstractfileengine
QT = core-private core testlib
SOURCES = tst_qabstractfileengine.cpp
RESOURCES += qabstractfileengine.qrc
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp b/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp
index 8c4c8b48d7..dba920d1f7 100644
--- a/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp
+++ b/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.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 FOO 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/corelib/io/qbuffer/qbuffer.pro b/tests/auto/corelib/io/qbuffer/qbuffer.pro
index 55d91f3cde..76b1088595 100644
--- a/tests/auto/corelib/io/qbuffer/qbuffer.pro
+++ b/tests/auto/corelib/io/qbuffer/qbuffer.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qbuffer
QT = core testlib
SOURCES = tst_qbuffer.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp b/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp
index 3b730d97f9..4968742110 100644
--- a/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp
+++ b/tests/auto/corelib/io/qbuffer/tst_qbuffer.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$
**
@@ -378,7 +373,7 @@ void tst_QBuffer::read_rawdata()
for (int i = 0; i < (int)sizeof(mydata); ++i) {
QVERIFY(!buffer.atEnd());
in >> ch;
- QVERIFY(ch == (quint8)mydata[i]);
+ QCOMPARE(ch, (quint8)mydata[i]);
}
QVERIFY(buffer.atEnd());
}
diff --git a/tests/auto/corelib/io/qdatastream/qdatastream.pro b/tests/auto/corelib/io/qdatastream/qdatastream.pro
index 9ab2b0948d..291b3eb611 100644
--- a/tests/auto/corelib/io/qdatastream/qdatastream.pro
+++ b/tests/auto/corelib/io/qdatastream/qdatastream.pro
@@ -4,9 +4,8 @@ QT += testlib
SOURCES = tst_qdatastream.cpp
TESTDATA += datastream.q42
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-android: !android-no-sdk {
+android {
RESOURCES += \
testdata.qrc
}
diff --git a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
index 86fd142036..f5a546ebf1 100644
--- a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
+++ b/tests/auto/corelib/io/qdatastream/tst_qdatastream.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$
**
@@ -187,6 +182,11 @@ private slots:
void floatingPointNaN();
+ void transaction_data();
+ void transaction();
+ void nestedTransactionsResult_data();
+ void nestedTransactionsResult();
+
private:
void writebool(QDataStream *s);
void writeQBitArray(QDataStream *s);
@@ -316,7 +316,7 @@ void tst_QDataStream::cleanupTestCase()
static int dataIndex(const QString &tag)
{
- int pos = tag.lastIndexOf("_");
+ int pos = tag.lastIndexOf(QLatin1Char('_'));
if (pos >= 0) {
int ret = 0;
QString count = tag.mid(pos + 1);
@@ -353,9 +353,9 @@ void tst_QDataStream::stream_data(int noOfElements)
for (int b=0; b<2; b++) {
QString byte_order = b == 0 ? "BigEndian" : "LittleEndian";
- QString tag = device + "_" + byte_order;
+ QString tag = device + QLatin1Char('_') + byte_order;
for (int e=0; e<noOfElements; e++) {
- QTest::newRow(qPrintable(tag + QString("_%1").arg(e))) << device << QString(byte_order);
+ QTest::newRow(qPrintable(tag + QLatin1Char('_') + QString::number(e))) << device << byte_order;
}
}
}
@@ -544,7 +544,7 @@ void tst_QDataStream::readQRegExp(QDataStream *s)
*s >> R;
QCOMPARE(R, test);
*s >> V;
- QVERIFY(V.type() == QVariant::RegExp);
+ QCOMPARE(V.type(), QVariant::RegExp);
QCOMPARE(V.toRegExp(), test);
}
@@ -812,7 +812,7 @@ void tst_QDataStream::readbool(QDataStream *s)
bool d1;
*s >> d1;
- QVERIFY(d1 == expected);
+ QCOMPARE(d1, expected);
}
// ************************************
@@ -875,7 +875,7 @@ void tst_QDataStream::readQBitArray(QDataStream *s)
QBitArray d1;
*s >> d1;
- QVERIFY(d1 == expected);
+ QCOMPARE(d1, expected);
}
// ************************************
@@ -934,7 +934,7 @@ void tst_QDataStream::readQBrush(QDataStream *s)
*s >> d2;
QBrush brush = qBrushData(dataIndex(QTest::currentDataTag()));
- QVERIFY(d2 == brush);
+ QCOMPARE(d2, brush);
}
// ************************************
@@ -976,7 +976,7 @@ void tst_QDataStream::readQColor(QDataStream *s)
QColor test(QColorData(dataIndex(QTest::currentDataTag())));
QColor d3;
*s >> d3;
- QVERIFY(d3 == test);
+ QCOMPARE(d3, test);
}
@@ -1072,7 +1072,7 @@ void tst_QDataStream::readQCursor(QDataStream *s)
*s >> d5;
QVERIFY(d5.shape() == test.shape()); //## lacks operator==
- QVERIFY(d5.hotSpot() == test.hotSpot());
+ QCOMPARE(d5.hotSpot(), test.hotSpot());
QVERIFY((d5.bitmap() != 0 && test.bitmap() != 0) || (d5.bitmap() == 0 && test.bitmap() == 0));
if (d5.bitmap() != 0) {
QPixmap actual = *(d5.bitmap());
@@ -1135,7 +1135,7 @@ void tst_QDataStream::readQDate(QDataStream *s)
QDate test(qDateData(dataIndex(QTest::currentDataTag())));
QDate d6;
*s >> d6;
- QVERIFY(d6 == test);
+ QCOMPARE(d6, test);
}
// ************************************
@@ -1229,7 +1229,7 @@ void tst_QDataStream::readQTime(QDataStream *s)
QTime test = qTimeData(dataIndex(QTest::currentDataTag()));
QTime d7;
*s >> d7;
- QVERIFY(d7 == test);
+ QCOMPARE(d7, test);
}
// ************************************
@@ -1279,7 +1279,7 @@ void tst_QDataStream::readQDateTime(QDataStream *s)
QDateTime test(qDateTimeData(dataIndex(QTest::currentDataTag())));
QDateTime d8;
*s >> d8;
- QVERIFY(d8 == test);
+ QCOMPARE(d8, test);
}
// ************************************
@@ -1430,16 +1430,16 @@ void tst_QDataStream::readQImage(QDataStream *s)
QImage d12;
*s >> d12;
- QVERIFY(d12 == ref);
+ QCOMPARE(d12, ref);
// do some extra neurotic tests
- QVERIFY(d12.size() == ref.size());
- QVERIFY(d12.isNull() == ref.isNull());
- QVERIFY(d12.width() == ref.width());
- QVERIFY(d12.height() == ref.height());
- QVERIFY(d12.depth() == ref.depth());
- QVERIFY(d12.colorCount() == ref.colorCount());
- QVERIFY(d12.hasAlphaChannel() == ref.hasAlphaChannel());
+ QCOMPARE(d12.size(), ref.size());
+ QCOMPARE(d12.isNull(), ref.isNull());
+ QCOMPARE(d12.width(), ref.width());
+ QCOMPARE(d12.height(), ref.height());
+ QCOMPARE(d12.depth(), ref.depth());
+ QCOMPARE(d12.colorCount(), ref.colorCount());
+ QCOMPARE(d12.hasAlphaChannel(), ref.hasAlphaChannel());
}
// ************************************
@@ -1533,9 +1533,9 @@ void tst_QDataStream::readQPen(QDataStream *s)
QCOMPARE(d15.style(), origPen.style());
QCOMPARE(d15.width(), origPen.width());
QCOMPARE(d15.color(), origPen.color());
- QVERIFY(d15.capStyle() == origPen.capStyle());
- QVERIFY(d15.joinStyle() == origPen.joinStyle());
- QVERIFY(d15 == origPen);
+ QCOMPARE(d15.capStyle(), origPen.capStyle());
+ QCOMPARE(d15.joinStyle(), origPen.joinStyle());
+ QCOMPARE(d15, origPen);
}
// ************************************
@@ -1583,11 +1583,11 @@ void tst_QDataStream::readQPixmap(QDataStream *s)
QPixmap d16;
*s >> d16;
QVERIFY(!d16.isNull() && !pm.isNull());
- QVERIFY(d16.width() == pm.width());
- QVERIFY(d16.height() == pm.height());
- QVERIFY(d16.size() == pm.size());
- QVERIFY(d16.rect() == pm.rect());
- QVERIFY(d16.depth() == pm.depth());
+ QCOMPARE(d16.width(), pm.width());
+ QCOMPARE(d16.height(), pm.height());
+ QCOMPARE(d16.size(), pm.size());
+ QCOMPARE(d16.rect(), pm.rect());
+ QCOMPARE(d16.depth(), pm.depth());
}
void tst_QDataStream::writeQIcon(QDataStream *s)
@@ -1654,11 +1654,11 @@ void tst_QDataStream::readQPoint(QDataStream *s)
QPoint ref(qPointData(dataIndex(QTest::currentDataTag())));
QPoint d17;
*s >> d17;
- QVERIFY(d17 == ref);
+ QCOMPARE(d17, ref);
QPointF d17f;
*s >> d17f;
- QVERIFY(d17f == QPointF(ref));
+ QCOMPARE(d17f, QPointF(ref));
}
// ************************************
@@ -1706,11 +1706,11 @@ void tst_QDataStream::readQRect(QDataStream *s)
QRect ref(qRectData(dataIndex(QTest::currentDataTag())));
QRect d18;
*s >> d18;
- QVERIFY(d18 == ref);
+ QCOMPARE(d18, ref);
QRectF d18f;
*s >> d18f;
- QVERIFY(d18f == QRectF(ref));
+ QCOMPARE(d18f, QRectF(ref));
}
// ************************************
@@ -1819,11 +1819,11 @@ void tst_QDataStream::readQPolygon(QDataStream *s)
QPolygon ref(qPolygonData(dataIndex(QTest::currentDataTag())));
QPolygon d19;
*s >> d19;
- QVERIFY(d19 == ref);
+ QCOMPARE(d19, ref);
QPolygonF d19f;
*s >> d19f;
- QVERIFY(d19f == QPolygonF(ref));
+ QCOMPARE(d19f, QPolygonF(ref));
}
// ************************************
@@ -1883,7 +1883,7 @@ void tst_QDataStream::readQRegion(QDataStream *s)
QRegion ref(qRegionData(dataIndex(QTest::currentDataTag())));
QRegion r;
*s >> r;
- QVERIFY(r == ref);
+ QCOMPARE(r, ref);
}
// ************************************
@@ -1931,11 +1931,11 @@ void tst_QDataStream::readQSize(QDataStream *s)
QSize ref(qSizeData(dataIndex(QTest::currentDataTag())));
QSize d21;
*s >> d21;
- QVERIFY(d21 == ref);
+ QCOMPARE(d21, ref);
QSizeF d21f;
*s >> d21f;
- QVERIFY(d21f == QSizeF(ref));
+ QCOMPARE(d21f, QSizeF(ref));
}
// *********************** atEnd ******************************
@@ -2087,7 +2087,7 @@ void tst_QDataStream::setVersion_data()
QDataStream latest;
for (int vers = 1; vers <= latest.version(); ++vers)
- QTest::newRow(qPrintable(QString("v_%1").arg(vers))) << vers;
+ QTest::newRow(("v_" + QByteArray::number(vers)).constData()) << vers;
}
void tst_QDataStream::setVersion()
@@ -2111,13 +2111,13 @@ void tst_QDataStream::setVersion()
QDataStream in(&ba1, QIODevice::ReadOnly);
in.setVersion(vers);
in >> keyseq1 >> keyseq2 >> deadbeef;
- QVERIFY(keyseq1 == QKeySequence(Qt::Key_A));
+ QCOMPARE(keyseq1, QKeySequence(Qt::Key_A));
if (vers >= 5) {
QVERIFY(keyseq2 == QKeySequence(Qt::Key_B, Qt::Key_C));
} else {
- QVERIFY(keyseq2 == QKeySequence(Qt::Key_B));
+ QCOMPARE(keyseq2, QKeySequence(Qt::Key_B));
}
- QVERIFY(deadbeef == 0xDEADBEEF);
+ QCOMPARE(deadbeef, 0xDEADBEEF);
}
/*
@@ -2126,7 +2126,7 @@ void tst_QDataStream::setVersion()
// revise the test if new color roles or color groups are added
QVERIFY(QPalette::NColorRoles == QPalette::ToolTipText + 1);
- QVERIFY(QPalette::NColorGroups == 3);
+ QCOMPARE(int(QPalette::NColorGroups), 3);
QByteArray ba2;
QPalette pal1, pal2;
@@ -2191,8 +2191,8 @@ void tst_QDataStream::setVersion()
}
}
}
- QVERIFY(pal1 == inPal1);
- QVERIFY(pal2 == inPal2);
+ QCOMPARE(pal1, inPal1);
+ QCOMPARE(pal2, inPal2);
}
}
}
@@ -3077,9 +3077,9 @@ void tst_QDataStream::compatibility_Qt3()
in >> in_palette;
in >> in_brush;
}
- QVERIFY(in_brush.style() == Qt::NoBrush);
- QVERIFY(in_palette.brush(QPalette::Button).style() == Qt::NoBrush);
- QVERIFY(in_palette.color(QPalette::Light) == Qt::green);
+ QCOMPARE(in_brush.style(), Qt::NoBrush);
+ QCOMPARE(in_palette.brush(QPalette::Button).style(), Qt::NoBrush);
+ QCOMPARE(in_palette.color(QPalette::Light), QColor(Qt::green));
}
}
@@ -3109,9 +3109,9 @@ void tst_QDataStream::compatibility_Qt2()
in >> in_palette;
in >> in_brush;
}
- QVERIFY(in_brush.style() == Qt::NoBrush);
- QVERIFY(in_palette.brush(QPalette::Button).style() == Qt::NoBrush);
- QVERIFY(in_palette.color(QPalette::Light) == Qt::green);
+ QCOMPARE(in_brush.style(), Qt::NoBrush);
+ QCOMPARE(in_palette.brush(QPalette::Button).style(), Qt::NoBrush);
+ QCOMPARE(in_palette.color(QPalette::Light), QColor(Qt::green));
}
void tst_QDataStream::floatingPointNaN()
@@ -3205,6 +3205,165 @@ void tst_QDataStream::floatingPointPrecision()
}
+void tst_QDataStream::transaction_data()
+{
+ QTest::addColumn<qint8>("i8Data");
+ QTest::addColumn<qint16>("i16Data");
+ QTest::addColumn<qint32>("i32Data");
+ QTest::addColumn<qint64>("i64Data");
+ QTest::addColumn<bool>("bData");
+ QTest::addColumn<float>("fData");
+ QTest::addColumn<double>("dData");
+ QTest::addColumn<QByteArray>("strData");
+ QTest::addColumn<QByteArray>("rawData");
+
+ QTest::newRow("1") << qint8(1) << qint16(2) << qint32(3) << qint64(4) << true << 5.0f
+ << double(6.0) << QByteArray("Hello world!") << QByteArray("Qt rocks!");
+ QTest::newRow("2") << qint8(1 << 6) << qint16(1 << 14) << qint32(1 << 30) << qint64Data(3) << false << 123.0f
+ << double(234.0) << stringData(5).toUtf8() << stringData(6).toUtf8();
+ QTest::newRow("3") << qint8(-1) << qint16(-2) << qint32(-3) << qint64(-4) << true << -123.0f
+ << double(-234.0) << stringData(3).toUtf8() << stringData(4).toUtf8();
+}
+
+void tst_QDataStream::transaction()
+{
+ QByteArray testBuffer;
+
+ QFETCH(qint8, i8Data);
+ QFETCH(qint16, i16Data);
+ QFETCH(qint32, i32Data);
+ QFETCH(qint64, i64Data);
+ QFETCH(bool, bData);
+ QFETCH(float, fData);
+ QFETCH(double, dData);
+ QFETCH(QByteArray, strData);
+ QFETCH(QByteArray, rawData);
+
+ {
+ QDataStream stream(&testBuffer, QIODevice::WriteOnly);
+
+ stream << i8Data << i16Data << i32Data << i64Data
+ << bData << fData << dData << strData.constData();
+ stream.writeRawData(rawData.constData(), rawData.size());
+ }
+
+ for (int splitPos = 0; splitPos <= testBuffer.size(); ++splitPos) {
+ QByteArray readBuffer(testBuffer.left(splitPos));
+ SequentialBuffer dev(&readBuffer);
+ dev.open(QIODevice::ReadOnly);
+ QDataStream stream(&dev);
+
+ qint8 i8;
+ qint16 i16;
+ qint32 i32;
+ qint64 i64;
+ bool b;
+ float f;
+ double d;
+ char *str;
+ QByteArray raw(rawData.size(), 0);
+
+ forever {
+ stream.startTransaction();
+ stream >> i8 >> i16 >> i32 >> i64 >> b >> f >> d >> str;
+ stream.readRawData(raw.data(), raw.size());
+
+ if (stream.commitTransaction())
+ break;
+
+ QVERIFY(stream.status() == QDataStream::ReadPastEnd);
+ QVERIFY(splitPos == 0 || !stream.atEnd());
+ QVERIFY(readBuffer.size() < testBuffer.size());
+ delete [] str;
+ raw.fill(0);
+ readBuffer.append(testBuffer.right(testBuffer.size() - splitPos));
+ }
+
+ QVERIFY(stream.atEnd());
+ QCOMPARE(i8, i8Data);
+ QCOMPARE(i16, i16Data);
+ QCOMPARE(i32, i32Data);
+ QCOMPARE(i64, i64Data);
+ QCOMPARE(b, bData);
+ QCOMPARE(f, fData);
+ QCOMPARE(d, dData);
+ QVERIFY(strData == str);
+ delete [] str;
+ QCOMPARE(raw, rawData);
+ }
+}
+
+void tst_QDataStream::nestedTransactionsResult_data()
+{
+ QTest::addColumn<bool>("commitFirst");
+ QTest::addColumn<bool>("rollbackFirst");
+ QTest::addColumn<bool>("commitSecond");
+ QTest::addColumn<bool>("rollbackSecond");
+ QTest::addColumn<bool>("successExpected");
+ QTest::addColumn<bool>("expectedAtEnd");
+ QTest::addColumn<int>("expectedStatus");
+
+ QTest::newRow("1") << false << false << false << false
+ << false << true << int(QDataStream::ReadCorruptData);
+ QTest::newRow("2") << false << false << false << true
+ << false << true << int(QDataStream::ReadCorruptData);
+ QTest::newRow("3") << false << false << true << false
+ << false << true << int(QDataStream::ReadCorruptData);
+
+ QTest::newRow("4") << false << true << false << false
+ << false << true << int(QDataStream::ReadCorruptData);
+ QTest::newRow("5") << false << true << false << true
+ << false << false << int(QDataStream::ReadPastEnd);
+ QTest::newRow("6") << false << true << true << false
+ << false << false << int(QDataStream::ReadPastEnd);
+
+ QTest::newRow("7") << true << false << false << false
+ << false << true << int(QDataStream::ReadCorruptData);
+ QTest::newRow("8") << true << false << false << true
+ << false << false << int(QDataStream::ReadPastEnd);
+ QTest::newRow("9") << true << false << true << false
+ << true << true << int(QDataStream::Ok);
+}
+
+void tst_QDataStream::nestedTransactionsResult()
+{
+ QByteArray testBuffer(1, 0);
+ QDataStream stream(&testBuffer, QIODevice::ReadOnly);
+ uchar c;
+
+ QFETCH(bool, commitFirst);
+ QFETCH(bool, rollbackFirst);
+ QFETCH(bool, commitSecond);
+ QFETCH(bool, rollbackSecond);
+ QFETCH(bool, successExpected);
+ QFETCH(bool, expectedAtEnd);
+ QFETCH(int, expectedStatus);
+
+ stream.startTransaction();
+ stream.startTransaction();
+ stream >> c;
+
+ if (commitFirst)
+ QVERIFY(stream.commitTransaction());
+ else if (rollbackFirst)
+ stream.rollbackTransaction();
+ else
+ stream.abortTransaction();
+
+ stream.startTransaction();
+
+ if (commitSecond)
+ QCOMPARE(stream.commitTransaction(), commitFirst);
+ else if (rollbackSecond)
+ stream.rollbackTransaction();
+ else
+ stream.abortTransaction();
+
+ QCOMPARE(stream.commitTransaction(), successExpected);
+ QCOMPARE(stream.atEnd(), expectedAtEnd);
+ QCOMPARE(int(stream.status()), expectedStatus);
+}
+
QTEST_MAIN(tst_QDataStream)
#include "tst_qdatastream.moc"
diff --git a/tests/auto/corelib/io/qdataurl/qdataurl.pro b/tests/auto/corelib/io/qdataurl/qdataurl.pro
index d21fc4ed15..7085c9d881 100644
--- a/tests/auto/corelib/io/qdataurl/qdataurl.pro
+++ b/tests/auto/corelib/io/qdataurl/qdataurl.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qdataurl
QT = core core-private testlib
SOURCES = tst_qdataurl.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qdataurl/tst_qdataurl.cpp b/tests/auto/corelib/io/qdataurl/tst_qdataurl.cpp
index 6648550dda..66720d28e0 100644
--- a/tests/auto/corelib/io/qdataurl/tst_qdataurl.cpp
+++ b/tests/auto/corelib/io/qdataurl/tst_qdataurl.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/corelib/io/qdebug/qdebug.pro b/tests/auto/corelib/io/qdebug/qdebug.pro
index 5e902bb105..45c0aa4061 100644
--- a/tests/auto/corelib/io/qdebug/qdebug.pro
+++ b/tests/auto/corelib/io/qdebug/qdebug.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qdebug
QT = core testlib concurrent
SOURCES = tst_qdebug.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
index db2805ebf0..abec4e7aba 100644
--- a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
+++ b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
@@ -1,31 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** 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/corelib/io/qdir/qdir.pro b/tests/auto/corelib/io/qdir/qdir.pro
index 65cfd3faa9..e5739f7e0a 100644
--- a/tests/auto/corelib/io/qdir/qdir.pro
+++ b/tests/auto/corelib/io/qdir/qdir.pro
@@ -8,9 +8,7 @@ TESTDATA += testdir testData searchdir resources entrylist types tst_qdir.cpp
contains(CONFIG, builtin_testdata): DEFINES += BUILTIN_TESTDATA
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-
-android:!android-no-sdk {
+android {
RESOURCES += android_testdata.qrc
}
diff --git a/tests/auto/corelib/io/qdir/testdir/dir/qrc_qdir.cpp b/tests/auto/corelib/io/qdir/testdir/dir/qrc_qdir.cpp
index a03f7cef1b..a1d5c2c9ff 100644
--- a/tests/auto/corelib/io/qdir/testdir/dir/qrc_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/testdir/dir/qrc_qdir.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/corelib/io/qdir/testdir/dir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/testdir/dir/tst_qdir.cpp
index a03f7cef1b..a1d5c2c9ff 100644
--- a/tests/auto/corelib/io/qdir/testdir/dir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/testdir/dir/tst_qdir.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/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp
index ad49678245..703e9c5b07 100644
--- a/tests/auto/corelib/io/qdir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/tst_qdir.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$
**
@@ -227,13 +222,13 @@ private:
Q_DECLARE_METATYPE(tst_QDir::UncHandling)
tst_QDir::tst_QDir()
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
: m_dataPath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation))
#elif !defined(BUILTIN_TESTDATA)
: m_dataPath(QFileInfo(QFINDTESTDATA("testData")).absolutePath())
#endif
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QString resourceSourcePath = QStringLiteral(":/android_testdata/");
QDirIterator it(resourceSourcePath, QDirIterator::Subdirectories);
while (it.hasNext()) {
@@ -572,7 +567,7 @@ void tst_QDir::exists_data()
char drive = 'Z';
QString driv;
do {
- driv = QString::fromLatin1("%1:/").arg(drive);
+ driv = drive + QLatin1String(":/");
if (!driveLetters.contains(driv)) break;
--drive;
} while (drive >= 'A');
@@ -637,7 +632,7 @@ void tst_QDir::compare()
dir.makeAbsolute();
QVERIFY(dir == QDir::currentPath());
- QVERIFY(QDir() == QDir(QDir::currentPath()));
+ QCOMPARE(QDir(), QDir(QDir::currentPath()));
QVERIFY(QDir("../") == QDir(QDir::currentPath() + "/.."));
}
@@ -1073,7 +1068,7 @@ void tst_QDir::current()
if (!path.isEmpty()) {
bool b = QDir::setCurrent(path);
// If path is non existent, then setCurrent should be false (currentDir is empty in testData)
- QVERIFY(b == !currentDir.isEmpty());
+ QCOMPARE(b, !currentDir.isEmpty());
}
if (!currentDir.isEmpty()) {
QDir newCurrent = QDir::current();
@@ -1095,7 +1090,7 @@ void tst_QDir::cd_data()
QTest::addColumn<bool>("successExpected");
QTest::addColumn<QString>("newDir");
- int index = m_dataPath.lastIndexOf("/");
+ int index = m_dataPath.lastIndexOf(QLatin1Char('/'));
QTest::newRow("cdUp") << m_dataPath << ".." << true << m_dataPath.left(index==0?1:index);
QTest::newRow("cdUp non existent (relative dir)") << "anonexistingDir" << ".."
<< true << m_dataPath;
@@ -1139,11 +1134,11 @@ void tst_QDir::setNameFilters_data()
QTest::newRow("spaces2") << m_dataPath + "/testdir/spaces" << QStringList("*.bar")
<< QStringList("foo.bar");
QTest::newRow("spaces3") << m_dataPath + "/testdir/spaces" << QStringList("foo.*")
- << QString("foo. bar,foo.bar").split(",");
- QTest::newRow("files1") << m_dataPath + "/testdir/dir" << QString("*r.cpp *.pro").split(" ")
- << QString("qdir.pro,qrc_qdir.cpp,tst_qdir.cpp").split(",");
+ << QString("foo. bar,foo.bar").split(QLatin1Char(','));
+ QTest::newRow("files1") << m_dataPath + "/testdir/dir" << QString("*r.cpp *.pro").split(QLatin1Char(' '))
+ << QString("qdir.pro,qrc_qdir.cpp,tst_qdir.cpp").split(QLatin1Char(','));
QTest::newRow("resources1") << QString(":/tst_qdir/resources/entryList") << QStringList("*.data")
- << QString("file1.data,file2.data,file3.data").split(',');
+ << QString("file1.data,file2.data,file3.data").split(QLatin1Char(','));
}
void tst_QDir::setNameFilters()
@@ -1718,7 +1713,7 @@ void tst_QDir::searchPaths()
QDir::setSearchPaths(searchPathPrefixList.at(i), searchPathsList.at(i).split(","));
}
for (int i = 0; i < searchPathPrefixList.count(); ++i) {
- QVERIFY(QDir::searchPaths(searchPathPrefixList.at(i)) == searchPathsList.at(i).split(","));
+ QCOMPARE(QDir::searchPaths(searchPathPrefixList.at(i)), searchPathsList.at(i).split(","));
}
QCOMPARE(QFile(filename).exists(), exists);
@@ -1741,7 +1736,7 @@ void tst_QDir::searchPaths()
}
}
for (int i = 0; i < searchPathPrefixList.count(); ++i) {
- QVERIFY(QDir::searchPaths(searchPathPrefixList.at(i)) == searchPathsList.at(i).split(","));
+ QCOMPARE(QDir::searchPaths(searchPathPrefixList.at(i)), searchPathsList.at(i).split(","));
}
QCOMPARE(QFile(filename).exists(), exists);
@@ -2145,7 +2140,7 @@ void tst_QDir::equalityOperator_data()
QString pathinroot(QDir::rootPath() + QLatin1String("assets/.."));
#elif defined (Q_OS_WIN)
QString pathinroot("c:/windows/..");
-#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#elif defined(Q_OS_ANDROID)
QString pathinroot("/system/..");
#elif defined(Q_OS_HAIKU)
QString pathinroot("/boot/..");
diff --git a/tests/auto/corelib/io/qdiriterator/qdiriterator.pro b/tests/auto/corelib/io/qdiriterator/qdiriterator.pro
index 51bfcb36a5..2d8dfba996 100644
--- a/tests/auto/corelib/io/qdiriterator/qdiriterator.pro
+++ b/tests/auto/corelib/io/qdiriterator/qdiriterator.pro
@@ -8,6 +8,5 @@ TESTDATA += entrylist
contains(CONFIG, builtin_testdata): DEFINES += BUILTIN_TESTDATA
wince*mips*|wincewm50smart-msvc200*: DEFINES += WINCE_BROKEN_ITERATE=1
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
win32: CONFIG += insignificant_test # Crashes on Windows in release builds
diff --git a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
index 554771f4d2..0fbce74055 100644
--- a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
+++ b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.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$
**
@@ -123,7 +118,7 @@ private:
void tst_QDirIterator::initTestCase()
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QString testdata_dir = QStandardPaths::writableLocation(QStandardPaths::CacheLocation);
QString resourceSourcePath = QStringLiteral(":/");
QDirIterator it(resourceSourcePath, QDirIterator::Subdirectories);
@@ -551,7 +546,7 @@ void tst_QDirIterator::recurseWithFilters() const
QVERIFY(it.hasNext());
it.next();
actualEntries.insert(it.fileInfo().filePath());
- QVERIFY(actualEntries == expectedEntries);
+ QCOMPARE(actualEntries, expectedEntries);
QVERIFY(!it.hasNext());
}
diff --git a/tests/auto/corelib/io/qfile/qfile.pro b/tests/auto/corelib/io/qfile/qfile.pro
index e2c714c67f..10c8d918f7 100644
--- a/tests/auto/corelib/io/qfile/qfile.pro
+++ b/tests/auto/corelib/io/qfile/qfile.pro
@@ -5,4 +5,3 @@ wince* {
SUBDIRS = test stdinprocess
}
-CONFIG += parallel_test
diff --git a/tests/auto/corelib/io/qfile/stdinprocess/main.cpp b/tests/auto/corelib/io/qfile/stdinprocess/main.cpp
index abf20a0454..6ff42c2485 100644
--- a/tests/auto/corelib/io/qfile/stdinprocess/main.cpp
+++ b/tests/auto/corelib/io/qfile/stdinprocess/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/corelib/io/qfile/stdinprocess/stdinprocess.pro b/tests/auto/corelib/io/qfile/stdinprocess/stdinprocess.pro
index 51badce898..8e463e4cef 100644
--- a/tests/auto/corelib/io/qfile/stdinprocess/stdinprocess.pro
+++ b/tests/auto/corelib/io/qfile/stdinprocess/stdinprocess.pro
@@ -6,4 +6,3 @@ CONFIG += console
# This app is testdata for tst_qfile
target.path = $$[QT_INSTALL_TESTS]/tst_qfile/$$TARGET
INSTALLS += target
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qfile/test/test.pro b/tests/auto/corelib/io/qfile/test/test.pro
index 9aa4119795..c9ba96cc1b 100644
--- a/tests/auto/corelib/io/qfile/test/test.pro
+++ b/tests/auto/corelib/io/qfile/test/test.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
CONFIG -= app_bundle debug_and_release_target
QT = core-private core testlib
qtHaveModule(network): QT += network
@@ -17,4 +16,3 @@ TESTDATA += ../dosfile.txt ../noendofline.txt ../testfile.txt \
../resources/file1.ext1
win32:!winrt: LIBS+=-lole32 -luuid
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index b1e383dda1..411c73fb90 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -1,31 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** 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$
**
@@ -853,7 +849,7 @@ void tst_QFile::readAll()
QByteArray a = file.readAll();
file.reset();
- QVERIFY(file.pos() == 0);
+ QCOMPARE(file.pos(), 0);
QVERIFY(file.bytesAvailable() > 7);
QByteArray b = file.read(1);
@@ -1199,7 +1195,7 @@ void tst_QFile::append()
f.close();
QVERIFY2(f.open(QIODevice::Append), msgOpenFailed(f).constData());
- QVERIFY(f.pos() == 1);
+ QCOMPARE(f.pos(), 1);
f.putChar('a');
f.close();
QCOMPARE(int(f.size()), 2);
@@ -2051,7 +2047,7 @@ void tst_QFile::longFileName()
QString line = ts.readLine();
QCOMPARE(line, fileName);
}
- QString newName = fileName + QLatin1String("1");
+ QString newName = fileName + QLatin1Char('1');
{
QVERIFY(QFile::copy(fileName, newName));
QFile file(newName);
@@ -2228,7 +2224,7 @@ void tst_QFile::removeOpenFile()
QVERIFY(removed);
QVERIFY(!f.isOpen());
QVERIFY(!f.exists());
- QVERIFY(f.error() == QFile::NoError);
+ QCOMPARE(f.error(), QFile::NoError);
}
{
@@ -2255,7 +2251,7 @@ void tst_QFile::removeOpenFile()
QVERIFY(removed);
QVERIFY(!f.isOpen());
QVERIFY(!f.exists());
- QVERIFY(f.error() == QFile::NoError);
+ QCOMPARE(f.error(), QFile::NoError);
}
}
@@ -2823,13 +2819,13 @@ void tst_QFile::readEof()
char buf[10];
int ret = file.read(buf, sizeof buf);
QCOMPARE(ret, 0);
- QVERIFY(file.error() == QFile::NoError);
+ QCOMPARE(file.error(), QFile::NoError);
QVERIFY(file.atEnd());
// Do it again to ensure that we get the same result
ret = file.read(buf, sizeof buf);
QCOMPARE(ret, 0);
- QVERIFY(file.error() == QFile::NoError);
+ QCOMPARE(file.error(), QFile::NoError);
QVERIFY(file.atEnd());
}
@@ -2844,13 +2840,13 @@ void tst_QFile::readEof()
QByteArray ret = file.read(10);
QVERIFY(ret.isEmpty());
- QVERIFY(file.error() == QFile::NoError);
+ QCOMPARE(file.error(), QFile::NoError);
QVERIFY(file.atEnd());
// Do it again to ensure that we get the same result
ret = file.read(10);
QVERIFY(ret.isEmpty());
- QVERIFY(file.error() == QFile::NoError);
+ QCOMPARE(file.error(), QFile::NoError);
QVERIFY(file.atEnd());
}
@@ -2866,13 +2862,13 @@ void tst_QFile::readEof()
char buf[10];
int ret = file.readLine(buf, sizeof buf);
QCOMPARE(ret, -1);
- QVERIFY(file.error() == QFile::NoError);
+ QCOMPARE(file.error(), QFile::NoError);
QVERIFY(file.atEnd());
// Do it again to ensure that we get the same result
ret = file.readLine(buf, sizeof buf);
QCOMPARE(ret, -1);
- QVERIFY(file.error() == QFile::NoError);
+ QCOMPARE(file.error(), QFile::NoError);
QVERIFY(file.atEnd());
}
@@ -2887,13 +2883,13 @@ void tst_QFile::readEof()
QByteArray ret = file.readLine();
QVERIFY(ret.isNull());
- QVERIFY(file.error() == QFile::NoError);
+ QCOMPARE(file.error(), QFile::NoError);
QVERIFY(file.atEnd());
// Do it again to ensure that we get the same result
ret = file.readLine();
QVERIFY(ret.isNull());
- QVERIFY(file.error() == QFile::NoError);
+ QCOMPARE(file.error(), QFile::NoError);
QVERIFY(file.atEnd());
}
@@ -2908,12 +2904,12 @@ void tst_QFile::readEof()
char c;
QVERIFY(!file.getChar(&c));
- QVERIFY(file.error() == QFile::NoError);
+ QCOMPARE(file.error(), QFile::NoError);
QVERIFY(file.atEnd());
// Do it again to ensure that we get the same result
QVERIFY(!file.getChar(&c));
- QVERIFY(file.error() == QFile::NoError);
+ QCOMPARE(file.error(), QFile::NoError);
QVERIFY(file.atEnd());
}
}
@@ -3001,7 +2997,7 @@ void tst_QFile::map()
memory = file.map(offset, size);
QCOMPARE(file.error(), QFile::NoError);
QVERIFY(memory);
- QVERIFY(memory[0] == 'Q');
+ QCOMPARE(memory[0], uchar('Q'));
QVERIFY(file.unmap(memory));
QCOMPARE(file.error(), QFile::NoError);
diff --git a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro
index 571637be37..8aa81896cc 100644
--- a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro
+++ b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro
@@ -6,6 +6,5 @@ RESOURCES += qfileinfo.qrc \
testdata.qrc
win32:!wince:!winrt:LIBS += -ladvapi32 -lnetapi32
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
win32: CONFIG += insignificant_test # Crashes on Windows in release builds
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
index d2c43f79d6..8d62a38e6b 100644
--- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.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$
**
@@ -1104,7 +1099,7 @@ void tst_QFileInfo::consistent()
QFileInfo fi(file);
QCOMPARE(fi.filePath(), expected);
- QCOMPARE(fi.dir().path() + "/" + fi.fileName(), expected);
+ QCOMPARE(fi.dir().path() + QLatin1Char('/') + fi.fileName(), expected);
}
@@ -1204,7 +1199,7 @@ void tst_QFileInfo::fileTimes()
QEXPECT_FAIL("", "WinRT does not allow timestamp handling change in the filesystem due to sandboxing", Continue);
#elif defined(Q_OS_QNX)
QEXPECT_FAIL("", "QNX uses the noatime filesystem option", Continue);
-#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#elif defined(Q_OS_ANDROID)
if (fileInfo.lastRead() <= beforeRead)
QEXPECT_FAIL("", "Android may use relatime or noatime on mounts", Continue);
#endif
@@ -1438,7 +1433,7 @@ void tst_QFileInfo::refresh()
QCOMPARE(file.write("JOJOJO"), qint64(6));
file.flush();
- QVERIFY(info.lastModified() == lastModified);
+ QCOMPARE(info.lastModified(), lastModified);
QCOMPARE(info.size(), qint64(7));
#if defined(Q_OS_WIN) || defined(Q_OS_WINCE)
@@ -1659,7 +1654,7 @@ void tst_QFileInfo::isWritable()
void tst_QFileInfo::isExecutable()
{
QString appPath = QCoreApplication::applicationDirPath();
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
appPath += "/libtst_qfileinfo.so";
#else
appPath += "/tst_qfileinfo";
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+blackberry/test b/tests/auto/corelib/io/qfileselector/platforms/+blackberry/test
deleted file mode 100644
index e69de29bb2..0000000000
--- a/tests/auto/corelib/io/qfileselector/platforms/+blackberry/test
+++ /dev/null
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+blackberry/test2 b/tests/auto/corelib/io/qfileselector/platforms/+blackberry/test2
deleted file mode 100644
index e69de29bb2..0000000000
--- a/tests/auto/corelib/io/qfileselector/platforms/+blackberry/test2
+++ /dev/null
diff --git a/tests/auto/corelib/io/qfileselector/qfileselector.pro b/tests/auto/corelib/io/qfileselector/qfileselector.pro
index ded3d6502e..edcc91e8ed 100644
--- a/tests/auto/corelib/io/qfileselector/qfileselector.pro
+++ b/tests/auto/corelib/io/qfileselector/qfileselector.pro
@@ -1,4 +1,3 @@
-CONFIG += parallel_test
CONFIG += testcase
TARGET = tst_qfileselectors
QT = core-private testlib
diff --git a/tests/auto/corelib/io/qfileselector/qfileselector.qrc b/tests/auto/corelib/io/qfileselector/qfileselector.qrc
index 37bd397c9d..ab7a4d7f23 100644
--- a/tests/auto/corelib/io/qfileselector/qfileselector.qrc
+++ b/tests/auto/corelib/io/qfileselector/qfileselector.qrc
@@ -14,7 +14,6 @@
<!-- platforms/test: deepest possible selection -->
<file>platforms/test</file>
<file>platforms/+unix/+android/test</file>
- <file>platforms/+unix/+blackberry/test</file>
<file>platforms/+unix/+darwin/+mac/+ios/test</file>
<file>platforms/+unix/+darwin/+mac/+osx/test</file>
<file>platforms/+unix/+darwin/+mac/test</file>
@@ -27,7 +26,6 @@
<file>platforms/+windows/+winrt/test</file>
<file>platforms/+windows/test</file>
<file>platforms/+android/test</file>
- <file>platforms/+blackberry/test</file>
<file>platforms/+ios/test</file>
<file>platforms/+osx/test</file>
<file>platforms/+darwin/test</file>
@@ -40,7 +38,6 @@
<!-- platforms/test2: shallow selection for the deepest selector -->
<file>platforms/test2</file>
<file>platforms/+android/test2</file>
- <file>platforms/+blackberry/test2</file>
<file>platforms/+ios/test2</file>
<file>platforms/+osx/test2</file>
<file>platforms/+haiku/test2</file>
diff --git a/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp b/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp
index 112aca224c..e5ede1ad06 100644
--- a/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp
+++ b/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2013 BlackBerry Limited. All rights reserved.
-** 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$
**
@@ -60,6 +55,8 @@ private slots:
void urlConvenience_data();
void urlConvenience();
+
+ void addStatics();
};
void tst_QFileSelector::basicTest_data()
@@ -88,7 +85,7 @@ void tst_QFileSelector::basicTest_data()
QString expectedPlatform1File(":/platforms");
QString expectedPlatform2File(""); //Only the last selector
QString expectedPlatform3File; // Only the first selector (the family)
-#if defined(Q_OS_UNIX) && !defined(Q_OS_ANDROID) && !defined(Q_OS_BLACKBERRY) && \
+#if defined(Q_OS_UNIX) && !defined(Q_OS_ANDROID) && \
!defined(Q_OS_DARWIN) && !defined(Q_OS_LINUX) && !defined(Q_OS_HAIKU)
/* We are only aware of specific unixes, and do not have test files for any of the others.
However those unixes can get a selector added from the result of a uname call, so this will
@@ -229,5 +226,14 @@ void tst_QFileSelector::urlConvenience()
QCOMPARE(fs.select(testUrl), expectedUrl);
}
+void tst_QFileSelector::addStatics()
+{
+ QFileSelector fs;
+ QCOMPARE(fs.select(QStringLiteral(":/extras/test")), QStringLiteral(":/extras/test"));
+
+ QFileSelectorPrivate::addStatics(QStringList() << QStringLiteral("custom1"));
+ QCOMPARE(fs.select(QStringLiteral(":/extras/test")), QStringLiteral(":/extras/+custom1/test"));
+}
+
QTEST_MAIN(tst_QFileSelector)
#include "tst_qfileselector.moc"
diff --git a/tests/auto/corelib/io/qfilesystementry/qfilesystementry.pro b/tests/auto/corelib/io/qfilesystementry/qfilesystementry.pro
index 99d3af1848..474836fba2 100644
--- a/tests/auto/corelib/io/qfilesystementry/qfilesystementry.pro
+++ b/tests/auto/corelib/io/qfilesystementry/qfilesystementry.pro
@@ -1,7 +1,6 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qfilesystementry
QT = core-private testlib
SOURCES = tst_qfilesystementry.cpp \
$$QT_SOURCE_TREE/src/corelib/io/qfilesystementry.cpp
HEADERS = $$QT_SOURCE_TREE/src/corelib/io/qfilesystementry_p.h
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp b/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp
index 049f7ef764..aed4895a47 100644
--- a/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp
+++ b/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.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/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro b/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro
index 1faa089c6e..46dd70289b 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro
+++ b/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qfilesystemwatcher
QT = core testlib
SOURCES = tst_qfilesystemwatcher.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index 026743257c..187f72d095 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.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$
**
@@ -92,7 +87,7 @@ tst_QFileSystemWatcher::tst_QFileSystemWatcher()
m_tempDirPattern += QStringLiteral("tst_qfilesystemwatcherXXXXXX");
#endif // QT_NO_FILESYSTEMWATCHER
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QDir::setCurrent(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
#endif
}
@@ -731,9 +726,10 @@ void tst_QFileSystemWatcher::signalsEmittedAfterFileMoved()
QString movePath = testDir.filePath("movehere");
for (int i = 0; i < fileCount; ++i) {
- QFile f(testDir.filePath(QString("test%1.txt").arg(i)));
+ const QByteArray iB = QByteArray::number(i);
+ QFile f(testDir.filePath(QLatin1String("test") + QString::fromLatin1(iB) + QLatin1String(".txt")));
QVERIFY(f.open(QIODevice::WriteOnly));
- f.write(QByteArray("i am ") + QByteArray::number(i));
+ f.write(QByteArray("i am ") + iB);
f.close();
}
diff --git a/tests/auto/corelib/io/qiodevice/qiodevice.pro b/tests/auto/corelib/io/qiodevice/qiodevice.pro
index 9fd70fb177..945022a289 100644
--- a/tests/auto/corelib/io/qiodevice/qiodevice.pro
+++ b/tests/auto/corelib/io/qiodevice/qiodevice.pro
@@ -5,9 +5,8 @@ SOURCES = tst_qiodevice.cpp
TESTDATA += tst_qiodevice.cpp
MOC_DIR=tmp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-android:!android-no-sdk: {
+android {
RESOURCES += \
android_testdata.qrc
}
diff --git a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
index 0fdddd1180..30eaa5aab9 100644
--- a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
+++ b/tests/auto/corelib/io/qiodevice/tst_qiodevice.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,10 +53,12 @@ private slots:
void readLine2_data();
void readLine2();
- void peekBug();
void readAllKeepPosition();
void writeInTextMode();
+ void transaction_data();
+ void transaction();
+
private:
QSharedPointer<QTemporaryDir> m_tempDir;
QString m_previousCurrent;
@@ -69,7 +66,7 @@ private:
void tst_QIODevice::initTestCase()
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QVERIFY(QFileInfo(QStringLiteral("./tst_qiodevice.cpp")).exists()
|| QFile::copy(QStringLiteral(":/tst_qiodevice.cpp"), QStringLiteral("./tst_qiodevice.cpp")));
#endif
@@ -117,6 +114,8 @@ void tst_QIODevice::constructing_QTcpSocket()
socket.connectToHost(QtNetworkSettings::serverName(), 143);
QVERIFY(socket.waitForConnected(30000));
QVERIFY(device->isOpen());
+ QCOMPARE(device->readChannelCount(), 1);
+ QCOMPARE(device->writeChannelCount(), 1);
while (!device->canReadLine())
QVERIFY(device->waitForReadyRead(30000));
@@ -128,6 +127,8 @@ void tst_QIODevice::constructing_QTcpSocket()
QCOMPARE(socket.pos(), qlonglong(0));
socket.close();
+ QCOMPARE(socket.readChannelCount(), 0);
+ QCOMPARE(socket.writeChannelCount(), 0);
socket.connectToHost(QtNetworkSettings::serverName(), 143);
QVERIFY(socket.waitForConnected(30000));
QVERIFY(device->isOpen());
@@ -161,6 +162,8 @@ void tst_QIODevice::constructing_QFile()
QVERIFY(file.open(QFile::ReadOnly));
QVERIFY(device->isOpen());
QCOMPARE((int) device->openMode(), (int) QFile::ReadOnly);
+ QCOMPARE(device->readChannelCount(), 1);
+ QCOMPARE(device->writeChannelCount(), 0);
char buf[1024];
memset(buf, 0, sizeof(buf));
@@ -541,77 +544,23 @@ void tst_QIODevice::readLine2()
}
}
-
-class PeekBug : public QIODevice {
- Q_OBJECT
-public:
- char alphabet[27];
- qint64 counter;
- PeekBug() : QIODevice(), counter(0) {
- memcpy(alphabet,"abcdefghijklmnopqrstuvqxyz",27);
- };
- qint64 readData(char *data, qint64 maxlen) {
- qint64 pos = 0;
- while (pos < maxlen) {
- *(data + pos) = alphabet[counter];
- pos++;
- counter++;
- if (counter == 26)
- counter = 0;
- }
- return maxlen;
- }
- qint64 writeData(const char * /* data */, qint64 /* maxlen */) {
- return -1;
- }
-
-};
-
-// This is a regression test for an old bug where peeking at
-// more than one character failed to put them back.
-void tst_QIODevice::peekBug()
-{
- PeekBug peekBug;
- peekBug.open(QIODevice::ReadOnly | QIODevice::Unbuffered);
-
- char onetwo[2];
- peekBug.peek(onetwo, 2);
- QCOMPARE(onetwo[0], 'a');
- QCOMPARE(onetwo[1], 'b');
-
- peekBug.read(onetwo, 1);
- QCOMPARE(onetwo[0], 'a');
-
- peekBug.peek(onetwo, 2);
- QCOMPARE(onetwo[0], 'b');
- QCOMPARE(onetwo[1], 'c');
-
- peekBug.read(onetwo, 1);
- QCOMPARE(onetwo[0], 'b');
- peekBug.read(onetwo, 1);
- QCOMPARE(onetwo[0], 'c');
- peekBug.read(onetwo, 1);
- QCOMPARE(onetwo[0], 'd');
-
- peekBug.peek(onetwo, 2);
- QCOMPARE(onetwo[0], 'e');
- QCOMPARE(onetwo[1], 'f');
-
-}
-
class SequentialReadBuffer : public QIODevice
{
public:
- SequentialReadBuffer(const char *data) : QIODevice(), buf(data), offset(0) { }
+ SequentialReadBuffer(const char *data)
+ : QIODevice(), buf(new QByteArray(data)), offset(0), ownbuf(true) { }
+ SequentialReadBuffer(QByteArray *byteArray)
+ : QIODevice(), buf(byteArray), offset(0), ownbuf(false) { }
+ virtual ~SequentialReadBuffer() { if (ownbuf) delete buf; }
bool isSequential() const Q_DECL_OVERRIDE { return true; }
- const QByteArray &buffer() const { return buf; }
+ const QByteArray &buffer() const { return *buf; }
protected:
qint64 readData(char *data, qint64 maxSize) Q_DECL_OVERRIDE
{
- maxSize = qMin(maxSize, qint64(buf.size() - offset));
- memcpy(data, buf.constData() + offset, maxSize);
+ maxSize = qMin(maxSize, qint64(buf->size() - offset));
+ memcpy(data, buf->constData() + offset, maxSize);
offset += maxSize;
return maxSize;
}
@@ -621,8 +570,9 @@ protected:
}
private:
- QByteArray buf;
+ QByteArray *buf;
int offset;
+ bool ownbuf;
};
// Test readAll() on position change for sequential device
@@ -632,6 +582,8 @@ void tst_QIODevice::readAllKeepPosition()
buffer.open(QIODevice::ReadOnly);
char c;
+ QCOMPARE(buffer.readChannelCount(), 1);
+ QCOMPARE(buffer.writeChannelCount(), 0);
QVERIFY(buffer.getChar(&c));
QCOMPARE(buffer.pos(), qint64(0));
buffer.ungetChar(c);
@@ -682,5 +634,117 @@ void tst_QIODevice::writeInTextMode()
#endif
}
+void tst_QIODevice::transaction_data()
+{
+ QTest::addColumn<bool>("sequential");
+ QTest::addColumn<qint8>("i8Data");
+ QTest::addColumn<qint16>("i16Data");
+ QTest::addColumn<qint32>("i32Data");
+ QTest::addColumn<qint64>("i64Data");
+ QTest::addColumn<bool>("bData");
+ QTest::addColumn<float>("fData");
+ QTest::addColumn<double>("dData");
+ QTest::addColumn<QByteArray>("strData");
+
+ bool sequential = true;
+ do {
+ QByteArray devName(sequential ? "sequential" : "random-access");
+
+ QTest::newRow(qPrintable(devName + '1')) << sequential << qint8(1) << qint16(2)
+ << qint32(3) << qint64(4) << true
+ << 5.0f << double(6.0)
+ << QByteArray("Hello world!");
+ QTest::newRow(qPrintable(devName + '2')) << sequential << qint8(1 << 6) << qint16(1 << 14)
+ << qint32(1 << 30) << (qint64(1) << 62) << false
+ << 123.0f << double(234.0)
+ << QByteArray("abcdefghijklmnopqrstuvwxyz");
+ QTest::newRow(qPrintable(devName + '3')) << sequential << qint8(-1) << qint16(-2)
+ << qint32(-3) << qint64(-4) << true
+ << -123.0f << double(-234.0)
+ << QByteArray("Qt rocks!");
+ sequential = !sequential;
+ } while (!sequential);
+}
+
+// Test transaction integrity
+void tst_QIODevice::transaction()
+{
+ QByteArray testBuffer;
+
+ QFETCH(bool, sequential);
+ QFETCH(qint8, i8Data);
+ QFETCH(qint16, i16Data);
+ QFETCH(qint32, i32Data);
+ QFETCH(qint64, i64Data);
+ QFETCH(bool, bData);
+ QFETCH(float, fData);
+ QFETCH(double, dData);
+ QFETCH(QByteArray, strData);
+
+ {
+ QDataStream stream(&testBuffer, QIODevice::WriteOnly);
+
+ stream << i8Data << i16Data << i32Data << i64Data
+ << bData << fData << dData << strData.constData();
+ }
+
+ for (int splitPos = 0; splitPos <= testBuffer.size(); ++splitPos) {
+ QByteArray readBuffer(testBuffer.left(splitPos));
+ QIODevice *dev = sequential ? (QIODevice *) new SequentialReadBuffer(&readBuffer)
+ : (QIODevice *) new QBuffer(&readBuffer);
+ dev->open(QIODevice::ReadOnly);
+ QDataStream stream(dev);
+
+ qint8 i8;
+ qint16 i16;
+ qint32 i32;
+ qint64 i64;
+ bool b;
+ float f;
+ double d;
+ char *str;
+
+ forever {
+ QVERIFY(!dev->isTransactionStarted());
+ dev->startTransaction();
+ QVERIFY(dev->isTransactionStarted());
+
+ // Try to read all data in one go. If the status of the data stream
+ // indicates an unsuccessful operation, restart a read transaction
+ // on the completed buffer.
+ stream >> i8 >> i16 >> i32 >> i64 >> b >> f >> d >> str;
+
+ QVERIFY(stream.atEnd());
+ if (stream.status() == QDataStream::Ok) {
+ dev->commitTransaction();
+ break;
+ }
+
+ dev->rollbackTransaction();
+ QVERIFY(splitPos == 0 || !stream.atEnd());
+ QCOMPARE(dev->pos(), Q_INT64_C(0));
+ QCOMPARE(dev->bytesAvailable(), qint64(readBuffer.size()));
+ QVERIFY(readBuffer.size() < testBuffer.size());
+ delete [] str;
+ readBuffer.append(testBuffer.right(testBuffer.size() - splitPos));
+ stream.resetStatus();
+ }
+
+ QVERIFY(!dev->isTransactionStarted());
+ QVERIFY(stream.atEnd());
+ QCOMPARE(i8, i8Data);
+ QCOMPARE(i16, i16Data);
+ QCOMPARE(i32, i32Data);
+ QCOMPARE(i64, i64Data);
+ QCOMPARE(b, bData);
+ QCOMPARE(f, fData);
+ QCOMPARE(d, dData);
+ QVERIFY(strData == str);
+ delete [] str;
+ stream.setDevice(0);
+ delete dev;
+ }
+}
+
QTEST_MAIN(tst_QIODevice)
#include "tst_qiodevice.moc"
diff --git a/tests/auto/corelib/io/qipaddress/qipaddress.pro b/tests/auto/corelib/io/qipaddress/qipaddress.pro
index ff569aa3d5..9c769052ed 100644
--- a/tests/auto/corelib/io/qipaddress/qipaddress.pro
+++ b/tests/auto/corelib/io/qipaddress/qipaddress.pro
@@ -1,5 +1,4 @@
SOURCES += tst_qipaddress.cpp
TARGET = tst_qipaddress
QT = core core-private testlib
-CONFIG += testcase parallel_test
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+CONFIG += testcase
diff --git a/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp b/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp
index 0addd89ebf..ba5e9eaaa1 100644
--- a/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp
+++ b/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2012 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 Intel Corporation.
+** 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/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp b/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp
index 87d194ed98..f10c2a7c98 100644
--- a/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp
+++ b/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2013 David Faure <faure+bluesystems@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/corelib/io/qlockfile/tst_qlockfile.cpp b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
index 4884c126d4..2e5cfb1053 100644
--- a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
+++ b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2013 David Faure <faure+bluesystems@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$
**
@@ -75,7 +70,7 @@ public:
void tst_QLockFile::initTestCase()
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QSKIP("This test requires deploying and running external console applications");
#elif defined(QT_NO_PROCESS)
QSKIP("This test requires QProcess support");
diff --git a/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp b/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp
index 0f2cfd406d..571288675e 100644
--- a/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp
+++ b/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.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/corelib/io/qloggingregistry/qloggingregistry.pro b/tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro
index a311173c0e..321420c2df 100644
--- a/tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro
+++ b/tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro
@@ -8,7 +8,7 @@ SOURCES += tst_qloggingregistry.cpp
OTHER_FILES += qtlogging.ini
TESTDATA += qtlogging.ini
-android:!android-no-sdk: {
+android {
RESOURCES += \
android_testdata.qrc
}
diff --git a/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp b/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp
index 58b923001e..0a74dc64c0 100644
--- a/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp
+++ b/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.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/corelib/io/qnodebug/qnodebug.pro b/tests/auto/corelib/io/qnodebug/qnodebug.pro
index ff8e09b84b..7e35f92474 100644
--- a/tests/auto/corelib/io/qnodebug/qnodebug.pro
+++ b/tests/auto/corelib/io/qnodebug/qnodebug.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qnodebug
QT = core testlib
SOURCES = tst_qnodebug.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp b/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp
index 5ece9190a5..b0acb1c58d 100644
--- a/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp
+++ b/tests/auto/corelib/io/qnodebug/tst_qnodebug.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,8 +64,9 @@ void tst_QNoDebug::noDebugOutput() const
void tst_QNoDebug::streaming() const
{
QDateTime dt(QDate(1,2,3),QTime(4,5,6));
- const QString debugString = dt.toString(QStringLiteral("yyyy-MM-dd HH:mm:ss.zzz t"));
- QTest::ignoreMessage(QtWarningMsg, qPrintable(QString::fromLatin1("QDateTime(%1 Qt::TimeSpec(LocalTime))").arg(debugString)));
+ const QByteArray debugString = dt.toString(QStringLiteral("yyyy-MM-dd HH:mm:ss.zzz t")).toLatin1();
+ const QByteArray message = "QDateTime(" + debugString + " Qt::TimeSpec(LocalTime))";
+ QTest::ignoreMessage(QtWarningMsg, message.constData());
qWarning() << dt;
}
diff --git a/tests/auto/corelib/io/qprocess-noapplication/qprocess-noapplication.pro b/tests/auto/corelib/io/qprocess-noapplication/qprocess-noapplication.pro
index 2f409ebdbc..e46e7e1100 100644
--- a/tests/auto/corelib/io/qprocess-noapplication/qprocess-noapplication.pro
+++ b/tests/auto/corelib/io/qprocess-noapplication/qprocess-noapplication.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
CONFIG -= app_bundle debug_and_release_target
QT = core testlib
SOURCES = tst_qprocessnoapplication.cpp
diff --git a/tests/auto/corelib/io/qprocess-noapplication/tst_qprocessnoapplication.cpp b/tests/auto/corelib/io/qprocess-noapplication/tst_qprocessnoapplication.cpp
index 3cb7455864..b9702a93cf 100644
--- a/tests/auto/corelib/io/qprocess-noapplication/tst_qprocessnoapplication.cpp
+++ b/tests/auto/corelib/io/qprocess-noapplication/tst_qprocessnoapplication.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2012 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore 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/corelib/io/qprocess/fileWriterProcess/fileWriterProcess.pro b/tests/auto/corelib/io/qprocess/fileWriterProcess/fileWriterProcess.pro
index 55e9b05d1a..947dc916f2 100644
--- a/tests/auto/corelib/io/qprocess/fileWriterProcess/fileWriterProcess.pro
+++ b/tests/auto/corelib/io/qprocess/fileWriterProcess/fileWriterProcess.pro
@@ -3,4 +3,3 @@ CONFIG += console
CONFIG -= app_bundle
QT = core
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/fileWriterProcess/main.cpp b/tests/auto/corelib/io/qprocess/fileWriterProcess/main.cpp
index 25cb66f9d2..efeadadb93 100644
--- a/tests/auto/corelib/io/qprocess/fileWriterProcess/main.cpp
+++ b/tests/auto/corelib/io/qprocess/fileWriterProcess/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/corelib/io/qprocess/test/test.pro b/tests/auto/corelib/io/qprocess/test/test.pro
index f77dacc87b..96d105a4b4 100644
--- a/tests/auto/corelib/io/qprocess/test/test.pro
+++ b/tests/auto/corelib/io/qprocess/test/test.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
CONFIG -= app_bundle debug_and_release_target
QT = core-private testlib network
SOURCES = ../tst_qprocess.cpp
@@ -19,4 +18,3 @@ TEST_HELPER_INSTALLS += \
"../testProcessSpacesArgs/one space" \
"../testProcessSpacesArgs/two space s" \
"../test Space In Name/testSpaceInName"
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testDetached/main.cpp b/tests/auto/corelib/io/qprocess/testDetached/main.cpp
index 760306ea17..702cabe873 100644
--- a/tests/auto/corelib/io/qprocess/testDetached/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testDetached/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/corelib/io/qprocess/testDetached/testDetached.pro b/tests/auto/corelib/io/qprocess/testDetached/testDetached.pro
index 961b28ec7d..8d1fcba624 100644
--- a/tests/auto/corelib/io/qprocess/testDetached/testDetached.pro
+++ b/tests/auto/corelib/io/qprocess/testDetached/testDetached.pro
@@ -4,4 +4,3 @@ CONFIG += console
CONFIG -= app_bundle
INSTALLS =
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testExitCodes/main.cpp b/tests/auto/corelib/io/qprocess/testExitCodes/main.cpp
index c3cf9f56c7..f681870609 100644
--- a/tests/auto/corelib/io/qprocess/testExitCodes/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testExitCodes/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/corelib/io/qprocess/testExitCodes/testExitCodes.pro b/tests/auto/corelib/io/qprocess/testExitCodes/testExitCodes.pro
index 049454abe2..b08371804f 100644
--- a/tests/auto/corelib/io/qprocess/testExitCodes/testExitCodes.pro
+++ b/tests/auto/corelib/io/qprocess/testExitCodes/testExitCodes.pro
@@ -3,4 +3,3 @@ CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testForwarding/main.cpp b/tests/auto/corelib/io/qprocess/testForwarding/main.cpp
index a588772460..d76156219e 100644
--- a/tests/auto/corelib/io/qprocess/testForwarding/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testForwarding/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/corelib/io/qprocess/testGuiProcess/main.cpp b/tests/auto/corelib/io/qprocess/testGuiProcess/main.cpp
index 1e3c0416e4..98babfacb8 100644
--- a/tests/auto/corelib/io/qprocess/testGuiProcess/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testGuiProcess/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/corelib/io/qprocess/testGuiProcess/testGuiProcess.pro b/tests/auto/corelib/io/qprocess/testGuiProcess/testGuiProcess.pro
index d3439072bb..8778da7ffe 100644
--- a/tests/auto/corelib/io/qprocess/testGuiProcess/testGuiProcess.pro
+++ b/tests/auto/corelib/io/qprocess/testGuiProcess/testGuiProcess.pro
@@ -3,4 +3,3 @@ QT += widgets
CONFIG += console
CONFIG -= app_bundle
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testProcessCrash/main.cpp b/tests/auto/corelib/io/qprocess/testProcessCrash/main.cpp
index ad2288acb2..262db73d72 100644
--- a/tests/auto/corelib/io/qprocess/testProcessCrash/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessCrash/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/corelib/io/qprocess/testProcessCrash/testProcessCrash.pro b/tests/auto/corelib/io/qprocess/testProcessCrash/testProcessCrash.pro
index f7c57abc37..7ccc976efc 100644
--- a/tests/auto/corelib/io/qprocess/testProcessCrash/testProcessCrash.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessCrash/testProcessCrash.pro
@@ -3,4 +3,3 @@ CONFIG += console
CONFIG -= qt app_bundle
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/main.cpp b/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/main.cpp
index fcad82c8d2..eb780fbc3a 100644
--- a/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/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/corelib/io/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro b/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro
index 56b4642bed..fbb3411d47 100644
--- a/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro
@@ -3,4 +3,3 @@ CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testProcessEOF/main.cpp b/tests/auto/corelib/io/qprocess/testProcessEOF/main.cpp
index 3405adb913..4fb2e29c2d 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEOF/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEOF/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/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro b/tests/auto/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro
index 8f77e46f74..98fe78c8b9 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro
@@ -4,4 +4,3 @@ CONFIG += console
win32:!mingw:!equals(TEMPLATE_PREFIX, "vc"):QMAKE_CXXFLAGS += /GS-
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho/main.cpp b/tests/auto/corelib/io/qprocess/testProcessEcho/main.cpp
index 18c1798af5..19f30de552 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho/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/corelib/io/qprocess/testProcessEcho/testProcessEcho.pro b/tests/auto/corelib/io/qprocess/testProcessEcho/testProcessEcho.pro
index 3940ddbf98..e236e05c7d 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho/testProcessEcho.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho/testProcessEcho.pro
@@ -2,4 +2,3 @@ SOURCES = main.cpp
CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho2/main.cpp b/tests/auto/corelib/io/qprocess/testProcessEcho2/main.cpp
index 75c27b822f..ce4494b048 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho2/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho2/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/corelib/io/qprocess/testProcessEcho2/testProcessEcho2.pro b/tests/auto/corelib/io/qprocess/testProcessEcho2/testProcessEcho2.pro
index 3940ddbf98..e236e05c7d 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho2/testProcessEcho2.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho2/testProcessEcho2.pro
@@ -2,4 +2,3 @@ SOURCES = main.cpp
CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho3/main.cpp b/tests/auto/corelib/io/qprocess/testProcessEcho3/main.cpp
index cf13e55e4f..dfd6e009db 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho3/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho3/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/corelib/io/qprocess/testProcessEcho3/testProcessEcho3.pro b/tests/auto/corelib/io/qprocess/testProcessEcho3/testProcessEcho3.pro
index 3940ddbf98..e236e05c7d 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho3/testProcessEcho3.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho3/testProcessEcho3.pro
@@ -2,4 +2,3 @@ SOURCES = main.cpp
CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp b/tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp
index c82f5cb539..abe957c1ea 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.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/corelib/io/qprocess/testProcessEnvironment/main.cpp b/tests/auto/corelib/io/qprocess/testProcessEnvironment/main.cpp
index 8386c9378c..4de359d83f 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEnvironment/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEnvironment/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/corelib/io/qprocess/testProcessEnvironment/testProcessEnvironment.pro b/tests/auto/corelib/io/qprocess/testProcessEnvironment/testProcessEnvironment.pro
index 962c1122c1..a07ae00605 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEnvironment/testProcessEnvironment.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessEnvironment/testProcessEnvironment.pro
@@ -6,4 +6,3 @@ DESTDIR = ./
mac {
CONFIG -= app_bundle
}
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testProcessHang/main.cpp b/tests/auto/corelib/io/qprocess/testProcessHang/main.cpp
index e06502f738..cb904134f9 100644
--- a/tests/auto/corelib/io/qprocess/testProcessHang/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessHang/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 Intel Corporation.
+** 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/corelib/io/qprocess/testProcessNormal/main.cpp b/tests/auto/corelib/io/qprocess/testProcessNormal/main.cpp
index 9e0ae4be18..4611ed4547 100644
--- a/tests/auto/corelib/io/qprocess/testProcessNormal/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessNormal/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/corelib/io/qprocess/testProcessNormal/testProcessNormal.pro b/tests/auto/corelib/io/qprocess/testProcessNormal/testProcessNormal.pro
index f7bb0985a3..c6db9d1bac 100644
--- a/tests/auto/corelib/io/qprocess/testProcessNormal/testProcessNormal.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessNormal/testProcessNormal.pro
@@ -3,5 +3,4 @@ CONFIG += console
CONFIG -= qt app_bundle
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
QT = core
diff --git a/tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp b/tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp
index 255f8416c0..07409166f2 100644
--- a/tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessOutput/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/corelib/io/qprocess/testProcessOutput/testProcessOutput.pro b/tests/auto/corelib/io/qprocess/testProcessOutput/testProcessOutput.pro
index 2de4534896..95191098bd 100644
--- a/tests/auto/corelib/io/qprocess/testProcessOutput/testProcessOutput.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessOutput/testProcessOutput.pro
@@ -2,5 +2,4 @@ SOURCES = main.cpp
CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
QT = core
diff --git a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp
index 1f67e1c6b9..494d8147a7 100644
--- a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/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/corelib/io/qprocess/testSetNamedPipeHandleState/main.cpp b/tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/main.cpp
index 7b520bfb47..488b03ab57 100644
--- a/tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/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/corelib/io/qprocess/testSetWorkingDirectory/main.cpp b/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/main.cpp
index 2a87027591..37d7deb1ac 100644
--- a/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/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/corelib/io/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro b/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro
index d425d5569e..21a115b536 100644
--- a/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro
+++ b/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro
@@ -2,5 +2,4 @@ SOURCES = main.cpp
CONFIG += console
CONFIG -= app_bundle
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
QT = core
diff --git a/tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp b/tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp
index 7c4f58d37c..ed0f16ac17 100644
--- a/tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp
+++ b/tests/auto/corelib/io/qprocess/testSoftExit/main_unix.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/corelib/io/qprocess/testSoftExit/main_win.cpp b/tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp
index 18b38dd5de..898029483f 100644
--- a/tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp
+++ b/tests/auto/corelib/io/qprocess/testSoftExit/main_win.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/corelib/io/qprocess/testSoftExit/testSoftExit.pro b/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro
index b59241851f..d19a631cae 100644
--- a/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro
+++ b/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro
@@ -9,5 +9,4 @@ unix {
CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
QT = core
diff --git a/tests/auto/corelib/io/qprocess/testSpaceInName/main.cpp b/tests/auto/corelib/io/qprocess/testSpaceInName/main.cpp
index c9ac08e860..0e2374de06 100644
--- a/tests/auto/corelib/io/qprocess/testSpaceInName/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testSpaceInName/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/corelib/io/qprocess/testSpaceInName/testSpaceInName.pro b/tests/auto/corelib/io/qprocess/testSpaceInName/testSpaceInName.pro
index b7213ae507..afa4f32a85 100644
--- a/tests/auto/corelib/io/qprocess/testSpaceInName/testSpaceInName.pro
+++ b/tests/auto/corelib/io/qprocess/testSpaceInName/testSpaceInName.pro
@@ -6,5 +6,4 @@ DESTDIR = "../test Space In Name"
mac {
CONFIG -= app_bundle
}
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
QT = core
diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
index 7e1d5487ba..1f0ace0dd3 100644
--- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
+++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
@@ -1,32 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Copyright (C) 2015 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** 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$
**
@@ -128,7 +123,8 @@ private slots:
void spaceArgsTest();
#if defined(Q_OS_WIN)
void nativeArguments();
-#endif
+ void createProcessArgumentsModifier();
+#endif // Q_OS_WIN
void exitCodeTest();
void systemEnvironment();
void lockupsInStartDetached();
@@ -492,9 +488,11 @@ void tst_QProcess::echoTest2()
QCOMPARE(process.error(), QProcess::Timedout);
process.write("Hello");
+ QSignalSpy spy0(&process, &QProcess::channelReadyRead);
QSignalSpy spy1(&process, &QProcess::readyReadStandardOutput);
QSignalSpy spy2(&process, &QProcess::readyReadStandardError);
+ QVERIFY(spy0.isValid());
QVERIFY(spy1.isValid());
QVERIFY(spy2.isValid());
@@ -513,6 +511,7 @@ void tst_QProcess::echoTest2()
break;
}
+ QVERIFY(spy0.count() > 0);
QVERIFY(spy1.count() > 0);
QVERIFY(spy2.count() > 0);
@@ -828,11 +827,11 @@ void tst_QProcess::openModes()
{
QProcess proc;
QVERIFY(!proc.isOpen());
- QVERIFY(proc.openMode() == QProcess::NotOpen);
+ QCOMPARE(proc.openMode(), QProcess::NotOpen);
proc.start("testProcessEcho3/testProcessEcho3");
QVERIFY(proc.waitForStarted(5000));
QVERIFY(proc.isOpen());
- QVERIFY(proc.openMode() == QProcess::ReadWrite);
+ QCOMPARE(proc.openMode(), QProcess::ReadWrite);
QVERIFY(proc.isReadable());
QVERIFY(proc.isWritable());
@@ -841,7 +840,7 @@ void tst_QProcess::openModes()
proc.closeWriteChannel();
QVERIFY(proc.isWritable());
- QVERIFY(proc.openMode() == QProcess::ReadWrite);
+ QCOMPARE(proc.openMode(), QProcess::ReadWrite);
while (proc.bytesAvailable() < 4 && proc.waitForReadyRead(5000))
{ }
@@ -850,12 +849,12 @@ void tst_QProcess::openModes()
proc.closeReadChannel(QProcess::StandardOutput);
- QVERIFY(proc.openMode() == QProcess::ReadWrite);
+ QCOMPARE(proc.openMode(), QProcess::ReadWrite);
QVERIFY(proc.isReadable());
proc.closeReadChannel(QProcess::StandardError);
- QVERIFY(proc.openMode() == QProcess::ReadWrite);
+ QCOMPARE(proc.openMode(), QProcess::ReadWrite);
QVERIFY(proc.isReadable());
proc.close();
@@ -982,6 +981,9 @@ public:
this, &SoftExitProcess::terminateSlot);
break;
case 4:
+ setReadChannelMode(QProcess::MergedChannels);
+ connect(this, SIGNAL(channelReadyRead(int)), this, SLOT(terminateSlot()));
+ break;
default:
connect(this, &QProcess::stateChanged,
this, &SoftExitProcess::terminateSlot);
@@ -1003,8 +1005,8 @@ public:
public slots:
void terminateSlot()
{
- writePendingData(); // In cases 3 and 4 we haven't written the data yet.
- if (killing || (n == 4 && state() != Running)) {
+ writePendingData(); // In cases 3 and 5 we haven't written the data yet.
+ if (killing || (n == 5 && state() != Running)) {
// Don't try to kill the process before it is running - that can
// be hazardous, as the actual child process might not be running
// yet. Also, don't kill it "recursively".
@@ -1047,14 +1049,14 @@ void tst_QProcess::softExitInSlots_data()
QByteArray dataTagPrefix("gui app ");
#ifndef QT_NO_WIDGETS
- for (int i = 0; i < 5; ++i) {
+ for (int i = 0; i < 6; ++i) {
QTest::newRow(dataTagPrefix + QByteArray::number(i))
<< "testGuiProcess/testGuiProcess" << i;
}
#endif
dataTagPrefix = "console app ";
- for (int i = 0; i < 5; ++i) {
+ for (int i = 0; i < 6; ++i) {
QTest::newRow(dataTagPrefix + QByteArray::number(i))
<< "testProcessEcho2/testProcessEcho2" << i;
}
@@ -1434,11 +1436,11 @@ void tst_QProcess::spaceArgsTest()
QCOMPARE(actual, args);
#endif
- if (program.contains(" "))
- program = "\"" + program + "\"";
+ if (program.contains(QLatin1Char(' ')))
+ program = QLatin1Char('"') + program + QLatin1Char('"');
if (!stringArgs.isEmpty())
- program += QString::fromLatin1(" ") + stringArgs;
+ program += QLatin1Char(' ') + stringArgs;
errorMessage.clear();
process.start(program);
@@ -1484,9 +1486,9 @@ void tst_QProcess::nativeArguments()
char buf[256];
fgets(buf, 256, file);
fclose(file);
- QStringList actual = QString::fromLatin1(buf).split("|");
+ QStringList actual = QString::fromLatin1(buf).split(QLatin1Char('|'));
#else
- QStringList actual = QString::fromLatin1(proc.readAll()).split("|");
+ QStringList actual = QString::fromLatin1(proc.readAll()).split(QLatin1Char('|'));
#endif
QVERIFY(!actual.isEmpty());
// not interested in the program name, it might be different.
@@ -1500,7 +1502,26 @@ void tst_QProcess::nativeArguments()
QCOMPARE(actual, expected);
}
-#endif
+void tst_QProcess::createProcessArgumentsModifier()
+{
+ int calls = 0;
+ const QString reversedCommand = "lamroNssecorPtset/lamroNssecorPtset";
+ QProcess process;
+ process.setCreateProcessArgumentsModifier([&calls] (QProcess::CreateProcessArguments *args)
+ {
+ calls++;
+ std::reverse(args->arguments, args->arguments + wcslen(args->arguments) - 1);
+ });
+ process.start(reversedCommand);
+ QVERIFY2(process.waitForStarted(), qUtf8Printable(process.errorString()));
+ QVERIFY(process.waitForFinished());
+ QCOMPARE(calls, 1);
+
+ process.setCreateProcessArgumentsModifier(QProcess::CreateProcessArgumentModifier());
+ QVERIFY(!process.waitForStarted());
+ QCOMPARE(calls, 1);
+}
+#endif // Q_OS_WIN
void tst_QProcess::exitCodeTest()
{
@@ -2268,6 +2289,13 @@ void tst_QProcess::setNonExistentWorkingDirectory()
process.start(QFileInfo("testSetWorkingDirectory/testSetWorkingDirectory").absoluteFilePath());
QVERIFY(!process.waitForFinished());
QCOMPARE(int(process.error()), int(QProcess::FailedToStart));
+
+#ifdef Q_OS_UNIX
+# ifdef QPROCESS_USE_SPAWN
+ QEXPECT_FAIL("", "QProcess cannot detect failure to start when using posix_spawn()", Continue);
+# endif
+ QVERIFY2(process.errorString().startsWith("chdir:"), process.errorString().toLocal8Bit());
+#endif
}
#endif
diff --git a/tests/auto/corelib/io/qprocessenvironment/qprocessenvironment.pro b/tests/auto/corelib/io/qprocessenvironment/qprocessenvironment.pro
index 760fa11b9e..04cef29a64 100644
--- a/tests/auto/corelib/io/qprocessenvironment/qprocessenvironment.pro
+++ b/tests/auto/corelib/io/qprocessenvironment/qprocessenvironment.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qprocessenvironment
QT = core testlib
SOURCES = tst_qprocessenvironment.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp b/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
index 2099101a91..a4a5d5b0c7 100644
--- a/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
+++ b/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.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$
**
@@ -57,25 +52,25 @@ private slots:
void tst_QProcessEnvironment::operator_eq()
{
QProcessEnvironment e1;
- QVERIFY(e1 == e1);
+ QCOMPARE(e1, e1);
e1.clear();
- QVERIFY(e1 == e1);
+ QCOMPARE(e1, e1);
e1 = QProcessEnvironment();
QProcessEnvironment e2;
- QVERIFY(e1 == e2);
+ QCOMPARE(e1, e2);
e1.clear();
- QVERIFY(e1 == e2);
+ QCOMPARE(e1, e2);
e2.clear();
- QVERIFY(e1 == e2);
+ QCOMPARE(e1, e2);
e1.insert("FOO", "bar");
QVERIFY(e1 != e2);
e2.insert("FOO", "bar");
- QVERIFY(e1 == e2);
+ QCOMPARE(e1, e2);
e2.insert("FOO", "baz");
QVERIFY(e1 != e2);
@@ -212,7 +207,7 @@ void tst_QProcessEnvironment::insertEnv()
e3.insert(e3); // mustn't deadlock
- QVERIFY(e3 == e2);
+ QCOMPARE(e3, e2);
}
void tst_QProcessEnvironment::caseSensitivity()
diff --git a/tests/auto/corelib/io/qresourceengine/qresourceengine.pro b/tests/auto/corelib/io/qresourceengine/qresourceengine.pro
index 64f5cb46e0..a39de3c4d5 100644
--- a/tests/auto/corelib/io/qresourceengine/qresourceengine.pro
+++ b/tests/auto/corelib/io/qresourceengine/qresourceengine.pro
@@ -1,4 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qresourceengine
load(resources)
QT = core testlib
@@ -16,8 +16,7 @@ TESTDATA += \
parentdir.txt \
testqrc/*
GENERATED_TESTDATA = $${runtime_resource.target}
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-android:!android-no-sdk {
+android {
RESOURCES += android_testdata.qrc
}
diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
index 4c6a06d224..561ab193c6 100644
--- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
+++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.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,7 +36,7 @@ class tst_QResourceEngine: public QObject
public:
tst_QResourceEngine()
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
: m_runtimeResourceRcc(QFileInfo(QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QStringLiteral("/runtime_resource.rcc")).absoluteFilePath())
#else
: m_runtimeResourceRcc(QFINDTESTDATA("runtime_resource.rcc"))
@@ -68,7 +63,7 @@ private:
void tst_QResourceEngine::initTestCase()
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QString sourcePath(QStringLiteral(":/android_testdata/"));
QString dataPath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
@@ -125,7 +120,7 @@ void tst_QResourceEngine::checkStructure_data()
<< QLatin1String("test")
<< QLatin1String("withoutslashes");
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
rootContents.insert(1, QLatin1String("android_testdata"));
#endif
diff --git a/tests/auto/corelib/io/qsavefile/qsavefile.pro b/tests/auto/corelib/io/qsavefile/qsavefile.pro
index 36db000fa7..dd22d69ce6 100644
--- a/tests/auto/corelib/io/qsavefile/qsavefile.pro
+++ b/tests/auto/corelib/io/qsavefile/qsavefile.pro
@@ -1,4 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qsavefile
QT = core testlib
SOURCES = tst_qsavefile.cpp
diff --git a/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp b/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp
index 6e6dc2df95..9573f3078b 100644
--- a/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp
+++ b/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2012 David Faure <faure@kde.org>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore 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/corelib/io/qsettings/tst_qsettings.cpp b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
index 19155cc3ad..87a801c9dd 100644
--- a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
+++ b/tests/auto/corelib/io/qsettings/tst_qsettings.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$
**
@@ -121,6 +116,7 @@ private slots:
void testEmptyKey();
void testResourceFiles();
void testRegistryShortRootNames();
+ void testRegistry32And64Bit();
void trailingWhitespace();
#ifdef Q_OS_MAC
void fileName();
@@ -276,8 +272,8 @@ void tst_QSettings::initTestCase()
, Qt::CaseInsensitive
#endif
);
- QVERIFY(custom1 == QSettings::CustomFormat1);
- QVERIFY(custom2 == QSettings::CustomFormat2);
+ QCOMPARE(custom1, QSettings::CustomFormat1);
+ QCOMPARE(custom2, QSettings::CustomFormat2);
cleanupTestFiles();
}
@@ -357,30 +353,29 @@ void tst_QSettings::ctor()
QSettings settings8(format, QSettings::SystemScope, "software.org");
// test QSettings::format() while we're at it
- QVERIFY(settings1.format() == format);
- QVERIFY(settings2.format() == format);
- QVERIFY(settings3.format() == format);
- QVERIFY(settings4.format() == format);
+ QCOMPARE(settings1.format(), format);
+ QCOMPARE(settings2.format(), format);
+ QCOMPARE(settings3.format(), format);
+ QCOMPARE(settings4.format(), format);
// test QSettings::scope() while we're at it
- QVERIFY(settings1.scope() == QSettings::UserScope);
- QVERIFY(settings2.scope() == QSettings::UserScope);
- QVERIFY(settings3.scope() == QSettings::SystemScope);
- QVERIFY(settings4.scope() == QSettings::SystemScope);
+ QCOMPARE(settings1.scope(), QSettings::UserScope);
+ QCOMPARE(settings2.scope(), QSettings::UserScope);
+ QCOMPARE(settings3.scope(), QSettings::SystemScope);
+ QCOMPARE(settings4.scope(), QSettings::SystemScope);
// test QSettings::organizationName() while we're at it
- QVERIFY(settings1.organizationName() == "software.org");
- QVERIFY(settings2.organizationName() == "software.org");
- QVERIFY(settings3.organizationName() == "software.org");
- QVERIFY(settings4.organizationName() == "software.org");
+ QCOMPARE(settings1.organizationName(), QLatin1String("software.org"));
+ QCOMPARE(settings2.organizationName(), QLatin1String("software.org"));
+ QCOMPARE(settings3.organizationName(), QLatin1String("software.org"));
+ QCOMPARE(settings4.organizationName(), QLatin1String("software.org"));
// test QSettings::applicationName() while we're at it
QCOMPARE(settings1.applicationName(), QString("KillerAPP"));
QVERIFY(settings2.applicationName().isEmpty());
- QVERIFY(settings3.applicationName() == "KillerAPP");
+ QCOMPARE(settings3.applicationName(), QLatin1String("KillerAPP"));
QVERIFY(settings4.applicationName().isEmpty());
-#if !defined(Q_OS_BLACKBERRY)
/*
Go forwards.
*/
@@ -437,22 +432,6 @@ void tst_QSettings::ctor()
QCOMPARE(settings2.value("key 1").toString(), QString("bilboh"));
QCOMPARE(settings3.value("key 1").toString(), QString("catha"));
QCOMPARE(settings4.value("key 1").toString(), QString("quirko"));
-#else
- /*
- No fallback mechanism and a single scope on Blackberry OS
- */
- settings2.setValue("key 1", QString("whoa"));
- QCOMPARE(settings2.value("key 1").toString(), QString("whoa"));
- QCOMPARE(settings4.value("key 1").toString(), QString("whoa"));
- QVERIFY(!settings1.contains("key 1"));
- QVERIFY(!settings3.contains("key 1"));
-
- settings1.setValue("key 1", QString("blah"));
- QCOMPARE(settings1.value("key 1").toString(), QString("blah"));
- QCOMPARE(settings2.value("key 1").toString(), QString("whoa"));
- QCOMPARE(settings3.value("key 1").toString(), QString("blah"));
- QCOMPARE(settings4.value("key 1").toString(), QString("whoa"));
-#endif
/*
Test the copies again.
@@ -489,17 +468,10 @@ void tst_QSettings::ctor()
QSettings settings3(format, QSettings::SystemScope, "software.org", "KillerAPP");
QSettings settings4(format, QSettings::SystemScope, "software.org");
-#if !defined(Q_OS_BLACKBERRY)
QCOMPARE(settings1.value("key 1").toString(), QString("gurgle"));
QCOMPARE(settings2.value("key 1").toString(), QString("bilboh"));
QCOMPARE(settings3.value("key 1").toString(), QString("catha"));
QCOMPARE(settings4.value("key 1").toString(), QString("quirko"));
-#else
- QCOMPARE(settings1.value("key 1").toString(), QString("blah"));
- QCOMPARE(settings2.value("key 1").toString(), QString("whoa"));
- QCOMPARE(settings3.value("key 1").toString(), QString("blah"));
- QCOMPARE(settings4.value("key 1").toString(), QString("whoa"));
-#endif
/*
Test problem keys.
@@ -553,7 +525,7 @@ void tst_QSettings::ctor()
settings1.endGroup();
// test QSettings::scope() while we're at it
- QVERIFY(settings1.scope() == QSettings::UserScope);
+ QCOMPARE(settings1.scope(), QSettings::UserScope);
// test QSettings::organizationName() while we're at it
QVERIFY(settings1.organizationName().isEmpty());
@@ -628,20 +600,20 @@ void tst_QSettings::ctor()
QCOMPARE(settings2.status(), QSettings::NoError);
// test QSettings::format() while we're at it
- QVERIFY(settings.format() == format);
- QVERIFY(settings2.format() == format);
+ QCOMPARE(settings.format(), format);
+ QCOMPARE(settings2.format(), format);
// test QSettings::scope() while we're at it
- QVERIFY(settings.scope() == QSettings::UserScope);
- QVERIFY(settings2.scope() == QSettings::UserScope);
+ QCOMPARE(settings.scope(), QSettings::UserScope);
+ QCOMPARE(settings2.scope(), QSettings::UserScope);
// test QSettings::organizationName() while we're at it
QVERIFY(settings.organizationName().isEmpty());
- QVERIFY(settings2.organizationName() == "software.org");
+ QCOMPARE(settings2.organizationName(), QLatin1String("software.org"));
// test QSettings::applicationName() while we're at it
QVERIFY(settings.applicationName().isEmpty());
- QVERIFY(settings2.applicationName() == "KillerAPP");
+ QCOMPARE(settings2.applicationName(), QLatin1String("KillerAPP"));
}
}
@@ -1187,16 +1159,16 @@ void tst_QSettings::remove()
{
QSettings settings0(QSettings::UserScope, "software.org", "KillerAPP");
int initialNumKeys = settings0.allKeys().size();
- QCOMPARE(settings0.value("key 1", "123").toString(), QString("123"));
+ QCOMPARE(settings0.value("key 1", "123").toString(), QLatin1String("123"));
settings0.remove("key 1");
- QCOMPARE(settings0.value("key 1", "456").toString(), QString("456"));
+ QCOMPARE(settings0.value("key 1", "456").toString(), QLatin1String("456"));
settings0.setValue("key 1", "bubloo");
- QCOMPARE(settings0.value("key 1").toString(), QString("bubloo"));
+ QCOMPARE(settings0.value("key 1").toString(), QLatin1String("bubloo"));
settings0.remove("key 2");
- QCOMPARE(settings0.value("key 1").toString(), QString("bubloo"));
+ QCOMPARE(settings0.value("key 1").toString(), QLatin1String("bubloo"));
settings0.remove("key 1");
- QCOMPARE(settings0.value("key 1", "789").toString(), QString("789"));
+ QCOMPARE(settings0.value("key 1", "789").toString(), QLatin1String("789"));
/*
Make sure that removing a key removes all the subkeys.
@@ -1324,7 +1296,6 @@ void tst_QSettings::remove()
QCOMPARE(settings1.value("key 1").toString(), QString("gurgle"));
QCOMPARE(settings2.value("key 1").toString(), QString("whoa"));
-#if !defined(Q_OS_BLACKBERRY)
if (m_canWriteNativeSystemSettings) {
QCOMPARE(settings3->value("key 1").toString(), QString("blah"));
QCOMPARE(settings4->value("key 1").toString(), QString("doodah"));
@@ -1357,14 +1328,6 @@ void tst_QSettings::remove()
QVERIFY(!settings3->contains("key 1"));
QVERIFY(!settings4->contains("key 1"));
}
-#else
- settings1.remove("key 1");
- QCOMPARE(settings2.value("key 1").toString(), QString("whoa"));
-
- settings2.remove("key 1");
- QVERIFY(!settings1.contains("key 1"));
- QVERIFY(!settings2.contains("key 1"));
-#endif
/*
Get ready for the next part of the test.
@@ -1502,7 +1465,7 @@ void tst_QSettings::contains()
}
settings1.endGroup();
- QVERIFY(settings1.group() == "alpha");
+ QCOMPARE(settings1.group(), QLatin1String("alpha"));
keys = settings1.allKeys();
QCOMPARE(keys.size(), expectedResult.size() + 3);
for (i = 0; i < keys.size(); ++i) {
@@ -1667,7 +1630,6 @@ void tst_QSettings::setFallbacksEnabled()
main associated file when fallbacks are turned off.
*/
-#if !defined(Q_OS_BLACKBERRY)
QCOMPARE(settings1.value("key 1").toString(), QString("alpha"));
QCOMPARE(settings2.value("key 1").toString(), QString("beta"));
QCOMPARE(settings3.value("key 1").toString(), QString("gamma"));
@@ -1697,22 +1659,6 @@ void tst_QSettings::setFallbacksEnabled()
QCOMPARE(settings1.value("key 5").toString(), QString(""));
QVERIFY(settings1.contains("key 1"));
QVERIFY(!settings1.contains("key 5"));
-#else
- QCOMPARE(settings1.value("key 1").toString(), QString("gamma"));
- QCOMPARE(settings2.value("key 1").toString(), QString("delta"));
- QCOMPARE(settings3.value("key 1").toString(), QString("gamma"));
- QCOMPARE(settings4.value("key 1").toString(), QString("delta"));
-
- QCOMPARE(settings1.value("key 2").toString(), QString("gamma"));
- QCOMPARE(settings2.value("key 2").toString(), QString("beta"));
- QCOMPARE(settings3.value("key 2").toString(), QString("gamma"));
- QCOMPARE(settings4.value("key 2").toString(), QString("beta"));
-
- QCOMPARE(settings1.value("key 3").toString(), QString("gamma"));
- QCOMPARE(settings2.value("key 3").toString(), QString("delta"));
- QCOMPARE(settings3.value("key 3").toString(), QString("gamma"));
- QCOMPARE(settings4.value("key 3").toString(), QString("delta"));
-#endif
}
void tst_QSettings::testChildKeysAndGroups_data()
@@ -1794,26 +1740,26 @@ void tst_QSettings::testUpdateRequestEvent()
QSettings settings1("foo", QSettings::IniFormat);
QVERIFY(!QFile::exists("foo"));
- QVERIFY(QFileInfo("foo").size() == 0);
+ QCOMPARE(QFileInfo("foo").size(), qint64(0));
settings1.setValue("key1", 1);
- QVERIFY(QFileInfo("foo").size() == 0);
+ QCOMPARE(QFileInfo("foo").size(), qint64(0));
QTRY_VERIFY(QFileInfo("foo").size() > 0);
settings1.remove("key1");
QVERIFY(QFileInfo("foo").size() > 0);
- QTRY_VERIFY(QFileInfo("foo").size() == 0);
+ QTRY_COMPARE(QFileInfo("foo").size(), qint64(0));
settings1.setValue("key2", 2);
- QVERIFY(QFileInfo("foo").size() == 0);
+ QCOMPARE(QFileInfo("foo").size(), qint64(0));
QTRY_VERIFY(QFileInfo("foo").size() > 0);
settings1.clear();
QVERIFY(QFileInfo("foo").size() > 0);
- QTRY_VERIFY(QFileInfo("foo").size() == 0);
+ QTRY_COMPARE(QFileInfo("foo").size(), qint64(0));
#ifdef Q_OS_WINRT
QDir::setCurrent(oldCur);
@@ -1960,7 +1906,7 @@ void tst_QSettings::testEmptyData()
settings.setValue("vList", vList);
settings.setValue("vList2", vList2);
settings.setValue("vList3", vList3);
- QVERIFY(settings.status() == QSettings::NoError);
+ QCOMPARE(settings.status(), QSettings::NoError);
}
{
QSettings settings(filename, QSettings::IniFormat);
@@ -1973,7 +1919,7 @@ void tst_QSettings::testEmptyData()
QCOMPARE(settings.value("vList").toList(), vList);
QCOMPARE(settings.value("vList2").toList(), vList2);
QCOMPARE(settings.value("vList3").toList(), vList3);
- QVERIFY(settings.status() == QSettings::NoError);
+ QCOMPARE(settings.status(), QSettings::NoError);
}
{
@@ -1987,7 +1933,7 @@ void tst_QSettings::testEmptyData()
settings.setValue("vList", vList);
settings.setValue("vList2", vList2);
settings.setValue("vList3", vList3);
- QVERIFY(settings.status() == QSettings::NoError);
+ QCOMPARE(settings.status(), QSettings::NoError);
}
{
QSettings settings("QtProject", "tst_qsettings");
@@ -2000,7 +1946,7 @@ void tst_QSettings::testEmptyData()
QCOMPARE(settings.value("vList").toList(), vList);
QCOMPARE(settings.value("vList2").toList(), vList2);
QCOMPARE(settings.value("vList3").toList(), vList3);
- QVERIFY(settings.status() == QSettings::NoError);
+ QCOMPARE(settings.status(), QSettings::NoError);
}
QFile::remove(filename);
}
@@ -2018,17 +1964,17 @@ void tst_QSettings::testEmptyKey()
void tst_QSettings::testResourceFiles()
{
QSettings settings(":/resourcefile.ini", QSettings::IniFormat);
- QVERIFY(settings.status() == QSettings::NoError);
+ QCOMPARE(settings.status(), QSettings::NoError);
QVERIFY(!settings.isWritable());
QCOMPARE(settings.value("Field 1/Bottom").toInt(), 89);
settings.setValue("Field 1/Bottom", 90);
// the next two lines check the statu quo; another behavior would be possible
- QVERIFY(settings.status() == QSettings::NoError);
+ QCOMPARE(settings.status(), QSettings::NoError);
QCOMPARE(settings.value("Field 1/Bottom").toInt(), 90);
settings.sync();
- QVERIFY(settings.status() == QSettings::AccessError);
+ QCOMPARE(settings.status(), QSettings::AccessError);
QCOMPARE(settings.value("Field 1/Bottom").toInt(), 90);
}
@@ -2044,6 +1990,52 @@ void tst_QSettings::testRegistryShortRootNames()
#endif
}
+void tst_QSettings::testRegistry32And64Bit()
+{
+#if !defined (Q_OS_WIN) || defined(Q_OS_WINRT)
+ QSKIP("This test is specific to the Windows registry.", SkipAll);
+#else
+
+ const QString key("HKEY_LOCAL_MACHINE\\Software");
+ const QString keyWow("HKEY_LOCAL_MACHINE\\Software\\Wow6432Node");
+
+#ifndef Q_OS_WIN64
+ // This branch is taken at compile time if targeting 32-bit; it does not
+ // necessarily mean that the OS running the test is 32-bit (it could be
+ // e.g. 64-bit).
+ QCOMPARE(QSettings(key, QSettings::NativeFormat).childGroups(),
+ QSettings(key, QSettings::Registry32Format).childGroups());
+
+ // Detect whether we are running under 64-bit Windows.
+ typedef BOOL (WINAPI *IsWow64ProcessPtr)(HANDLE hProcess, PBOOL Wow64Process);
+ IsWow64ProcessPtr IsWow64Process = (IsWow64ProcessPtr)QLibrary::resolve(
+ "kernel32.dll", "IsWow64Process");
+
+ if (IsWow64Process) {
+ BOOL IsWow64 = FALSE;
+ if (IsWow64Process(GetCurrentProcess(), &IsWow64) && IsWow64) {
+ // The 64-bit registry's "Wow6432Node" key should match the 32-bit registry.
+ // If we are not on 32-bit Windows, these should never be the same,
+ // because the 64-bit registry has a "Wow6432Node" key.
+ QCOMPARE(QSettings(keyWow, QSettings::Registry64Format).childGroups(),
+ QSettings(key, QSettings::Registry32Format).childGroups());
+ }
+ }
+#else
+ // This branch is taken at compile time if targeting 64-bit; it does not
+ // necessarily mean that the OS running the test is 64-bit (it could be
+ // e.g. 128-bit).
+ QCOMPARE(QSettings(key, QSettings::NativeFormat).childGroups(),
+ QSettings(key, QSettings::Registry64Format).childGroups());
+
+ // The 64-bit registry's "Wow6432Node" key should match the 32-bit registry.
+ QCOMPARE(QSettings(keyWow, QSettings::Registry64Format).childGroups(),
+ QSettings(key, QSettings::Registry32Format).childGroups());
+#endif
+
+#endif
+}
+
void tst_QSettings::trailingWhitespace()
{
{
@@ -2469,7 +2461,6 @@ void tst_QSettings::testArrays()
}
settings2.endArray();
-#if !defined (Q_OS_BLACKBERRY)
size1 = settings1.beginReadArray("strings");
QCOMPARE(size1, 3);
@@ -2480,7 +2471,6 @@ void tst_QSettings::testArrays()
QCOMPARE(str, fiveStrings.at(i));
}
settings1.endArray();
-#endif
}
#ifdef QT_BUILD_INTERNAL
@@ -2539,7 +2529,7 @@ QString escapeWeirdChars(const QString &s)
QChar c = s.at(i);
if (c.unicode() < ' ' || c.unicode() > '~'
|| (escapeNextDigit && c.unicode() >= '0' && c.unicode() <= 'f')) {
- result += QString("\\x%1").arg(c.unicode(), 0, 16);
+ result += QLatin1String("\\x") + QString::number(c.unicode(), 16);
escapeNextDigit = true;
} else {
result += c;
@@ -3133,7 +3123,7 @@ void tst_QSettings::registerFormat()
// so we can test error handling
QSettings::Format custom3 = QSettings::registerFormat("custom3", readCustom3File, writeCustom3File);
- QVERIFY(custom3 == QSettings::CustomFormat3);
+ QCOMPARE(custom3, QSettings::CustomFormat3);
QDir dir(settingsPath());
QVERIFY(dir.mkpath("someDir"));
@@ -3203,7 +3193,6 @@ void tst_QSettings::setPath()
path checks that it has no bad side effects.
*/
for (int i = 0; i < 2; ++i) {
-#if !defined(Q_OS_BLACKBERRY)
#if !defined(Q_OS_WIN) && !defined(Q_OS_MAC)
TEST_PATH(i == 0, "conf", NativeFormat, UserScope, "alpha")
TEST_PATH(i == 0, "conf", NativeFormat, SystemScope, "beta")
@@ -3214,34 +3203,28 @@ void tst_QSettings::setPath()
TEST_PATH(i == 0, "custom1", CustomFormat1, SystemScope, "zeta")
TEST_PATH(i == 0, "custom2", CustomFormat2, UserScope, "eta")
TEST_PATH(i == 0, "custom2", CustomFormat2, SystemScope, "iota")
-#else // Q_OS_BLACKBERRY: no system scope
- TEST_PATH(i == 0, "conf", NativeFormat, UserScope, "alpha")
- TEST_PATH(i == 0, "ini", IniFormat, UserScope, "gamma")
- TEST_PATH(i == 0, "custom1", CustomFormat1, UserScope, "epsilon")
- TEST_PATH(i == 0, "custom2", CustomFormat2, UserScope, "eta")
-#endif
}
}
void tst_QSettings::setDefaultFormat()
{
- QVERIFY(QSettings::defaultFormat() == QSettings::NativeFormat);
+ QCOMPARE(QSettings::defaultFormat(), QSettings::NativeFormat);
QSettings::setDefaultFormat(QSettings::CustomFormat1);
QSettings settings1("org", "app");
QSettings settings2(QSettings::SystemScope, "org", "app");
QSettings settings3;
- QVERIFY(settings1.format() == QSettings::NativeFormat);
- QVERIFY(settings2.format() == QSettings::NativeFormat);
- QVERIFY(settings3.format() == QSettings::CustomFormat1);
+ QCOMPARE(settings1.format(), QSettings::NativeFormat);
+ QCOMPARE(settings2.format(), QSettings::NativeFormat);
+ QCOMPARE(settings3.format(), QSettings::CustomFormat1);
QSettings::setDefaultFormat(QSettings::NativeFormat);
- QVERIFY(QSettings::defaultFormat() == QSettings::NativeFormat);
+ QCOMPARE(QSettings::defaultFormat(), QSettings::NativeFormat);
- QVERIFY(settings1.format() == QSettings::NativeFormat);
- QVERIFY(settings2.format() == QSettings::NativeFormat);
- QVERIFY(settings3.format() == QSettings::CustomFormat1);
+ QCOMPARE(settings1.format(), QSettings::NativeFormat);
+ QCOMPARE(settings2.format(), QSettings::NativeFormat);
+ QCOMPARE(settings3.format(), QSettings::CustomFormat1);
}
void tst_QSettings::dontCreateNeedlessPaths()
@@ -3302,7 +3285,7 @@ void tst_QSettings::dontReorderIniKeysNeedlessly()
outFile.close();
QSettings settings(outFileName, QSettings::IniFormat);
- QVERIFY(settings.status() == QSettings::NoError);
+ QCOMPARE(settings.status(), QSettings::NoError);
QVERIFY(settings.isWritable());
settings.setValue("Field 1/Bottom", 90);
diff --git a/tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro b/tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro
index 9fb6f9b31f..c72d9e4fad 100644
--- a/tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro
+++ b/tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro
@@ -3,4 +3,3 @@ TARGET = tst_qstandardpaths
QT = core testlib
SOURCES = tst_qstandardpaths.cpp
TESTDATA += tst_qstandardpaths.cpp qstandardpaths.pro
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
index e1c277717d..5b18ab9d68 100644
--- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
+++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.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,7 +39,7 @@
#include <sys/types.h>
#endif
-#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_BLACKBERRY) && !defined(Q_OS_ANDROID)
+#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_ANDROID)
#define Q_XDG_PLATFORM
#endif
@@ -296,9 +291,9 @@ void tst_qstandardpaths::testDataLocation()
{
// On all platforms, DataLocation should be GenericDataLocation / organization name / app name
// This allows one app to access the data of another app.
- // Blackberry OS, Android and WinRT are an exception to this case, owing to the fact that
+ // Android and WinRT are an exception to this case, owing to the fact that
// applications are sandboxed.
-#if !defined(Q_OS_BLACKBERRY) && !defined(Q_OS_ANDROID) && !defined(Q_OS_WINRT)
+#if !defined(Q_OS_ANDROID) && !defined(Q_OS_WINRT)
const QString base = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation), base + "/tst_qstandardpaths");
QCoreApplication::instance()->setOrganizationName("Qt");
@@ -327,7 +322,7 @@ void tst_qstandardpaths::testAppConfigLocation()
{
// On all platforms where applications are not sandboxed,
// AppConfigLocation should be GenericConfigLocation / organization name / app name
-#if !defined(Q_OS_BLACKBERRY) && !defined(Q_OS_ANDROID) && !defined(Q_OS_WINRT)
+#if !defined(Q_OS_ANDROID) && !defined(Q_OS_WINRT)
const QString base = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation), base + "/tst_qstandardpaths");
QCoreApplication::setOrganizationName("Qt");
diff --git a/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp b/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp
index efbcdc78e0..802bbe9963 100644
--- a/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp
+++ b/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2014 Ivan Komissarov <ABBAPOH@gmail.com>
-** 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$
**
@@ -61,9 +56,9 @@ void tst_QStorageInfo::defaultValues()
QVERIFY(!storage.isRoot());
QVERIFY(storage.device().isEmpty());
QVERIFY(storage.fileSystemType().isEmpty());
- QVERIFY(storage.bytesTotal() == -1);
- QVERIFY(storage.bytesFree() == -1);
- QVERIFY(storage.bytesAvailable() == -1);
+ QCOMPARE(storage.bytesTotal(), -1);
+ QCOMPARE(storage.bytesFree(), -1);
+ QCOMPARE(storage.bytesAvailable(), -1);
}
void tst_QStorageInfo::operatorEqual()
@@ -71,19 +66,19 @@ void tst_QStorageInfo::operatorEqual()
{
QStorageInfo storage1 = QStorageInfo::root();
QStorageInfo storage2(QDir::rootPath());
- QVERIFY(storage1 == storage2);
+ QCOMPARE(storage1, storage2);
}
{
QStorageInfo storage1(QCoreApplication::applicationDirPath());
QStorageInfo storage2(QCoreApplication::applicationFilePath());
- QVERIFY(storage1 == storage2);
+ QCOMPARE(storage1, storage2);
}
{
QStorageInfo storage1;
QStorageInfo storage2;
- QVERIFY(storage1 == storage2);
+ QCOMPARE(storage1, storage2);
}
}
@@ -184,15 +179,15 @@ void tst_QStorageInfo::caching()
qint64 free = storage1.bytesFree();
QStorageInfo storage2(storage1);
- QVERIFY(free == storage2.bytesFree());
+ QCOMPARE(free, storage2.bytesFree());
file.write(QByteArray(1024*1024, '\0'));
file.flush();
- QVERIFY(free == storage1.bytesFree());
- QVERIFY(free == storage2.bytesFree());
+ QCOMPARE(free, storage1.bytesFree());
+ QCOMPARE(free, storage2.bytesFree());
storage2.refresh();
- QVERIFY(storage1 == storage2);
+ QCOMPARE(storage1, storage2);
QVERIFY(free != storage2.bytesFree());
}
#endif
diff --git a/tests/auto/corelib/io/qtemporarydir/qtemporarydir.pro b/tests/auto/corelib/io/qtemporarydir/qtemporarydir.pro
index 0908878514..4a69971f78 100644
--- a/tests/auto/corelib/io/qtemporarydir/qtemporarydir.pro
+++ b/tests/auto/corelib/io/qtemporarydir/qtemporarydir.pro
@@ -3,4 +3,3 @@ TARGET = tst_qtemporarydir
SOURCES += tst_qtemporarydir.cpp
QT = core testlib
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
index 6e03d8360e..72a57c5905 100644
--- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
+++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.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$
**
@@ -235,7 +230,7 @@ void tst_QTemporaryDir::nonWritableCurrentDir()
{
#ifdef Q_OS_UNIX
-# if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+# if defined(Q_OS_ANDROID)
const char nonWritableDir[] = "/data";
# else
const char nonWritableDir[] = "/home";
diff --git a/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro b/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro
index c16a729ad0..a89e5c66ff 100644
--- a/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro
+++ b/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro
@@ -1,12 +1,10 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qtemporaryfile
QT = core testlib
SOURCES = tst_qtemporaryfile.cpp
TESTDATA += tst_qtemporaryfile.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
RESOURCES += qtemporaryfile.qrc
-android:!android-no-sdk {
+android {
RESOURCES += android_testdata.qrc
}
diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
index 6e461cae17..9645ca9ba2 100644
--- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
+++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.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$
**
@@ -98,7 +93,7 @@ void tst_QTemporaryFile::initTestCase()
QVERIFY(QDir("test-XXXXXX").exists() || QDir().mkdir("test-XXXXXX"));
QCoreApplication::setApplicationName("tst_qtemporaryfile");
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QString sourceDir(":/android_testdata/");
QDirIterator it(sourceDir, QDirIterator::Subdirectories);
while (it.hasNext()) {
@@ -295,7 +290,7 @@ void tst_QTemporaryFile::nonWritableCurrentDir()
ChdirOnReturn cor(QDir::currentPath());
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QDir::setCurrent("/data");
#else
QDir::setCurrent("/home");
@@ -471,7 +466,7 @@ void tst_QTemporaryFile::renameFdLeak()
{
#ifdef Q_OS_UNIX
-# if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+# if defined(Q_OS_ANDROID)
ChdirOnReturn cor(QDir::currentPath());
QDir::setCurrent(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
# endif
@@ -545,15 +540,16 @@ void tst_QTemporaryFile::keepOpenMode()
{
QTemporaryFile file;
QVERIFY(file.open());
+ QCOMPARE(file.openMode(), QIODevice::ReadWrite);
QCOMPARE(file.write(data), (qint64)data.size());
QVERIFY(file.rename("temporary-file.txt"));
QVERIFY(((QFile &)file).open(QIODevice::ReadOnly));
- QVERIFY(QIODevice::ReadOnly == file.openMode());
+ QCOMPARE(file.openMode(), QIODevice::ReadOnly);
QCOMPARE(file.readAll(), data);
QVERIFY(((QFile &)file).open(QIODevice::WriteOnly));
- QVERIFY(QIODevice::WriteOnly == file.openMode());
+ QCOMPARE(file.openMode(), QIODevice::WriteOnly);
}
}
@@ -679,7 +675,7 @@ void tst_QTemporaryFile::createNativeFile_data()
QTest::addColumn<bool>("valid");
QTest::addColumn<QByteArray>("content");
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
const QString nativeFilePath = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QStringLiteral("/resources/test.txt");
#else
const QString nativeFilePath = QFINDTESTDATA("resources/test.txt");
@@ -707,7 +703,7 @@ void tst_QTemporaryFile::createNativeFile()
f.seek(currentPos);
}
QTemporaryFile *tempFile = QTemporaryFile::createNativeFile(f);
- QVERIFY(valid == (bool)tempFile);
+ QCOMPARE(valid, (bool)tempFile);
if (currentPos != -1)
QCOMPARE(currentPos, f.pos());
if (valid) {
diff --git a/tests/auto/corelib/io/qtextstream/readAllStdinProcess/main.cpp b/tests/auto/corelib/io/qtextstream/readAllStdinProcess/main.cpp
index 0f27b15229..08d2bf8183 100644
--- a/tests/auto/corelib/io/qtextstream/readAllStdinProcess/main.cpp
+++ b/tests/auto/corelib/io/qtextstream/readAllStdinProcess/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/corelib/io/qtextstream/readAllStdinProcess/readAllStdinProcess.pro b/tests/auto/corelib/io/qtextstream/readAllStdinProcess/readAllStdinProcess.pro
index 578fa86f5c..4a4c091dcb 100644
--- a/tests/auto/corelib/io/qtextstream/readAllStdinProcess/readAllStdinProcess.pro
+++ b/tests/auto/corelib/io/qtextstream/readAllStdinProcess/readAllStdinProcess.pro
@@ -7,4 +7,3 @@ DESTDIR = ./
# This app is testdata for tst_qtextstream
target.path = $$[QT_INSTALL_TESTS]/tst_qtextstream/$$TARGET
INSTALLS += target
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qtextstream/readLineStdinProcess/main.cpp b/tests/auto/corelib/io/qtextstream/readLineStdinProcess/main.cpp
index 2867302999..41ea5e56f0 100644
--- a/tests/auto/corelib/io/qtextstream/readLineStdinProcess/main.cpp
+++ b/tests/auto/corelib/io/qtextstream/readLineStdinProcess/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/corelib/io/qtextstream/readLineStdinProcess/readLineStdinProcess.pro b/tests/auto/corelib/io/qtextstream/readLineStdinProcess/readLineStdinProcess.pro
index 578fa86f5c..4a4c091dcb 100644
--- a/tests/auto/corelib/io/qtextstream/readLineStdinProcess/readLineStdinProcess.pro
+++ b/tests/auto/corelib/io/qtextstream/readLineStdinProcess/readLineStdinProcess.pro
@@ -7,4 +7,3 @@ DESTDIR = ./
# This app is testdata for tst_qtextstream
target.path = $$[QT_INSTALL_TESTS]/tst_qtextstream/$$TARGET
INSTALLS += target
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp b/tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp
index f3b149b6b0..a3c1fc525b 100644
--- a/tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp
+++ b/tests/auto/corelib/io/qtextstream/stdinProcess/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/corelib/io/qtextstream/stdinProcess/stdinProcess.pro b/tests/auto/corelib/io/qtextstream/stdinProcess/stdinProcess.pro
index 578fa86f5c..4a4c091dcb 100644
--- a/tests/auto/corelib/io/qtextstream/stdinProcess/stdinProcess.pro
+++ b/tests/auto/corelib/io/qtextstream/stdinProcess/stdinProcess.pro
@@ -7,4 +7,3 @@ DESTDIR = ./
# This app is testdata for tst_qtextstream
target.path = $$[QT_INSTALL_TESTS]/tst_qtextstream/$$TARGET
INSTALLS += target
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qtextstream/test/test.pro b/tests/auto/corelib/io/qtextstream/test/test.pro
index 073aecdfba..50335524d3 100644
--- a/tests/auto/corelib/io/qtextstream/test/test.pro
+++ b/tests/auto/corelib/io/qtextstream/test/test.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = ../tst_qtextstream
QT = core network testlib
SOURCES = ../tst_qtextstream.cpp
@@ -20,7 +19,6 @@ TESTDATA += \
../qtextstream.qrc \
../tst_qtextstream.cpp \
../resources
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
builtin_testdata {
DEFINES += BUILTIN_TESTDATA
diff --git a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
index 13be58a1f1..104873b85e 100644
--- a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
+++ b/tests/auto/corelib/io/qtextstream/tst_qtextstream.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$
**
@@ -1635,18 +1630,18 @@ void tst_QTextStream::forcePoint()
{
QString str;
QTextStream stream(&str);
- stream << fixed << forcepoint << 1.0 << " " << 1 << " " << 0 << " " << -1.0 << " " << -1;
+ stream << fixed << forcepoint << 1.0 << ' ' << 1 << ' ' << 0 << ' ' << -1.0 << ' ' << -1;
QCOMPARE(str, QString("1.000000 1 0 -1.000000 -1"));
str.clear();
stream.seek(0);
- stream << scientific << forcepoint << 1.0 << " " << 1 << " " << 0 << " " << -1.0 << " " << -1;
+ stream << scientific << forcepoint << 1.0 << ' ' << 1 << ' ' << 0 << ' ' << -1.0 << ' ' << -1;
QCOMPARE(str, QString("1.000000e+00 1 0 -1.000000e+00 -1"));
str.clear();
stream.seek(0);
stream.setRealNumberNotation(QTextStream::SmartNotation);
- stream << forcepoint << 1.0 << " " << 1 << " " << 0 << " " << -1.0 << " " << -1;
+ stream << forcepoint << 1.0 << ' ' << 1 << ' ' << 0 << ' ' << -1.0 << ' ' << -1;
QCOMPARE(str, QString("1.00000 1 0 -1.00000 -1"));
}
@@ -1656,7 +1651,7 @@ void tst_QTextStream::forceSign()
{
QString str;
QTextStream stream(&str);
- stream << forcesign << 1.2 << " " << -1.2 << " " << 0;
+ stream << forcesign << 1.2 << ' ' << -1.2 << ' ' << 0;
QCOMPARE(str, QString("+1.2 -1.2 +0"));
}
@@ -1793,9 +1788,9 @@ void tst_QTextStream::nanInf()
QString s;
QTextStream out(&s);
- out << qInf() << " " << -qInf() << " " << qQNaN()
- << uppercasedigits << " "
- << qInf() << " " << -qInf() << " " << qQNaN()
+ out << qInf() << ' ' << -qInf() << ' ' << qQNaN()
+ << uppercasedigits << ' '
+ << qInf() << ' ' << -qInf() << ' ' << qQNaN()
<< flush;
QCOMPARE(s, QString("inf -inf nan INF -INF NAN"));
@@ -2601,7 +2596,7 @@ void tst_QTextStream::useCase1()
stream.setCodec(QTextCodec::codecForName("ISO-8859-1"));
stream.setAutoDetectUnicode(true);
- stream << 4.15 << " " << QByteArray("abc") << " " << QString("ole");
+ stream << 4.15 << ' ' << QByteArray("abc") << ' ' << QString("ole");
}
file.seek(0);
@@ -2637,7 +2632,7 @@ void tst_QTextStream::useCase2()
stream.setCodec(QTextCodec::codecForName("ISO-8859-1"));
stream.setAutoDetectUnicode(true);
- stream << 4.15 << " " << QByteArray("abc") << " " << QString("ole");
+ stream << 4.15 << ' ' << QByteArray("abc") << ' ' << QString("ole");
file.close();
QVERIFY(file.open(QFile::ReadWrite));
diff --git a/tests/auto/corelib/io/qurl/idna-test.c b/tests/auto/corelib/io/qurl/idna-test.c
index 4e16e4f38e..035d3e1c89 100644
--- a/tests/auto/corelib/io/qurl/idna-test.c
+++ b/tests/auto/corelib/io/qurl/idna-test.c
@@ -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 documentation 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/corelib/io/qurl/qurl.pro b/tests/auto/corelib/io/qurl/qurl.pro
index f65a9c688c..c046c75522 100644
--- a/tests/auto/corelib/io/qurl/qurl.pro
+++ b/tests/auto/corelib/io/qurl/qurl.pro
@@ -1,7 +1,6 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qurl
QT = core testlib concurrent
SOURCES = tst_qurl.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
mac: OBJECTIVE_SOURCES += tst_qurl_mac.mm
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp
index ef210d4a64..73672f3572 100644
--- a/tests/auto/corelib/io/qurl/tst_qurl.cpp
+++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp
@@ -1,32 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Copyright (C) 2015 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** 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$
**
@@ -232,7 +227,7 @@ void tst_QUrl::constructing()
QVERIFY(url.isEmpty());
QCOMPARE(url.port(), -1);
QCOMPARE(url.toString(), QString());
- QVERIFY(url == url);
+ QCOMPARE(url, url);
QVERIFY(!(url < url));
QUrl fromLocal = QUrl::fromLocalFile(QString());
@@ -260,7 +255,7 @@ void tst_QUrl::hashInPath()
QCOMPARE(withHashInPath.toDisplayString(QUrl::PreferLocalFile), QString("hi%23mum.txt"));
QUrl fromHashInPath = QUrl::fromEncoded(withHashInPath.toEncoded());
- QVERIFY(withHashInPath == fromHashInPath);
+ QCOMPARE(withHashInPath, fromHashInPath);
const QUrl localWithHash = QUrl::fromLocalFile("/hi#mum.txt");
QCOMPARE(localWithHash.path(), QString::fromLatin1("/hi#mum.txt"));
@@ -290,7 +285,7 @@ void tst_QUrl::assignment()
QUrl copy;
copy = url;
- QVERIFY(url == copy);
+ QCOMPARE(url, copy);
}
void tst_QUrl::comparison()
@@ -301,7 +296,7 @@ void tst_QUrl::comparison()
QUrl url2("http://qt-project.org/");
QVERIFY(url2.isValid());
- QVERIFY(url1 == url2);
+ QCOMPARE(url1, url2);
QVERIFY(!(url1 < url2));
QVERIFY(!(url2 < url1));
QVERIFY(url1.matches(url2, QUrl::None));
@@ -335,7 +330,7 @@ void tst_QUrl::comparison()
url5.setEncodedQuery("a=%2a");
QUrl url6;
url6.setEncodedQuery("a=%2A");
- QVERIFY(url5 == url6);
+ QCOMPARE(url5, url6);
QUrl url7;
url7.setEncodedQuery("a=C");
@@ -372,7 +367,7 @@ void tst_QUrl::comparison()
QUrl hostUrl1("file:/foo");
QUrl hostUrl2("file:///foo");
- QVERIFY(hostUrl1 == hostUrl2);
+ QCOMPARE(hostUrl1, hostUrl2);
QVERIFY(hostUrl1.matches(hostUrl2, QUrl::None));
QVERIFY(hostUrl1.matches(hostUrl2, QUrl::RemoveAuthority));
@@ -466,7 +461,7 @@ void tst_QUrl::copying()
QUrl copy(url);
- QVERIFY(url == copy);
+ QCOMPARE(url, copy);
}
void tst_QUrl::setUrl()
@@ -1689,9 +1684,9 @@ void tst_QUrl::percentEncoding()
QFETCH(QByteArray, encoded);
QCOMPARE(QUrl(original).toEncoded().constData(), encoded.constData());
- QVERIFY(QUrl::fromEncoded(QUrl(original).toEncoded()) == QUrl(original));
+ QCOMPARE(QUrl::fromEncoded(QUrl(original).toEncoded()), QUrl(original));
QCOMPARE(QUrl::fromEncoded(QUrl(original).toEncoded()).toString(), original);
- QVERIFY(QUrl::fromEncoded(encoded) == QUrl(original));
+ QCOMPARE(QUrl::fromEncoded(encoded), QUrl(original));
QCOMPARE(QUrl(QUrl(original).toString()).toString(), original);
}
@@ -2952,7 +2947,8 @@ void tst_QUrl::fromUserInput_data()
int c = 0;
while (it.hasNext()) {
it.next();
- QTest::newRow(QString("file-%1").arg(c++).toLatin1()) << it.filePath() << QUrl::fromLocalFile(it.filePath());
+ QTest::newRow(("file-" + QByteArray::number(c++)).constData())
+ << it.filePath() << QUrl::fromLocalFile(it.filePath());
}
// basic latin1
@@ -3047,7 +3043,8 @@ void tst_QUrl::fromUserInputWithCwd_data()
#endif
); // fromUserInput cleans the path
}
- QTest::newRow(QString("file-%1").arg(c++).toLatin1()) << it.fileName() << QDir::currentPath() << url << url;
+ QTest::newRow(("file-" + QByteArray::number(c++)).constData())
+ << it.fileName() << QDir::currentPath() << url << url;
}
#ifndef Q_OS_WINRT // WinRT cannot cd outside current / sandbox
QDir parent = QDir::current();
@@ -3258,7 +3255,7 @@ void tst_QUrl::acceptEmptyAuthoritySegments()
// However, file:/bar is the same as file:///bar
QString file_triple_bar("file:///bar"), file_uni_bar("file:/bar");
- QVERIFY(QUrl(file_triple_bar) == QUrl(file_uni_bar));
+ QCOMPARE(QUrl(file_triple_bar), QUrl(file_uni_bar));
QCOMPARE(QUrl(file_uni_bar).toString(), file_triple_bar);
QCOMPARE(QUrl(file_uni_bar, QUrl::StrictMode).toString(), file_triple_bar);
diff --git a/tests/auto/corelib/io/qurl/tst_qurl_mac.mm b/tests/auto/corelib/io/qurl/tst_qurl_mac.mm
index 45c1681b22..f2d151a090 100644
--- a/tests/auto/corelib/io/qurl/tst_qurl_mac.mm
+++ b/tests/auto/corelib/io/qurl/tst_qurl_mac.mm
@@ -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/corelib/io/qurlinternal/qurlinternal.pro b/tests/auto/corelib/io/qurlinternal/qurlinternal.pro
index c62cd045f3..ae5e023446 100644
--- a/tests/auto/corelib/io/qurlinternal/qurlinternal.pro
+++ b/tests/auto/corelib/io/qurlinternal/qurlinternal.pro
@@ -3,5 +3,3 @@ requires(contains(QT_CONFIG,private_tests))
TARGET = tst_qurlinternal
SOURCES += tst_qurlinternal.cpp ../../codecs/utf8/utf8data.cpp
QT = core core-private testlib
-CONFIG += parallel_test
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
index 753a679d4c..f5835ec5f4 100644
--- a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
+++ b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
@@ -1,32 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Copyright (C) 2012 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** 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$
**
@@ -1003,7 +998,9 @@ void tst_QUrlInternal::encodingRecodeInvalidUtf8_data()
QTest::addColumn<QString>("utf16");
extern void loadInvalidUtf8Rows();
+ extern void loadNonCharactersRows();
loadInvalidUtf8Rows();
+ loadNonCharactersRows();
QTest::newRow("utf8-mix-4") << QByteArray("\xE0.A2\x80");
QTest::newRow("utf8-mix-5") << QByteArray("\xE0\xA2.80");
diff --git a/tests/auto/corelib/io/qurlquery/qurlquery.pro b/tests/auto/corelib/io/qurlquery/qurlquery.pro
index 3284903d5b..68129f356f 100644
--- a/tests/auto/corelib/io/qurlquery/qurlquery.pro
+++ b/tests/auto/corelib/io/qurlquery/qurlquery.pro
@@ -1,6 +1,5 @@
QT = core core-private testlib
TARGET = tst_qurlquery
-CONFIG += parallel_test testcase
+CONFIG += testcase
SOURCES += tst_qurlquery.cpp
DEFINES += SRCDIR=\\\"$$PWD/\\\"
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp b/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp
index 769a96ac64..d839141091 100644
--- a/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp
+++ b/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2012 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 Intel Corporation.
+** 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$
**
@@ -103,7 +98,7 @@ static QByteArray prettyList(const T &items)
first = false;
result += prettyPair(it);
}
- result += ")";
+ result += QLatin1Char(')');
return result.toLocal8Bit();
}
@@ -176,20 +171,20 @@ void tst_QUrlQuery::constructing()
QUrlQuery copy(empty);
QVERIFY(copy.isEmpty());
QVERIFY(!copy.isDetached());
- QVERIFY(copy == empty);
+ QCOMPARE(copy, empty);
QCOMPARE(qHash(copy), qHash(empty));
QVERIFY(!(copy != empty));
copy = empty;
- QVERIFY(copy == empty);
+ QCOMPARE(copy, empty);
copy = QUrlQuery();
- QVERIFY(copy == empty);
+ QCOMPARE(copy, empty);
QCOMPARE(qHash(copy), qHash(empty));
}
{
QUrlQuery copy(emptyQuery());
- QVERIFY(copy == empty);
+ QCOMPARE(copy, empty);
}
QVERIFY(!empty.hasQueryItem("a"));
@@ -214,7 +209,7 @@ void tst_QUrlQuery::constructing()
QVERIFY(!(other == empty));
QUrlQuery copy(other);
- QVERIFY(copy == other);
+ QCOMPARE(copy, other);
copy.clear();
QVERIFY(copy.isEmpty());
@@ -222,7 +217,7 @@ void tst_QUrlQuery::constructing()
copy = other;
QVERIFY(!copy.isEmpty());
- QVERIFY(copy == other);
+ QCOMPARE(copy, other);
copy = QUrlQuery();
QVERIFY(copy.isEmpty());
@@ -298,7 +293,7 @@ void tst_QUrlQuery::addRemove()
QCOMPARE(allItems.at(0).first, QString("a"));
QCOMPARE(allItems.at(0).second, QString("b"));
- QVERIFY(query == original);
+ QCOMPARE(query, original);
QVERIFY(!(query != original));
QCOMPARE(qHash(query), qHash(original));
}
@@ -346,7 +341,7 @@ void tst_QUrlQuery::multiAddRemove()
QVERIFY(query.hasQueryItem("a"));
// returns the first one
- QVERIFY(query.queryItemValue("a") == "b");
+ QCOMPARE(query.queryItemValue("a"), QLatin1String("b"));
// order is the order we set them in
QVERIFY(query.allQueryItemValues("a") == QStringList() << "b" << "c");
@@ -359,9 +354,9 @@ void tst_QUrlQuery::multiAddRemove()
QVERIFY(query.hasQueryItem("A"));
QVERIFY(query.hasQueryItem("a"));
- QVERIFY(query.queryItemValue("a") == "b");
+ QCOMPARE(query.queryItemValue("a"), QLatin1String("b"));
QVERIFY(query.allQueryItemValues("a") == QStringList() << "b" << "c");
- QVERIFY(query.queryItemValue("A") == "B");
+ QCOMPARE(query.queryItemValue("A"), QLatin1String("B"));
QVERIFY(query.allQueryItemValues("A") == QStringList() << "B" << "C");
}
@@ -371,7 +366,7 @@ void tst_QUrlQuery::multiAddRemove()
QVERIFY(query.hasQueryItem("a"));
// it must have removed the first one
- QVERIFY(query.queryItemValue("a") == "c");
+ QCOMPARE(query.queryItemValue("a"), QLatin1String("c"));
}
{
@@ -720,7 +715,7 @@ void tst_QUrlQuery::old_queryItems()
QVERIFY(!url.isEmpty());
QList<QPair<QString, QString> > setItems = url.queryItems();
- QVERIFY(newItems == setItems);
+ QCOMPARE(newItems, setItems);
url.addQueryItem("1", "z");
@@ -746,18 +741,18 @@ void tst_QUrlQuery::old_queryItems()
url.removeAllQueryItems("1");
QVERIFY(!url.hasQueryItem("1"));
- QCOMPARE(url.queryItemValue("4").toLatin1().constData(), "a b");
- QCOMPARE(url.queryItemValue("5").toLatin1().constData(), "&");
- QCOMPARE(url.queryItemValue("tex").toLatin1().constData(), "a + b = c");
- QCOMPARE(url.queryItemValue("foo bar").toLatin1().constData(), "hello world");
+ QCOMPARE(url.queryItemValue("4"), QLatin1String("a b"));
+ QCOMPARE(url.queryItemValue("5"), QLatin1String("&"));
+ QCOMPARE(url.queryItemValue("tex"), QLatin1String("a + b = c"));
+ QCOMPARE(url.queryItemValue("foo bar"), QLatin1String("hello world"));
//url.setUrl("http://www.google.com/search?q=a+b");
url.setQuery("q=a+b");
- QCOMPARE(url.queryItemValue("q"), QString("a+b"));
+ QCOMPARE(url.queryItemValue("q"), QLatin1String("a+b"));
//url.setUrl("http://www.google.com/search?q=a=b"); // invalid, but should be tolerated
url.setQuery("q=a=b");
- QCOMPARE(url.queryItemValue("q"), QString("a=b"));
+ QCOMPARE(url.queryItemValue("q"), QLatin1String("a=b"));
}
void tst_QUrlQuery::old_hasQueryItem_data()
diff --git a/tests/auto/corelib/io/qwinoverlappedionotifier/qwinoverlappedionotifier.pro b/tests/auto/corelib/io/qwinoverlappedionotifier/qwinoverlappedionotifier.pro
index b7a36459f8..4f0e9da3c2 100644
--- a/tests/auto/corelib/io/qwinoverlappedionotifier/qwinoverlappedionotifier.pro
+++ b/tests/auto/corelib/io/qwinoverlappedionotifier/qwinoverlappedionotifier.pro
@@ -2,4 +2,3 @@ CONFIG += testcase
TARGET = tst_qwinoverlappedionotifier
QT = core-private testlib
SOURCES = tst_qwinoverlappedionotifier.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qwinoverlappedionotifier/tst_qwinoverlappedionotifier.cpp b/tests/auto/corelib/io/qwinoverlappedionotifier/tst_qwinoverlappedionotifier.cpp
index 57a01e0a79..7034c2c9fd 100644
--- a/tests/auto/corelib/io/qwinoverlappedionotifier/tst_qwinoverlappedionotifier.cpp
+++ b/tests/auto/corelib/io/qwinoverlappedionotifier/tst_qwinoverlappedionotifier.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$
**
@@ -199,7 +194,7 @@ void tst_QWinOverlappedIoNotifier::waitForAnyNotified()
NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
notifier.setHandle(hFile);
notifier.setEnabled(true);
- QVERIFY(notifier.waitForAnyNotified(100) == 0);
+ QVERIFY(!notifier.waitForAnyNotified(100));
OVERLAPPED overlapped1;
ZeroMemory(&overlapped1, sizeof(OVERLAPPED));
@@ -224,7 +219,7 @@ void tst_QWinOverlappedIoNotifier::waitForAnyNotified()
CloseHandle(hFile);
QVERIFY(overlappedObjects.isEmpty());
- QVERIFY(notifier.waitForAnyNotified(100) == 0);
+ QVERIFY(!notifier.waitForAnyNotified(100));
}
void tst_QWinOverlappedIoNotifier::brokenPipe()