summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/cmake/CMakeLists.txt5
-rw-r--r--tests/auto/cmake/test_interface_link_libraries/CMakeLists.txt21
-rw-r--r--tests/auto/cmake/test_interface_link_libraries/main.cpp48
-rw-r--r--tests/auto/cmake/test_interface_link_libraries/somelib.cpp52
-rw-r--r--tests/auto/cmake/test_interface_link_libraries/somelib.h58
-rw-r--r--tests/auto/cmake/test_moc_macro_target/CMakeLists.txt23
-rw-r--r--tests/auto/cmake/test_moc_macro_target/interface/myinterface.h52
-rw-r--r--tests/auto/cmake/test_moc_macro_target/main_gen_test.cpp61
-rw-r--r--tests/auto/cmake/test_moc_macro_target/main_wrap_test.cpp51
-rw-r--r--tests/auto/cmake/test_moc_macro_target/mywrapobject.h57
-rw-r--r--tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro2
-rw-r--r--tests/auto/corelib/plugin/qlibrary/qlibrary.pro2
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver.pro3
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.pro3
-rw-r--r--tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.pro3
-rw-r--r--tests/auto/dbus/qdbusmarshall/qpong/qpong.pro4
-rw-r--r--tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro3
-rw-r--r--tests/auto/network/access/qnetworkcachemetadata/qnetworkcachemetadata.pro3
-rw-r--r--tests/auto/network/access/qnetworkdiskcache/qnetworkdiskcache.pro3
-rw-r--r--tests/auto/network/ssl/qsslsocket/qsslsocket.pro3
-rw-r--r--tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/qsslsocket_onDemandCertificates_member.pro3
-rw-r--r--tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/qsslsocket_onDemandCertificates_static.pro3
-rw-r--r--tests/auto/tools/moc/moc.pro3
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp41
-rw-r--r--tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp7
-rw-r--r--tests/auto/xml/dom/qdom/qdom.pro1
-rw-r--r--tests/auto/xml/sax/qxmlinputsource/qxmlinputsource.pro5
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro3
28 files changed, 487 insertions, 36 deletions
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
index 0f794915ee..87d8a802f3 100644
--- a/tests/auto/cmake/CMakeLists.txt
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -129,3 +129,8 @@ expect_pass(test_opengl_lib)
if (NOT CMAKE_VERSION VERSION_LESS 2.8.11)
expect_pass(test_interface)
endif()
+
+if (NOT CMAKE_VERSION VERSION_LESS 2.8.12)
+ expect_pass(test_interface_link_libraries)
+ expect_pass(test_moc_macro_target)
+endif()
diff --git a/tests/auto/cmake/test_interface_link_libraries/CMakeLists.txt b/tests/auto/cmake/test_interface_link_libraries/CMakeLists.txt
new file mode 100644
index 0000000000..d747a43c4a
--- /dev/null
+++ b/tests/auto/cmake/test_interface_link_libraries/CMakeLists.txt
@@ -0,0 +1,21 @@
+
+cmake_minimum_required(VERSION 2.8)
+
+project(test_interface_link_libraries)
+
+find_package(Qt5Gui REQUIRED)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+cmake_policy(SET CMP0022 NEW)
+
+include(GenerateExportHeader)
+
+add_library(somelib SHARED somelib.cpp)
+generate_export_header(somelib)
+set_property(TARGET somelib PROPERTY LINK_LIBRARIES Qt5::Gui)
+set_property(TARGET somelib PROPERTY INTERFACE_LINK_LIBRARIES Qt5::Gui)
+
+add_executable(mainexe main.cpp)
+set_property(TARGET mainexe PROPERTY LINK_LIBRARIES somelib)
diff --git a/tests/auto/cmake/test_interface_link_libraries/main.cpp b/tests/auto/cmake/test_interface_link_libraries/main.cpp
new file mode 100644
index 0000000000..4ea2204d38
--- /dev/null
+++ b/tests/auto/cmake/test_interface_link_libraries/main.cpp
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "somelib.h"
+
+int main(int,char**)
+{
+ SomeObject so;
+ return so.value();
+}
diff --git a/tests/auto/cmake/test_interface_link_libraries/somelib.cpp b/tests/auto/cmake/test_interface_link_libraries/somelib.cpp
new file mode 100644
index 0000000000..633540b164
--- /dev/null
+++ b/tests/auto/cmake/test_interface_link_libraries/somelib.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "somelib.h"
+
+SomeObject::SomeObject(QObject *parent)
+ : QTextDocument(parent)
+{
+}
+
+int SomeObject::value()
+{
+ return 0;
+}
diff --git a/tests/auto/cmake/test_interface_link_libraries/somelib.h b/tests/auto/cmake/test_interface_link_libraries/somelib.h
new file mode 100644
index 0000000000..76b35b6b6a
--- /dev/null
+++ b/tests/auto/cmake/test_interface_link_libraries/somelib.h
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SOMELIB_H
+#define SOMELIB_H
+
+#include "somelib_export.h"
+
+#include <QTextDocument>
+
+class SOMELIB_EXPORT SomeObject : QTextDocument
+{
+ Q_OBJECT
+public:
+ explicit SomeObject(QObject *parent = 0);
+
+ int value();
+};
+
+#endif
diff --git a/tests/auto/cmake/test_moc_macro_target/CMakeLists.txt b/tests/auto/cmake/test_moc_macro_target/CMakeLists.txt
new file mode 100644
index 0000000000..e97ac199e8
--- /dev/null
+++ b/tests/auto/cmake/test_moc_macro_target/CMakeLists.txt
@@ -0,0 +1,23 @@
+
+cmake_minimum_required(VERSION 2.8)
+
+project(test_moc_macro_target)
+
+find_package(Qt5Core REQUIRED)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+qt5_generate_moc(main_gen_test.cpp
+ "${CMAKE_CURRENT_BINARY_DIR}/main_gen_test.moc"
+ TARGET Qt5GenerateMacroTest
+)
+add_executable(Qt5GenerateMacroTest WIN32 main_gen_test.cpp "${CMAKE_CURRENT_BINARY_DIR}/main_gen_test.moc")
+target_include_directories(Qt5GenerateMacroTest PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/interface")
+target_link_libraries(Qt5GenerateMacroTest Qt5::Core)
+
+qt5_wrap_cpp(moc_file mywrapobject.h
+ TARGET Qt5WrapMacroTest
+)
+add_executable(Qt5WrapMacroTest WIN32 main_wrap_test.cpp ${moc_file})
+target_include_directories(Qt5WrapMacroTest PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/interface")
+target_link_libraries(Qt5WrapMacroTest Qt5::Core)
diff --git a/tests/auto/cmake/test_moc_macro_target/interface/myinterface.h b/tests/auto/cmake/test_moc_macro_target/interface/myinterface.h
new file mode 100644
index 0000000000..7218b200dd
--- /dev/null
+++ b/tests/auto/cmake/test_moc_macro_target/interface/myinterface.h
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MYINTERFACE_H
+#define MYINTERFACE_H
+
+class MyInterface
+{
+
+};
+
+Q_DECLARE_INTERFACE(MyInterface, "org.cmake.example.MyInterface")
+
+#endif
diff --git a/tests/auto/cmake/test_moc_macro_target/main_gen_test.cpp b/tests/auto/cmake/test_moc_macro_target/main_gen_test.cpp
new file mode 100644
index 0000000000..bdedc4e485
--- /dev/null
+++ b/tests/auto/cmake/test_moc_macro_target/main_gen_test.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QObject>
+
+#include "myinterface.h"
+
+class MyObject : public QObject, MyInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(MyInterface)
+public:
+ explicit MyObject(QObject *parent = 0) : QObject(parent) { }
+};
+
+int main(int argc, char **argv)
+{
+ MyObject mo;
+ mo.objectName();
+ return 0;
+}
+
+#include "main_gen_test.moc"
diff --git a/tests/auto/cmake/test_moc_macro_target/main_wrap_test.cpp b/tests/auto/cmake/test_moc_macro_target/main_wrap_test.cpp
new file mode 100644
index 0000000000..763e21b5d9
--- /dev/null
+++ b/tests/auto/cmake/test_moc_macro_target/main_wrap_test.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QObject>
+
+#include "mywrapobject.h"
+
+int main(int argc, char **argv)
+{
+ MyWrapObject mwo;
+ mwo.objectName();
+ return 0;
+}
diff --git a/tests/auto/cmake/test_moc_macro_target/mywrapobject.h b/tests/auto/cmake/test_moc_macro_target/mywrapobject.h
new file mode 100644
index 0000000000..29e9b24556
--- /dev/null
+++ b/tests/auto/cmake/test_moc_macro_target/mywrapobject.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MYWRAPOBJECT_H
+#define MYWRAPOBJECT_H
+
+#include <QObject>
+
+#include "myinterface.h"
+
+class MyWrapObject : public QObject, MyInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(MyInterface)
+public:
+ explicit MyWrapObject(QObject *parent = 0) : QObject(parent) { }
+};
+
+#endif
diff --git a/tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro
index 0dc7903c4c..8823d54590 100644
--- a/tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro
+++ b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro
@@ -1,7 +1,7 @@
CONFIG -= app_bundle debug_and_release
CONFIG += console
DESTDIR = ./
-QT -= gui
+QT = core
wince*: {
LIBS += coredll.lib
}
diff --git a/tests/auto/corelib/plugin/qlibrary/qlibrary.pro b/tests/auto/corelib/plugin/qlibrary/qlibrary.pro
index 49c29d7edc..5bdf780fc0 100644
--- a/tests/auto/corelib/plugin/qlibrary/qlibrary.pro
+++ b/tests/auto/corelib/plugin/qlibrary/qlibrary.pro
@@ -1,4 +1,4 @@
-QT -= gui
+QT = core
TEMPLATE = subdirs
CONFIG += ordered
diff --git a/tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver.pro b/tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver.pro
index 59597abe7b..dc480fc88c 100644
--- a/tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver.pro
+++ b/tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver.pro
@@ -1,7 +1,6 @@
SOURCES = qmyserver.cpp
HEADERS = ../myobject.h
TARGET = qmyserver
-QT += dbus
-QT -= gui
+QT = core dbus
CONFIG -= app_bundle
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.pro b/tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.pro
index 605b52e3aa..b863135b68 100644
--- a/tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.pro
+++ b/tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.pro
@@ -1,6 +1,5 @@
SOURCES = qpinger.cpp ../interface.cpp
HEADERS = ../interface.h
TARGET = qpinger
-QT += dbus
-QT -= gui
+QT = core dbus
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.pro b/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.pro
index 59597abe7b..dc480fc88c 100644
--- a/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.pro
+++ b/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.pro
@@ -1,7 +1,6 @@
SOURCES = qmyserver.cpp
HEADERS = ../myobject.h
TARGET = qmyserver
-QT += dbus
-QT -= gui
+QT = core dbus
CONFIG -= app_bundle
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/dbus/qdbusmarshall/qpong/qpong.pro b/tests/auto/dbus/qdbusmarshall/qpong/qpong.pro
index a63e915d9a..d652036034 100644
--- a/tests/auto/dbus/qdbusmarshall/qpong/qpong.pro
+++ b/tests/auto/dbus/qdbusmarshall/qpong/qpong.pro
@@ -1,7 +1,5 @@
SOURCES = qpong.cpp
TARGET = qpong
-QT += dbus
-QT -= gui
-
+QT = core dbus
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro b/tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro
index 56572a2490..2b5ffab088 100644
--- a/tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro
+++ b/tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro
@@ -1,8 +1,7 @@
CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qabstractnetworkcache
-QT += network testlib
-QT -= gui
+QT = core network testlib
SOURCES += tst_qabstractnetworkcache.cpp
TESTDATA += tests/*
diff --git a/tests/auto/network/access/qnetworkcachemetadata/qnetworkcachemetadata.pro b/tests/auto/network/access/qnetworkcachemetadata/qnetworkcachemetadata.pro
index ebef3b007d..7342252963 100644
--- a/tests/auto/network/access/qnetworkcachemetadata/qnetworkcachemetadata.pro
+++ b/tests/auto/network/access/qnetworkcachemetadata/qnetworkcachemetadata.pro
@@ -1,7 +1,6 @@
CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qnetworkcachemetadata
-QT -= gui
-QT += network testlib
+QT = core network testlib
SOURCES += tst_qnetworkcachemetadata.cpp
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/network/access/qnetworkdiskcache/qnetworkdiskcache.pro b/tests/auto/network/access/qnetworkdiskcache/qnetworkdiskcache.pro
index d84a332870..57f9c0534a 100644
--- a/tests/auto/network/access/qnetworkdiskcache/qnetworkdiskcache.pro
+++ b/tests/auto/network/access/qnetworkdiskcache/qnetworkdiskcache.pro
@@ -1,7 +1,6 @@
CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qnetworkdiskcache
-QT -= gui
-QT += network testlib
+QT = core network testlib
SOURCES += tst_qnetworkdiskcache.cpp
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/network/ssl/qsslsocket/qsslsocket.pro b/tests/auto/network/ssl/qsslsocket/qsslsocket.pro
index f799d180cd..d8a6b2cdcb 100644
--- a/tests/auto/network/ssl/qsslsocket/qsslsocket.pro
+++ b/tests/auto/network/ssl/qsslsocket/qsslsocket.pro
@@ -2,8 +2,7 @@ CONFIG += testcase
SOURCES += tst_qsslsocket.cpp
!wince*:win32:LIBS += -lws2_32
-QT += core-private network-private testlib
-QT -= gui
+QT = core core-private network-private testlib
TARGET = tst_qsslsocket
diff --git a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/qsslsocket_onDemandCertificates_member.pro b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/qsslsocket_onDemandCertificates_member.pro
index 1626b62286..e8247d7b16 100644
--- a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/qsslsocket_onDemandCertificates_member.pro
+++ b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/qsslsocket_onDemandCertificates_member.pro
@@ -4,8 +4,7 @@ testcase.timeout = 300 # this test is slow
SOURCES += tst_qsslsocket_onDemandCertificates_member.cpp
!wince*:win32:LIBS += -lws2_32
-QT += core-private network-private testlib
-QT -= gui
+QT = core core-private network-private testlib
TARGET = tst_qsslsocket_onDemandCertificates_member
diff --git a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/qsslsocket_onDemandCertificates_static.pro b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/qsslsocket_onDemandCertificates_static.pro
index 06fad48d5a..8a95e11780 100644
--- a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/qsslsocket_onDemandCertificates_static.pro
+++ b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/qsslsocket_onDemandCertificates_static.pro
@@ -3,8 +3,7 @@ CONFIG += parallel_test
SOURCES += tst_qsslsocket_onDemandCertificates_static.cpp
!wince*:win32:LIBS += -lws2_32
-QT += core-private network-private testlib
-QT -= gui
+QT = core core-private network-private testlib
TARGET = tst_qsslsocket_onDemandCertificates_static
diff --git a/tests/auto/tools/moc/moc.pro b/tests/auto/tools/moc/moc.pro
index 1600c458b5..5ea8c06f02 100644
--- a/tests/auto/tools/moc/moc.pro
+++ b/tests/auto/tools/moc/moc.pro
@@ -29,8 +29,7 @@ if(*-g++*|*-icc*|*-clang*|*-llvm):!irix-*:!win32-*: HEADERS += os9-newlines.h wi
if(*-g++*|*-clang*): HEADERS += dollars.h
SOURCES += tst_moc.cpp
-QT -= gui
-QT += sql network testlib
+QT = core sql network testlib
qtHaveModule(dbus) {
DEFINES += WITH_DBUS
QT += dbus
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index e7303d716e..a6cd85ade5 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -566,6 +566,7 @@ private slots:
void parseDefines();
void preprocessorOnly();
void unterminatedFunctionMacro();
+ void QTBUG32933_relatedObjectsDontIncludeItself();
signals:
void sigWithUnsignedArg(unsigned foo);
@@ -1759,6 +1760,14 @@ void tst_Moc::warnings_data()
<< 1
<< QString()
<< QString("standard input:1: Error: Class contains Q_OBJECT macro but does not inherit from QObject");
+
+ QTest::newRow("Warning on invalid macro")
+ << QByteArray("#define Foo(a, b)\n class X : public QObject { Q_OBJECT }; \n Foo(a) \n Foo(a,b,c) \n")
+ << QStringList()
+ << 0
+ << QString("IGNORE_ALL_STDOUT")
+ << QString(":3: Warning: Macro argument mismatch.\n:4: Warning: Macro argument mismatch.");
+
}
void tst_Moc::warnings()
@@ -1800,7 +1809,7 @@ void tst_Moc::warnings()
// magic value "IGNORE_ALL_STDOUT" ignores stdout
if (expectedStdOut != "IGNORE_ALL_STDOUT")
QCOMPARE(QString::fromLocal8Bit(proc.readAllStandardOutput()).trimmed(), expectedStdOut);
- QCOMPARE(QString::fromLocal8Bit(proc.readAllStandardError()).trimmed(), expectedStdErr);
+ QCOMPARE(QString::fromLocal8Bit(proc.readAllStandardError()).trimmed().remove('\r'), expectedStdErr);
}
class tst_Moc::PrivateClass : public QObject {
@@ -3038,7 +3047,37 @@ void tst_Moc::unterminatedFunctionMacro()
#endif
}
+namespace QTBUG32933_relatedObjectsDontIncludeItself {
+ namespace NS {
+ class Obj : QObject {
+ Q_OBJECT
+ Q_PROPERTY(MyEnum p1 MEMBER member)
+ Q_PROPERTY(Obj::MyEnum p2 MEMBER member)
+ Q_PROPERTY(NS::Obj::MyEnum p3 MEMBER member)
+ Q_PROPERTY(QTBUG32933_relatedObjectsDontIncludeItself::NS::Obj::MyEnum p4 MEMBER member)
+ Q_ENUMS(MyEnum);
+ public:
+ enum MyEnum { Something, SomethingElse };
+ MyEnum member;
+ };
+ }
+}
+
+void tst_Moc::QTBUG32933_relatedObjectsDontIncludeItself()
+{
+ const QMetaObject *mo = &QTBUG32933_relatedObjectsDontIncludeItself::NS::Obj::staticMetaObject;
+ const QMetaObject **objects = mo->d.relatedMetaObjects;
+ // the related objects should be empty because the enums is in the same object.
+ QVERIFY(!objects);
+
+}
+
QTEST_MAIN(tst_Moc)
+// the generated code must compile with QT_NO_KEYWORDS
+#undef signals
+#undef slots
+#undef emit
+
#include "tst_moc.moc"
diff --git a/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp b/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp
index c17e2523f9..d3191b2206 100644
--- a/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp
+++ b/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp
@@ -419,12 +419,15 @@ void tst_QColumnView::scrollTo()
QWidget w;
w.show();
+ QCOMPARE(view.HorizontalOffset(), 0);
if (giveFocus)
view.setFocus(Qt::OtherFocusReason);
else
view.clearFocus();
+ QCOMPARE(view.HorizontalOffset(), 0);
qApp->processEvents();
+ QCOMPARE(view.HorizontalOffset(), 0);
QTRY_COMPARE(view.hasFocus(), giveFocus);
// scroll to the right
int level = 0;
@@ -440,10 +443,8 @@ void tst_QColumnView::scrollTo()
if (level >= 2) {
if (!reverse) {
QTRY_VERIFY(view.HorizontalOffset() < 0);
- if (last <= view.HorizontalOffset()) {
- qDebug() << "Test failure. last=" << last
+ qDebug() << "last=" << last
<< " ; HorizontalOffset= " << view.HorizontalOffset();
- }
QTRY_VERIFY(last > view.HorizontalOffset());
} else {
QTRY_VERIFY(view.HorizontalOffset() > 0);
diff --git a/tests/auto/xml/dom/qdom/qdom.pro b/tests/auto/xml/dom/qdom/qdom.pro
index db19a8ba89..3248b8e0e2 100644
--- a/tests/auto/xml/dom/qdom/qdom.pro
+++ b/tests/auto/xml/dom/qdom/qdom.pro
@@ -3,7 +3,6 @@ TARGET = tst_qdom
SOURCES += tst_qdom.cpp
QT = core xml testlib
-QT -= gui
wince* {
wince*|qt_not_deployed {
diff --git a/tests/auto/xml/sax/qxmlinputsource/qxmlinputsource.pro b/tests/auto/xml/sax/qxmlinputsource/qxmlinputsource.pro
index a8bf834074..8846ae5e4a 100644
--- a/tests/auto/xml/sax/qxmlinputsource/qxmlinputsource.pro
+++ b/tests/auto/xml/sax/qxmlinputsource/qxmlinputsource.pro
@@ -1,7 +1,4 @@
CONFIG += testcase
TARGET = tst_qxmlinputsource
SOURCES += tst_qxmlinputsource.cpp
-QT += core xml network testlib
-QT -= gui
-
-
+QT = core xml network testlib
diff --git a/tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro b/tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro
index 981f506c6d..349b976f58 100644
--- a/tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro
+++ b/tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro
@@ -6,7 +6,6 @@ HEADERS += parser/parser.h
SOURCES += tst_qxmlsimplereader.cpp parser/parser.cpp
CONFIG += no_batch
-QT += network xml testlib
-QT -= gui
+QT = core network xml testlib
TESTDATA += encodings/* xmldocs/*