diff options
Diffstat (limited to 'tests/auto/cmake/mockplugins')
33 files changed, 851 insertions, 0 deletions
diff --git a/tests/auto/cmake/mockplugins/mock1plugin/mock1plugin.json b/tests/auto/cmake/mockplugins/mock1plugin/mock1plugin.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock1plugin/mock1plugin.json @@ -0,0 +1 @@ +{} diff --git a/tests/auto/cmake/mockplugins/mock1plugin/mock1plugin.pro b/tests/auto/cmake/mockplugins/mock1plugin/mock1plugin.pro new file mode 100644 index 0000000000..1ccbe924ae --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock1plugin/mock1plugin.pro @@ -0,0 +1,9 @@ +TARGET = mock1plugin + +HEADERS += qmock1plugin.h +SOURCES += qmock1plugin.cpp +QT = mockplugins1 + +PLUGIN_TYPE = mockplugin +PLUGIN_CLASS_NAME = QMock1Plugin +load(qt_plugin) diff --git a/tests/auto/cmake/mockplugins/mock1plugin/qmock1plugin.cpp b/tests/auto/cmake/mockplugins/mock1plugin/qmock1plugin.cpp new file mode 100644 index 0000000000..2ee817d80a --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock1plugin/qmock1plugin.cpp @@ -0,0 +1,10 @@ +#include "qmock1plugin.h" + +QT_BEGIN_NAMESPACE + +QString QMock1Plugin::pluginName() const +{ + return "QMock1Plugin"; +} + +QT_END_NAMESPACE diff --git a/tests/auto/cmake/mockplugins/mock1plugin/qmock1plugin.h b/tests/auto/cmake/mockplugins/mock1plugin/qmock1plugin.h new file mode 100644 index 0000000000..e2e114b1d9 --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock1plugin/qmock1plugin.h @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** Copyright (C) 2018 Kitware, Inc. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMOCK1PLUGIN_H +#define QMOCK1PLUGIN_H + +#include <QObject> +#include <QtMockPlugins1/QMockPlugin> + +QT_BEGIN_NAMESPACE + +class QMock1Plugin : public QObject, public QMockPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID QMockPlugin_iid FILE "mock1plugin.json") + Q_INTERFACES(QMockPlugin) +public: + QString pluginName() const override; +}; + +QT_END_NAMESPACE + +#endif // QMOCK1PLUGIN_H diff --git a/tests/auto/cmake/mockplugins/mock2plugin/mock2plugin.json b/tests/auto/cmake/mockplugins/mock2plugin/mock2plugin.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock2plugin/mock2plugin.json @@ -0,0 +1 @@ +{} diff --git a/tests/auto/cmake/mockplugins/mock2plugin/mock2plugin.pro b/tests/auto/cmake/mockplugins/mock2plugin/mock2plugin.pro new file mode 100644 index 0000000000..75dc21cf0a --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock2plugin/mock2plugin.pro @@ -0,0 +1,10 @@ +TARGET = mock2plugin + +HEADERS += qmock2plugin.h +SOURCES += qmock2plugin.cpp +QT = mockplugins1 + +PLUGIN_TYPE = mockplugin +PLUGIN_CLASS_NAME = QMock2Plugin +PLUGIN_EXTENDS = mockplugins1 +load(qt_plugin) diff --git a/tests/auto/cmake/mockplugins/mock2plugin/qmock2plugin.cpp b/tests/auto/cmake/mockplugins/mock2plugin/qmock2plugin.cpp new file mode 100644 index 0000000000..5b3280e884 --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock2plugin/qmock2plugin.cpp @@ -0,0 +1,10 @@ +#include "qmock2plugin.h" + +QT_BEGIN_NAMESPACE + +QString QMock2Plugin::pluginName() const +{ + return "QMock2Plugin"; +} + +QT_END_NAMESPACE diff --git a/tests/auto/cmake/mockplugins/mock2plugin/qmock2plugin.h b/tests/auto/cmake/mockplugins/mock2plugin/qmock2plugin.h new file mode 100644 index 0000000000..be99133dc8 --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock2plugin/qmock2plugin.h @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** Copyright (C) 2018 Kitware, Inc. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMOCK2PLUGIN_H +#define QMOCK2PLUGIN_H + +#include <QObject> +#include <QtMockPlugins1/QMockPlugin> + +QT_BEGIN_NAMESPACE + +class QMock2Plugin : public QObject, public QMockPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID QMockPlugin_iid FILE "mock2plugin.json") + Q_INTERFACES(QMockPlugin) +public: + QString pluginName() const override; +}; + +QT_END_NAMESPACE + +#endif // QMOCK2PLUGIN_H diff --git a/tests/auto/cmake/mockplugins/mock3plugin/mock3plugin.json b/tests/auto/cmake/mockplugins/mock3plugin/mock3plugin.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock3plugin/mock3plugin.json @@ -0,0 +1 @@ +{} diff --git a/tests/auto/cmake/mockplugins/mock3plugin/mock3plugin.pro b/tests/auto/cmake/mockplugins/mock3plugin/mock3plugin.pro new file mode 100644 index 0000000000..ed7df603bb --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock3plugin/mock3plugin.pro @@ -0,0 +1,10 @@ +TARGET = mock3plugin + +HEADERS += qmock3plugin.h +SOURCES += qmock3plugin.cpp +QT = mockplugins1 + +PLUGIN_TYPE = mockplugin +PLUGIN_CLASS_NAME = QMock3Plugin +PLUGIN_EXTENDS = mockplugins1 mockplugins2 +load(qt_plugin) diff --git a/tests/auto/cmake/mockplugins/mock3plugin/qmock3plugin.cpp b/tests/auto/cmake/mockplugins/mock3plugin/qmock3plugin.cpp new file mode 100644 index 0000000000..b38f854e4b --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock3plugin/qmock3plugin.cpp @@ -0,0 +1,10 @@ +#include "qmock3plugin.h" + +QT_BEGIN_NAMESPACE + +QString QMock3Plugin::pluginName() const +{ + return "QMock3Plugin"; +} + +QT_END_NAMESPACE diff --git a/tests/auto/cmake/mockplugins/mock3plugin/qmock3plugin.h b/tests/auto/cmake/mockplugins/mock3plugin/qmock3plugin.h new file mode 100644 index 0000000000..08d1aa68ce --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock3plugin/qmock3plugin.h @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** Copyright (C) 2018 Kitware, Inc. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMOCK3PLUGIN_H +#define QMOCK3PLUGIN_H + +#include <QObject> +#include <QtMockPlugins1/QMockPlugin> + +QT_BEGIN_NAMESPACE + +class QMock3Plugin : public QObject, public QMockPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID QMockPlugin_iid FILE "mock3plugin.json") + Q_INTERFACES(QMockPlugin) +public: + QString pluginName() const override; +}; + +QT_END_NAMESPACE + +#endif // QMOCK3PLUGIN_H diff --git a/tests/auto/cmake/mockplugins/mock4plugin/mock4plugin.json b/tests/auto/cmake/mockplugins/mock4plugin/mock4plugin.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock4plugin/mock4plugin.json @@ -0,0 +1 @@ +{} diff --git a/tests/auto/cmake/mockplugins/mock4plugin/mock4plugin.pro b/tests/auto/cmake/mockplugins/mock4plugin/mock4plugin.pro new file mode 100644 index 0000000000..4dd2d6c547 --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock4plugin/mock4plugin.pro @@ -0,0 +1,10 @@ +TARGET = mock4plugin + +HEADERS += qmock4plugin.h +SOURCES += qmock4plugin.cpp +QT = mockplugins1 + +PLUGIN_TYPE = mockplugin +PLUGIN_CLASS_NAME = QMock4Plugin +PLUGIN_EXTENDS = - +load(qt_plugin) diff --git a/tests/auto/cmake/mockplugins/mock4plugin/qmock4plugin.cpp b/tests/auto/cmake/mockplugins/mock4plugin/qmock4plugin.cpp new file mode 100644 index 0000000000..5deaf7f43f --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock4plugin/qmock4plugin.cpp @@ -0,0 +1,10 @@ +#include "qmock4plugin.h" + +QT_BEGIN_NAMESPACE + +QString QMock4Plugin::pluginName() const +{ + return "QMock4Plugin"; +} + +QT_END_NAMESPACE diff --git a/tests/auto/cmake/mockplugins/mock4plugin/qmock4plugin.h b/tests/auto/cmake/mockplugins/mock4plugin/qmock4plugin.h new file mode 100644 index 0000000000..0776bef002 --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock4plugin/qmock4plugin.h @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** Copyright (C) 2018 Kitware, Inc. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMOCK4PLUGIN_H +#define QMOCK4PLUGIN_H + +#include <QObject> +#include <QtMockPlugins1/QMockPlugin> + +QT_BEGIN_NAMESPACE + +class QMock4Plugin : public QObject, public QMockPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID QMockPlugin_iid FILE "mock4plugin.json") + Q_INTERFACES(QMockPlugin) +public: + QString pluginName() const override; +}; + +QT_END_NAMESPACE + +#endif // QMOCK4PLUGIN_H diff --git a/tests/auto/cmake/mockplugins/mock5plugin/mock5plugin.json b/tests/auto/cmake/mockplugins/mock5plugin/mock5plugin.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock5plugin/mock5plugin.json @@ -0,0 +1 @@ +{} diff --git a/tests/auto/cmake/mockplugins/mock5plugin/mock5plugin.pro b/tests/auto/cmake/mockplugins/mock5plugin/mock5plugin.pro new file mode 100644 index 0000000000..29496868fe --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock5plugin/mock5plugin.pro @@ -0,0 +1,10 @@ +TARGET = mock5plugin + +HEADERS += qmock5plugin.h +SOURCES += qmock5plugin.cpp +QT = mockplugins3 + +PLUGIN_TYPE = mockplugin +PLUGIN_CLASS_NAME = QMock5Plugin +PLUGIN_EXTENDS = - +load(qt_plugin) diff --git a/tests/auto/cmake/mockplugins/mock5plugin/qmock5plugin.cpp b/tests/auto/cmake/mockplugins/mock5plugin/qmock5plugin.cpp new file mode 100644 index 0000000000..c5b4620516 --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock5plugin/qmock5plugin.cpp @@ -0,0 +1,10 @@ +#include "qmock5plugin.h" + +QT_BEGIN_NAMESPACE + +QString QMock5Plugin::pluginName() const +{ + return "QMock5Plugin"; +} + +QT_END_NAMESPACE diff --git a/tests/auto/cmake/mockplugins/mock5plugin/qmock5plugin.h b/tests/auto/cmake/mockplugins/mock5plugin/qmock5plugin.h new file mode 100644 index 0000000000..2f387da203 --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock5plugin/qmock5plugin.h @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** Copyright (C) 2018 Kitware, Inc. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMOCK5PLUGIN_H +#define QMOCK5PLUGIN_H + +#include <QObject> +#include <QtMockPlugins1/QMockPlugin> + +QT_BEGIN_NAMESPACE + +class QMock5Plugin : public QObject, public QMockPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID QMockPlugin_iid FILE "mock5plugin.json") + Q_INTERFACES(QMockPlugin) +public: + QString pluginName() const override; +}; + +QT_END_NAMESPACE + +#endif // QMOCK5PLUGIN_H diff --git a/tests/auto/cmake/mockplugins/mock6plugin/mock6plugin.json b/tests/auto/cmake/mockplugins/mock6plugin/mock6plugin.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock6plugin/mock6plugin.json @@ -0,0 +1 @@ +{} diff --git a/tests/auto/cmake/mockplugins/mock6plugin/mock6plugin.pro b/tests/auto/cmake/mockplugins/mock6plugin/mock6plugin.pro new file mode 100644 index 0000000000..140f198811 --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock6plugin/mock6plugin.pro @@ -0,0 +1,9 @@ +TARGET = mock6plugin + +HEADERS += qmock6plugin.h +SOURCES += qmock6plugin.cpp +QT = mockplugins3 + +PLUGIN_TYPE = mockauxplugin +PLUGIN_CLASS_NAME = QMock6Plugin +load(qt_plugin) diff --git a/tests/auto/cmake/mockplugins/mock6plugin/qmock6plugin.cpp b/tests/auto/cmake/mockplugins/mock6plugin/qmock6plugin.cpp new file mode 100644 index 0000000000..4a0329c68a --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock6plugin/qmock6plugin.cpp @@ -0,0 +1,10 @@ +#include "qmock6plugin.h" + +QT_BEGIN_NAMESPACE + +QString QMock6Plugin::pluginName() const +{ + return "QMock6Plugin"; +} + +QT_END_NAMESPACE diff --git a/tests/auto/cmake/mockplugins/mock6plugin/qmock6plugin.h b/tests/auto/cmake/mockplugins/mock6plugin/qmock6plugin.h new file mode 100644 index 0000000000..6b29b6703b --- /dev/null +++ b/tests/auto/cmake/mockplugins/mock6plugin/qmock6plugin.h @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** Copyright (C) 2018 Kitware, Inc. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMOCK6PLUGIN_H +#define QMOCK6PLUGIN_H + +#include <QObject> +#include <QtMockPlugins3/QMockAuxPlugin> + +QT_BEGIN_NAMESPACE + +class QMock6Plugin : public QObject, public QMockAuxPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID QMockAuxPlugin_iid FILE "mock6plugin.json") + Q_INTERFACES(QMockAuxPlugin) +public: + QString pluginName() const override; +}; + +QT_END_NAMESPACE + +#endif // QMOCK6PLUGIN_H diff --git a/tests/auto/cmake/mockplugins/mockplugins.pro b/tests/auto/cmake/mockplugins/mockplugins.pro new file mode 100644 index 0000000000..830d130a05 --- /dev/null +++ b/tests/auto/cmake/mockplugins/mockplugins.pro @@ -0,0 +1,36 @@ +TEMPLATE = subdirs + +src_mock1plugin.subdir = $$PWD/mock1plugin +src_mock1plugin.target = sub-mockplugin1 +src_mock1plugin.depends = mockplugins1 + +src_mock2plugin.subdir = $$PWD/mock2plugin +src_mock2plugin.target = sub-mockplugin2 +src_mock2plugin.depends = mockplugins1 + +src_mock3plugin.subdir = $$PWD/mock3plugin +src_mock3plugin.target = sub-mockplugin3 +src_mock3plugin.depends = mockplugins1 + +src_mock4plugin.subdir = $$PWD/mock4plugin +src_mock4plugin.target = sub-mockplugin4 +src_mock4plugin.depends = mockplugins1 + +src_mock5plugin.subdir = $$PWD/mock5plugin +src_mock5plugin.target = sub-mockplugin5 +src_mock5plugin.depends = mockplugins3 + +src_mock6plugin.subdir = $$PWD/mock6plugin +src_mock6plugin.target = sub-mockplugin6 +src_mock6plugin.depends = mockplugins3 + +SUBDIRS += \ + mockplugins1 \ + mockplugins2 \ + mockplugins3 \ + src_mock1plugin \ + src_mock2plugin \ + src_mock3plugin \ + src_mock4plugin \ + src_mock5plugin \ + src_mock6plugin diff --git a/tests/auto/cmake/mockplugins/mockplugins1/fake.cpp b/tests/auto/cmake/mockplugins/mockplugins1/fake.cpp new file mode 100644 index 0000000000..f95eba6055 --- /dev/null +++ b/tests/auto/cmake/mockplugins/mockplugins1/fake.cpp @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2019 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtCore/QtGlobal> + +// Empty exported function needed to create .lib on Windows. +Q_DECL_EXPORT void mockplugins1_foo() { + +} diff --git a/tests/auto/cmake/mockplugins/mockplugins1/mockplugins1.pro b/tests/auto/cmake/mockplugins/mockplugins1/mockplugins1.pro new file mode 100644 index 0000000000..dd98937ee3 --- /dev/null +++ b/tests/auto/cmake/mockplugins/mockplugins1/mockplugins1.pro @@ -0,0 +1,10 @@ +TARGET = QtMockPlugins1 +QT = core +MODULE_PLUGIN_TYPES = mockplugin + +# Fake a git_build, to force qmake to run syncqt.pl when doing a standalone tests build +# like it is done in Coin, otherwise module headers would not be generated. +CONFIG += git_build +HEADERS += qmockplugin.h +SOURCES += fake.cpp # Needed to make libtool / ar happy on macOS +load(qt_module) diff --git a/tests/auto/cmake/mockplugins/mockplugins1/qmockplugin.h b/tests/auto/cmake/mockplugins/mockplugins1/qmockplugin.h new file mode 100644 index 0000000000..9427ae9212 --- /dev/null +++ b/tests/auto/cmake/mockplugins/mockplugins1/qmockplugin.h @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2018 Kitware, Inc. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMOCKPLUGIN_H +#define QMOCKPLUGIN_H + +#include <QString> +#include <QtPlugin> + +QT_BEGIN_NAMESPACE + +#define QMockPlugin_iid "org.qt-project.Qt.Tests.QMockPlugin" + +class QMockPlugin +{ +public: + virtual ~QMockPlugin() {} + virtual QString pluginName() const = 0; +}; + +Q_DECLARE_INTERFACE(QMockPlugin, QMockPlugin_iid) + +QT_END_NAMESPACE + +#endif // QMOCKPLUGIN_H diff --git a/tests/auto/cmake/mockplugins/mockplugins2/fake.cpp b/tests/auto/cmake/mockplugins/mockplugins2/fake.cpp new file mode 100644 index 0000000000..384623d646 --- /dev/null +++ b/tests/auto/cmake/mockplugins/mockplugins2/fake.cpp @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2019 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtCore/QtGlobal> + +// Empty exported function needed to create .lib on Windows. +Q_DECL_EXPORT void mockplugins2_foo() { + +} diff --git a/tests/auto/cmake/mockplugins/mockplugins2/mockplugins2.pro b/tests/auto/cmake/mockplugins/mockplugins2/mockplugins2.pro new file mode 100644 index 0000000000..1dd03391e8 --- /dev/null +++ b/tests/auto/cmake/mockplugins/mockplugins2/mockplugins2.pro @@ -0,0 +1,4 @@ +TARGET = QtMockPlugins2 +QT = core +SOURCES += fake.cpp # Needed to make libtool / ar happy on macOS +load(qt_module) diff --git a/tests/auto/cmake/mockplugins/mockplugins3/fake.cpp b/tests/auto/cmake/mockplugins/mockplugins3/fake.cpp new file mode 100644 index 0000000000..9ec2b42181 --- /dev/null +++ b/tests/auto/cmake/mockplugins/mockplugins3/fake.cpp @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2019 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtCore/QtGlobal> + +// Empty exported function needed to create .lib on Windows. +Q_DECL_EXPORT void mockplugins3_foo() { + +} diff --git a/tests/auto/cmake/mockplugins/mockplugins3/mockplugins3.pro b/tests/auto/cmake/mockplugins/mockplugins3/mockplugins3.pro new file mode 100644 index 0000000000..3651abaafa --- /dev/null +++ b/tests/auto/cmake/mockplugins/mockplugins3/mockplugins3.pro @@ -0,0 +1,11 @@ +TARGET = QtMockPlugins3 +QT = core +MODULE_PLUGIN_TYPES = mockauxplugin + +# Fake a git_build, to force qmake to run syncqt.pl when doing a standalone tests build +# like it is done in Coin, otherwise module headers would not be generated. +CONFIG += git_build +HEADERS += qmockauxplugin.h +SOURCES += fake.cpp # Needed to make libtool / ar happy on macOS + +load(qt_module) diff --git a/tests/auto/cmake/mockplugins/mockplugins3/qmockauxplugin.h b/tests/auto/cmake/mockplugins/mockplugins3/qmockauxplugin.h new file mode 100644 index 0000000000..25e4762bac --- /dev/null +++ b/tests/auto/cmake/mockplugins/mockplugins3/qmockauxplugin.h @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2018 Kitware, Inc. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMOCKAUXPLUGIN_H +#define QMOCKAUXPLUGIN_H + +#include <QString> +#include <QtPlugin> + +QT_BEGIN_NAMESPACE + +#define QMockAuxPlugin_iid "org.qt-project.Qt.Tests.QMockAuxPlugin" + +class QMockAuxPlugin +{ +public: + virtual ~QMockAuxPlugin() {} + virtual QString pluginName() const = 0; +}; + +Q_DECLARE_INTERFACE(QMockAuxPlugin, QMockAuxPlugin_iid) + +QT_END_NAMESPACE + +#endif // QMOCKAUXPLUGIN_H |