summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusabstractadaptor.h
blob: 0610d2b2242a315aa921d519b5905ebd59b1d291 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDBus module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the Technology Preview License Agreement accompanying
** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file.  Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, 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.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/

#ifndef QDBUSABSTRACTADAPTOR_H
#define QDBUSABSTRACTADAPTOR_H

#include <QtCore/qobject.h>
#include <QtDBus/qdbusmacros.h>

QT_BEGIN_HEADER

QT_BEGIN_NAMESPACE

QT_MODULE(DBus)

class QDBusAbstractAdaptorPrivate;
class QDBUS_EXPORT QDBusAbstractAdaptor: public QObject
{
    Q_OBJECT
protected:
    QDBusAbstractAdaptor(QObject *parent);

public:
    ~QDBusAbstractAdaptor();

protected:
    void setAutoRelaySignals(bool enable);
    bool autoRelaySignals() const;

private:
    Q_DECLARE_PRIVATE(QDBusAbstractAdaptor)
};

QT_END_NAMESPACE

QT_END_HEADER

#endif
h: 33.3%;'/> -rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_c-check.cmake5
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_c.cmake12
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_c_and_cxx-check.cmake11
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_c_and_cxx.cmake17
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_c_no_unity_build-check.cmake5
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_c_no_unity_build.cmake10
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_code_before_and_after_include-check.cmake7
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_code_before_and_after_include.cmake13
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_cxx-check.cmake5
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_cxx.cmake12
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_default_batchsize-check.cmake7
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_default_batchsize.cmake15
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_order-check.cmake7
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_order.cmake12
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_runtest.cmake8
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_skip-check.cmake14
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_skip.cmake30
-rw-r--r--Tests/RunCMake/VS10Project/RunCMakeTest.cmake9
-rw-r--r--Tests/RunCMake/VS10Project/UnityBuildNative-check.cmake45
-rw-r--r--Tests/RunCMake/VS10Project/UnityBuildNative.cmake12
-rw-r--r--Tests/RunCMake/VS10Project/UnityBuildPre2017-check.cmake48
-rw-r--r--Tests/RunCMake/VS10Project/UnityBuildPre2017.cmake12
30 files changed, 388 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 48eebcc..8fd5234 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -576,3 +576,4 @@ endif()
add_RunCMake_test("CTestCommandExpandLists")
add_RunCMake_test(PrecompileHeaders)
+add_RunCMake_test("UnityBuild")
diff --git a/Tests/RunCMake/UnityBuild/CMakeLists.txt b/Tests/RunCMake/UnityBuild/CMakeLists.txt
new file mode 100644
index 0000000..77030d6
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.15)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/UnityBuild/RunCMakeTest.cmake b/Tests/RunCMake/UnityBuild/RunCMakeTest.cmake
new file mode 100644
index 0000000..8e484d0
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/RunCMakeTest.cmake
@@ -0,0 +1,23 @@
+include(RunCMake)
+
+run_cmake(unitybuild_c)
+run_cmake(unitybuild_cxx)
+run_cmake(unitybuild_c_and_cxx)
+run_cmake(unitybuild_batchsize)
+run_cmake(unitybuild_default_batchsize)
+run_cmake(unitybuild_skip)
+run_cmake(unitybuild_code_before_and_after_include)
+run_cmake(unitybuild_c_no_unity_build)
+run_cmake(unitybuild_order)
+
+function(run_test name)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${name}-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake(${name})
+ run_cmake_command(${name}-build ${CMAKE_COMMAND} --build . --config Debug)
+ run_cmake_command(${name}-test ${CMAKE_CTEST_COMMAND} -C Debug)
+ unset(RunCMake_TEST_BINARY_DIR)
+ unset(RunCMake_TEST_NO_CLEAN)
+endfunction()
+
+run_test(unitybuild_runtest)
diff --git a/Tests/RunCMake/UnityBuild/func.c b/Tests/RunCMake/UnityBuild/func.c
new file mode 100644
index 0000000..b14c907
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/func.c
@@ -0,0 +1,6 @@
+#include "func.h"
+
+int func(void)
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/UnityBuild/func.h b/Tests/RunCMake/UnityBuild/func.h
new file mode 100644
index 0000000..563a980
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/func.h
@@ -0,0 +1,6 @@
+#ifndef func_h
+#define func_h
+
+extern int func(void);
+
+#endif
diff --git a/Tests/RunCMake/UnityBuild/main.c b/Tests/RunCMake/UnityBuild/main.c
new file mode 100644
index 0000000..19c18d4
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/main.c
@@ -0,0 +1,6 @@
+#include "func.h"
+
+int main(void)
+{
+ return func();
+}
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_batchsize-check.cmake b/Tests/RunCMake/UnityBuild/unitybuild_batchsize-check.cmake
new file mode 100644
index 0000000..32bb8e7
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/unitybuild_batchsize-check.cmake
@@ -0,0 +1,11 @@
+set(unitybuild_c0 "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_0.c")
+set(unitybuild_c1 "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_1.c")
+if(NOT EXISTS "${unitybuild_c0}")
+ set(RunCMake_TEST_FAILED "Generated unity source files ${unitybuild_c0} does not exist.")
+ return()
+endif()
+
+if(NOT EXISTS "${unitybuild_c1}")
+ set(RunCMake_TEST_FAILED "Generated unity source files ${unitybuild_c1} does not exist.")
+ return()
+endif()
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_batchsize.cmake b/Tests/RunCMake/UnityBuild/unitybuild_batchsize.cmake
new file mode 100644
index 0000000..7caf251
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/unitybuild_batchsize.cmake
@@ -0,0 +1,16 @@
+project(unitybuild_batchsize C)
+
+set(srcs "")
+foreach(s RANGE 1 8)
+ set(src "${CMAKE_CURRENT_BINARY_DIR}/s${s}.c")
+ file(WRITE "${src}" "int s${s}(void) { return 0; }\n")
+ list(APPEND srcs "${src}")
+endforeach()
+
+add_library(tgt SHARED ${srcs})
+
+set_target_properties(tgt
+ PROPERTIES
+ UNITY_BUILD ON
+ UNITY_BUILD_BATCH_SIZE 4
+)
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_c-check.cmake b/Tests/RunCMake/UnityBuild/unitybuild_c-check.cmake
new file mode 100644
index 0000000..c980df0
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/unitybuild_c-check.cmake
@@ -0,0 +1,5 @@
+set(unitybuild_c "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_0.c")
+if(NOT EXISTS "${unitybuild_c}")
+ set(RunCMake_TEST_FAILED "Generated unity source files ${unitybuild_c} does not exist.")
+ return()
+endif()
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_c.cmake b/Tests/RunCMake/UnityBuild/unitybuild_c.cmake
new file mode 100644
index 0000000..77a09cb
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/unitybuild_c.cmake
@@ -0,0 +1,12 @@
+project(unitybuild_c C)
+
+set(srcs "")
+foreach(s RANGE 1 8)
+ set(src "${CMAKE_CURRENT_BINARY_DIR}/s${s}.c")
+ file(WRITE "${src}" "int s${s}(void) { return 0; }\n")
+ list(APPEND srcs "${src}")
+endforeach()
+
+add_library(tgt SHARED ${srcs})
+
+set_target_properties(tgt PROPERTIES UNITY_BUILD ON)
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_c_and_cxx-check.cmake b/Tests/RunCMake/UnityBuild/unitybuild_c_and_cxx-check.cmake
new file mode 100644
index 0000000..32c2992
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/unitybuild_c_and_cxx-check.cmake
@@ -0,0 +1,11 @@
+set(unitybuild_c "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_0.c")
+if(NOT EXISTS "${unitybuild_c}")
+ set(RunCMake_TEST_FAILED "Generated unity source files ${unitybuild_c} does not exist.")
+ return()
+endif()
+
+set(unitybuild_cxx "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_0.cxx")
+if(NOT EXISTS "${unitybuild_cxx}")
+ set(RunCMake_TEST_FAILED "Generated unity source files ${unitybuild_cxx} does not exist.")
+ return()
+endif()
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_c_and_cxx.cmake b/Tests/RunCMake/UnityBuild/unitybuild_c_and_cxx.cmake
new file mode 100644