diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-11-15 15:59:13 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2016-11-23 08:42:05 +0000 |
commit | 2333c58fff009435503c3b7ef3d86569227056eb (patch) | |
tree | c98fd555af28f6324b24a3884bc8f40fa18bde24 /src/compositor/global | |
parent | 1d5b44cbb1e834bc8db94d8ec1ac140b8ca9ed37 (diff) |
Use the feature system internally
Get rid of almost all DEFINES += ... in the pro files,
instead use the proper QT_CONFIG() macro to determine
whether a feature is available.
Change-Id: I867769be2085c6ba93b6815e223e2b89edcb245d
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/compositor/global')
-rw-r--r-- | src/compositor/global/global.pri | 2 | ||||
-rw-r--r-- | src/compositor/global/qtwaylandcompositorglobal.h | 72 | ||||
-rw-r--r-- | src/compositor/global/qtwaylandcompositorglobal_p.h | 59 | ||||
-rw-r--r-- | src/compositor/global/qwaylandcompositorextension.h | 2 | ||||
-rw-r--r-- | src/compositor/global/qwaylandexport.h | 56 |
5 files changed, 133 insertions, 58 deletions
diff --git a/src/compositor/global/global.pri b/src/compositor/global/global.pri index e48b8a8c2..29d4f4376 100644 --- a/src/compositor/global/global.pri +++ b/src/compositor/global/global.pri @@ -1,7 +1,7 @@ INCLUDEPATH += global/ HEADERS += \ - global/qwaylandexport.h \ + global/qtwaylandcompositorglobal.h \ global/qwaylandcompositorextension.h \ global/qwaylandcompositorextension_p.h \ global/qwaylandquickextension.h \ diff --git a/src/compositor/global/qtwaylandcompositorglobal.h b/src/compositor/global/qtwaylandcompositorglobal.h new file mode 100644 index 000000000..403f1962a --- /dev/null +++ b/src/compositor/global/qtwaylandcompositorglobal.h @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and 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 Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** 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-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QWAYLANDCOMPOSITORGLOBAL_H +#define QWAYLANDCOMPOSITORGLOBAL_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include <QtGui/qtguiglobal.h> +#include <QtWaylandCompositor/qtwaylandcompositor-config.h> + +QT_BEGIN_NAMESPACE + +#if !defined(Q_WAYLAND_COMPOSITOR_EXPORT) +# if defined(QT_SHARED) && defined(QT_BUILD_COMPOSITOR_LIB) +# define Q_WAYLAND_COMPOSITOR_EXPORT Q_DECL_EXPORT +# elif defined(QT_SHARED) +# define Q_WAYLAND_COMPOSITOR_EXPORT Q_DECL_IMPORT +# else +# define Q_WAYLAND_COMPOSITOR_EXPORT +# endif +#endif + +QT_END_NAMESPACE + +#endif // QWAYLANDCOMPOSITORGLOBAL_H + diff --git a/src/compositor/global/qtwaylandcompositorglobal_p.h b/src/compositor/global/qtwaylandcompositorglobal_p.h new file mode 100644 index 000000000..629d58292 --- /dev/null +++ b/src/compositor/global/qtwaylandcompositorglobal_p.h @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and 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 Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** 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-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QWAYLANDCOMPOSITORGLOBAL_P_H +#define QWAYLANDCOMPOSITORGLOBAL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include <QtWaylandCompositor/qtwaylandcompositorglobal.h> +#include <QtGui/private/qtguiglobal_p.h> +#include <QtWaylandCompositor/private/qtwaylandcompositor-config_p.h> + +#endif // QWAYLANDCOMPOSITORGLOBAL_P_H + diff --git a/src/compositor/global/qwaylandcompositorextension.h b/src/compositor/global/qwaylandcompositorextension.h index d666b4f2a..e9aa84609 100644 --- a/src/compositor/global/qwaylandcompositorextension.h +++ b/src/compositor/global/qwaylandcompositorextension.h @@ -37,7 +37,7 @@ #ifndef QWAYLANDEXTENSION_H #define QWAYLANDEXTENSION_H -#include <QtWaylandCompositor/qwaylandexport.h> +#include <QtWaylandCompositor/qtwaylandcompositorglobal.h> #include <QtCore/QObject> #include <QtCore/QVector> diff --git a/src/compositor/global/qwaylandexport.h b/src/compositor/global/qwaylandexport.h deleted file mode 100644 index ddfa6aa77..000000000 --- a/src/compositor/global/qwaylandexport.h +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the QtWaylandCompositor module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later 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 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef WAYLANDEXPORT_H -#define WAYLANDEXPORT_H - -#include <QtCore/qglobal.h> - -QT_BEGIN_NAMESPACE - -#if !defined(Q_WAYLAND_COMPOSITOR_EXPORT) -# if defined(QT_SHARED) && defined(QT_BUILD_COMPOSITOR_LIB) -# define Q_WAYLAND_COMPOSITOR_EXPORT Q_DECL_EXPORT -# elif defined(QT_SHARED) -# define Q_WAYLAND_COMPOSITOR_EXPORT Q_DECL_IMPORT -# else -# define Q_WAYLAND_COMPOSITOR_EXPORT -# endif -#endif - -QT_END_NAMESPACE - -#endif //WAYLANDEXPORT_H |