summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/widgets')
-rw-r--r--tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp51
-rw-r--r--tests/auto/widgets/widgets/qabstractscrollarea/qabstractscrollarea.pro1
-rw-r--r--tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp29
-rw-r--r--tests/auto/widgets/widgets/qabstractslider/qabstractslider.pro1
-rw-r--r--tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp29
-rw-r--r--tests/auto/widgets/widgets/qabstractspinbox/qabstractspinbox.pro1
-rw-r--r--tests/auto/widgets/widgets/qabstractspinbox/tst_qabstractspinbox.cpp29
-rw-r--r--tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp57
-rw-r--r--tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp63
-rw-r--r--tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp44
-rw-r--r--tests/auto/widgets/widgets/qcombobox/qcombobox.pro1
-rw-r--r--tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp93
-rw-r--r--tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp49
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro1
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp47
-rw-r--r--tests/auto/widgets/widgets/qdial/qdial.pro1
-rw-r--r--tests/auto/widgets/widgets/qdial/tst_qdial.cpp29
-rw-r--r--tests/auto/widgets/widgets/qdialogbuttonbox/qdialogbuttonbox.pro1
-rw-r--r--tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp29
-rw-r--r--tests/auto/widgets/widgets/qdockwidget/qdockwidget.pro1
-rw-r--r--tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp32
-rw-r--r--tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp42
-rw-r--r--tests/auto/widgets/widgets/qfocusframe/qfocusframe.pro1
-rw-r--r--tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp29
-rw-r--r--tests/auto/widgets/widgets/qfontcombobox/qfontcombobox.pro1
-rw-r--r--tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp59
-rw-r--r--tests/auto/widgets/widgets/qframe/tst_qframe.cpp54
-rw-r--r--tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp140
-rw-r--r--tests/auto/widgets/widgets/qkeysequenceedit/qkeysequenceedit.pro1
-rw-r--r--tests/auto/widgets/widgets/qkeysequenceedit/tst_qkeysequenceedit.cpp29
-rw-r--r--tests/auto/widgets/widgets/qlabel/qlabel.pro1
-rw-r--r--tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp29
-rw-r--r--tests/auto/widgets/widgets/qlcdnumber/qlcdnumber.pro1
-rw-r--r--tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp29
-rw-r--r--tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp125
-rw-r--r--tests/auto/widgets/widgets/qmainwindow/qmainwindow.pro1
-rw-r--r--tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp31
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp55
-rw-r--r--tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp65
-rw-r--r--tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp84
-rw-r--r--tests/auto/widgets/widgets/qmenu/tst_qmenu_mac.mm31
-rw-r--r--tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp34
-rw-r--r--tests/auto/widgets/widgets/qopenglwidget/BLACKLIST12
-rw-r--r--tests/auto/widgets/widgets/qopenglwidget/qopenglwidget.pro3
-rw-r--r--tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp29
-rw-r--r--tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp29
-rw-r--r--tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp29
-rw-r--r--tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp54
-rw-r--r--tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp29
-rw-r--r--tests/auto/widgets/widgets/qscrollarea/qscrollarea.pro1
-rw-r--r--tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp29
-rw-r--r--tests/auto/widgets/widgets/qscrollbar/qscrollbar.pro1
-rw-r--r--tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp29
-rw-r--r--tests/auto/widgets/widgets/qsizegrip/qsizegrip.pro1
-rw-r--r--tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp29
-rw-r--r--tests/auto/widgets/widgets/qslider/qslider.pro1
-rw-r--r--tests/auto/widgets/widgets/qslider/tst_qslider.cpp29
-rw-r--r--tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp29
-rw-r--r--tests/auto/widgets/widgets/qsplashscreen/tst_qsplashscreen.cpp29
-rw-r--r--tests/auto/widgets/widgets/qsplitter/qsplitter.pro1
-rw-r--r--tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp35
-rw-r--r--tests/auto/widgets/widgets/qstackedwidget/tst_qstackedwidget.cpp31
-rw-r--r--tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp55
-rw-r--r--tests/auto/widgets/widgets/qtabbar/qtabbar.pro1
-rw-r--r--tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp31
-rw-r--r--tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp39
-rw-r--r--tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp43
-rw-r--r--tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp29
-rw-r--r--tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp29
-rw-r--r--tests/auto/widgets/widgets/qtoolbox/qtoolbox.pro1
-rw-r--r--tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp55
-rw-r--r--tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp29
72 files changed, 966 insertions, 1207 deletions
diff --git a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
index 43d6912c6e..9efa8cf47e 100644
--- a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
+++ b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -48,17 +43,11 @@ class tst_QAbstractButton : public QObject
{
Q_OBJECT
-public:
- tst_QAbstractButton();
- virtual ~tst_QAbstractButton();
-
-
-public slots:
+private slots:
void initTestCase();
void cleanupTestCase();
void init();
- void cleanup();
-private slots:
+
void setAutoRepeat_data();
void setAutoRepeat();
@@ -147,14 +136,6 @@ private:
}
};
-tst_QAbstractButton::tst_QAbstractButton()
-{
-}
-
-tst_QAbstractButton::~tst_QAbstractButton()
-{
-}
-
void tst_QAbstractButton::initTestCase()
{
testWidget = new MyButton(0);
@@ -188,10 +169,6 @@ void tst_QAbstractButton::init()
click_count = 0;
}
-void tst_QAbstractButton::cleanup()
-{
-}
-
void tst_QAbstractButton::resetValues()
{
toggle_count = 0;
diff --git a/tests/auto/widgets/widgets/qabstractscrollarea/qabstractscrollarea.pro b/tests/auto/widgets/widgets/qabstractscrollarea/qabstractscrollarea.pro
index 911898407b..2d9aa52e3a 100644
--- a/tests/auto/widgets/widgets/qabstractscrollarea/qabstractscrollarea.pro
+++ b/tests/auto/widgets/widgets/qabstractscrollarea/qabstractscrollarea.pro
@@ -3,7 +3,6 @@
############################################################
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qabstractscrollarea
QT += widgets testlib
SOURCES += tst_qabstractscrollarea.cpp
diff --git a/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp b/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp
index 129b9e97d0..60efcddc60 100644
--- a/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp
+++ b/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.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/widgets/widgets/qabstractslider/qabstractslider.pro b/tests/auto/widgets/widgets/qabstractslider/qabstractslider.pro
index 020be08867..6453999786 100644
--- a/tests/auto/widgets/widgets/qabstractslider/qabstractslider.pro
+++ b/tests/auto/widgets/widgets/qabstractslider/qabstractslider.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qabstractslider
QT += widgets testlib
SOURCES += tst_qabstractslider.cpp
diff --git a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
index 3c150e77b9..d4b221a4a7 100644
--- a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
+++ b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.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/widgets/widgets/qabstractspinbox/qabstractspinbox.pro b/tests/auto/widgets/widgets/qabstractspinbox/qabstractspinbox.pro
index 8fa1c0fcac..f9b601228e 100644
--- a/tests/auto/widgets/widgets/qabstractspinbox/qabstractspinbox.pro
+++ b/tests/auto/widgets/widgets/qabstractspinbox/qabstractspinbox.pro
@@ -3,7 +3,6 @@
############################################################
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qabstractspinbox
QT += widgets testlib
SOURCES += tst_qabstractspinbox.cpp
diff --git a/tests/auto/widgets/widgets/qabstractspinbox/tst_qabstractspinbox.cpp b/tests/auto/widgets/widgets/qabstractspinbox/tst_qabstractspinbox.cpp
index 53234f33de..36f5df4649 100644
--- a/tests/auto/widgets/widgets/qabstractspinbox/tst_qabstractspinbox.cpp
+++ b/tests/auto/widgets/widgets/qabstractspinbox/tst_qabstractspinbox.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/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp b/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp
index 5dec6224ca..7684f16c47 100644
--- a/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp
+++ b/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.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$
**
@@ -68,14 +63,7 @@ protected:
class tst_QButtonGroup : public QObject
{
Q_OBJECT
-public:
- tst_QButtonGroup();
-public slots:
- void initTestCase();
- void cleanupTestCase();
- void init();
- void cleanup();
private slots:
void arrowKeyNavigation();
void exclusive();
@@ -91,27 +79,6 @@ private slots:
void task209485_removeFromGroupInEventHandler();
};
-tst_QButtonGroup::tst_QButtonGroup()
-{
-}
-
-
-void tst_QButtonGroup::initTestCase()
-{
-}
-
-void tst_QButtonGroup::cleanupTestCase()
-{
-}
-
-void tst_QButtonGroup::init()
-{
-}
-
-void tst_QButtonGroup::cleanup()
-{
-}
-
QT_BEGIN_NAMESPACE
extern bool Q_GUI_EXPORT qt_tab_all_widgets();
QT_END_NAMESPACE
diff --git a/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp b/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp
index 9b8ab110cd..8e4a800a75 100644
--- a/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp
+++ b/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -46,15 +41,6 @@ class tst_QCalendarWidget : public QObject
{
Q_OBJECT
-public:
- tst_QCalendarWidget();
- virtual ~tst_QCalendarWidget();
-public slots:
- void initTestCase();
- void cleanupTestCase();
- void init();
- void cleanup();
-
private slots:
void getSetCheck();
void buttonClickCheck();
@@ -265,31 +251,6 @@ void tst_QCalendarWidget::setWeekdayFormat()
}
}
-tst_QCalendarWidget::tst_QCalendarWidget()
-{
-}
-
-tst_QCalendarWidget::~tst_QCalendarWidget()
-{
-}
-
-void tst_QCalendarWidget::initTestCase()
-{
-}
-
-void tst_QCalendarWidget::cleanupTestCase()
-{
-}
-
-void tst_QCalendarWidget::init()
-{
-}
-
-void tst_QCalendarWidget::cleanup()
-{
-}
-
-
typedef void (QCalendarWidget::*ShowFunc)();
Q_DECLARE_METATYPE(ShowFunc)
diff --git a/tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp b/tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp
index 5696382fab..c9699bfb81 100644
--- a/tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp
+++ b/tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -45,17 +40,12 @@ class tst_QCheckBox : public QObject
{
Q_OBJECT
-public:
- tst_QCheckBox();
- virtual ~tst_QCheckBox();
-
-public slots:
+private slots:
void initTestCase();
void cleanupTestCase();
void init();
void cleanup();
-private slots:
void setChecked();
void setTriState();
void setText_data();
@@ -86,14 +76,6 @@ private:
QCheckBox *testWidget;
};
-tst_QCheckBox::tst_QCheckBox()
-{
-}
-
-tst_QCheckBox::~tst_QCheckBox()
-{
-}
-
void tst_QCheckBox::initTestCase()
{
// Create the test class
diff --git a/tests/auto/widgets/widgets/qcombobox/qcombobox.pro b/tests/auto/widgets/widgets/qcombobox/qcombobox.pro
index 03e8ed75ed..88b9d08557 100644
--- a/tests/auto/widgets/widgets/qcombobox/qcombobox.pro
+++ b/tests/auto/widgets/widgets/qcombobox/qcombobox.pro
@@ -2,4 +2,3 @@ CONFIG += testcase
TARGET = tst_qcombobox
QT += widgets widgets-private gui-private core-private testlib
SOURCES += tst_qcombobox.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
index ae516639a6..2a356f574c 100644
--- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.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$
**
@@ -2315,9 +2310,10 @@ void tst_QComboBox::task191329_size()
QStandardItemModel model(rows, 2);
for (int row = 0; row < model.rowCount(); ++row) {
+ const QString rowS = QLatin1String("row ") + QString::number(row);
for (int column = 0; column < model.columnCount(); ++column) {
- QStandardItem *item = new QStandardItem(QString("row %0, column %1").arg(row).arg(column));
- model.setItem(row, column, item);
+ const QString text = rowS + QLatin1String(", column ") + QString::number(column);
+ model.setItem(row, column, new QStandardItem(text));
}
}
QTableView *table = new QTableView();
@@ -2400,7 +2396,7 @@ void tst_QComboBox::task248169_popupWithMinimalSize()
QTest::qWaitForWindowExposed(comboBox.view());
QTRY_VERIFY(comboBox.view()->isVisible());
-#if defined QT_BUILD_INTERNAL && !defined Q_OS_BLACKBERRY
+#if defined QT_BUILD_INTERNAL
QFrame *container = comboBox.findChild<QComboBoxPrivateContainer *>();
QVERIFY(container);
QTRY_VERIFY(desktop.screenGeometry(container).contains(container->geometry()));
@@ -2694,7 +2690,8 @@ void tst_QComboBox::resetModel()
void reset()
{
- QStringListModel::reset();
+ QStringListModel::beginResetModel();
+ QStringListModel::endResetModel();
}
};
QComboBox cb;
@@ -2866,10 +2863,11 @@ void tst_QComboBox::task_QTBUG_10491_currentIndexAndModelColumn()
QStandardItemModel model(4, 4, &comboBox);
for (int i = 0; i < 4; i++){
- model.setItem(i, 0, new QStandardItem(QString("Employee Nr %1").arg(i)));
- model.setItem(i, 1, new QStandardItem(QString("Street Nr %1").arg(i)));
- model.setItem(i, 2, new QStandardItem(QString("Town Nr %1").arg(i)));
- model.setItem(i, 3, new QStandardItem(QString("Phone Nr %1").arg(i)));
+ const QString iS = QString::number(i);
+ model.setItem(i, 0, new QStandardItem(QLatin1String("Employee Nr ") + iS));
+ model.setItem(i, 1, new QStandardItem(QLatin1String("Street Nr ") + iS));
+ model.setItem(i, 2, new QStandardItem(QLatin1String("Town Nr ") + iS));
+ model.setItem(i, 3, new QStandardItem(QLatin1String("Phone Nr ") + iS));
}
comboBox.setModel(&model);
comboBox.setModelColumn(0);
@@ -2915,12 +2913,12 @@ void tst_QComboBox::itemData()
// ensure that the currentText(), the DisplayRole and the EditRole
// stay in sync when using QComboBox's default model
for (int i = 0; i < itemCount; ++i) {
- QString itemText = QString("item text %1").arg(i);
+ QString itemText = QLatin1String("item text ") + QString::number(i);
comboBox.addItem(itemText);
}
for (int i = 0; i < itemCount; ++i) {
- QString itemText = QString("item text %1").arg(i);
+ QString itemText = QLatin1String("item text ") + QString::number(i);
QCOMPARE(comboBox.itemText(i), itemText);
QCOMPARE(comboBox.itemData(i, Qt::DisplayRole).toString(), itemText);
QCOMPARE(comboBox.itemData(i, Qt::EditRole).toString(), itemText);
@@ -2932,14 +2930,11 @@ void tst_QComboBox::itemData()
QCOMPARE(comboBox.currentData(Qt::EditRole).toString(), itemText);
}
- for (int i = 0; i < itemCount; ++i) {
- // now change by using setItemText
- QString itemText = QString("setItemText %1").arg(i);
- comboBox.setItemText(i, itemText);
- }
+ for (int i = 0; i < itemCount; ++i) // now change by using setItemText
+ comboBox.setItemText(i, QLatin1String("setItemText ") + QString::number(i));
for (int i = 0; i < itemCount; ++i) {
- QString itemText = QString("setItemText %1").arg(i);
+ QString itemText = QLatin1String("setItemText ") + QString::number(i);
QCOMPARE(comboBox.itemText(i), itemText);
QCOMPARE(comboBox.itemData(i, Qt::DisplayRole).toString(), itemText);
QCOMPARE(comboBox.itemData(i, Qt::EditRole).toString(), itemText);
@@ -2953,12 +2948,12 @@ void tst_QComboBox::itemData()
for (int i = 0; i < itemCount; ++i) {
// now change by changing the DisplayRole's data
- QString itemText = QString("setItemData(DisplayRole) %1").arg(i);
+ QString itemText = QLatin1String("setItemData(DisplayRole) ") + QString::number(i);
comboBox.setItemData(i, QVariant(itemText), Qt::DisplayRole);
}
for (int i = 0; i < itemCount; ++i) {
- QString itemText = QString("setItemData(DisplayRole) %1").arg(i);
+ QString itemText = QLatin1String("setItemData(DisplayRole) ") + QString::number(i);
QCOMPARE(comboBox.itemText(i), itemText);
QCOMPARE(comboBox.itemData(i, Qt::DisplayRole).toString(), itemText);
QCOMPARE(comboBox.itemData(i, Qt::EditRole).toString(), itemText);
@@ -2972,12 +2967,12 @@ void tst_QComboBox::itemData()
for (int i = 0; i < itemCount; ++i) {
// now change by changing the EditRole's data
- QString itemText = QString("setItemData(EditRole) %1").arg(i);
+ QString itemText = QLatin1String("setItemData(EditRole) ") + QString::number(i);
comboBox.setItemData(i, QVariant(itemText), Qt::EditRole);
}
for (int i = 0; i < itemCount; ++i) {
- QString itemText = QString("setItemData(EditRole) %1").arg(i);
+ QString itemText = QLatin1String("setItemData(EditRole) ") + QString::number(i);
QCOMPARE(comboBox.itemText(i), itemText);
QCOMPARE(comboBox.itemData(i, Qt::DisplayRole).toString(), itemText);
QCOMPARE(comboBox.itemData(i, Qt::EditRole).toString(), itemText);
@@ -2994,14 +2989,14 @@ void tst_QComboBox::itemData()
// set additional user data in the addItem call
for (int i = 0; i < itemCount; ++i) {
- QString itemText = QString("item text %1").arg(i);
- QString itemDataText = QString("item data %1").arg(i);
- comboBox.addItem(itemText, QVariant(itemDataText));
+ const QString iS = QString::number(i);
+ comboBox.addItem(QLatin1String("item text ") + iS, QVariant(QLatin1String("item data ") + iS));
}
for (int i = 0; i < itemCount; ++i) {
- QString itemText = QString("item text %1").arg(i);
- QString itemDataText = QString("item data %1").arg(i);
+ const QString iS = QString::number(i);
+ QString itemText = QLatin1String("item text ") + iS;
+ QString itemDataText = QLatin1String("item data ") + iS;
QCOMPARE(comboBox.itemData(i, Qt::DisplayRole).toString(), itemText);
QCOMPARE(comboBox.itemData(i, Qt::EditRole).toString(), itemText);
QCOMPARE(comboBox.itemData(i).toString(), itemDataText);
@@ -3024,8 +3019,9 @@ void tst_QComboBox::itemData()
QString qtlogoPath = QFINDTESTDATA("qtlogo.png");
QIcon icon = QIcon(QPixmap(qtlogoPath));
for (int i = 0; i < itemCount; ++i) {
- QString itemText = QString("item text %1").arg(i);
- QString itemDataText = QString("item data %1").arg(i);
+ const QString iS = QString::number(i);
+ QString itemText = QLatin1String("item text ") + iS;
+ QString itemDataText = QLatin1String("item data ") + iS;
double d = i;
comboBox.addItem(itemText);
comboBox.setItemData(i, QVariant(itemDataText), Qt::UserRole);
@@ -3034,8 +3030,9 @@ void tst_QComboBox::itemData()
}
for (int i = 0; i < itemCount; ++i) {
- QString itemText = QString("item text %1").arg(i);
- QString itemDataText = QString("item data %1").arg(i);
+ const QString iS = QString::number(i);
+ QString itemText = QLatin1String("item text ") + iS;
+ QString itemDataText = QLatin1String("item data ") + iS;
double d = i;
QCOMPARE(comboBox.itemData(i, Qt::DisplayRole).toString(), itemText);
QCOMPARE(comboBox.itemData(i, Qt::EditRole).toString(), itemText);
@@ -3218,12 +3215,12 @@ void tst_QComboBox::task_QTBUG_49831_scrollerNotActivated()
box.setModel(&model);
box.setCurrentIndex(500);
box.show();
- QTest::qWaitForWindowShown(&box);
+ QTest::qWaitForWindowExposed(&box);
QTest::mouseMove(&box, QPoint(5, 5), 100);
box.showPopup();
QFrame *container = box.findChild<QComboBoxPrivateContainer *>();
QVERIFY(container);
- QTest::qWaitForWindowShown(container);
+ QTest::qWaitForWindowExposed(container);
QList<QComboBoxPrivateScroller *> scrollers = container->findChildren<QComboBoxPrivateScroller *>();
// Not all styles support scrollers. We rely only on those platforms that do to catch any regression.
diff --git a/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp b/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
index a57553097a..667e348945 100644
--- a/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
+++ b/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -48,16 +43,12 @@
class tst_QCommandLinkButton : public QObject
{
Q_OBJECT
-public:
- tst_QCommandLinkButton();
- virtual ~tst_QCommandLinkButton();
-public slots:
+private slots:
void initTestCase();
void cleanupTestCase();
void init();
- void cleanup();
-private slots:
+
void getSetCheck();
void pressed();
void setAccel();
@@ -112,14 +103,6 @@ void tst_QCommandLinkButton::getSetCheck()
delete var1;
}
-tst_QCommandLinkButton::tst_QCommandLinkButton()
-{
-}
-
-tst_QCommandLinkButton::~tst_QCommandLinkButton()
-{
-}
-
void tst_QCommandLinkButton::initTestCase()
{
// Create the test class
@@ -153,10 +136,6 @@ void tst_QCommandLinkButton::init()
resetCounters();
}
-void tst_QCommandLinkButton::cleanup()
-{
-}
-
void tst_QCommandLinkButton::resetCounters()
{
toggle_count = 0;
diff --git a/tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro b/tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro
index 690edd5c9e..411185ae2a 100644
--- a/tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro
+++ b/tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qdatetimeedit
QT += widgets testlib core-private widgets-private
SOURCES += tst_qdatetimeedit.cpp
diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
index d41398046f..50db58fdb8 100644
--- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
+++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.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$
**
@@ -125,15 +120,13 @@ public:
class tst_QDateTimeEdit : public QObject
{
Q_OBJECT
-public:
- tst_QDateTimeEdit();
- virtual ~tst_QDateTimeEdit();
-public slots:
+
+private slots:
void initTestCase();
void init();
void cleanup();
void cleanupTestCase();
-private slots:
+
void cachedDayTest();
void getSetCheck();
void constructor_qwidget();
@@ -314,14 +307,6 @@ void tst_QDateTimeEdit::getSetCheck()
QCOMPARE(timeEdit.inputMethodQuery(Qt::ImHints), QVariant(int(Qt::ImhPreferNumbers)));
}
-tst_QDateTimeEdit::tst_QDateTimeEdit()
-{
-}
-
-tst_QDateTimeEdit::~tst_QDateTimeEdit()
-{
-}
-
void tst_QDateTimeEdit::initTestCase()
{
QLocale system = QLocale::system();
@@ -3436,7 +3421,7 @@ void tst_QDateTimeEdit::deleteCalendarWidget()
// it should create a new widget
QVERIFY(edit.calendarWidget());
- QVERIFY(edit.calendarWidget()->objectName() != "cw1");
+ QVERIFY(edit.calendarWidget()->objectName() != QLatin1String("cw1"));
}
}
diff --git a/tests/auto/widgets/widgets/qdial/qdial.pro b/tests/auto/widgets/widgets/qdial/qdial.pro
index 0af9633236..9bdd61f9d5 100644
--- a/tests/auto/widgets/widgets/qdial/qdial.pro
+++ b/tests/auto/widgets/widgets/qdial/qdial.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qdial
QT += widgets testlib
SOURCES += tst_qdial.cpp
diff --git a/tests/auto/widgets/widgets/qdial/tst_qdial.cpp b/tests/auto/widgets/widgets/qdial/tst_qdial.cpp
index e047e86067..7db3b44dc8 100644
--- a/tests/auto/widgets/widgets/qdial/tst_qdial.cpp
+++ b/tests/auto/widgets/widgets/qdial/tst_qdial.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/widgets/widgets/qdialogbuttonbox/qdialogbuttonbox.pro b/tests/auto/widgets/widgets/qdialogbuttonbox/qdialogbuttonbox.pro
index 9892c48e0c..7f2ad59581 100644
--- a/tests/auto/widgets/widgets/qdialogbuttonbox/qdialogbuttonbox.pro
+++ b/tests/auto/widgets/widgets/qdialogbuttonbox/qdialogbuttonbox.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
QT += widgets testlib
SOURCES += tst_qdialogbuttonbox.cpp
diff --git a/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp b/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
index 32412afcd5..a35ea8eb6e 100644
--- a/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
+++ b/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.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/widgets/widgets/qdockwidget/qdockwidget.pro b/tests/auto/widgets/widgets/qdockwidget/qdockwidget.pro
index eca396f1a8..5c1ef52036 100644
--- a/tests/auto/widgets/widgets/qdockwidget/qdockwidget.pro
+++ b/tests/auto/widgets/widgets/qdockwidget/qdockwidget.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qdockwidget
QT += widgets widgets-private testlib
QT += core-private gui-private
diff --git a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
index 61a9461a62..cb55bd32b0 100644
--- a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
+++ b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.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$
**
@@ -934,9 +929,6 @@ void tst_QDockWidget::task237438_setFloatingCrash()
void tst_QDockWidget::task248604_infiniteResize()
{
-#if defined Q_OS_BLACKBERRY
- QSKIP("Top level window is stretched to fullscreen");
-#endif
QDockWidget d;
QTabWidget *t = new QTabWidget;
t->addTab(new QWidget, "Foo");
diff --git a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp
index 6a1ce17aab..59ddd54194 100644
--- a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp
+++ b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.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$
**
@@ -214,12 +209,15 @@ void tst_QDoubleSpinBox::setPrefixSuffix_data()
QTest::newRow("data0") << QString() << QString() << 10.5 << 1 << "10.5" << "10.5" << false;
QTest::newRow("data1") << QString() << "cm" << 10.5 << 2 << "10.50cm" << "10.50" << false;
- QTest::newRow("data2") << "cm: " << QString() << 10.5 << 0 << "cm: 10" << "10" << false;
+
+ // 10.5 is rounded correctly to 11 when using libdouble-conversion, or incorrectly to 10 when
+ // using snprintf. This is not the point of this test, though.
+ QTest::newRow("data2") << "cm: " << QString() << 10.4 << 0 << "cm: 10" << "10" << false;
QTest::newRow("data3") << "length: " << "cm" << 10.5 << 3 << "length: 10.500cm" << "10.500" << false;
QTest::newRow("data4") << QString() << QString() << 10.5 << 1 << "10.5" << "10.5" << true;
QTest::newRow("data5") << QString() << "cm" << 10.5 << 2 << "10.50cm" << "10.50" << true;
- QTest::newRow("data6") << "cm: " << QString() << 10.5 << 0 << "cm: 10" << "10" << true;
+ QTest::newRow("data6") << "cm: " << QString() << 10.4 << 0 << "cm: 10" << "10" << true;
QTest::newRow("data7") << "length: " << "cm" << 10.5 << 3 << "length: 10.500cm" << "10.500" << true;
}
@@ -817,8 +815,10 @@ void tst_QDoubleSpinBox::editingFinished()
QCOMPARE(editingFinishedSpy1.count(), 4);
QCOMPARE(editingFinishedSpy2.count(), 4);
- testFocusWidget->show(); // On BlackBerry this is our root window we need to show it again
- // otherwise subsequent tests will fail
+ // On some platforms this is our root window
+ // we need to show it again otherwise subsequent
+ // tests will fail
+ testFocusWidget->show();
}
void tst_QDoubleSpinBox::removeAll()
diff --git a/tests/auto/widgets/widgets/qfocusframe/qfocusframe.pro b/tests/auto/widgets/widgets/qfocusframe/qfocusframe.pro
index 6fa0589f95..404edcd075 100644
--- a/tests/auto/widgets/widgets/qfocusframe/qfocusframe.pro
+++ b/tests/auto/widgets/widgets/qfocusframe/qfocusframe.pro
@@ -3,7 +3,6 @@
############################################################
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qfocusframe
QT += widgets testlib
SOURCES += tst_qfocusframe.cpp
diff --git a/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp b/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp
index 105a1ac55a..e6e689336a 100644
--- a/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp
+++ b/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.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/widgets/widgets/qfontcombobox/qfontcombobox.pro b/tests/auto/widgets/widgets/qfontcombobox/qfontcombobox.pro
index b21729bb9b..418789ac0f 100644
--- a/tests/auto/widgets/widgets/qfontcombobox/qfontcombobox.pro
+++ b/tests/auto/widgets/widgets/qfontcombobox/qfontcombobox.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qfontcombobox
QT += widgets testlib
SOURCES += tst_qfontcombobox.cpp
diff --git a/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp b/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp
index 5d6fdf2851..cda24a19d3 100644
--- a/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp
+++ b/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.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$
**
@@ -39,12 +34,6 @@ class tst_QFontComboBox : public QObject
{
Q_OBJECT
-public slots:
- void initTestCase();
- void cleanupTestCase();
- void init();
- void cleanup();
-
private slots:
void qfontcombobox_data();
void qfontcombobox();
@@ -69,28 +58,6 @@ public:
{ return SubQFontComboBox::event(e); }
};
-// This will be called before the first test function is executed.
-// It is only called once.
-void tst_QFontComboBox::initTestCase()
-{
-}
-
-// This will be called after the last test function is executed.
-// It is only called once.
-void tst_QFontComboBox::cleanupTestCase()
-{
-}
-
-// This will be called before each test function is executed.
-void tst_QFontComboBox::init()
-{
-}
-
-// This will be called after every test function.
-void tst_QFontComboBox::cleanup()
-{
-}
-
void tst_QFontComboBox::qfontcombobox_data()
{
}
@@ -248,7 +215,7 @@ void tst_QFontComboBox::writingSystem_data()
QTest::newRow("Runic") << QFontDatabase::Runic;
for (int i = 0; i < 31; ++i)
- QTest::newRow(qPrintable(QString("enum %1").arg(i))) << (QFontDatabase::WritingSystem)i;
+ QTest::newRow(("enum " + QByteArray::number(i)).constData()) << (QFontDatabase::WritingSystem)i;
}
// public QFontDatabase::WritingSystem writingSystem() const
diff --git a/tests/auto/widgets/widgets/qframe/tst_qframe.cpp b/tests/auto/widgets/widgets/qframe/tst_qframe.cpp
index 81a6ba2ee3..432f4474c5 100644
--- a/tests/auto/widgets/widgets/qframe/tst_qframe.cpp
+++ b/tests/auto/widgets/widgets/qframe/tst_qframe.cpp
@@ -1,32 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2014 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.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$
**
@@ -73,22 +68,24 @@ static void provideFrameData()
for (int lineWidth = 0; lineWidth < 3; ++lineWidth) {
for (int midLineWidth = 0; midLineWidth < 3; ++midLineWidth) {
- QTest::newRow(qPrintable(QStringLiteral("box_noshadow_%1_%2").arg(lineWidth).arg(midLineWidth)))
- << "box_noshadow" << lineWidth << midLineWidth << QFrame::Box << (QFrame::Shadow)0;
- QTest::newRow(qPrintable(QStringLiteral("box_plain_%1_%2").arg(lineWidth).arg(midLineWidth)))
+ const QByteArray postFix = '_' + QByteArray::number(lineWidth) + '_'
+ + QByteArray::number(midLineWidth);
+ QTest::newRow(("box_noshadow" + postFix).constData())
+ << "box_noshadow" << lineWidth << midLineWidth << QFrame::Box << (QFrame::Shadow)0;
+ QTest::newRow(("box_plain" + postFix).constData())
<< "box_plain" << lineWidth << midLineWidth << QFrame::Box << QFrame::Plain;
- QTest::newRow(qPrintable(QStringLiteral("box_raised_%1_%2").arg(lineWidth).arg(midLineWidth)))
+ QTest::newRow(("box_raised" + postFix).constData())
<< "box_raised" << lineWidth << midLineWidth << QFrame::Box << QFrame::Raised;
- QTest::newRow(qPrintable(QStringLiteral("box_sunken_%1_%2").arg(lineWidth).arg(midLineWidth)))
+ QTest::newRow(("box_sunken" + postFix).constData())
<< "box_sunken" << lineWidth << midLineWidth << QFrame::Box << QFrame::Sunken;
- QTest::newRow(qPrintable(QStringLiteral("winpanel_noshadow_%1_%2").arg(lineWidth).arg(midLineWidth)))
+ QTest::newRow(("winpanel_noshadow" + postFix).constData())
<< "winpanel_noshadow" << lineWidth << midLineWidth << QFrame::WinPanel << (QFrame::Shadow)0;
- QTest::newRow(qPrintable(QStringLiteral("winpanel_plain_%1_%2").arg(lineWidth).arg(midLineWidth)))
+ QTest::newRow(("winpanel_plain" + postFix).constData())
<< "winpanel_plain" << lineWidth << midLineWidth << QFrame::WinPanel << QFrame::Plain;
- QTest::newRow(qPrintable(QStringLiteral("winpanel_raised_%1_%2").arg(lineWidth).arg(midLineWidth)))
+ QTest::newRow(("winpanel_raised" + postFix).constData())
<< "winpanel_raised" << lineWidth << midLineWidth << QFrame::WinPanel << QFrame::Raised;
- QTest::newRow(qPrintable(QStringLiteral("winpanel_sunken_%1_%2").arg(lineWidth).arg(midLineWidth)))
+ QTest::newRow(("winpanel_sunken" + postFix).constData())
<< "winpanel_sunken" << lineWidth << midLineWidth << QFrame::WinPanel << QFrame::Sunken;
}
}
@@ -174,7 +171,10 @@ void tst_QFrame::testPainting()
const QPixmap pixmap = frame.grab();
- const QString referenceFilePath = QFINDTESTDATA(QStringLiteral("images/%1_%2_%3.png").arg(basename).arg(lineWidth).arg(midLineWidth));
+ const QString fileName = QLatin1String("images/") + basename + QLatin1Char('_')
+ + QString::number(lineWidth) + QLatin1Char('_') + QString::number(midLineWidth)
+ + QLatin1String(".png");
+ const QString referenceFilePath = QFINDTESTDATA(fileName);
const QPixmap referencePixmap(referenceFilePath);
QVERIFY2(!referencePixmap.isNull(), qPrintable(QStringLiteral("Could not load reference pixmap %1").arg(referenceFilePath)));
QCOMPARE(pixmap, referencePixmap);
diff --git a/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp b/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp
index 53eec99258..62224217d6 100644
--- a/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp
+++ b/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.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$
**
@@ -73,6 +68,7 @@ private slots:
void childrenAreDisabled();
void propagateFocus();
void task_QTBUG_19170_ignoreMouseReleseEvent();
+ void task_QTBUG_15519_propagateMouseEvents();
private:
bool checked;
@@ -80,6 +76,7 @@ private:
qint64 clickTimeStamp;
qint64 toggleTimeStamp;
+ static void sendMouseMoveEvent(QWidget *widget, const QPoint &localPos);
};
tst_QGroupBox::tst_QGroupBox()
@@ -502,5 +499,114 @@ void tst_QGroupBox::task_QTBUG_19170_ignoreMouseReleseEvent()
QCOMPARE(box.isChecked(), false);
}
+class MouseEventTestWidget : public QWidget
+{
+public:
+ bool mousePressed;
+ bool mouseReleased;
+ bool mouseMoved;
+
+ void reset()
+ {
+ mousePressed = false;
+ mouseReleased = false;
+ mouseMoved = false;
+ }
+
+protected:
+ void mousePressEvent(QMouseEvent*)
+ {
+ mousePressed = true;
+ }
+
+ void mouseReleaseEvent(QMouseEvent*)
+ {
+ mouseReleased = true;
+ }
+
+ void mouseMoveEvent(QMouseEvent*)
+ {
+ mouseMoved = true;
+ }
+};
+
+void tst_QGroupBox::task_QTBUG_15519_propagateMouseEvents()
+{
+ MouseEventTestWidget parent;
+ QGroupBox box(&parent);
+ parent.setMouseTracking(true);
+ box.setMouseTracking(true);
+ box.resize(100, 100);
+ box.setTitle("This is a test for QTBUG-15519");
+ box.show();
+
+ QStyleOptionGroupBox option;
+ option.initFrom(&box);
+ option.subControls = QStyle::SubControls(QStyle::SC_All);
+ QRect checkBoxRect = box.style()->subControlRect(QStyle::CC_GroupBox, &option,
+ QStyle::SC_GroupBoxCheckBox, &box);
+
+ // Without a checkbox, all mouse events should propagate
+
+ parent.reset();
+ QTest::mousePress(&box, Qt::LeftButton, 0, checkBoxRect.center());
+ QCOMPARE(parent.mousePressed, true);
+
+ parent.reset();
+ QTest::mousePress(&box, Qt::LeftButton, 0, box.rect().center());
+ QCOMPARE(parent.mousePressed, true);
+
+ parent.reset();
+ QTest::mouseRelease(&box, Qt::LeftButton, 0, checkBoxRect.center());
+ QCOMPARE(parent.mouseReleased, true);
+
+ parent.reset();
+ QTest::mouseRelease(&box, Qt::LeftButton, 0, box.rect().center());
+ QCOMPARE(parent.mouseReleased, true);
+
+ parent.reset();
+ sendMouseMoveEvent(&box, checkBoxRect.center());
+ QCOMPARE(parent.mouseMoved, true);
+
+ parent.reset();
+ sendMouseMoveEvent(&box, box.rect().center());
+ QCOMPARE(parent.mouseMoved, true);
+
+ // With a checkbox, presses and releases to the checkbox should not propagate
+
+ box.setCheckable(true);
+
+ parent.reset();
+ QTest::mousePress(&box, Qt::LeftButton, 0, checkBoxRect.center());
+ QCOMPARE(parent.mousePressed, false);
+
+ parent.reset();
+ QTest::mousePress(&box, Qt::LeftButton, 0, box.rect().center());
+ QCOMPARE(parent.mousePressed, true);
+
+ parent.reset();
+ QTest::mouseRelease(&box, Qt::LeftButton, 0, checkBoxRect.center());
+ QCOMPARE(parent.mouseReleased, false);
+
+ parent.reset();
+ QTest::mouseRelease(&box, Qt::LeftButton, 0, box.rect().center());
+ QCOMPARE(parent.mouseReleased, true);
+
+ parent.reset();
+ sendMouseMoveEvent(&box, checkBoxRect.center());
+ QCOMPARE(parent.mouseMoved, true);
+
+ parent.reset();
+ sendMouseMoveEvent(&box, box.rect().center());
+ QCOMPARE(parent.mouseMoved, true);
+}
+
+void tst_QGroupBox::sendMouseMoveEvent(QWidget *widget, const QPoint &localPos)
+{
+ // Send a MouseMove event without actually moving the pointer
+ QMouseEvent event(QEvent::MouseMove, localPos, Qt::NoButton, Qt::NoButton, Qt::NoModifier);
+ QApplication::sendEvent(widget, &event);
+}
+
QTEST_MAIN(tst_QGroupBox)
#include "tst_qgroupbox.moc"
diff --git a/tests/auto/widgets/widgets/qkeysequenceedit/qkeysequenceedit.pro b/tests/auto/widgets/widgets/qkeysequenceedit/qkeysequenceedit.pro
index 097cb00d11..c660b398ce 100644
--- a/tests/auto/widgets/widgets/qkeysequenceedit/qkeysequenceedit.pro
+++ b/tests/auto/widgets/widgets/qkeysequenceedit/qkeysequenceedit.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qkeysequenceedit
QT += widgets testlib
SOURCES += tst_qkeysequenceedit.cpp
diff --git a/tests/auto/widgets/widgets/qkeysequenceedit/tst_qkeysequenceedit.cpp b/tests/auto/widgets/widgets/qkeysequenceedit/tst_qkeysequenceedit.cpp
index 3472d0487a..191031c485 100644
--- a/tests/auto/widgets/widgets/qkeysequenceedit/tst_qkeysequenceedit.cpp
+++ b/tests/auto/widgets/widgets/qkeysequenceedit/tst_qkeysequenceedit.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/widgets/widgets/qlabel/qlabel.pro b/tests/auto/widgets/widgets/qlabel/qlabel.pro
index 6c259bc5a3..6a5757fb5c 100644
--- a/tests/auto/widgets/widgets/qlabel/qlabel.pro
+++ b/tests/auto/widgets/widgets/qlabel/qlabel.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qlabel
QT += widgets widgets-private testlib
diff --git a/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp b/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
index d76dbf6b46..ad971c6b5f 100644
--- a/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
+++ b/tests/auto/widgets/widgets/qlabel/tst_qlabel.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/widgets/widgets/qlcdnumber/qlcdnumber.pro b/tests/auto/widgets/widgets/qlcdnumber/qlcdnumber.pro
index 220380b1d5..1508806fb0 100644
--- a/tests/auto/widgets/widgets/qlcdnumber/qlcdnumber.pro
+++ b/tests/auto/widgets/widgets/qlcdnumber/qlcdnumber.pro
@@ -3,7 +3,6 @@
############################################################
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qlcdnumber
QT += widgets testlib
SOURCES += tst_qlcdnumber.cpp
diff --git a/tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp b/tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp
index a6d586ca19..9dcfd813ac 100644
--- a/tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp
+++ b/tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.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/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
index b46609c371..598b518810 100644
--- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -64,6 +59,7 @@
#include <qsortfilterproxymodel.h>
#include <qdebug.h>
#include <qscreen.h>
+#include <qshortcut.h>
#include "qcommonstyle.h"
#include "qstyleoption.h"
@@ -131,14 +127,13 @@ public:
enum EventStates { Press, Release, Click };
tst_QLineEdit();
- virtual ~tst_QLineEdit();
-public slots:
+private slots:
void initTestCase();
void cleanupTestCase();
void init();
void cleanup();
-private slots:
+
void getSetCheck();
void experimental();
@@ -313,6 +308,9 @@ private slots:
void shouldShowPlaceholderText();
void QTBUG1266_setInputMaskEmittingTextEdited();
+ void shortcutOverrideOnReadonlyLineEdit_data();
+ void shortcutOverrideOnReadonlyLineEdit();
+
protected slots:
void editingFinished();
@@ -377,10 +375,6 @@ tst_QLineEdit::tst_QLineEdit() : validInput(false), m_testWidget(0), m_keyboardS
}
}
-tst_QLineEdit::~tst_QLineEdit()
-{
-}
-
QLineEdit *tst_QLineEdit::ensureTestWidget()
{
if (!m_testWidget) {
@@ -2245,6 +2239,7 @@ void tst_QLineEdit::deleteSelectedText()
edit.setText(text);
edit.selectAll();
+#ifndef QT_NO_CONTEXTMENU
QMenu *menu = edit.createStandardContextMenu();
for (int i = 0; i < menu->actions().count(); ++i) {
QAction *current = menu->actions().at(i);
@@ -2253,6 +2248,7 @@ void tst_QLineEdit::deleteSelectedText()
QVERIFY(edit.text().isEmpty());
}
}
+#endif // QT_NO_CONTEXTMENU
}
@@ -2888,6 +2884,11 @@ void tst_QLineEdit::insert()
QCOMPARE(testWidget->text(), QString("No Crash! This is a nice test"));
}
+static inline QByteArray selectionTestName(int start, int length)
+{
+ return "selection start: " + QByteArray::number(start) + " length: " + QByteArray::number(length);
+}
+
void tst_QLineEdit::setSelection_data()
{
QTest::addColumn<QString>("text");
@@ -2901,39 +2902,39 @@ void tst_QLineEdit::setSelection_data()
int start, length, pos;
start = 0; length = 1; pos = 1;
- QTest::newRow(QString("selection start: %1 length: %2").arg(start).arg(length).toLatin1())
+ QTest::newRow(selectionTestName(start, length).constData())
<< text << start << length << pos << QString("A") << true;
start = 0; length = 2; pos = 2;
- QTest::newRow(QString("selection start: %1 length: %2").arg(start).arg(length).toLatin1())
+ QTest::newRow(selectionTestName(start, length).constData())
<< text << start << length << pos << QString("Ab") << true;
start = 0; length = 4; pos = 4;
- QTest::newRow(QString("selection start: %1 length: %2").arg(start).arg(length).toLatin1())
+ QTest::newRow(selectionTestName(start, length).constData())
<< text << start << length << pos << QString("Abc ") << true;
start = -1; length = 0; pos = text.length();
- QTest::newRow(QString("selection start: %1 length: %2").arg(start).arg(length).toLatin1())
+ QTest::newRow(selectionTestName(start, length).constData())
<< text << start << length << pos << QString() << false;
start = 34; length = 1; pos = 35;
- QTest::newRow(QString("selection start: %1 length: %2").arg(start).arg(length).toLatin1())
+ QTest::newRow(selectionTestName(start, length).constData())
<< text << start << length << pos << QString("z") << true;
start = 34; length = 2; pos = 35;
- QTest::newRow(QString("selection start: %1 length: %2").arg(start).arg(length).toLatin1())
+ QTest::newRow(selectionTestName(start, length).constData())
<< text << start << length << pos << QString("z") << true;
start = 34; length = -1; pos = 33;
- QTest::newRow(QString("selection start: %1 length: %2").arg(start).arg(length).toLatin1())
+ QTest::newRow(selectionTestName(start, length).constData())
<< text << start << length << pos << QString("y") << true;
start = 1; length = -2; pos = 0;
- QTest::newRow(QString("selection start: %1 length: %2").arg(start).arg(length).toLatin1())
+ QTest::newRow(selectionTestName(start, length).constData())
<< text << start << length << pos << QString("A") << true;
start = -1; length = -1; pos = text.length();
- QTest::newRow(QString("selection start: %1 length: %2").arg(start).arg(length).toLatin1())
+ QTest::newRow(selectionTestName(start, length).constData())
<< text << start << length << pos << QString() << false;
}
@@ -3314,7 +3315,7 @@ void tst_QLineEdit::inlineCompletion()
QStandardItem *root = model->invisibleRootItem();
QStandardItem *items[5];
for (int i = 0; i < 5; i++) {
- items[i] = new QStandardItem(QString("item%1").arg(i));
+ items[i] = new QStandardItem(QLatin1String("item") + QString::number(i));
if ((i+2)%2 == 0) { // disable 0,2,4
items[i]->setFlags(items[i]->flags() & ~Qt::ItemIsEnabled);
}
@@ -4504,5 +4505,61 @@ void tst_QLineEdit::QTBUG1266_setInputMaskEmittingTextEdited()
QCOMPARE(spy.count(), 0);
}
+void tst_QLineEdit::shortcutOverrideOnReadonlyLineEdit_data()
+{
+ QTest::addColumn<QKeySequence>("keySequence");
+ QTest::addColumn<bool>("shouldBeHandledByQLineEdit");
+
+ QTest::newRow("Copy") << QKeySequence(QKeySequence::Copy) << true;
+ QTest::newRow("MoveToNextChar") << QKeySequence(QKeySequence::MoveToNextChar) << true;
+ QTest::newRow("SelectAll") << QKeySequence(QKeySequence::SelectAll) << true;
+ QTest::newRow("Right press") << QKeySequence(Qt::Key_Right) << true;
+ QTest::newRow("Left press") << QKeySequence(Qt::Key_Left) << true;
+
+ QTest::newRow("Paste") << QKeySequence(QKeySequence::Paste) << false;
+ QTest::newRow("Paste") << QKeySequence(QKeySequence::Cut) << false;
+ QTest::newRow("Undo") << QKeySequence(QKeySequence::Undo) << false;
+ QTest::newRow("Redo") << QKeySequence(QKeySequence::Redo) << false;
+
+ QTest::newRow("a") << QKeySequence(Qt::Key_A) << false;
+ QTest::newRow("b") << QKeySequence(Qt::Key_B) << false;
+ QTest::newRow("c") << QKeySequence(Qt::Key_C) << false;
+ QTest::newRow("x") << QKeySequence(Qt::Key_X) << false;
+ QTest::newRow("X") << QKeySequence(Qt::ShiftModifier + Qt::Key_X) << false;
+
+ QTest::newRow("Alt+Home") << QKeySequence(Qt::AltModifier + Qt::Key_Home) << false;
+}
+
+void tst_QLineEdit::shortcutOverrideOnReadonlyLineEdit()
+{
+ QFETCH(QKeySequence, keySequence);
+ QFETCH(bool, shouldBeHandledByQLineEdit);
+
+ QWidget widget;
+
+ QShortcut *shortcut = new QShortcut(keySequence, &widget);
+ QSignalSpy spy(shortcut, &QShortcut::activated);
+ QVERIFY(spy.isValid());
+
+ QLineEdit *lineEdit = new QLineEdit(QStringLiteral("Test"), &widget);
+ lineEdit->setReadOnly(true);
+ lineEdit->setFocus();
+
+ widget.show();
+
+ QVERIFY(QTest::qWaitForWindowActive(&widget));
+
+ const int keySequenceCount = keySequence.count();
+ for (int i = 0; i < keySequenceCount; ++i) {
+ const uint key = keySequence[i];
+ QTest::keyClick(lineEdit,
+ Qt::Key(key & ~Qt::KeyboardModifierMask),
+ Qt::KeyboardModifier(key & Qt::KeyboardModifierMask));
+ }
+
+ const int activationCount = shouldBeHandledByQLineEdit ? 0 : 1;
+ QCOMPARE(spy.count(), activationCount);
+}
+
QTEST_MAIN(tst_QLineEdit)
#include "tst_qlineedit.moc"
diff --git a/tests/auto/widgets/widgets/qmainwindow/qmainwindow.pro b/tests/auto/widgets/widgets/qmainwindow/qmainwindow.pro
index bd4fc6ba97..7e0a5320b0 100644
--- a/tests/auto/widgets/widgets/qmainwindow/qmainwindow.pro
+++ b/tests/auto/widgets/widgets/qmainwindow/qmainwindow.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qmainwindow
QT += widgets widgets-private testlib
SOURCES += tst_qmainwindow.cpp
diff --git a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
index 6282028746..5bd26c632c 100644
--- a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
+++ b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.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$
**
@@ -1369,7 +1364,7 @@ void tst_QMainWindow::restoreStateFromPreviousVersion()
QVector<QDockWidget*> docks;
for(int i = 0; i < 16; ++i) {
- const QString name = QString::fromLatin1("dock %1").arg(i);
+ const QString name = QStringLiteral("dock ") + QString::number(i);
QDockWidget *dock = new QDockWidget(name);
docks += dock;
dock->setObjectName(name);
diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
index aa86e02465..607fc1625a 100644
--- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
+++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.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$
**
@@ -622,6 +617,11 @@ void tst_QMdiArea::showWindows()
//#define USE_SHOW
+static inline QString windowTitle(const QString &t, const QString &f)
+{
+ return t + QLatin1String(" - [") + f + QLatin1Char(']');
+}
+
void tst_QMdiArea::changeWindowTitle()
{
const QString mwc = QString::fromLatin1("MainWindow's Caption");
@@ -633,7 +633,7 @@ void tst_QMdiArea::changeWindowTitle()
mw->setWindowTitle( mwc );
QMdiArea *ws = new QMdiArea( mw );
mw->setCentralWidget( ws );
- mw->menuBar();
+ mw->menuBar()->setNativeMenuBar(false);
mw->show();
QVERIFY(QTest::qWaitForWindowExposed(mw));
@@ -649,7 +649,7 @@ void tst_QMdiArea::changeWindowTitle()
widget->setWindowState(Qt::WindowMaximized);
#endif
#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
- QTRY_COMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc).arg(wc) );
+ QTRY_COMPARE( mw->windowTitle(), windowTitle(mwc, wc) );
#endif
mw->hide();
@@ -658,7 +658,7 @@ void tst_QMdiArea::changeWindowTitle()
QVERIFY(QTest::qWaitForWindowExposed(mw));
#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
- QTRY_COMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc).arg(wc) );
+ QTRY_COMPARE( mw->windowTitle(), windowTitle(mwc, wc) );
#endif
#ifdef USE_SHOW
@@ -676,11 +676,11 @@ void tst_QMdiArea::changeWindowTitle()
#endif
qApp->processEvents();
#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
- QTRY_COMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc).arg(wc) );
+ QTRY_COMPARE( mw->windowTitle(), windowTitle(mwc, wc) );
widget->setWindowTitle( wc2 );
- QCOMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc).arg(wc2) );
+ QCOMPARE( mw->windowTitle(), windowTitle(mwc, wc2) );
mw->setWindowTitle( mwc2 );
- QCOMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc2).arg(wc2) );
+ QCOMPARE( mw->windowTitle(), windowTitle(mwc2, wc2) );
#endif
mw->show();
@@ -694,7 +694,7 @@ void tst_QMdiArea::changeWindowTitle()
qApp->processEvents();
#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
- QCOMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc2).arg(wc2) );
+ QCOMPARE( mw->windowTitle(), windowTitle(mwc2, wc2) );
#endif
#ifdef USE_SHOW
widget->showNormal();
@@ -715,7 +715,7 @@ void tst_QMdiArea::changeWindowTitle()
#endif
qApp->processEvents();
#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
- QCOMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc2).arg(wc2) );
+ QCOMPARE( mw->windowTitle(), windowTitle(mwc2, wc2) );
#endif
#ifdef USE_SHOW
@@ -742,7 +742,7 @@ void tst_QMdiArea::changeModified()
mw->setWindowTitle( mwc );
QMdiArea *ws = new QMdiArea( mw );
mw->setCentralWidget( ws );
- mw->menuBar();
+ mw->menuBar()->setNativeMenuBar(false);
mw->show();
QWidget *widget = new QWidget( ws );
@@ -2007,6 +2007,7 @@ void tst_QMdiArea::iconGeometryInMenuBar()
#if !defined (Q_OS_MAC) && !defined(Q_OS_WINCE)
QMainWindow mainWindow;
QMenuBar *menuBar = mainWindow.menuBar();
+ menuBar->setNativeMenuBar(false);
QMdiArea *mdiArea = new QMdiArea;
QMdiSubWindow *subWindow = mdiArea->addSubWindow(new QWidget);
mainWindow.setCentralWidget(mdiArea);
@@ -2322,7 +2323,7 @@ void tst_QMdiArea::setViewMode()
iconPixmap.fill(Qt::red);
for (int i = 0; i < 5; ++i) {
QMdiSubWindow *subWindow = mdiArea.addSubWindow(new QWidget);
- subWindow->setWindowTitle(QString(QLatin1String("Title %1")).arg(i));
+ subWindow->setWindowTitle(QLatin1String("Title ") + QString::number(i));
subWindow->setWindowIcon(iconPixmap);
}
diff --git a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
index db252347ac..fe5c3a14a0 100644
--- a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
+++ b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.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$
**
@@ -202,6 +197,7 @@ private slots:
void task_226929();
void styleChange();
void testFullScreenState();
+ void testRemoveBaseWidget();
};
void tst_QMdiSubWindow::initTestCase()
@@ -396,7 +392,7 @@ void tst_QMdiSubWindow::mainWindowSupport()
QMdiArea *nestedWorkspace = new QMdiArea; // :-)
window->setWidget(nestedWorkspace);
- window->widget()->setWindowTitle(QString::fromLatin1("Window %1").arg(i));
+ window->widget()->setWindowTitle(QLatin1String("Window ") + QString::number(i));
workspace->addSubWindow(window);
QVERIFY(!window->maximizedButtonsWidget());
@@ -423,8 +419,9 @@ void tst_QMdiSubWindow::mainWindowSupport()
QVERIFY(window->maximizedSystemMenuIconWidget());
QCOMPARE(window->maximizedSystemMenuIconWidget(), qobject_cast<QWidget *>(mainWindow.menuBar()
->cornerWidget(Qt::TopLeftCorner)));
- QCOMPARE(mainWindow.windowTitle(), QString::fromLatin1("%1 - [%2]")
- .arg(originalWindowTitle, window->widget()->windowTitle()));
+ const QString expectedTitle = originalWindowTitle + QLatin1String(" - [")
+ + window->widget()->windowTitle() + QLatin1Char(']');
+ QCOMPARE(mainWindow.windowTitle(), expectedTitle);
#endif
// Check that nested child windows don't set window title
@@ -432,7 +429,7 @@ void tst_QMdiSubWindow::mainWindowSupport()
QMdiSubWindow *nestedWindow = new QMdiSubWindow;
nestedWindow->setWidget(new QWidget);
nestedWorkspace->addSubWindow(nestedWindow);
- nestedWindow->widget()->setWindowTitle(QString::fromLatin1("NestedWindow %1").arg(i));
+ nestedWindow->widget()->setWindowTitle(QLatin1String("NestedWindow ") + QString::number(i));
nestedWindow->showMaximized();
qApp->processEvents();
QVERIFY(nestedWindow->isMaximized());
@@ -970,7 +967,7 @@ void tst_QMdiSubWindow::setSystemMenu()
QMdiArea *mdiArea = new QMdiArea;
mdiArea->addSubWindow(subWindow);
mainWindow.setCentralWidget(mdiArea);
- mainWindow.menuBar();
+ mainWindow.menuBar()->setNativeMenuBar(false);
mainWindow.show();
QVERIFY(QTest::qWaitForWindowExposed(&mainWindow));
QTest::qWait(60);
@@ -1470,6 +1467,7 @@ void tst_QMdiSubWindow::hideAndShow()
QMainWindow mainWindow;
mainWindow.setGeometry(0, 0, 640, 480);
QMenuBar *menuBar = mainWindow.menuBar();
+ menuBar->setNativeMenuBar(false);
mainWindow.setCentralWidget(tabWidget);
mainWindow.show();
QVERIFY(QTest::qWaitForWindowExposed(&mainWindow));
@@ -1738,6 +1736,7 @@ void tst_QMdiSubWindow::replaceMenuBarWhileMaximized()
mainWindow.setCentralWidget(mdiArea);
QMenuBar *menuBar = mainWindow.menuBar();
+ menuBar->setNativeMenuBar(false);
mainWindow.show();
QVERIFY(QTest::qWaitForWindowExposed(&mainWindow));
@@ -1754,6 +1753,7 @@ void tst_QMdiSubWindow::replaceMenuBarWhileMaximized()
// Replace.
mainWindow.setMenuBar(new QMenuBar);
menuBar = mainWindow.menuBar();
+ menuBar->setNativeMenuBar(false);
qApp->processEvents();
QVERIFY(subWindow->maximizedButtonsWidget());
@@ -2080,6 +2080,27 @@ void tst_QMdiSubWindow::testFullScreenState()
QCOMPARE(subWindow->size(), QSize(300, 300));
}
+void tst_QMdiSubWindow::testRemoveBaseWidget()
+{
+ QMdiArea mdiArea;
+ mdiArea.show();
+
+ QWidget *widget1 = new QWidget;
+ mdiArea.addSubWindow(widget1);
+
+ QWidget *widget2 = new QWidget;
+ mdiArea.addSubWindow(widget2);
+
+ mdiArea.removeSubWindow(widget1);
+ QVERIFY(!widget1->parent());
+
+ widget2->setParent(widget1);
+ mdiArea.removeSubWindow(widget2);
+ QCOMPARE(widget2->parent(), widget1);
+
+ delete widget1;
+}
+
QTEST_MAIN(tst_QMdiSubWindow)
#include "tst_qmdisubwindow.moc"
diff --git a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
index 20f17f6e9e..c3b432788b 100644
--- a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
+++ b/tests/auto/widgets/widgets/qmenu/tst_qmenu.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$
**
@@ -455,6 +450,7 @@ void tst_QMenu::overrideMenuAction()
//test the override menu action by first creating an action to which we set its menu
QMainWindow w;
w.resize(300, 200);
+ w.menuBar()->setNativeMenuBar(false);
centerOnScreen(&w);
QAction *aFileMenu = new QAction("&File", &w);
@@ -558,7 +554,7 @@ void tst_QMenu::widgetActionFocus()
QMenu m;
QListWidget *l = new QListWidget(&m);
for (int i = 1; i<3 ; i++)
- l->addItem(QString("item%1").arg(i));
+ l->addItem(QStringLiteral("item" ) + QString::number(i));
QWidgetAction *wa = new QWidgetAction(&m);
wa->setDefaultWidget(l);
m.addAction(wa);
@@ -595,10 +591,19 @@ void tst_QMenu::widgetActionFocus()
QCOMPARE(m.activeAction(), (QAction *)wa);
}
+static QMenu *getTornOffMenu()
+{
+ foreach (QWidget *w, QApplication::allWidgets()) {
+ if (w->isVisible() && w->inherits("QTornOffMenu"))
+ return static_cast<QMenu *>(w);
+ }
+ return Q_NULLPTR;
+}
+
void tst_QMenu::tearOff()
{
QWidget widget;
- QMenu *menu = new QMenu(&widget);
+ QScopedPointer<QMenu> menu(new QMenu(&widget));
QVERIFY(!menu->isTearOffEnabled()); //default value
menu->setTearOffEnabled(true);
menu->addAction("aaa");
@@ -611,24 +616,43 @@ void tst_QMenu::tearOff()
widget.activateWindow();
QVERIFY(QTest::qWaitForWindowActive(&widget));
menu->popup(widget.geometry().topRight() + QPoint(50, 0));
- QVERIFY(QTest::qWaitForWindowActive(menu));
+ QVERIFY(QTest::qWaitForWindowActive(menu.data()));
QVERIFY(!menu->isTearOffMenuVisible());
- QTest::mouseClick(menu, Qt::LeftButton, 0, QPoint(3, 3), 10);
+ QTest::mouseClick(menu.data(), Qt::LeftButton, 0, QPoint(3, 3), 10);
QTRY_VERIFY(menu->isTearOffMenuVisible());
- QPointer<QMenu> torn = 0;
- foreach (QWidget *w, QApplication::allWidgets()) {
- if (w->inherits("QTornOffMenu")) {
- torn = static_cast<QMenu *>(w);
- break;
- }
- }
+ QPointer<QMenu> torn = getTornOffMenu();
QVERIFY(torn);
QVERIFY(torn->isVisible());
menu->hideTearOffMenu();
QVERIFY(!menu->isTearOffMenuVisible());
QVERIFY(!torn->isVisible());
+
+#ifndef QT_NO_CURSOR
+ // Test under-mouse positioning
+ menu->showTearOffMenu();
+ torn = getTornOffMenu();
+ QVERIFY(torn);
+ QVERIFY(torn->isVisible());
+ QVERIFY(menu->isTearOffMenuVisible());
+ // Some platforms include the window title bar in its geometry.
+ QTRY_COMPARE(torn->windowHandle()->position(), QCursor::pos());
+
+ menu->hideTearOffMenu();
+ QVERIFY(!menu->isTearOffMenuVisible());
+ QVERIFY(!torn->isVisible());
+
+ // Test custom positioning
+ const QPoint &pos = QCursor::pos() / 2 + QPoint(10, 10);
+ menu->showTearOffMenu(pos);
+ torn = getTornOffMenu();
+ QVERIFY(torn);
+ QVERIFY(torn->isVisible());
+ QVERIFY(menu->isTearOffMenuVisible());
+ // Some platforms include the window title bar in its geometry.
+ QTRY_COMPARE(torn->windowHandle()->position(), pos);
+#endif // QT_NO_CURSOR
}
void tst_QMenu::layoutDirection()
@@ -806,7 +830,7 @@ void tst_QMenu::task250673_activeMultiColumnSubMenuPosition()
uint i = 2;
while (main.columnCount() < 2) {
- main.addAction(QString("Item %1").arg(i));
+ main.addAction(QLatin1String("Item ") + QString::number(i));
++i;
QVERIFY(i<1000);
}
@@ -1186,7 +1210,7 @@ public:
MyMenu() : m_currentIndex(0)
{
for (int i = 0; i < 2; ++i)
- dialogActions[i] = addAction( QString("dialog %1").arg(i), dialogs + i, SLOT(exec()));
+ dialogActions[i] = addAction(QLatin1String("dialog ") + QString::number(i), dialogs + i, SLOT(exec()));
}
void activateAction(int index)
diff --git a/tests/auto/widgets/widgets/qmenu/tst_qmenu_mac.mm b/tests/auto/widgets/widgets/qmenu/tst_qmenu_mac.mm
index b1708d8669..f90af47c19 100644
--- a/tests/auto/widgets/widgets/qmenu/tst_qmenu_mac.mm
+++ b/tests/auto/widgets/widgets/qmenu/tst_qmenu_mac.mm
@@ -1,37 +1,32 @@
/****************************************************************************
**
-** 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$
**
****************************************************************************/
-#import <Cocoa/Cocoa.h>
+#import <AppKit/AppKit.h>
#include <QMenu>
#include <QTest>
diff --git a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
index f787d73a02..3bcdea3137 100644
--- a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
+++ b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.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$
**
@@ -211,6 +206,7 @@ void tst_QMenuBar::cleanup()
TestMenu tst_QMenuBar::initSimpleMenuBar(QMenuBar *mb)
{
TestMenu result;
+ mb->setNativeMenuBar(false);
connect(mb, SIGNAL(triggered(QAction*)), this, SLOT(onSimpleActivated(QAction*)));
QMenu *menu = mb->addMenu(QStringLiteral("&accel"));
QAction *action = menu->addAction(QStringLiteral("menu1") );
@@ -278,6 +274,7 @@ void tst_QMenuBar::onComplexActionTriggered()
TestMenu tst_QMenuBar::initComplexMenuBar(QMenuBar *mb)
{
TestMenu result;
+ mb->setNativeMenuBar(false);
QMenu *menu = addNumberedMenu(mb, 1);
result.menus << menu;
for (char c = 'a'; c < 'c'; ++c)
@@ -991,6 +988,7 @@ void tst_QMenuBar::check_altClosePress()
QMainWindow w;
w.setWindowTitle(QTest::currentTestFunction());
+ w.menuBar()->setNativeMenuBar(false);
QMenu *menuFile = w.menuBar()->addMenu(tr("&File"));
menuFile->addAction("Quit");
QMenu *menuEdit = w.menuBar()->addMenu(tr("&Edit"));
@@ -1066,6 +1064,7 @@ void tst_QMenuBar::check_menuPosition()
menu.addAction("item");
}
+ w.menuBar()->setNativeMenuBar(false);
QAction *menu_action = w.menuBar()->addMenu(&menu);
centerOnScreen(&w);
w.show();
@@ -1399,6 +1398,7 @@ void tst_QMenuBar::cornerWidgets()
widget.setWindowTitle(QLatin1String(QTest::currentTestFunction()) + dataTag);
QVBoxLayout *layout = new QVBoxLayout(&widget);
QMenuBar *menuBar = new QMenuBar(&widget);
+ menuBar->setNativeMenuBar(false);
layout->addWidget(menuBar);
QMenu *fileMenu = menuBar->addMenu("File");
fileMenu->addAction("Quit");
diff --git a/tests/auto/widgets/widgets/qopenglwidget/BLACKLIST b/tests/auto/widgets/widgets/qopenglwidget/BLACKLIST
index 725b8e93b4..86c7141268 100644
--- a/tests/auto/widgets/widgets/qopenglwidget/BLACKLIST
+++ b/tests/auto/widgets/widgets/qopenglwidget/BLACKLIST
@@ -1,2 +1,14 @@
[clearAndGrab]
opensuse-13.1
+
+#QTBUG-31611
+[painter]
+windows msvc-2010 32bit developer-build
+
+#QTBUG-31611
+[reparentToAlreadyCreated]
+windows msvc-2010 32bit developer-build
+
+#QTBUG-31611
+[reparentToNotYetCreated]
+windows msvc-2010 32bit developer-build
diff --git a/tests/auto/widgets/widgets/qopenglwidget/qopenglwidget.pro b/tests/auto/widgets/widgets/qopenglwidget/qopenglwidget.pro
index bbc6e987af..2d4cff9e10 100644
--- a/tests/auto/widgets/widgets/qopenglwidget/qopenglwidget.pro
+++ b/tests/auto/widgets/widgets/qopenglwidget/qopenglwidget.pro
@@ -1,8 +1,5 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qopenglwidget
QT += gui-private core-private testlib widgets
SOURCES += tst_qopenglwidget.cpp
-
-win32-msvc2010:contains(QT_CONFIG, angle):CONFIG += insignificant_test # QTBUG-31611
diff --git a/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp b/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp
index a4a0045265..c76c4d927b 100644
--- a/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp
+++ b/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.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/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
index d466489acb..6ad13cd781 100644
--- a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
+++ b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.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/widgets/widgets/qprogressbar/tst_qprogressbar.cpp b/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp
index 5455ebb830..205ef34958 100644
--- a/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp
+++ b/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.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/widgets/widgets/qpushbutton/tst_qpushbutton.cpp b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
index 44a554ad82..302d290c72 100644
--- a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
+++ b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.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$
**
@@ -49,17 +44,12 @@
class tst_QPushButton : public QObject
{
Q_OBJECT
-public:
- tst_QPushButton();
- virtual ~tst_QPushButton();
-
-public slots:
+private slots:
void initTestCase();
void cleanupTestCase();
void init();
- void cleanup();
-private slots:
+
void getSetCheck();
void autoRepeat();
void pressed();
@@ -109,14 +99,6 @@ void tst_QPushButton::getSetCheck()
delete var1;
}
-tst_QPushButton::tst_QPushButton()
-{
-}
-
-tst_QPushButton::~tst_QPushButton()
-{
-}
-
void tst_QPushButton::initTestCase()
{
// Create the test class
@@ -149,11 +131,6 @@ void tst_QPushButton::init()
resetCounters();
}
-void tst_QPushButton::cleanup()
-{
-}
-
-
void tst_QPushButton::resetCounters()
{
toggle_count = 0;
@@ -537,9 +514,6 @@ void tst_QPushButton::sizeHint_data()
#if !defined(QT_NO_STYLE_WINDOWS)
QTest::newRow("windows") << QString::fromLatin1("windows");
#endif
-#if !defined(QT_NO_STYLE_GTK)
- QTest::newRow("gtk") << QString::fromLatin1("gtk");
-#endif
#if defined(Q_OS_MAC) && !defined(QT_NO_STYLE_MAC)
QTest::newRow("macintosh") << QString::fromLatin1("macintosh");
#endif
diff --git a/tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp b/tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp
index 7d8190c932..e3752df09e 100644
--- a/tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp
+++ b/tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.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/widgets/widgets/qscrollarea/qscrollarea.pro b/tests/auto/widgets/widgets/qscrollarea/qscrollarea.pro
index 0cd706420e..bdf18a0252 100644
--- a/tests/auto/widgets/widgets/qscrollarea/qscrollarea.pro
+++ b/tests/auto/widgets/widgets/qscrollarea/qscrollarea.pro
@@ -3,7 +3,6 @@
############################################################
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qscrollarea
QT += widgets testlib
SOURCES += tst_qscrollarea.cpp
diff --git a/tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp b/tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp
index ce6afc0a57..d1923e4bb0 100644
--- a/tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp
+++ b/tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.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/widgets/widgets/qscrollbar/qscrollbar.pro b/tests/auto/widgets/widgets/qscrollbar/qscrollbar.pro
index 8c6ea6e1d4..2863dd2034 100644
--- a/tests/auto/widgets/widgets/qscrollbar/qscrollbar.pro
+++ b/tests/auto/widgets/widgets/qscrollbar/qscrollbar.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qscrollbar
QT += widgets testlib
SOURCES += tst_qscrollbar.cpp
diff --git a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
index 0b7189179d..08ef96bf1b 100644
--- a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
+++ b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.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/widgets/widgets/qsizegrip/qsizegrip.pro b/tests/auto/widgets/widgets/qsizegrip/qsizegrip.pro
index ceb897c612..1149b50feb 100644
--- a/tests/auto/widgets/widgets/qsizegrip/qsizegrip.pro
+++ b/tests/auto/widgets/widgets/qsizegrip/qsizegrip.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qsizegrip
INCLUDEPATH += .
QT += widgets testlib
diff --git a/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp b/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp
index d5f6ac689f..7610adc155 100644
--- a/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp
+++ b/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.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/widgets/widgets/qslider/qslider.pro b/tests/auto/widgets/widgets/qslider/qslider.pro
index d0a61e5a95..4c8b061459 100644
--- a/tests/auto/widgets/widgets/qslider/qslider.pro
+++ b/tests/auto/widgets/widgets/qslider/qslider.pro
@@ -3,7 +3,6 @@
############################################################
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qslider
QT += widgets testlib
SOURCES += tst_qslider.cpp
diff --git a/tests/auto/widgets/widgets/qslider/tst_qslider.cpp b/tests/auto/widgets/widgets/qslider/tst_qslider.cpp
index 3bbf41d61b..65cc3c9ece 100644
--- a/tests/auto/widgets/widgets/qslider/tst_qslider.cpp
+++ b/tests/auto/widgets/widgets/qslider/tst_qslider.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/widgets/widgets/qspinbox/tst_qspinbox.cpp b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
index 34b05c5291..c735d269c5 100644
--- a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
+++ b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.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/widgets/widgets/qsplashscreen/tst_qsplashscreen.cpp b/tests/auto/widgets/widgets/qsplashscreen/tst_qsplashscreen.cpp
index f9632a5974..91a9c49b00 100644
--- a/tests/auto/widgets/widgets/qsplashscreen/tst_qsplashscreen.cpp
+++ b/tests/auto/widgets/widgets/qsplashscreen/tst_qsplashscreen.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/widgets/widgets/qsplitter/qsplitter.pro b/tests/auto/widgets/widgets/qsplitter/qsplitter.pro
index c43847b11f..8ae745ea9d 100644
--- a/tests/auto/widgets/widgets/qsplitter/qsplitter.pro
+++ b/tests/auto/widgets/widgets/qsplitter/qsplitter.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qsplitter
QT += widgets testlib
SOURCES += tst_qsplitter.cpp
diff --git a/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp b/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp
index a54ad6ecd0..f490446c8a 100644
--- a/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp
+++ b/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.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$
**
@@ -678,9 +673,9 @@ void tst_QSplitter::task187373_addAbstractScrollAreas_data()
classNames << QLatin1String("QTreeView");
foreach (QString className, classNames) {
- QTest::newRow(qPrintable(QString("%1 1").arg(className))) << className << false << true;
- QTest::newRow(qPrintable(QString("%1 2").arg(className))) << className << true << false;
- QTest::newRow(qPrintable(QString("%1 3").arg(className))) << className << true << true;
+ QTest::newRow(qPrintable(className + QLatin1String(" 1"))) << className << false << true;
+ QTest::newRow(qPrintable(className + QLatin1String(" 2"))) << className << true << false;
+ QTest::newRow(qPrintable(className + QLatin1String(" 3"))) << className << true << true;
}
}
diff --git a/tests/auto/widgets/widgets/qstackedwidget/tst_qstackedwidget.cpp b/tests/auto/widgets/widgets/qstackedwidget/tst_qstackedwidget.cpp
index d060c4ceae..7b5ec4fa4c 100644
--- a/tests/auto/widgets/widgets/qstackedwidget/tst_qstackedwidget.cpp
+++ b/tests/auto/widgets/widgets/qstackedwidget/tst_qstackedwidget.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$
**
@@ -149,7 +144,7 @@ private:
void createWidgets() {
for (int i = 0; i < m_n; ++i) {
QLineEdit *le = new QLineEdit(this);
- le->setObjectName(QString::fromLatin1("lineEdit%1").arg(i));
+ le->setObjectName(QLatin1String("lineEdit") + QString::number(i));
layout ()->addWidget(le);
m_les << le;
}
diff --git a/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp b/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp
index 991e72acd0..14ee6cb9bd 100644
--- a/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp
+++ b/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.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,21 +39,13 @@ class tst_QStatusBar: public QObject
{
Q_OBJECT
-public:
- tst_QStatusBar();
- virtual ~tst_QStatusBar();
-
-
protected slots:
void messageChanged(const QString&);
-public slots:
- void initTestCase();
- void cleanupTestCase();
+private slots:
void init();
void cleanup();
-private slots:
void tempMessage();
void insertWidget();
void insertPermanentWidget();
@@ -73,14 +60,6 @@ private:
QString currentMessage;
};
-tst_QStatusBar::tst_QStatusBar()
-{
-}
-
-tst_QStatusBar::~tst_QStatusBar()
-{
-}
-
void tst_QStatusBar::init()
{
testWidget = new QStatusBar;
@@ -97,14 +76,6 @@ void tst_QStatusBar::cleanup()
delete testWidget;
}
-void tst_QStatusBar::initTestCase()
-{
-}
-
-void tst_QStatusBar::cleanupTestCase()
-{
-}
-
void tst_QStatusBar::messageChanged(const QString &m)
{
currentMessage = m;
diff --git a/tests/auto/widgets/widgets/qtabbar/qtabbar.pro b/tests/auto/widgets/widgets/qtabbar/qtabbar.pro
index 8772005bef..01b3c4a404 100644
--- a/tests/auto/widgets/widgets/qtabbar/qtabbar.pro
+++ b/tests/auto/widgets/widgets/qtabbar/qtabbar.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qtabbar
QT += widgets testlib
SOURCES += tst_qtabbar.cpp
diff --git a/tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp b/tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp
index 3f1badeda1..550cca8145 100644
--- a/tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp
+++ b/tests/auto/widgets/widgets/qtabbar/tst_qtabbar.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$
**
@@ -600,7 +595,7 @@ public slots:
void updateTabText()
{
count++;
- setTabText(0, QString("%1").arg(count));
+ setTabText(0, QString::number(count));
}
};
diff --git a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
index a991f18110..f8125bf749 100644
--- a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
+++ b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.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$
**
@@ -76,13 +71,11 @@ class QTabWidgetChild:public QTabWidget {
class tst_QTabWidget:public QObject {
Q_OBJECT
- public:
- tst_QTabWidget();
- public slots:
+private slots:
void init();
void cleanup();
- private slots:
+
void getSetCheck();
void testChild();
void addRemoveTab();
@@ -156,10 +149,6 @@ void tst_QTabWidget::getSetCheck()
QCOMPARE(w5, obj1.currentWidget()); // current not changed
}
-tst_QTabWidget::tst_QTabWidget()
-{
-}
-
void tst_QTabWidget::init()
{
tw = new QTabWidget(0);
diff --git a/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp b/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp
index 8c9e908228..700fa505c1 100644
--- a/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp
+++ b/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.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$
**
@@ -72,15 +67,11 @@ QVariant TestBrowser::loadResource(int type, const QUrl &name)
class tst_QTextBrowser : public QObject
{
Q_OBJECT
-public:
- tst_QTextBrowser();
- virtual ~tst_QTextBrowser();
-public slots:
+private slots:
void init();
void cleanup();
-private slots:
void noReloadOnAnchorJump();
void bgColorOnSourceChange();
void forwardButton();
@@ -105,14 +96,6 @@ private:
TestBrowser *browser;
};
-tst_QTextBrowser::tst_QTextBrowser()
-{
-}
-
-tst_QTextBrowser::~tst_QTextBrowser()
-{
-}
-
void tst_QTextBrowser::init()
{
QString prefix = QFileInfo(QFINDTESTDATA("subdir")).absolutePath();
diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
index b81e4df123..f1ebfda88b 100644
--- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
+++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.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/widgets/widgets/qtoolbar/tst_qtoolbar.cpp b/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp
index e653a85d96..3525dcddd6 100644
--- a/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp
+++ b/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.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/widgets/widgets/qtoolbox/qtoolbox.pro b/tests/auto/widgets/widgets/qtoolbox/qtoolbox.pro
index a8c62ec54a..19b3a03443 100644
--- a/tests/auto/widgets/widgets/qtoolbox/qtoolbox.pro
+++ b/tests/auto/widgets/widgets/qtoolbox/qtoolbox.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qtoolbox
QT += widgets testlib
SOURCES += tst_qtoolbox.cpp
diff --git a/tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp b/tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp
index b016811eeb..8637b2e8f9 100644
--- a/tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp
+++ b/tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.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,19 +39,13 @@ class tst_QToolBox : public QObject
{
Q_OBJECT
-public:
- tst_QToolBox();
- virtual ~tst_QToolBox();
-
protected slots:
void currentChanged(int);
-public slots:
- void initTestCase();
- void cleanupTestCase();
+private slots:
void init();
void cleanup();
-private slots:
+
void getSetCheck();
void populate();
void change();
@@ -106,14 +95,6 @@ void tst_QToolBox::getSetCheck()
QCOMPARE(w3, obj1.currentWidget());
}
-tst_QToolBox::tst_QToolBox()
-{
-}
-
-tst_QToolBox::~tst_QToolBox()
-{
-}
-
class tst_QToolBoxPrivate
{
public:
@@ -183,14 +164,6 @@ void tst_QToolBox::cleanup()
delete d;
}
-void tst_QToolBox::initTestCase()
-{
-}
-
-void tst_QToolBox::cleanupTestCase()
-{
-}
-
void tst_QToolBox::currentChanged(int index)
{
currentIndex = index;
diff --git a/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp b/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp
index 0d1abe5032..1775f03680 100644
--- a/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp
+++ b/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.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$
**