From 2af438a6ce31f225f0d1c0b1b43df848a858fe18 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 22 Jun 2012 10:04:05 +0200 Subject: Give the CMake unit tests more meaningful names. Change-Id: I0a54d32ec62ff6daf7672d0aabdeb038f4c7c78f Reviewed-by: David Faure --- tests/auto/cmake/CMakeLists.txt | 63 ++++++++++++--------- tests/auto/cmake/fail4/CMakeLists.txt | 22 -------- tests/auto/cmake/fail4/myobject.cpp | 54 ------------------ tests/auto/cmake/fail4/myobject.h | 57 ------------------- tests/auto/cmake/fail4/pass4.qrc | 6 -- tests/auto/cmake/fail4/resource_file.txt | 1 - tests/auto/cmake/fail5/CMakeLists.txt | 19 ------- tests/auto/cmake/fail5/myobject.cpp | 54 ------------------ tests/auto/cmake/fail5/myobject.h | 57 ------------------- .../auto/cmake/pass(needsquoting)6/CMakeLists.txt | 22 -------- tests/auto/cmake/pass(needsquoting)6/mywidget.cpp | 56 ------------------- tests/auto/cmake/pass(needsquoting)6/mywidget.h | 65 ---------------------- tests/auto/cmake/pass(needsquoting)6/mywidget.ui | 34 ----------- tests/auto/cmake/pass1/CMakeLists.txt | 16 ------ tests/auto/cmake/pass1/three.cpp | 58 ------------------- tests/auto/cmake/pass1/two.cpp | 56 ------------------- tests/auto/cmake/pass10/CMakeLists.txt | 9 --- tests/auto/cmake/pass10/subdir1/CMakeLists.txt | 2 - tests/auto/cmake/pass11/CMakeLists.txt | 24 -------- tests/auto/cmake/pass11/main.cpp | 49 ---------------- tests/auto/cmake/pass11/resource_file.txt | 1 - tests/auto/cmake/pass2/CMakeLists.txt | 19 ------- tests/auto/cmake/pass2/myobject.cpp | 56 ------------------- tests/auto/cmake/pass2/myobject.h | 57 ------------------- tests/auto/cmake/pass2/pass2.qrc | 6 -- tests/auto/cmake/pass2/resource_file.txt | 1 - tests/auto/cmake/pass3/CMakeLists.txt | 21 ------- tests/auto/cmake/pass3/mywidget.cpp | 56 ------------------- tests/auto/cmake/pass3/mywidget.h | 65 ---------------------- tests/auto/cmake/pass3/mywidget.ui | 34 ----------- tests/auto/cmake/pass7/CMakeLists.txt | 13 ----- tests/auto/cmake/pass7/main.cpp | 47 ---------------- tests/auto/cmake/pass8/CMakeLists.txt | 20 ------- tests/auto/cmake/pass8/myobject.cpp | 54 ------------------ tests/auto/cmake/pass8/myobject.h | 57 ------------------- tests/auto/cmake/pass9/CMakeLists.txt | 36 ------------ tests/auto/cmake/pass9/mydbusobject.cpp | 56 ------------------- tests/auto/cmake/pass9/mydbusobject.h | 58 ------------------- .../cmake/test(needsquoting)dirname/CMakeLists.txt | 22 ++++++++ .../cmake/test(needsquoting)dirname/mywidget.cpp | 56 +++++++++++++++++++ .../cmake/test(needsquoting)dirname/mywidget.h | 65 ++++++++++++++++++++++ .../cmake/test(needsquoting)dirname/mywidget.ui | 34 +++++++++++ .../cmake/test_add_resource_options/CMakeLists.txt | 22 ++++++++ .../cmake/test_add_resource_options/myobject.cpp | 54 ++++++++++++++++++ .../cmake/test_add_resource_options/myobject.h | 57 +++++++++++++++++++ .../test_add_resource_options/resource_file.txt | 1 + .../test_macro_options.qrc | 6 ++ .../test_add_resources_delyed_file/CMakeLists.txt | 24 ++++++++ .../cmake/test_add_resources_delyed_file/main.cpp | 49 ++++++++++++++++ .../resource_file.txt | 1 + tests/auto/cmake/test_dbus_module/CMakeLists.txt | 36 ++++++++++++ tests/auto/cmake/test_dbus_module/mydbusobject.cpp | 56 +++++++++++++++++++ tests/auto/cmake/test_dbus_module/mydbusobject.h | 58 +++++++++++++++++++ .../cmake/test_dependent_modules/CMakeLists.txt | 21 +++++++ .../auto/cmake/test_dependent_modules/mywidget.cpp | 56 +++++++++++++++++++ tests/auto/cmake/test_dependent_modules/mywidget.h | 65 ++++++++++++++++++++++ .../auto/cmake/test_dependent_modules/mywidget.ui | 34 +++++++++++ .../test_multiple_find_package/CMakeLists.txt | 9 +++ .../subdir1/CMakeLists.txt | 2 + .../test_platform_defs_include/CMakeLists.txt | 13 +++++ .../auto/cmake/test_platform_defs_include/main.cpp | 47 ++++++++++++++++ .../cmake/test_qtmainwin_library/CMakeLists.txt | 20 +++++++ .../auto/cmake/test_qtmainwin_library/myobject.cpp | 54 ++++++++++++++++++ tests/auto/cmake/test_qtmainwin_library/myobject.h | 57 +++++++++++++++++++ .../cmake/test_use_modules_function/CMakeLists.txt | 16 ++++++ .../auto/cmake/test_use_modules_function/three.cpp | 58 +++++++++++++++++++ tests/auto/cmake/test_use_modules_function/two.cpp | 56 +++++++++++++++++++ .../test_wrap_cpp_and_resources/CMakeLists.txt | 19 +++++++ .../cmake/test_wrap_cpp_and_resources/myobject.cpp | 56 +++++++++++++++++++ .../cmake/test_wrap_cpp_and_resources/myobject.h | 57 +++++++++++++++++++ .../test_wrap_cpp_and_resources/resource_file.txt | 1 + .../test_wrap_cpp_and_resources.qrc | 6 ++ .../cmake/test_wrap_cpp_options/CMakeLists.txt | 19 +++++++ .../auto/cmake/test_wrap_cpp_options/myobject.cpp | 54 ++++++++++++++++++ tests/auto/cmake/test_wrap_cpp_options/myobject.h | 57 +++++++++++++++++++ 75 files changed, 1354 insertions(+), 1345 deletions(-) delete mode 100644 tests/auto/cmake/fail4/CMakeLists.txt delete mode 100644 tests/auto/cmake/fail4/myobject.cpp delete mode 100644 tests/auto/cmake/fail4/myobject.h delete mode 100644 tests/auto/cmake/fail4/pass4.qrc delete mode 100644 tests/auto/cmake/fail4/resource_file.txt delete mode 100644 tests/auto/cmake/fail5/CMakeLists.txt delete mode 100644 tests/auto/cmake/fail5/myobject.cpp delete mode 100644 tests/auto/cmake/fail5/myobject.h delete mode 100644 tests/auto/cmake/pass(needsquoting)6/CMakeLists.txt delete mode 100644 tests/auto/cmake/pass(needsquoting)6/mywidget.cpp delete mode 100644 tests/auto/cmake/pass(needsquoting)6/mywidget.h delete mode 100644 tests/auto/cmake/pass(needsquoting)6/mywidget.ui delete mode 100644 tests/auto/cmake/pass1/CMakeLists.txt delete mode 100644 tests/auto/cmake/pass1/three.cpp delete mode 100644 tests/auto/cmake/pass1/two.cpp delete mode 100644 tests/auto/cmake/pass10/CMakeLists.txt delete mode 100644 tests/auto/cmake/pass10/subdir1/CMakeLists.txt delete mode 100644 tests/auto/cmake/pass11/CMakeLists.txt delete mode 100644 tests/auto/cmake/pass11/main.cpp delete mode 100644 tests/auto/cmake/pass11/resource_file.txt delete mode 100644 tests/auto/cmake/pass2/CMakeLists.txt delete mode 100644 tests/auto/cmake/pass2/myobject.cpp delete mode 100644 tests/auto/cmake/pass2/myobject.h delete mode 100644 tests/auto/cmake/pass2/pass2.qrc delete mode 100644 tests/auto/cmake/pass2/resource_file.txt delete mode 100644 tests/auto/cmake/pass3/CMakeLists.txt delete mode 100644 tests/auto/cmake/pass3/mywidget.cpp delete mode 100644 tests/auto/cmake/pass3/mywidget.h delete mode 100644 tests/auto/cmake/pass3/mywidget.ui delete mode 100644 tests/auto/cmake/pass7/CMakeLists.txt delete mode 100644 tests/auto/cmake/pass7/main.cpp delete mode 100644 tests/auto/cmake/pass8/CMakeLists.txt delete mode 100644 tests/auto/cmake/pass8/myobject.cpp delete mode 100644 tests/auto/cmake/pass8/myobject.h delete mode 100644 tests/auto/cmake/pass9/CMakeLists.txt delete mode 100644 tests/auto/cmake/pass9/mydbusobject.cpp delete mode 100644 tests/auto/cmake/pass9/mydbusobject.h create mode 100644 tests/auto/cmake/test(needsquoting)dirname/CMakeLists.txt create mode 100644 tests/auto/cmake/test(needsquoting)dirname/mywidget.cpp create mode 100644 tests/auto/cmake/test(needsquoting)dirname/mywidget.h create mode 100644 tests/auto/cmake/test(needsquoting)dirname/mywidget.ui create mode 100644 tests/auto/cmake/test_add_resource_options/CMakeLists.txt create mode 100644 tests/auto/cmake/test_add_resource_options/myobject.cpp create mode 100644 tests/auto/cmake/test_add_resource_options/myobject.h create mode 100644 tests/auto/cmake/test_add_resource_options/resource_file.txt create mode 100644 tests/auto/cmake/test_add_resource_options/test_macro_options.qrc create mode 100644 tests/auto/cmake/test_add_resources_delyed_file/CMakeLists.txt create mode 100644 tests/auto/cmake/test_add_resources_delyed_file/main.cpp create mode 100644 tests/auto/cmake/test_add_resources_delyed_file/resource_file.txt create mode 100644 tests/auto/cmake/test_dbus_module/CMakeLists.txt create mode 100644 tests/auto/cmake/test_dbus_module/mydbusobject.cpp create mode 100644 tests/auto/cmake/test_dbus_module/mydbusobject.h create mode 100644 tests/auto/cmake/test_dependent_modules/CMakeLists.txt create mode 100644 tests/auto/cmake/test_dependent_modules/mywidget.cpp create mode 100644 tests/auto/cmake/test_dependent_modules/mywidget.h create mode 100644 tests/auto/cmake/test_dependent_modules/mywidget.ui create mode 100644 tests/auto/cmake/test_multiple_find_package/CMakeLists.txt create mode 100644 tests/auto/cmake/test_multiple_find_package/subdir1/CMakeLists.txt create mode 100644 tests/auto/cmake/test_platform_defs_include/CMakeLists.txt create mode 100644 tests/auto/cmake/test_platform_defs_include/main.cpp create mode 100644 tests/auto/cmake/test_qtmainwin_library/CMakeLists.txt create mode 100644 tests/auto/cmake/test_qtmainwin_library/myobject.cpp create mode 100644 tests/auto/cmake/test_qtmainwin_library/myobject.h create mode 100644 tests/auto/cmake/test_use_modules_function/CMakeLists.txt create mode 100644 tests/auto/cmake/test_use_modules_function/three.cpp create mode 100644 tests/auto/cmake/test_use_modules_function/two.cpp create mode 100644 tests/auto/cmake/test_wrap_cpp_and_resources/CMakeLists.txt create mode 100644 tests/auto/cmake/test_wrap_cpp_and_resources/myobject.cpp create mode 100644 tests/auto/cmake/test_wrap_cpp_and_resources/myobject.h create mode 100644 tests/auto/cmake/test_wrap_cpp_and_resources/resource_file.txt create mode 100644 tests/auto/cmake/test_wrap_cpp_and_resources/test_wrap_cpp_and_resources.qrc create mode 100644 tests/auto/cmake/test_wrap_cpp_options/CMakeLists.txt create mode 100644 tests/auto/cmake/test_wrap_cpp_options/myobject.cpp create mode 100644 tests/auto/cmake/test_wrap_cpp_options/myobject.h (limited to 'tests/auto') diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt index d8c41821a4..7195a3d573 100644 --- a/tests/auto/cmake/CMakeLists.txt +++ b/tests/auto/cmake/CMakeLists.txt @@ -1,6 +1,6 @@ # This is an automatic test for the CMake configuration files. -# To run it, +# To run it manually, # 1) mkdir build # Create a build directory # 2) cd build # 3) cmake .. # Run cmake on this directory. @@ -8,20 +8,29 @@ # # The expected output is something like: # -# Start 1: pass1 -# 1/7 Test #1: pass1 ............................ Passed 4.25 sec -# Start 2: pass2 -# 2/7 Test #2: pass2 ............................ Passed 2.00 sec -# Start 3: pass3 -# 3/7 Test #3: pass3 ............................ Passed 2.85 sec -# Start 4: fail4 -# 4/7 Test #4: fail4 ............................ Passed 1.88 sec -# Start 5: fail5 -# 5/7 Test #5: fail5 ............................ Passed 1.36 sec -# Start 6: pass_needsquoting_6 -# 6/7 Test #6: pass_needsquoting_6 .............. Passed 2.88 sec -# Start 7: pass7 -# 7/7 Test #7: pass7 ............................ Passed 0.93 sec +# Start 1: test_use_modules_function +# 1/11 Test #1: test_use_modules_function ........ Passed 3.36 sec +# Start 2: test_wrap_cpp_and_resources +# 2/11 Test #2: test_wrap_cpp_and_resources ...... Passed 1.41 sec +# Start 3: test_dependent_modules +# 3/11 Test #3: test_dependent_modules ........... Passed 2.22 sec +# Start 4: test_add_resource_options +# 4/11 Test #4: test_add_resource_options ........ Passed 0.16 sec +# Start 5: test_wrap_cpp_options +# 5/11 Test #5: test_wrap_cpp_options ............ Passed 0.36 sec +# Start 6: test_needsquoting_dirname +# 6/11 Test #6: test_needsquoting_dirname ........ Passed 2.20 sec +# Start 7: test_platform_defs_include +# 7/11 Test #7: test_platform_defs_include ....... Passed 0.28 sec +# Start 8: test_qtmainwin_library +# 8/11 Test #8: test_qtmainwin_library ........... Passed 1.27 sec +# Start 9: test_dbus_module +# 9/11 Test #9: test_dbus_module ................. Passed 3.46 sec +# Start 10: test_multiple_find_package +# 10/11 Test #10: test_multiple_find_package ....... Passed 0.07 sec +# Start 11: test_add_resources_delyed_file +# 11/11 Test #11: test_add_resources_delyed_file ... Passed 0.38 sec +# # # Note that if Qt is not installed, or if it is installed to a # non-standard prefix, the environment variable CMAKE_PREFIX_PATH @@ -80,22 +89,22 @@ endmacro() if(NOT ${CMAKE_VERSION} VERSION_LESS 2.8.8) # Requires INCLUDE_DIRECTORIES target property in CMake 2.8.8 - expect_pass(pass1) + expect_pass(test_use_modules_function) else() - message("CMake version older than 2.8.8 (Found ${CMAKE_VERSION}). Not running test \"pass1\"") + message("CMake version older than 2.8.8 (Found ${CMAKE_VERSION}). Not running test \"test_use_modules_function\"") endif() -expect_pass(pass2) -expect_pass(pass3) -expect_fail(fail4) -expect_fail(fail5) -expect_pass("pass(needsquoting)6") -expect_pass(pass7) -expect_pass(pass8) +expect_pass(test_wrap_cpp_and_resources) +expect_pass(test_dependent_modules) +expect_fail(test_add_resource_options) +expect_fail(test_wrap_cpp_options) +expect_pass("test(needsquoting)dirname") +expect_pass(test_platform_defs_include) +expect_pass(test_qtmainwin_library) # If QtDBus has been installed then run the tests for its macros. find_package(Qt5DBus QUIET) if (Qt5DBus_FOUND AND NOT APPLE) - expect_pass(pass9) + expect_pass(test_dbus_module) endif() -expect_pass(pass10) -expect_pass(pass11) +expect_pass(test_multiple_find_package) +expect_pass(test_add_resources_delyed_file) diff --git a/tests/auto/cmake/fail4/CMakeLists.txt b/tests/auto/cmake/fail4/CMakeLists.txt deleted file mode 100644 index fdf90e17a7..0000000000 --- a/tests/auto/cmake/fail4/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ - -cmake_minimum_required(VERSION 2.8) - -project(pass4) - -find_package(Qt5Core REQUIRED) - -include_directories(${Qt5Core_INCLUDE_DIRS}) - -add_definitions(${Qt5Core_DEFINITIONS}) - -qt5_wrap_cpp(moc_files myobject.h) - -# Test options. The -binary option generates a binary to dlopen instead of -# a source file to compile. The compiler will consider it garbage when used -# in the add_executable call. -qt5_add_resources(rcc_files "pass4.qrc" OPTIONS -binary) - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}") - -add_executable(myobject myobject.cpp ${moc_files} ${rcc_files}) -target_link_libraries(myobject ${Qt5Core_LIBRARIES}) diff --git a/tests/auto/cmake/fail4/myobject.cpp b/tests/auto/cmake/fail4/myobject.cpp deleted file mode 100644 index 292a76e569..0000000000 --- a/tests/auto/cmake/fail4/myobject.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "myobject.h" - -MyObject::MyObject(QObject *parent) - : QObject(parent) -{ - emit someSignal(); -} - -int main(int argc, char **argv) -{ - MyObject myObject; - return 0; -} diff --git a/tests/auto/cmake/fail4/myobject.h b/tests/auto/cmake/fail4/myobject.h deleted file mode 100644 index cd8765d03f..0000000000 --- a/tests/auto/cmake/fail4/myobject.h +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef MYOBJECT_H -#define MYOBJECT_H - -#include - -class MyObject : public QObject -{ - Q_OBJECT -public: - MyObject(QObject *parent = 0); - -signals: - void someSignal(); -}; - -#endif diff --git a/tests/auto/cmake/fail4/pass4.qrc b/tests/auto/cmake/fail4/pass4.qrc deleted file mode 100644 index 00a17f541f..0000000000 --- a/tests/auto/cmake/fail4/pass4.qrc +++ /dev/null @@ -1,6 +0,0 @@ - - - resource_file.txt - - - diff --git a/tests/auto/cmake/fail4/resource_file.txt b/tests/auto/cmake/fail4/resource_file.txt deleted file mode 100644 index 2c604a4f18..0000000000 --- a/tests/auto/cmake/fail4/resource_file.txt +++ /dev/null @@ -1 +0,0 @@ -Ken sent me. diff --git a/tests/auto/cmake/fail5/CMakeLists.txt b/tests/auto/cmake/fail5/CMakeLists.txt deleted file mode 100644 index 962314c818..0000000000 --- a/tests/auto/cmake/fail5/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ - -cmake_minimum_required(VERSION 2.8) - -project(pass5) - -find_package(Qt5Core REQUIRED) - -include_directories(${Qt5Core_INCLUDE_DIRS}) - -add_definitions(${Qt5Core_DEFINITIONS}) - -# Test options. The -i option removes the include "myobject.h" from the moc file -# causing a compile failure. -> Options work -qt5_wrap_cpp(moc_files myobject.h OPTIONS -i) - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}") - -add_executable(myobject myobject.cpp ${moc_files}) -target_link_libraries(myobject ${Qt5Core_LIBRARIES}) diff --git a/tests/auto/cmake/fail5/myobject.cpp b/tests/auto/cmake/fail5/myobject.cpp deleted file mode 100644 index 292a76e569..0000000000 --- a/tests/auto/cmake/fail5/myobject.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "myobject.h" - -MyObject::MyObject(QObject *parent) - : QObject(parent) -{ - emit someSignal(); -} - -int main(int argc, char **argv) -{ - MyObject myObject; - return 0; -} diff --git a/tests/auto/cmake/fail5/myobject.h b/tests/auto/cmake/fail5/myobject.h deleted file mode 100644 index cd8765d03f..0000000000 --- a/tests/auto/cmake/fail5/myobject.h +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef MYOBJECT_H -#define MYOBJECT_H - -#include - -class MyObject : public QObject -{ - Q_OBJECT -public: - MyObject(QObject *parent = 0); - -signals: - void someSignal(); -}; - -#endif diff --git a/tests/auto/cmake/pass(needsquoting)6/CMakeLists.txt b/tests/auto/cmake/pass(needsquoting)6/CMakeLists.txt deleted file mode 100644 index 63f675df18..0000000000 --- a/tests/auto/cmake/pass(needsquoting)6/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ - -cmake_minimum_required(VERSION 2.8) - -project("pass(needsquoting)6") - -find_package(Qt5Core REQUIRED) -find_package(Qt5Gui REQUIRED) -find_package(Qt5Widgets REQUIRED) - -include_directories(${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS}) - -add_definitions(${Qt5Core_DEFINITIONS}) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -qt5_wrap_cpp(moc_files mywidget.h) -qt5_wrap_ui(ui_files mywidget.ui) - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}") - -add_executable(mywidget mywidget.cpp ${moc_files} ${ui_files}) -target_link_libraries(mywidget ${Qt5Widgets_LIBRARIES}) diff --git a/tests/auto/cmake/pass(needsquoting)6/mywidget.cpp b/tests/auto/cmake/pass(needsquoting)6/mywidget.cpp deleted file mode 100644 index 7f8923810d..0000000000 --- a/tests/auto/cmake/pass(needsquoting)6/mywidget.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "mywidget.h" -#include "ui_mywidget.h" - -MyWidget::MyWidget(QWidget *parent) - : QWidget(parent) -{ - emit someSignal(); -} - -int main(int argc, char **argv) -{ - QApplication app(argc, argv); - MyWidget myWidget; - return 0; -} diff --git a/tests/auto/cmake/pass(needsquoting)6/mywidget.h b/tests/auto/cmake/pass(needsquoting)6/mywidget.h deleted file mode 100644 index 11968e6454..0000000000 --- a/tests/auto/cmake/pass(needsquoting)6/mywidget.h +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef MYWIDGET_H -#define MYWIDGET_H - -#include - -namespace Ui -{ -class MyWidget; -} - -class MyWidget : public QWidget -{ - Q_OBJECT -public: - MyWidget(QWidget *parent = 0); - -signals: - void someSignal(); - -private: - Ui::MyWidget *ui; -}; - -#endif diff --git a/tests/auto/cmake/pass(needsquoting)6/mywidget.ui b/tests/auto/cmake/pass(needsquoting)6/mywidget.ui deleted file mode 100644 index ac42ac4dc2..0000000000 --- a/tests/auto/cmake/pass(needsquoting)6/mywidget.ui +++ /dev/null @@ -1,34 +0,0 @@ - - - Form - - - - 0 - 0 - 400 - 300 - - - - Form - - - - - - PushButton - - - - - - - - - - - - - - diff --git a/tests/auto/cmake/pass1/CMakeLists.txt b/tests/auto/cmake/pass1/CMakeLists.txt deleted file mode 100644 index 50a3375a15..0000000000 --- a/tests/auto/cmake/pass1/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ - -cmake_minimum_required(VERSION 2.8) - -project(pass1) - -set(CMAKE_AUTOMOC ON) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -add_executable(two two.cpp) -add_executable(three three.cpp) - -find_package(Qt5Core) - -qt5_use_modules(two Test) -qt5_use_modules(three Widgets Test) diff --git a/tests/auto/cmake/pass1/three.cpp b/tests/auto/cmake/pass1/three.cpp deleted file mode 100644 index 63bcbff480..0000000000 --- a/tests/auto/cmake/pass1/three.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include - -class Three : public QObject -{ - Q_OBJECT -public: - Three(QObject *parent = 0) - { - QWidget *w = new QWidget; - w->show(); - } -}; - -QTEST_MAIN(Three) - -#include "three.moc" diff --git a/tests/auto/cmake/pass1/two.cpp b/tests/auto/cmake/pass1/two.cpp deleted file mode 100644 index 24fcd5dba4..0000000000 --- a/tests/auto/cmake/pass1/two.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include - -class Two : public QObject -{ - Q_OBJECT -public: - Two(QObject *parent = 0) - { - - } -}; - -QTEST_MAIN(Two) - -#include "two.moc" diff --git a/tests/auto/cmake/pass10/CMakeLists.txt b/tests/auto/cmake/pass10/CMakeLists.txt deleted file mode 100644 index bd7051a768..0000000000 --- a/tests/auto/cmake/pass10/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ - -cmake_minimum_required(VERSION 2.8) - -project(pass10) - -find_package(Qt5Core REQUIRED) - -add_subdirectory(subdir1) - diff --git a/tests/auto/cmake/pass10/subdir1/CMakeLists.txt b/tests/auto/cmake/pass10/subdir1/CMakeLists.txt deleted file mode 100644 index 86c05f5de5..0000000000 --- a/tests/auto/cmake/pass10/subdir1/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ - -find_package(Qt5Core REQUIRED) diff --git a/tests/auto/cmake/pass11/CMakeLists.txt b/tests/auto/cmake/pass11/CMakeLists.txt deleted file mode 100644 index 0e9d028396..0000000000 --- a/tests/auto/cmake/pass11/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ - -cmake_minimum_required(VERSION 2.8) - -project(pass11) - -find_package(Qt5Core REQUIRED) - -include_directories(${Qt5Core_INCLUDE_DIRS}) - -add_definitions(${Qt5Core_DEFINITIONS}) - -qt5_add_resources(rcc_files "${CMAKE_CURRENT_BINARY_DIR}/pass11.qrc") - -file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pass11.qrc" " - - ${CMAKE_CURRENT_SOURCE_DIR}/resource_file.txt - - -") - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}") - -add_executable(pass11 main.cpp ${rcc_files}) -target_link_libraries(pass11 ${Qt5Core_LIBRARIES}) diff --git a/tests/auto/cmake/pass11/main.cpp b/tests/auto/cmake/pass11/main.cpp deleted file mode 100644 index 2a43be419b..0000000000 --- a/tests/auto/cmake/pass11/main.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include - -int main(int argc, char **argv) -{ - // Compile error if the resource file was not created. - Q_INIT_RESOURCE(pass11); - return 0; -} diff --git a/tests/auto/cmake/pass11/resource_file.txt b/tests/auto/cmake/pass11/resource_file.txt deleted file mode 100644 index 2c604a4f18..0000000000 --- a/tests/auto/cmake/pass11/resource_file.txt +++ /dev/null @@ -1 +0,0 @@ -Ken sent me. diff --git a/tests/auto/cmake/pass2/CMakeLists.txt b/tests/auto/cmake/pass2/CMakeLists.txt deleted file mode 100644 index c859f13fff..0000000000 --- a/tests/auto/cmake/pass2/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ - -cmake_minimum_required(VERSION 2.8) - -project(pass2) - -find_package(Qt5Core REQUIRED) - -include_directories(${Qt5Core_INCLUDE_DIRS}) - -add_definitions(${Qt5Core_DEFINITIONS}) - -qt5_wrap_cpp(moc_files myobject.h) - -qt5_add_resources(rcc_files "pass2.qrc") - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}") - -add_executable(myobject myobject.cpp ${moc_files} ${rcc_files}) -target_link_libraries(myobject ${Qt5Core_LIBRARIES}) diff --git a/tests/auto/cmake/pass2/myobject.cpp b/tests/auto/cmake/pass2/myobject.cpp deleted file mode 100644 index a237b00c50..0000000000 --- a/tests/auto/cmake/pass2/myobject.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "myobject.h" - -MyObject::MyObject(QObject *parent) - : QObject(parent) -{ - emit someSignal(); -} - -int main(int argc, char **argv) -{ - MyObject myObject; - // Compile error if the resource file was not created. - Q_INIT_RESOURCE(pass2); - return 0; -} diff --git a/tests/auto/cmake/pass2/myobject.h b/tests/auto/cmake/pass2/myobject.h deleted file mode 100644 index cd8765d03f..0000000000 --- a/tests/auto/cmake/pass2/myobject.h +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef MYOBJECT_H -#define MYOBJECT_H - -#include - -class MyObject : public QObject -{ - Q_OBJECT -public: - MyObject(QObject *parent = 0); - -signals: - void someSignal(); -}; - -#endif diff --git a/tests/auto/cmake/pass2/pass2.qrc b/tests/auto/cmake/pass2/pass2.qrc deleted file mode 100644 index 00a17f541f..0000000000 --- a/tests/auto/cmake/pass2/pass2.qrc +++ /dev/null @@ -1,6 +0,0 @@ - - - resource_file.txt - - - diff --git a/tests/auto/cmake/pass2/resource_file.txt b/tests/auto/cmake/pass2/resource_file.txt deleted file mode 100644 index 2c604a4f18..0000000000 --- a/tests/auto/cmake/pass2/resource_file.txt +++ /dev/null @@ -1 +0,0 @@ -Ken sent me. diff --git a/tests/auto/cmake/pass3/CMakeLists.txt b/tests/auto/cmake/pass3/CMakeLists.txt deleted file mode 100644 index 7fa6731f9b..0000000000 --- a/tests/auto/cmake/pass3/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ - -cmake_minimum_required(VERSION 2.8) - -project(pass3) - -# The module finds its dependencies -find_package(Qt5Widgets REQUIRED) - -include_directories(${Qt5Widgets_INCLUDE_DIRS}) - -add_definitions(${Qt5Core_DEFINITIONS}) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -qt5_wrap_cpp(moc_files mywidget.h) -qt5_wrap_ui(ui_files mywidget.ui) - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}") - -add_executable(mywidget mywidget.cpp ${moc_files} ${ui_files}) -target_link_libraries(mywidget ${Qt5Widgets_LIBRARIES}) diff --git a/tests/auto/cmake/pass3/mywidget.cpp b/tests/auto/cmake/pass3/mywidget.cpp deleted file mode 100644 index 7f8923810d..0000000000 --- a/tests/auto/cmake/pass3/mywidget.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "mywidget.h" -#include "ui_mywidget.h" - -MyWidget::MyWidget(QWidget *parent) - : QWidget(parent) -{ - emit someSignal(); -} - -int main(int argc, char **argv) -{ - QApplication app(argc, argv); - MyWidget myWidget; - return 0; -} diff --git a/tests/auto/cmake/pass3/mywidget.h b/tests/auto/cmake/pass3/mywidget.h deleted file mode 100644 index 11968e6454..0000000000 --- a/tests/auto/cmake/pass3/mywidget.h +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef MYWIDGET_H -#define MYWIDGET_H - -#include - -namespace Ui -{ -class MyWidget; -} - -class MyWidget : public QWidget -{ - Q_OBJECT -public: - MyWidget(QWidget *parent = 0); - -signals: - void someSignal(); - -private: - Ui::MyWidget *ui; -}; - -#endif diff --git a/tests/auto/cmake/pass3/mywidget.ui b/tests/auto/cmake/pass3/mywidget.ui deleted file mode 100644 index ac42ac4dc2..0000000000 --- a/tests/auto/cmake/pass3/mywidget.ui +++ /dev/null @@ -1,34 +0,0 @@ - - - Form - - - - 0 - 0 - 400 - 300 - - - - Form - - - - - - PushButton - - - - - - - - - - - - - - diff --git a/tests/auto/cmake/pass7/CMakeLists.txt b/tests/auto/cmake/pass7/CMakeLists.txt deleted file mode 100644 index ecf6b3649e..0000000000 --- a/tests/auto/cmake/pass7/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ - -cmake_minimum_required(VERSION 2.8) - -project(pass7) - -find_package(Qt5Core REQUIRED) - -include_directories(${Qt5Core_INCLUDE_DIRS}) -add_definitions(${Qt5Core_DEFINITIONS}) - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}") - -add_executable(myobject main.cpp) diff --git a/tests/auto/cmake/pass7/main.cpp b/tests/auto/cmake/pass7/main.cpp deleted file mode 100644 index 0a6b09d877..0000000000 --- a/tests/auto/cmake/pass7/main.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qplatformdefs.h" - -int main(int argc, char **argv) -{ - return 0; -} diff --git a/tests/auto/cmake/pass8/CMakeLists.txt b/tests/auto/cmake/pass8/CMakeLists.txt deleted file mode 100644 index 735b1bd26e..0000000000 --- a/tests/auto/cmake/pass8/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ - -cmake_minimum_required(VERSION 2.8) - -project(pass8) - -find_package(Qt5Core REQUIRED) - -include_directories(${Qt5Core_INCLUDE_DIRS}) - -add_definitions(${Qt5Core_DEFINITIONS}) - -qt5_wrap_cpp(moc_files myobject.h) - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}") - -# On non-windows, the WIN32 is harmless, and Qt5Core_QTMAIN_LIBRARIES is empty. -# We test that it is harmless on those, and test that it builds on Windows. -# It wouldn't build if WIN32 is used and Qt5Core_QTMAIN_LIBRARIES is empty. -add_executable(myobject WIN32 myobject.cpp ${moc_files} ) -target_link_libraries(myobject ${Qt5Core_LIBRARIES} ${Qt5Core_QTMAIN_LIBRARIES}) diff --git a/tests/auto/cmake/pass8/myobject.cpp b/tests/auto/cmake/pass8/myobject.cpp deleted file mode 100644 index b6287b2540..0000000000 --- a/tests/auto/cmake/pass8/myobject.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "myobject.h" - -MyObject::MyObject(QObject *parent) - : QObject(parent) -{ - emit someSignal(); -} - -int main(int argc, char **argv) -{ - MyObject myObject; - return 0; -} diff --git a/tests/auto/cmake/pass8/myobject.h b/tests/auto/cmake/pass8/myobject.h deleted file mode 100644 index 71a65ee801..0000000000 --- a/tests/auto/cmake/pass8/myobject.h +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef MYOBJECT_H -#define MYOBJECT_H - -#include - -class MyObject : public QObject -{ - Q_OBJECT -public: - MyObject(QObject *parent = 0); - -signals: - void someSignal(); -}; - -#endif diff --git a/tests/auto/cmake/pass9/CMakeLists.txt b/tests/auto/cmake/pass9/CMakeLists.txt deleted file mode 100644 index bf8ff6b3da..0000000000 --- a/tests/auto/cmake/pass9/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ - -cmake_minimum_required(VERSION 2.8) - -project(pass9) - -find_package(Qt5Core REQUIRED) -find_package(Qt5DBus REQUIRED) - -include_directories( - ${Qt5Core_INCLUDE_DIRS} - ${Qt5DBus_INCLUDE_DIRS} -) - -add_definitions(${Qt5Core_DEFINITIONS} ${Qt5DBus_DEFINITIONS}) - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}") - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(my_srcs mydbusobject.cpp) - -qt5_wrap_cpp(moc_files mydbusobject.h) - -qt5_generate_dbus_interface( - mydbusobject.h - ${CMAKE_BINARY_DIR}/org.qtProject.Tests.MyDBusObject.xml -) - -qt5_add_dbus_adaptor(my_srcs - ${CMAKE_BINARY_DIR}/org.qtProject.Tests.MyDBusObject.xml - mydbusobject.h - MyDBusObject -) - -add_executable(myobject ${my_srcs} ${moc_files}) -target_link_libraries(myobject ${Qt5DBus_LIBRARIES} ${Qt5Core_LIBRARIES}) diff --git a/tests/auto/cmake/pass9/mydbusobject.cpp b/tests/auto/cmake/pass9/mydbusobject.cpp deleted file mode 100644 index ee211bbe9b..0000000000 --- a/tests/auto/cmake/pass9/mydbusobject.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "mydbusobject.h" -#include "mydbusobjectadaptor.h" - -MyDBusObject::MyDBusObject(QObject *parent) - : QObject(parent) -{ - new MyDBusObjectAdaptor(this); - emit someSignal(); -} - -int main(int argc, char **argv) -{ - MyDBusObject myDBusObject; - return 0; -} diff --git a/tests/auto/cmake/pass9/mydbusobject.h b/tests/auto/cmake/pass9/mydbusobject.h deleted file mode 100644 index dd9a023ffe..0000000000 --- a/tests/auto/cmake/pass9/mydbusobject.h +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef MYDBUSOBJECT_H -#define MYDBUSOBJECT_H - -#include - -class MyDBusObject : public QObject -{ - Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "org.qtProject.Tests.MyDBusObject") -public: - MyDBusObject(QObject *parent = 0); - -signals: - void someSignal(); -}; - -#endif diff --git a/tests/auto/cmake/test(needsquoting)dirname/CMakeLists.txt b/tests/auto/cmake/test(needsquoting)dirname/CMakeLists.txt new file mode 100644 index 0000000000..12ce93ca26 --- /dev/null +++ b/tests/auto/cmake/test(needsquoting)dirname/CMakeLists.txt @@ -0,0 +1,22 @@ + +cmake_minimum_required(VERSION 2.8) + +project("test(needsquoting)dirname") + +find_package(Qt5Core REQUIRED) +find_package(Qt5Gui REQUIRED) +find_package(Qt5Widgets REQUIRED) + +include_directories(${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS}) + +add_definitions(${Qt5Core_DEFINITIONS}) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +qt5_wrap_cpp(moc_files mywidget.h) +qt5_wrap_ui(ui_files mywidget.ui) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}") + +add_executable(mywidget mywidget.cpp ${moc_files} ${ui_files}) +target_link_libraries(mywidget ${Qt5Widgets_LIBRARIES}) diff --git a/tests/auto/cmake/test(needsquoting)dirname/mywidget.cpp b/tests/auto/cmake/test(needsquoting)dirname/mywidget.cpp new file mode 100644 index 0000000000..7f8923810d --- /dev/null +++ b/tests/auto/cmake/test(needsquoting)dirname/mywidget.cpp @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "mywidget.h" +#include "ui_mywidget.h" + +MyWidget::MyWidget(QWidget *parent) + : QWidget(parent) +{ + emit someSignal(); +} + +int main(int argc, char **argv) +{ + QApplication app(argc, argv); + MyWidget myWidget; + return 0; +} diff --git a/tests/auto/cmake/test(needsquoting)dirname/mywidget.h b/tests/auto/cmake/test(needsquoting)dirname/mywidget.h new file mode 100644 index 0000000000..11968e6454 --- /dev/null +++ b/tests/auto/cmake/test(needsquoting)dirname/mywidget.h @@ -0,0 +1,65 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef MYWIDGET_H +#define MYWIDGET_H + +#include + +namespace Ui +{ +class MyWidget; +} + +class MyWidget : public QWidget +{ + Q_OBJECT +public: + MyWidget(QWidget *parent = 0); + +signals: + void someSignal(); + +private: + Ui::MyWidget *ui; +}; + +#endif diff --git a/tests/auto/cmake/test(needsquoting)dirname/mywidget.ui b/tests/auto/cmake/test(needsquoting)dirname/mywidget.ui new file mode 100644 index 0000000000..ac42ac4dc2 --- /dev/null +++ b/tests/auto/cmake/test(needsquoting)dirname/mywidget.ui @@ -0,0 +1,34 @@ + + + Form + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + + PushButton + + + + + + + + + + + + + + diff --git a/tests/auto/cmake/test_add_resource_options/CMakeLists.txt b/tests/auto/cmake/test_add_resource_options/CMakeLists.txt new file mode 100644 index 0000000000..e79b954f3d --- /dev/null +++ b/tests/auto/cmake/test_add_resource_options/CMakeLists.txt @@ -0,0 +1,22 @@ + +cmake_minimum_required(VERSION 2.8) + +project(test_add_resource_options) + +find_package(Qt5Core REQUIRED) + +include_directories(${Qt5Core_INCLUDE_DIRS}) + +add_definitions(${Qt5Core_DEFINITIONS}) + +qt5_wrap_cpp(moc_files myobject.h) + +# Test options. The -binary option generates a binary to dlopen instead of +# a source file to compile. The compiler will consider it garbage when used +# in the add_executable call. +qt5_add_resources(rcc_files "test_macro_options.qrc" OPTIONS -binary) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}") + +add_executable(myobject myobject.cpp ${moc_files} ${rcc_files}) +target_link_libraries(myobject ${Qt5Core_LIBRARIES}) diff --git a/tests/auto/cmake/test_add_resource_options/myobject.cpp b/tests/auto/cmake/test_add_resource_options/myobject.cpp new file mode 100644 index 0000000000..292a76e569 --- /dev/null +++ b/tests/auto/cmake/test_add_resource_options/myobject.cpp @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "myobject.h" + +MyObject::MyObject(QObject *parent) + : QObject(parent) +{ + emit someSignal(); +} + +int main(int argc, char **argv) +{ + MyObject myObject; + return 0; +} diff --git a/tests/auto/cmake/test_add_resource_options/myobject.h b/tests/auto/cmake/test_add_resource_options/myobject.h new file mode 100644 index 0000000000..cd8765d03f --- /dev/null +++ b/tests/auto/cmake/test_add_resource_options/myobject.h @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef MYOBJECT_H +#define MYOBJECT_H + +#include + +class MyObject : public QObject +{ + Q_OBJECT +public: + MyObject(QObject *parent = 0); + +signals: + void someSignal(); +}; + +#endif diff --git a/tests/auto/cmake/test_add_resource_options/resource_file.txt b/tests/auto/cmake/test_add_resource_options/resource_file.txt new file mode 100644 index 0000000000..2c604a4f18 --- /dev/null +++ b/tests/auto/cmake/test_add_resource_options/resource_file.txt @@ -0,0 +1 @@ +Ken sent me. diff --git a/tests/auto/cmake/test_add_resource_options/test_macro_options.qrc b/tests/auto/cmake/test_add_resource_options/test_macro_options.qrc new file mode 100644 index 0000000000..00a17f541f --- /dev/null +++ b/tests/auto/cmake/test_add_resource_options/test_macro_options.qrc @@ -0,0 +1,6 @@ + + + resource_file.txt + + + diff --git a/tests/auto/cmake/test_add_resources_delyed_file/CMakeLists.txt b/tests/auto/cmake/test_add_resources_delyed_file/CMakeLists.txt new file mode 100644 index 0000000000..a64f1680da --- /dev/null +++ b/tests/auto/cmake/test_add_resources_delyed_file/CMakeLists.txt @@ -0,0 +1,24 @@ + +cmake_minimum_required(VERSION 2.8) + +project(test_add_resources_delyed_file) + +find_package(Qt5Core REQUIRED) + +include_directories(${Qt5Core_INCLUDE_DIRS}) + +add_definitions(${Qt5Core_DEFINITIONS}) + +qt5_add_resources(rcc_files "${CMAKE_CURRENT_BINARY_DIR}/test_add_resources_delyed_file.qrc") + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_add_resources_delyed_file.qrc" " + + ${CMAKE_CURRENT_SOURCE_DIR}/resource_file.txt + + +") + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}") + +add_executable(test_add_resources_delyed_file main.cpp ${rcc_files}) +target_link_libraries(test_add_resources_delyed_file ${Qt5Core_LIBRARIES}) diff --git a/tests/auto/cmake/test_add_resources_delyed_file/main.cpp b/tests/auto/cmake/test_add_resources_delyed_file/main.cpp new file mode 100644 index 0000000000..7b45dc22eb --- /dev/null +++ b/tests/auto/cmake/test_add_resources_delyed_file/main.cpp @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +int main(int argc, char **argv) +{ + // Compile error if the resource file was not created. + Q_INIT_RESOURCE(test_add_resources_delyed_file); + return 0; +} diff --git a/tests/auto/cmake/test_add_resources_delyed_file/resource_file.txt b/tests/auto/cmake/test_add_resources_delyed_file/resource_file.txt new file mode 100644 index 0000000000..2c604a4f18 --- /dev/null +++ b/tests/auto/cmake/test_add_resources_delyed_file/resource_file.txt @@ -0,0 +1 @@ +Ken sent me. diff --git a/tests/auto/cmake/test_dbus_module/CMakeLists.txt b/tests/auto/cmake/test_dbus_module/CMakeLists.txt new file mode 100644 index 0000000000..6bbb52697c --- /dev/null +++ b/tests/auto/cmake/test_dbus_module/CMakeLists.txt @@ -0,0 +1,36 @@ + +cmake_minimum_required(VERSION 2.8) + +project(test_dbus_module) + +find_package(Qt5Core REQUIRED) +find_package(Qt5DBus REQUIRED) + +include_directories( + ${Qt5Core_INCLUDE_DIRS} + ${Qt5DBus_INCLUDE_DIRS} +) + +add_definitions(${Qt5Core_DEFINITIONS} ${Qt5DBus_DEFINITIONS}) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}") + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(my_srcs mydbusobject.cpp) + +qt5_wrap_cpp(moc_files mydbusobject.h) + +qt5_generate_dbus_interface( + mydbusobject.h + ${CMAKE_BINARY_DIR}/org.qtProject.Tests.MyDBusObject.xml +) + +qt5_add_dbus_adaptor(my_srcs + ${CMAKE_BINARY_DIR}/org.qtProject.Tests.MyDBusObject.xml + mydbusobject.h + MyDBusObject +) + +add_executable(myobject ${my_srcs} ${moc_files}) +target_link_libraries(myobject ${Qt5DBus_LIBRARIES} ${Qt5Core_LIBRARIES}) diff --git a/tests/auto/cmake/test_dbus_module/mydbusobject.cpp b/tests/auto/cmake/test_dbus_module/mydbusobject.cpp new file mode 100644 index 0000000000..ee211bbe9b --- /dev/null +++ b/tests/auto/cmake/test_dbus_module/mydbusobject.cpp @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "mydbusobject.h" +#include "mydbusobjectadaptor.h" + +MyDBusObject::MyDBusObject(QObject *parent) + : QObject(parent) +{ + new MyDBusObjectAdaptor(this); + emit someSignal(); +} + +int main(int argc, char **argv) +{ + MyDBusObject myDBusObject; + return 0; +} diff --git a/tests/auto/cmake/test_dbus_module/mydbusobject.h b/tests/auto/cmake/test_dbus_module/mydbusobject.h new file mode 100644 index 0000000000..dd9a023ffe --- /dev/null +++ b/tests/auto/cmake/test_dbus_module/mydbusobject.h @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef MYDBUSOBJECT_H +#define MYDBUSOBJECT_H + +#include + +class MyDBusObject : public QObject +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.qtProject.Tests.MyDBusObject") +public: + MyDBusObject(QObject *parent = 0); + +signals: + void someSignal(); +}; + +#endif diff --git a/tests/auto/cmake/test_dependent_modules/CMakeLists.txt b/tests/auto/cmake/test_dependent_modules/CMakeLists.txt new file mode 100644 index 0000000000..07f202b14c --- /dev/null +++ b/tests/auto/cmake/test_dependent_modules/CMakeLists.txt @@ -0,0 +1,21 @@ + +cmake_minimum_required(VERSION 2.8) + +project(test_dependent_modules) + +# The module finds its dependencies +find_package(Qt5Widgets REQUIRED) + +include_directories(${Qt5Widgets_INCLUDE_DIRS}) + +add_definitions(${Qt5Core_DEFINITIONS}) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +qt5_wrap_cpp(moc_files mywidget.h) +qt5_wrap_ui(ui_files mywidget.ui) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}") + +add_executable(mywidget mywidget.cpp ${moc_files} ${ui_files}) +target_link_libraries(mywidget ${Qt5Widgets_LIBRARIES}) diff --git a/tests/auto/cmake/test_dependent_modules/mywidget.cpp b/tests/auto/cmake/test_dependent_modules/mywidget.cpp new file mode 100644 index 0000000000..7f8923810d --- /dev/null +++ b/tests/auto/cmake/test_dependent_modules/mywidget.cpp @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "mywidget.h" +#include "ui_mywidget.h" + +MyWidget::MyWidget(QWidget *parent) + : QWidget(parent) +{ + emit someSignal(); +} + +int main(int argc, char **argv) +{ + QApplication app(argc, argv); + MyWidget myWidget; + return 0; +} diff --git a/tests/auto/cmake/test_dependent_modules/mywidget.h b/tests/auto/cmake/test_dependent_modules/mywidget.h new file mode 100644 index 0000000000..11968e6454 --- /dev/null +++ b/tests/auto/cmake/test_dependent_modules/mywidget.h @@ -0,0 +1,65 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef MYWIDGET_H +#define MYWIDGET_H + +#include + +namespace Ui +{ +class MyWidget; +} + +class MyWidget : public QWidget +{ + Q_OBJECT +public: + MyWidget(QWidget *parent = 0); + +signals: + void someSignal(); + +private: + Ui::MyWidget *ui; +}; + +#endif diff --git a/tests/auto/cmake/test_dependent_modules/mywidget.ui b/tests/auto/cmake/test_dependent_modules/mywidget.ui new file mode 100644 index 0000000000..ac42ac4dc2 --- /dev/null +++ b/tests/auto/cmake/test_dependent_modules/mywidget.ui @@ -0,0 +1,34 @@ + + + Form + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + + PushButton + + + + + + + + + + + + + + diff --git a/tests/auto/cmake/test_multiple_find_package/CMakeLists.txt b/tests/auto/cmake/test_multiple_find_package/CMakeLists.txt new file mode 100644 index 0000000000..dfac4ca3be --- /dev/null +++ b/tests/auto/cmake/test_multiple_find_package/CMakeLists.txt @@ -0,0 +1,9 @@ + +cmake_minimum_required(VERSION 2.8) + +project(test_multiple_find_package) + +find_package(Qt5Core REQUIRED) + +add_subdirectory(subdir1) + diff --git a/tests/auto/cmake/test_multiple_find_package/subdir1/CMakeLists.txt b/tests/auto/cmake/test_multiple_find_package/subdir1/CMakeLists.txt new file mode 100644 index 0000000000..86c05f5de5 --- /dev/null +++ b/tests/auto/cmake/test_multiple_find_package/subdir1/CMakeLists.txt @@ -0,0 +1,2 @@ + +find_package(Qt5Core REQUIRED) diff --git a/tests/auto/cmake/test_platform_defs_include/CMakeLists.txt b/tests/auto/cmake/test_platform_defs_include/CMakeLists.txt new file mode 100644 index 0000000000..2b32a419e7 --- /dev/null +++ b/tests/auto/cmake/test_platform_defs_include/CMakeLists.txt @@ -0,0 +1,13 @@ + +cmake_minimum_required(VERSION 2.8) + +project(test_platform_defs_include) + +find_package(Qt5Core REQUIRED) + +include_directories(${Qt5Core_INCLUDE_DIRS}) +add_definitions(${Qt5Core_DEFINITIONS}) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}") + +add_executable(myobject main.cpp) diff --git a/tests/auto/cmake/test_platform_defs_include/main.cpp b/tests/auto/cmake/test_platform_defs_include/main.cpp new file mode 100644 index 0000000000..0a6b09d877 --- /dev/null +++ b/tests/auto/cmake/test_platform_defs_include/main.cpp @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qplatformdefs.h" + +int main(int argc, char **argv) +{ + return 0; +} diff --git a/tests/auto/cmake/test_qtmainwin_library/CMakeLists.txt b/tests/auto/cmake/test_qtmainwin_library/CMakeLists.txt new file mode 100644 index 0000000000..40ccb41da7 --- /dev/null +++ b/tests/auto/cmake/test_qtmainwin_library/CMakeLists.txt @@ -0,0 +1,20 @@ + +cmake_minimum_required(VERSION 2.8) + +project(test_qtmainwin_library) + +find_package(Qt5Core REQUIRED) + +include_directories(${Qt5Core_INCLUDE_DIRS}) + +add_definitions(${Qt5Core_DEFINITIONS}) + +qt5_wrap_cpp(moc_files myobject.h) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}") + +# On non-windows, the WIN32 is harmless, and Qt5Core_QTMAIN_LIBRARIES is empty. +# We test that it is harmless on those, and test that it builds on Windows. +# It wouldn't build if WIN32 is used and Qt5Core_QTMAIN_LIBRARIES is empty. +add_executable(myobject WIN32 myobject.cpp ${moc_files} ) +target_link_libraries(myobject ${Qt5Core_LIBRARIES} ${Qt5Core_QTMAIN_LIBRARIES}) diff --git a/tests/auto/cmake/test_qtmainwin_library/myobject.cpp b/tests/auto/cmake/test_qtmainwin_library/myobject.cpp new file mode 100644 index 0000000000..b6287b2540 --- /dev/null +++ b/tests/auto/cmake/test_qtmainwin_library/myobject.cpp @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "myobject.h" + +MyObject::MyObject(QObject *parent) + : QObject(parent) +{ + emit someSignal(); +} + +int main(int argc, char **argv) +{ + MyObject myObject; + return 0; +} diff --git a/tests/auto/cmake/test_qtmainwin_library/myobject.h b/tests/auto/cmake/test_qtmainwin_library/myobject.h new file mode 100644 index 0000000000..71a65ee801 --- /dev/null +++ b/tests/auto/cmake/test_qtmainwin_library/myobject.h @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef MYOBJECT_H +#define MYOBJECT_H + +#include + +class MyObject : public QObject +{ + Q_OBJECT +public: + MyObject(QObject *parent = 0); + +signals: + void someSignal(); +}; + +#endif diff --git a/tests/auto/cmake/test_use_modules_function/CMakeLists.txt b/tests/auto/cmake/test_use_modules_function/CMakeLists.txt new file mode 100644 index 0000000000..4ce01938cb --- /dev/null +++ b/tests/auto/cmake/test_use_modules_function/CMakeLists.txt @@ -0,0 +1,16 @@ + +cmake_minimum_required(VERSION 2.8) + +project(test_use_modules_function) + +set(CMAKE_AUTOMOC ON) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +add_executable(two two.cpp) +add_executable(three three.cpp) + +find_package(Qt5Core) + +qt5_use_modules(two Test) +qt5_use_modules(three Widgets Test) diff --git a/tests/auto/cmake/test_use_modules_function/three.cpp b/tests/auto/cmake/test_use_modules_function/three.cpp new file mode 100644 index 0000000000..63bcbff480 --- /dev/null +++ b/tests/auto/cmake/test_use_modules_function/three.cpp @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +class Three : public QObject +{ + Q_OBJECT +public: + Three(QObject *parent = 0) + { + QWidget *w = new QWidget; + w->show(); + } +}; + +QTEST_MAIN(Three) + +#include "three.moc" diff --git a/tests/auto/cmake/test_use_modules_function/two.cpp b/tests/auto/cmake/test_use_modules_function/two.cpp new file mode 100644 index 0000000000..24fcd5dba4 --- /dev/null +++ b/tests/auto/cmake/test_use_modules_function/two.cpp @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +class Two : public QObject +{ + Q_OBJECT +public: + Two(QObject *parent = 0) + { + + } +}; + +QTEST_MAIN(Two) + +#include "two.moc" diff --git a/tests/auto/cmake/test_wrap_cpp_and_resources/CMakeLists.txt b/tests/auto/cmake/test_wrap_cpp_and_resources/CMakeLists.txt new file mode 100644 index 0000000000..316a4e43b8 --- /dev/null +++ b/tests/auto/cmake/test_wrap_cpp_and_resources/CMakeLists.txt @@ -0,0 +1,19 @@ + +cmake_minimum_required(VERSION 2.8) + +project(test_wrap_cpp_and_resources) + +find_package(Qt5Core REQUIRED) + +include_directories(${Qt5Core_INCLUDE_DIRS}) + +add_definitions(${Qt5Core_DEFINITIONS}) + +qt5_wrap_cpp(moc_files myobject.h) + +qt5_add_resources(rcc_files "test_wrap_cpp_and_resources.qrc") + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}") + +add_executable(myobject myobject.cpp ${moc_files} ${rcc_files}) +target_link_libraries(myobject ${Qt5Core_LIBRARIES}) diff --git a/tests/auto/cmake/test_wrap_cpp_and_resources/myobject.cpp b/tests/auto/cmake/test_wrap_cpp_and_resources/myobject.cpp new file mode 100644 index 0000000000..8f0272058c --- /dev/null +++ b/tests/auto/cmake/test_wrap_cpp_and_resources/myobject.cpp @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "myobject.h" + +MyObject::MyObject(QObject *parent) + : QObject(parent) +{ + emit someSignal(); +} + +int main(int argc, char **argv) +{ + MyObject myObject; + // Compile error if the resource file was not created. + Q_INIT_RESOURCE(test_wrap_cpp_and_resources); + return 0; +} diff --git a/tests/auto/cmake/test_wrap_cpp_and_resources/myobject.h b/tests/auto/cmake/test_wrap_cpp_and_resources/myobject.h new file mode 100644 index 0000000000..cd8765d03f --- /dev/null +++ b/tests/auto/cmake/test_wrap_cpp_and_resources/myobject.h @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef MYOBJECT_H +#define MYOBJECT_H + +#include + +class MyObject : public QObject +{ + Q_OBJECT +public: + MyObject(QObject *parent = 0); + +signals: + void someSignal(); +}; + +#endif diff --git a/tests/auto/cmake/test_wrap_cpp_and_resources/resource_file.txt b/tests/auto/cmake/test_wrap_cpp_and_resources/resource_file.txt new file mode 100644 index 0000000000..2c604a4f18 --- /dev/null +++ b/tests/auto/cmake/test_wrap_cpp_and_resources/resource_file.txt @@ -0,0 +1 @@ +Ken sent me. diff --git a/tests/auto/cmake/test_wrap_cpp_and_resources/test_wrap_cpp_and_resources.qrc b/tests/auto/cmake/test_wrap_cpp_and_resources/test_wrap_cpp_and_resources.qrc new file mode 100644 index 0000000000..00a17f541f --- /dev/null +++ b/tests/auto/cmake/test_wrap_cpp_and_resources/test_wrap_cpp_and_resources.qrc @@ -0,0 +1,6 @@ + + + resource_file.txt + + + diff --git a/tests/auto/cmake/test_wrap_cpp_options/CMakeLists.txt b/tests/auto/cmake/test_wrap_cpp_options/CMakeLists.txt new file mode 100644 index 0000000000..a7a2c0e045 --- /dev/null +++ b/tests/auto/cmake/test_wrap_cpp_options/CMakeLists.txt @@ -0,0 +1,19 @@ + +cmake_minimum_required(VERSION 2.8) + +project(test_wrap_cpp_options) + +find_package(Qt5Core REQUIRED) + +include_directories(${Qt5Core_INCLUDE_DIRS}) + +add_definitions(${Qt5Core_DEFINITIONS}) + +# Test options. The -i option removes the include "myobject.h" from the moc file +# causing a compile failure. -> Options work +qt5_wrap_cpp(moc_files myobject.h OPTIONS -i) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}") + +add_executable(myobject myobject.cpp ${moc_files}) +target_link_libraries(myobject ${Qt5Core_LIBRARIES}) diff --git a/tests/auto/cmake/test_wrap_cpp_options/myobject.cpp b/tests/auto/cmake/test_wrap_cpp_options/myobject.cpp new file mode 100644 index 0000000000..292a76e569 --- /dev/null +++ b/tests/auto/cmake/test_wrap_cpp_options/myobject.cpp @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "myobject.h" + +MyObject::MyObject(QObject *parent) + : QObject(parent) +{ + emit someSignal(); +} + +int main(int argc, char **argv) +{ + MyObject myObject; + return 0; +} diff --git a/tests/auto/cmake/test_wrap_cpp_options/myobject.h b/tests/auto/cmake/test_wrap_cpp_options/myobject.h new file mode 100644 index 0000000000..cd8765d03f --- /dev/null +++ b/tests/auto/cmake/test_wrap_cpp_options/myobject.h @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef MYOBJECT_H +#define MYOBJECT_H + +#include + +class MyObject : public QObject +{ + Q_OBJECT +public: + MyObject(QObject *parent = 0); + +signals: + void someSignal(); +}; + +#endif -- cgit v1.2.3