summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2016-11-16 11:10:14 +0100
committerLars Knoll <lars.knoll@qt.io>2016-11-23 08:42:11 +0000
commitf6912982ebd67d8aaa0c9d6b689bee63bc2360b7 (patch)
treec77f3ff4338350075d8cb70284d1758895bd1747
parent1d51cabc54653541c043e58df37ae56a06791d9b (diff)
Use new feature system, part 2
Convert all uses of QT_NO_FOO to proper QT_CONFIG(foo) checks. Change-Id: Id0f0b3325c246567a43d6b2d71b0d69e5535e648 Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
-rw-r--r--src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp6
-rw-r--r--src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp6
-rw-r--r--src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp6
-rw-r--r--src/plugins/platforms/wayland/plugins/decorations/bradient/main.cpp4
-rw-r--r--src/plugins/platforms/wayland/qwaylandclipboard.cpp4
-rw-r--r--src/plugins/platforms/wayland/qwaylandclipboard_p.h4
-rw-r--r--src/plugins/platforms/wayland/qwaylanddatadevice.cpp4
-rw-r--r--src/plugins/platforms/wayland/qwaylanddatadevice_p.h5
-rw-r--r--src/plugins/platforms/wayland/qwaylanddatadevicemanager.cpp4
-rw-r--r--src/plugins/platforms/wayland/qwaylanddatadevicemanager_p.h4
-rw-r--r--src/plugins/platforms/wayland/qwaylanddataoffer.cpp4
-rw-r--r--src/plugins/platforms/wayland/qwaylanddataoffer_p.h4
-rw-r--r--src/plugins/platforms/wayland/qwaylanddatasource.cpp4
-rw-r--r--src/plugins/platforms/wayland/qwaylanddatasource_p.h4
-rw-r--r--src/plugins/platforms/wayland/qwaylanddecorationfactory.cpp6
-rw-r--r--src/plugins/platforms/wayland/qwaylanddisplay.cpp6
-rw-r--r--src/plugins/platforms/wayland/qwaylanddisplay_p.h4
-rw-r--r--src/plugins/platforms/wayland/qwaylanddnd.cpp4
-rw-r--r--src/plugins/platforms/wayland/qwaylanddnd_p.h2
-rw-r--r--src/plugins/platforms/wayland/qwaylandinputdevice.cpp2
-rw-r--r--src/plugins/platforms/wayland/qwaylandintegration.cpp16
-rw-r--r--src/plugins/platforms/wayland/qwaylandintegration_p.h10
-rw-r--r--src/plugins/platforms/wayland/qwaylandnativeinterface.cpp4
-rw-r--r--src/plugins/platforms/wayland/qwaylandnativeinterface_p.h2
-rw-r--r--src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp4
-rw-r--r--src/plugins/platforms/wayland/qwaylandshmbackingstore_p.h2
-rw-r--r--src/plugins/platforms/wayland/qwaylandwindow.cpp2
-rw-r--r--src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationfactory.cpp6
28 files changed, 67 insertions, 66 deletions
diff --git a/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp b/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp
index aa197e3d104..4e7e7ee5cac 100644
--- a/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp
+++ b/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp
@@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QWaylandClientBufferIntegrationFactoryInterface_iid, QLatin1String("/wayland-graphics-integration-client"), Qt::CaseInsensitive))
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
@@ -57,7 +57,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
QStringList QWaylandClientBufferIntegrationFactory::keys(const QString &pluginPath)
{
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
QStringList list;
if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath);
@@ -80,7 +80,7 @@ QStringList QWaylandClientBufferIntegrationFactory::keys(const QString &pluginPa
QWaylandClientBufferIntegration *QWaylandClientBufferIntegrationFactory::create(const QString &name, const QStringList &args, const QString &pluginPath)
{
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
// Try loading the plugin from platformPluginPath first:
if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath);
diff --git a/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp b/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp
index dfa0b465485..527dc571a2e 100644
--- a/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp
+++ b/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp
@@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QWaylandServerBufferIntegrationFactoryInterface_iid, QLatin1String("/wayland-graphics-integration-client"), Qt::CaseInsensitive))
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
@@ -57,7 +57,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
QStringList QWaylandServerBufferIntegrationFactory::keys(const QString &pluginPath)
{
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
QStringList list;
if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath);
@@ -80,7 +80,7 @@ QStringList QWaylandServerBufferIntegrationFactory::keys(const QString &pluginPa
QWaylandServerBufferIntegration *QWaylandServerBufferIntegrationFactory::create(const QString &name, const QStringList &args, const QString &pluginPath)
{
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
// Try loading the plugin from platformPluginPath first:
if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath);
diff --git a/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp b/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp
index de303d009c2..c069a3645a4 100644
--- a/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp
+++ b/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp
@@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QWaylandInputDeviceIntegrationFactoryInterface_iid, QLatin1String("/wayland-inputdevice-integration"), Qt::CaseInsensitive))
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
@@ -57,7 +57,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
QStringList QWaylandInputDeviceIntegrationFactory::keys(const QString &pluginPath)
{
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
QStringList list;
if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath);
@@ -80,7 +80,7 @@ QStringList QWaylandInputDeviceIntegrationFactory::keys(const QString &pluginPat
QWaylandInputDeviceIntegration *QWaylandInputDeviceIntegrationFactory::create(const QString &name, const QStringList &args, const QString &pluginPath)
{
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
// Try loading the plugin from platformPluginPath first:
if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath);
diff --git a/src/plugins/platforms/wayland/plugins/decorations/bradient/main.cpp b/src/plugins/platforms/wayland/plugins/decorations/bradient/main.cpp
index f7ce0fca6f0..f57b816e845 100644
--- a/src/plugins/platforms/wayland/plugins/decorations/bradient/main.cpp
+++ b/src/plugins/platforms/wayland/plugins/decorations/bradient/main.cpp
@@ -56,7 +56,7 @@ namespace QtWaylandClient {
#define BUTTON_SPACING 5
-#ifndef QT_NO_IMAGEFORMAT_XPM
+#if QT_CONFIG(imageformat_xpm)
# define BUTTON_WIDTH 10
static const char * const qt_close_xpm[] = {
@@ -265,7 +265,7 @@ void QWaylandBradientDecoration::paint(QPaintDevice *device)
p.restore();
}
-#ifndef QT_NO_IMAGEFORMAT_XPM
+#if QT_CONFIG(imageformat_xpm)
p.save();
// Close button
diff --git a/src/plugins/platforms/wayland/qwaylandclipboard.cpp b/src/plugins/platforms/wayland/qwaylandclipboard.cpp
index 409abaa5684..68fb737ccb0 100644
--- a/src/plugins/platforms/wayland/qwaylandclipboard.cpp
+++ b/src/plugins/platforms/wayland/qwaylandclipboard.cpp
@@ -44,7 +44,7 @@
#include "qwaylanddatasource_p.h"
#include "qwaylanddatadevice_p.h"
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QT_BEGIN_NAMESPACE
@@ -118,4 +118,4 @@ bool QWaylandClipboard::ownsMode(QClipboard::Mode mode) const
QT_END_NAMESPACE
-#endif // QT_NO_DRAGANDDROP
+#endif // draganddrop
diff --git a/src/plugins/platforms/wayland/qwaylandclipboard_p.h b/src/plugins/platforms/wayland/qwaylandclipboard_p.h
index d662e512e24..584322e07db 100644
--- a/src/plugins/platforms/wayland/qwaylandclipboard_p.h
+++ b/src/plugins/platforms/wayland/qwaylandclipboard_p.h
@@ -57,7 +57,7 @@
#include <QtWaylandClient/qtwaylandclientglobal.h>
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
@@ -85,6 +85,6 @@ private:
QT_END_NAMESPACE
-#endif // QT_NO_DRAGANDDROP
+#endif // draganddrop
#endif // QWAYLANDCLIPBOARD_H
diff --git a/src/plugins/platforms/wayland/qwaylanddatadevice.cpp b/src/plugins/platforms/wayland/qwaylanddatadevice.cpp
index f1a1ba6f023..b76647ea2d0 100644
--- a/src/plugins/platforms/wayland/qwaylanddatadevice.cpp
+++ b/src/plugins/platforms/wayland/qwaylanddatadevice.cpp
@@ -56,7 +56,7 @@
#include <qpa/qplatformdrag.h>
#include <qpa/qwindowsysteminterface.h>
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QT_BEGIN_NAMESPACE
@@ -271,4 +271,4 @@ QPoint QWaylandDataDevice::calculateDragPosition(int x, int y, QWindow *wnd) con
QT_END_NAMESPACE
-#endif // QT_NO_DRAGANDDROP
+#endif // draganddrop
diff --git a/src/plugins/platforms/wayland/qwaylanddatadevice_p.h b/src/plugins/platforms/wayland/qwaylanddatadevice_p.h
index 318636de791..0b16f97d2c0 100644
--- a/src/plugins/platforms/wayland/qwaylanddatadevice_p.h
+++ b/src/plugins/platforms/wayland/qwaylanddatadevice_p.h
@@ -52,13 +52,14 @@
// We mean it.
//
+#include <qtwaylandclientglobal.h>
#include <QObject>
#include <QPointer>
#include <QPoint>
#include <QtWaylandClient/private/qwayland-wayland.h>
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QT_BEGIN_NAMESPACE
@@ -122,6 +123,6 @@ private:
QT_END_NAMESPACE
-#endif // QT_NO_DRAGANDDROP
+#endif // draganddrop
#endif // QWAYLANDDATADEVICE_H
diff --git a/src/plugins/platforms/wayland/qwaylanddatadevicemanager.cpp b/src/plugins/platforms/wayland/qwaylanddatadevicemanager.cpp
index 5c6f7415755..c398b86fd5f 100644
--- a/src/plugins/platforms/wayland/qwaylanddatadevicemanager.cpp
+++ b/src/plugins/platforms/wayland/qwaylanddatadevicemanager.cpp
@@ -46,7 +46,7 @@
#include <QtCore/QDebug>
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QT_BEGIN_NAMESPACE
@@ -83,4 +83,4 @@ QWaylandDisplay *QWaylandDataDeviceManager::display() const
QT_END_NAMESPACE
-#endif // QT_NO_DRAGANDDROP
+#endif // draganddrop
diff --git a/src/plugins/platforms/wayland/qwaylanddatadevicemanager_p.h b/src/plugins/platforms/wayland/qwaylanddatadevicemanager_p.h
index df8a67abaf0..e7fc2113a35 100644
--- a/src/plugins/platforms/wayland/qwaylanddatadevicemanager_p.h
+++ b/src/plugins/platforms/wayland/qwaylanddatadevicemanager_p.h
@@ -54,7 +54,7 @@
#include <QtWaylandClient/qtwaylandclientglobal.h>
#include <QtWaylandClient/private/qwayland-wayland.h>
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QT_BEGIN_NAMESPACE
@@ -83,6 +83,6 @@ private:
QT_END_NAMESPACE
-#endif // QT_NO_DRAGANDDROP
+#endif // draganddrop
#endif // QWAYLANDDATADEVICEMANAGER_H
diff --git a/src/plugins/platforms/wayland/qwaylanddataoffer.cpp b/src/plugins/platforms/wayland/qwaylanddataoffer.cpp
index b33a98e0f00..56a18f007d3 100644
--- a/src/plugins/platforms/wayland/qwaylanddataoffer.cpp
+++ b/src/plugins/platforms/wayland/qwaylanddataoffer.cpp
@@ -47,7 +47,7 @@
#include <QtCore/QDebug>
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QT_BEGIN_NAMESPACE
@@ -184,4 +184,4 @@ int QWaylandMimeData::readData(int fd, QByteArray &data) const
QT_END_NAMESPACE
-#endif // QT_NO_DRAGANDDROP
+#endif // draganddrop
diff --git a/src/plugins/platforms/wayland/qwaylanddataoffer_p.h b/src/plugins/platforms/wayland/qwaylanddataoffer_p.h
index 07adf342a35..96799c861e8 100644
--- a/src/plugins/platforms/wayland/qwaylanddataoffer_p.h
+++ b/src/plugins/platforms/wayland/qwaylanddataoffer_p.h
@@ -56,7 +56,7 @@
#include <QtWaylandClient/qtwaylandclientglobal.h>
#include <QtWaylandClient/private/qwayland-wayland.h>
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
@@ -106,5 +106,5 @@ private:
}
QT_END_NAMESPACE
-#endif // QT_NO_DRAGANDDROP
+#endif // draganddrop
#endif
diff --git a/src/plugins/platforms/wayland/qwaylanddatasource.cpp b/src/plugins/platforms/wayland/qwaylanddatasource.cpp
index bada694ca55..036bd0d8651 100644
--- a/src/plugins/platforms/wayland/qwaylanddatasource.cpp
+++ b/src/plugins/platforms/wayland/qwaylanddatasource.cpp
@@ -49,7 +49,7 @@
#include <unistd.h>
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QT_BEGIN_NAMESPACE
@@ -99,4 +99,4 @@ void QWaylandDataSource::data_source_target(const QString &mime_type)
QT_END_NAMESPACE
-#endif // QT_NO_DRAGANDDROP
+#endif // draganddrop
diff --git a/src/plugins/platforms/wayland/qwaylanddatasource_p.h b/src/plugins/platforms/wayland/qwaylanddatasource_p.h
index fd8601325ae..540e6ad7a1d 100644
--- a/src/plugins/platforms/wayland/qwaylanddatasource_p.h
+++ b/src/plugins/platforms/wayland/qwaylanddatasource_p.h
@@ -56,7 +56,7 @@
#include <QtWaylandClient/private/qwayland-wayland.h>
#include <QtWaylandClient/qtwaylandclientglobal.h>
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QT_BEGIN_NAMESPACE
@@ -94,6 +94,6 @@ private:
QT_END_NAMESPACE
-#endif // QT_NO_DRAGANDDROP
+#endif // draganddrop
#endif // QWAYLANDDATASOURCE_H
diff --git a/src/plugins/platforms/wayland/qwaylanddecorationfactory.cpp b/src/plugins/platforms/wayland/qwaylanddecorationfactory.cpp
index 43c712fc092..1279e3039f6 100644
--- a/src/plugins/platforms/wayland/qwaylanddecorationfactory.cpp
+++ b/src/plugins/platforms/wayland/qwaylanddecorationfactory.cpp
@@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QWaylandDecorationFactoryInterface_iid, QLatin1String("/wayland-decoration-client"), Qt::CaseInsensitive))
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
@@ -57,7 +57,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
QStringList QWaylandDecorationFactory::keys(const QString &pluginPath)
{
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
QStringList list;
if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath);
@@ -80,7 +80,7 @@ QStringList QWaylandDecorationFactory::keys(const QString &pluginPath)
QWaylandAbstractDecoration *QWaylandDecorationFactory::create(const QString &name, const QStringList &args, const QString &pluginPath)
{
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
// Try loading the plugin from platformPluginPath first:
if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath);
diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp
index de38e3f2584..534373b1606 100644
--- a/src/plugins/platforms/wayland/qwaylanddisplay.cpp
+++ b/src/plugins/platforms/wayland/qwaylanddisplay.cpp
@@ -120,7 +120,7 @@ QWaylandWindowManagerIntegration *QWaylandDisplay::windowManagerIntegration() co
QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration)
: mWaylandIntegration(waylandIntegration)
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
, mDndSelectionHandler(0)
#endif
, mWindowExtension(0)
@@ -160,7 +160,7 @@ QWaylandDisplay::~QWaylandDisplay(void)
mWaylandIntegration->destroyScreen(screen);
}
mScreens.clear();
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
delete mDndSelectionHandler.take();
#endif
wl_display_disconnect(mDisplay);
@@ -255,7 +255,7 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin
} else if (interface == QStringLiteral("wl_seat")) {
QWaylandInputDevice *inputDevice = mWaylandIntegration->createInputDevice(this, version, id);
mInputDevices.append(inputDevice);
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
} else if (interface == QStringLiteral("wl_data_device_manager")) {
mDndSelectionHandler.reset(new QWaylandDataDeviceManager(this, id));
#endif
diff --git a/src/plugins/platforms/wayland/qwaylanddisplay_p.h b/src/plugins/platforms/wayland/qwaylanddisplay_p.h
index afbe676514c..a4631b95f84 100644
--- a/src/plugins/platforms/wayland/qwaylanddisplay_p.h
+++ b/src/plugins/platforms/wayland/qwaylanddisplay_p.h
@@ -137,7 +137,7 @@ public:
QList<QWaylandInputDevice *> inputDevices() const { return mInputDevices; }
QWaylandInputDevice *defaultInputDevice() const;
QWaylandInputDevice *currentInputDevice() const { return defaultInputDevice(); }
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QWaylandDataDeviceManager *dndSelectionHandler() const { return mDndSelectionHandler.data(); }
#endif
QtWayland::qt_surface_extension *windowExtension() const { return mWindowExtension.data(); }
@@ -202,7 +202,7 @@ private:
QList<QWaylandInputDevice *> mInputDevices;
QList<Listener> mRegistryListeners;
QWaylandIntegration *mWaylandIntegration;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QScopedPointer<QWaylandDataDeviceManager> mDndSelectionHandler;
#endif
QScopedPointer<QtWayland::qt_surface_extension> mWindowExtension;
diff --git a/src/plugins/platforms/wayland/qwaylanddnd.cpp b/src/plugins/platforms/wayland/qwaylanddnd.cpp
index e29267fc901..54c075c4a3b 100644
--- a/src/plugins/platforms/wayland/qwaylanddnd.cpp
+++ b/src/plugins/platforms/wayland/qwaylanddnd.cpp
@@ -50,7 +50,7 @@
#include <QDebug>
QT_BEGIN_NAMESPACE
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
namespace QtWaylandClient {
QWaylandDrag::QWaylandDrag(QWaylandDisplay *display)
@@ -131,5 +131,5 @@ void QWaylandDrag::finishDrag(const QPlatformDropQtResponse &response)
}
}
-#endif // QT_NO_DRAGANDDROP
+#endif // draganddrop
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland/qwaylanddnd_p.h b/src/plugins/platforms/wayland/qwaylanddnd_p.h
index bcae8ace9ab..215a8b74d07 100644
--- a/src/plugins/platforms/wayland/qwaylanddnd_p.h
+++ b/src/plugins/platforms/wayland/qwaylanddnd_p.h
@@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
class QWaylandDisplay;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
class Q_WAYLAND_CLIENT_EXPORT QWaylandDrag : public QBasicDrag
{
public:
diff --git a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp b/src/plugins/platforms/wayland/qwaylandinputdevice.cpp
index 71be6bdf873..4e8ef7b6787 100644
--- a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp
+++ b/src/plugins/platforms/wayland/qwaylandinputdevice.cpp
@@ -190,7 +190,7 @@ QWaylandInputDevice::QWaylandInputDevice(QWaylandDisplay *display, int version,
, mSerial(0)
, mTouchDevice(0)
{
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
if (mQDisplay->dndSelectionHandler()) {
mDataDevice = mQDisplay->dndSelectionHandler()->getDataDevice(this);
}
diff --git a/src/plugins/platforms/wayland/qwaylandintegration.cpp b/src/plugins/platforms/wayland/qwaylandintegration.cpp
index 32b4b895315..748f4f29c8d 100644
--- a/src/plugins/platforms/wayland/qwaylandintegration.cpp
+++ b/src/plugins/platforms/wayland/qwaylandintegration.cpp
@@ -96,7 +96,7 @@ public:
const QByteArray desktopEnvironment = QGuiApplicationPrivate::platformIntegration()->services()->desktopEnvironment();
if (desktopEnvironment == QByteArrayLiteral("KDE")) {
-#ifndef QT_NO_SETTINGS
+#if QT_CONFIG(settings)
result.push_back(QStringLiteral("kde"));
#endif
} else if (!desktopEnvironment.isEmpty() &&
@@ -122,7 +122,7 @@ QWaylandIntegration::QWaylandIntegration()
, mInputDeviceIntegration(Q_NULLPTR)
, mFontDb(new QGenericUnixFontDatabase())
, mNativeInterface(new QWaylandNativeInterface(this))
-#ifndef QT_NO_ACCESSIBILITY
+#if QT_CONFIG(accessibility)
, mAccessibility(new QPlatformAccessibility())
#endif
, mClientBufferIntegrationInitialized(false)
@@ -131,7 +131,7 @@ QWaylandIntegration::QWaylandIntegration()
{
initializeInputDeviceIntegration();
mDisplay.reset(new QWaylandDisplay(this));
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
mClipboard.reset(new QWaylandClipboard(mDisplay.data()));
mDrag.reset(new QWaylandDrag(mDisplay.data()));
#endif
@@ -188,14 +188,14 @@ QPlatformWindow *QWaylandIntegration::createPlatformWindow(QWindow *window) cons
return new QWaylandShmWindow(window);
}
-#ifndef QT_NO_OPENGL
+#if QT_CONFIG(opengl)
QPlatformOpenGLContext *QWaylandIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
{
if (mDisplay->clientBufferIntegration())
return mDisplay->clientBufferIntegration()->createPlatformOpenGLContext(context->format(), context->shareHandle());
return 0;
}
-#endif // QT_NO_OPENGL
+#endif // opengl
QPlatformBackingStore *QWaylandIntegration::createPlatformBackingStore(QWindow *window) const
{
@@ -223,7 +223,7 @@ QPlatformFontDatabase *QWaylandIntegration::fontDatabase() const
return mFontDb.data();
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QPlatformClipboard *QWaylandIntegration::clipboard() const
{
return mClipboard.data();
@@ -233,7 +233,7 @@ QPlatformDrag *QWaylandIntegration::drag() const
{
return mDrag.data();
}
-#endif // QT_NO_DRAGANDDROP
+#endif // draganddrop
QPlatformInputContext *QWaylandIntegration::inputContext() const
{
@@ -255,7 +255,7 @@ QVariant QWaylandIntegration::styleHint(StyleHint hint) const
return QPlatformIntegration::styleHint(hint);
}
-#ifndef QT_NO_ACCESSIBILITY
+#if QT_CONFIG(accessibility)
QPlatformAccessibility *QWaylandIntegration::accessibility() const
{
return mAccessibility.data();
diff --git a/src/plugins/platforms/wayland/qwaylandintegration_p.h b/src/plugins/platforms/wayland/qwaylandintegration_p.h
index e30a10ea0c4..39bd812d96b 100644
--- a/src/plugins/platforms/wayland/qwaylandintegration_p.h
+++ b/src/plugins/platforms/wayland/qwaylandintegration_p.h
@@ -75,7 +75,7 @@ public:
bool hasCapability(QPlatformIntegration::Capability cap) const Q_DECL_OVERRIDE;
QPlatformWindow *createPlatformWindow(QWindow *window) const Q_DECL_OVERRIDE;
-#ifndef QT_NO_OPENGL
+#if QT_CONFIG(opengl)
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const Q_DECL_OVERRIDE;
#endif
QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const Q_DECL_OVERRIDE;
@@ -86,7 +86,7 @@ public:
QPlatformFontDatabase *fontDatabase() const Q_DECL_OVERRIDE;
QPlatformNativeInterface *nativeInterface() const Q_DECL_OVERRIDE;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QPlatformClipboard *clipboard() const Q_DECL_OVERRIDE;
QPlatformDrag *drag() const Q_DECL_OVERRIDE;
#endif
@@ -94,7 +94,7 @@ public:
QVariant styleHint(StyleHint hint) const Q_DECL_OVERRIDE;
-#ifndef QT_NO_ACCESSIBILITY
+#if QT_CONFIG(accessibility)
QPlatformAccessibility *accessibility() const Q_DECL_OVERRIDE;
#endif
@@ -126,14 +126,14 @@ private:
QWaylandShellIntegration *createShellIntegration(const QString& interfaceName);
QScopedPointer<QPlatformFontDatabase> mFontDb;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QScopedPointer<QPlatformClipboard> mClipboard;
QScopedPointer<QPlatformDrag> mDrag;
#endif
QScopedPointer<QWaylandDisplay> mDisplay;
QScopedPointer<QPlatformNativeInterface> mNativeInterface;
QScopedPointer<QPlatformInputContext> mInputContext;
-#ifndef QT_NO_ACCESSIBILITY
+#if QT_CONFIG(accessibility)
QScopedPointer<QPlatformAccessibility> mAccessibility;
#endif
bool mClientBufferIntegrationInitialized;
diff --git a/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp b/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp
index c0b675f782d..9946c323567 100644
--- a/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp
+++ b/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp
@@ -116,7 +116,7 @@ void *QWaylandNativeInterface::nativeResourceForScreen(const QByteArray &resourc
return nullptr;
}
-#ifndef QT_NO_OPENGL
+#if QT_CONFIG(opengl)
void *QWaylandNativeInterface::nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context)
{
#if QT_CONFIG(opengl)
@@ -134,7 +134,7 @@ void *QWaylandNativeInterface::nativeResourceForContext(const QByteArray &resour
return nullptr;
}
-#endif // QT_NO_OPENGL
+#endif // opengl
QVariantMap QWaylandNativeInterface::windowProperties(QPlatformWindow *window) const
{
diff --git a/src/plugins/platforms/wayland/qwaylandnativeinterface_p.h b/src/plugins/platforms/wayland/qwaylandnativeinterface_p.h
index 63a543ee7b0..7b8b2834255 100644
--- a/src/plugins/platforms/wayland/qwaylandnativeinterface_p.h
+++ b/src/plugins/platforms/wayland/qwaylandnativeinterface_p.h
@@ -72,7 +72,7 @@ public:
QWindow *window) Q_DECL_OVERRIDE;
void *nativeResourceForScreen(const QByteArray &resourceString,
QScreen *screen) Q_DECL_OVERRIDE;
-#ifndef QT_NO_OPENGL
+#if QT_CONFIG(opengl)
void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) Q_DECL_OVERRIDE;
#endif
QVariantMap windowProperties(QPlatformWindow *window) const Q_DECL_OVERRIDE;
diff --git a/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp b/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp
index d0d6cfd30ab..0afdda4c0c3 100644
--- a/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp
+++ b/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp
@@ -348,7 +348,7 @@ QWaylandWindow *QWaylandShmBackingStore::waylandWindow() const
return static_cast<QWaylandWindow *>(window()->handle());
}
-#ifndef QT_NO_OPENGL
+#if QT_CONFIG(opengl)
QImage QWaylandShmBackingStore::toImage() const
{
// Invoked from QPlatformBackingStore::composeAndFlush() that is called
@@ -357,7 +357,7 @@ QImage QWaylandShmBackingStore::toImage() const
return *contentSurface();
}
-#endif // QT_NO_OPENGL
+#endif // opengl
}
diff --git a/src/plugins/platforms/wayland/qwaylandshmbackingstore_p.h b/src/plugins/platforms/wayland/qwaylandshmbackingstore_p.h
index 5068519d8ed..a5b809c769f 100644
--- a/src/plugins/platforms/wayland/qwaylandshmbackingstore_p.h
+++ b/src/plugins/platforms/wayland/qwaylandshmbackingstore_p.h
@@ -107,7 +107,7 @@ public:
QWaylandWindow *waylandWindow() const;
void iterateBuffer();
-#ifndef QT_NO_OPENGL
+#if QT_CONFIG(opengl)
QImage toImage() const Q_DECL_OVERRIDE;
#endif
diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp
index 8e40f3b37ff..d16746bac2c 100644
--- a/src/plugins/platforms/wayland/qwaylandwindow.cpp
+++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp
@@ -795,7 +795,7 @@ void QWaylandWindow::requestActivateWindow()
void QWaylandWindow::unfocus()
{
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
QWaylandInputDevice *inputDevice = mDisplay->currentInputDevice();
if (inputDevice && inputDevice->dataDevice()) {
inputDevice->dataDevice()->invalidateSelectionOffer();
diff --git a/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationfactory.cpp b/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationfactory.cpp
index da622d13fba..8bee45c748f 100644
--- a/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationfactory.cpp
+++ b/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationfactory.cpp
@@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QWaylandShellIntegrationFactoryInterface_iid, QLatin1String("/wayland-shell-integration"), Qt::CaseInsensitive))
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
@@ -57,7 +57,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
QStringList QWaylandShellIntegrationFactory::keys(const QString &pluginPath)
{
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
QStringList list;
if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath);
@@ -80,7 +80,7 @@ QStringList QWaylandShellIntegrationFactory::keys(const QString &pluginPath)
QWaylandShellIntegration *QWaylandShellIntegrationFactory::create(const QString &name, const QStringList &args, const QString &pluginPath)
{
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
// Try loading the plugin from platformPluginPath first:
if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath);