From 893fd8540f2a2182a5e28fc88d59310f0aff8afe Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 16 Nov 2016 11:10:14 +0100 Subject: 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 Reviewed-by: Paul Olav Tvete Reviewed-by: Oswald Buddenhagen --- .../qwaylandclientbufferintegrationfactory.cpp | 6 +++--- .../qwaylandserverbufferintegrationfactory.cpp | 6 +++--- .../qwaylandinputdeviceintegrationfactory.cpp | 6 +++--- src/client/qwaylandclipboard.cpp | 4 ++-- src/client/qwaylandclipboard_p.h | 4 ++-- src/client/qwaylanddatadevice.cpp | 4 ++-- src/client/qwaylanddatadevice_p.h | 5 +++-- src/client/qwaylanddatadevicemanager.cpp | 4 ++-- src/client/qwaylanddatadevicemanager_p.h | 4 ++-- src/client/qwaylanddataoffer.cpp | 4 ++-- src/client/qwaylanddataoffer_p.h | 4 ++-- src/client/qwaylanddatasource.cpp | 4 ++-- src/client/qwaylanddatasource_p.h | 4 ++-- src/client/qwaylanddecorationfactory.cpp | 6 +++--- src/client/qwaylanddisplay.cpp | 6 +++--- src/client/qwaylanddisplay_p.h | 4 ++-- src/client/qwaylanddnd.cpp | 4 ++-- src/client/qwaylanddnd_p.h | 2 +- src/client/qwaylandinputdevice.cpp | 2 +- src/client/qwaylandintegration.cpp | 16 ++++++++-------- src/client/qwaylandintegration_p.h | 10 +++++----- src/client/qwaylandnativeinterface.cpp | 4 ++-- src/client/qwaylandnativeinterface_p.h | 2 +- src/client/qwaylandshmbackingstore.cpp | 4 ++-- src/client/qwaylandshmbackingstore_p.h | 2 +- src/client/qwaylandwindow.cpp | 2 +- .../shellintegration/qwaylandshellintegrationfactory.cpp | 6 +++--- .../compositor_api/qwaylandinputmethodcontrol.cpp | 4 ++-- .../compositor_api/qwaylandinputmethodcontrol.h | 5 +++-- src/compositor/compositor_api/qwaylandquickitem.cpp | 12 ++++++------ src/compositor/compositor_api/qwaylandquickitem.h | 6 +++--- .../qwlclientbufferintegrationfactory.cpp | 6 +++--- .../qwlserverbufferintegrationfactory.cpp | 6 +++--- src/plugins/decorations/bradient/main.cpp | 4 ++-- 34 files changed, 87 insertions(+), 85 deletions(-) diff --git a/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp b/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp index aa197e3d1..4e7e7ee5c 100644 --- a/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp +++ b/src/client/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/client/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp b/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp index dfa0b4654..527dc571a 100644 --- a/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp +++ b/src/client/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/client/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp b/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp index de303d009..c069a3645 100644 --- a/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp +++ b/src/client/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/client/qwaylandclipboard.cpp b/src/client/qwaylandclipboard.cpp index 409abaa56..68fb737cc 100644 --- a/src/client/qwaylandclipboard.cpp +++ b/src/client/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/client/qwaylandclipboard_p.h b/src/client/qwaylandclipboard_p.h index d662e512e..584322e07 100644 --- a/src/client/qwaylandclipboard_p.h +++ b/src/client/qwaylandclipboard_p.h @@ -57,7 +57,7 @@ #include -#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/client/qwaylanddatadevice.cpp b/src/client/qwaylanddatadevice.cpp index f1a1ba6f0..b76647ea2 100644 --- a/src/client/qwaylanddatadevice.cpp +++ b/src/client/qwaylanddatadevice.cpp @@ -56,7 +56,7 @@ #include #include -#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/client/qwaylanddatadevice_p.h b/src/client/qwaylanddatadevice_p.h index 318636de7..0b16f97d2 100644 --- a/src/client/qwaylanddatadevice_p.h +++ b/src/client/qwaylanddatadevice_p.h @@ -52,13 +52,14 @@ // We mean it. // +#include #include #include #include #include -#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/client/qwaylanddatadevicemanager.cpp b/src/client/qwaylanddatadevicemanager.cpp index 5c6f74157..c398b86fd 100644 --- a/src/client/qwaylanddatadevicemanager.cpp +++ b/src/client/qwaylanddatadevicemanager.cpp @@ -46,7 +46,7 @@ #include -#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/client/qwaylanddatadevicemanager_p.h b/src/client/qwaylanddatadevicemanager_p.h index df8a67aba..e7fc2113a 100644 --- a/src/client/qwaylanddatadevicemanager_p.h +++ b/src/client/qwaylanddatadevicemanager_p.h @@ -54,7 +54,7 @@ #include #include -#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/client/qwaylanddataoffer.cpp b/src/client/qwaylanddataoffer.cpp index b33a98e0f..56a18f007 100644 --- a/src/client/qwaylanddataoffer.cpp +++ b/src/client/qwaylanddataoffer.cpp @@ -47,7 +47,7 @@ #include -#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/client/qwaylanddataoffer_p.h b/src/client/qwaylanddataoffer_p.h index 07adf342a..96799c861 100644 --- a/src/client/qwaylanddataoffer_p.h +++ b/src/client/qwaylanddataoffer_p.h @@ -56,7 +56,7 @@ #include #include -#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/client/qwaylanddatasource.cpp b/src/client/qwaylanddatasource.cpp index bada694ca..036bd0d86 100644 --- a/src/client/qwaylanddatasource.cpp +++ b/src/client/qwaylanddatasource.cpp @@ -49,7 +49,7 @@ #include -#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/client/qwaylanddatasource_p.h b/src/client/qwaylanddatasource_p.h index fd8601325..540e6ad7a 100644 --- a/src/client/qwaylanddatasource_p.h +++ b/src/client/qwaylanddatasource_p.h @@ -56,7 +56,7 @@ #include #include -#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/client/qwaylanddecorationfactory.cpp b/src/client/qwaylanddecorationfactory.cpp index 43c712fc0..1279e3039 100644 --- a/src/client/qwaylanddecorationfactory.cpp +++ b/src/client/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/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp index de38e3f25..534373b16 100644 --- a/src/client/qwaylanddisplay.cpp +++ b/src/client/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/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h index afbe67651..a4631b95f 100644 --- a/src/client/qwaylanddisplay_p.h +++ b/src/client/qwaylanddisplay_p.h @@ -137,7 +137,7 @@ public: QList 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 mInputDevices; QList mRegistryListeners; QWaylandIntegration *mWaylandIntegration; -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) QScopedPointer mDndSelectionHandler; #endif QScopedPointer mWindowExtension; diff --git a/src/client/qwaylanddnd.cpp b/src/client/qwaylanddnd.cpp index e29267fc9..54c075c4a 100644 --- a/src/client/qwaylanddnd.cpp +++ b/src/client/qwaylanddnd.cpp @@ -50,7 +50,7 @@ #include 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/client/qwaylanddnd_p.h b/src/client/qwaylanddnd_p.h index bcae8ace9..215a8b74d 100644 --- a/src/client/qwaylanddnd_p.h +++ b/src/client/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/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp index 71be6bdf8..4e8ef7b67 100644 --- a/src/client/qwaylandinputdevice.cpp +++ b/src/client/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/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp index 32b4b8953..748f4f29c 100644 --- a/src/client/qwaylandintegration.cpp +++ b/src/client/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/client/qwaylandintegration_p.h b/src/client/qwaylandintegration_p.h index e30a10ea0..39bd812d9 100644 --- a/src/client/qwaylandintegration_p.h +++ b/src/client/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 mFontDb; -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) QScopedPointer mClipboard; QScopedPointer mDrag; #endif QScopedPointer mDisplay; QScopedPointer mNativeInterface; QScopedPointer mInputContext; -#ifndef QT_NO_ACCESSIBILITY +#if QT_CONFIG(accessibility) QScopedPointer mAccessibility; #endif bool mClientBufferIntegrationInitialized; diff --git a/src/client/qwaylandnativeinterface.cpp b/src/client/qwaylandnativeinterface.cpp index c0b675f78..9946c3235 100644 --- a/src/client/qwaylandnativeinterface.cpp +++ b/src/client/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/client/qwaylandnativeinterface_p.h b/src/client/qwaylandnativeinterface_p.h index 63a543ee7..7b8b28342 100644 --- a/src/client/qwaylandnativeinterface_p.h +++ b/src/client/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/client/qwaylandshmbackingstore.cpp b/src/client/qwaylandshmbackingstore.cpp index d0d6cfd30..0afdda4c0 100644 --- a/src/client/qwaylandshmbackingstore.cpp +++ b/src/client/qwaylandshmbackingstore.cpp @@ -348,7 +348,7 @@ QWaylandWindow *QWaylandShmBackingStore::waylandWindow() const return static_cast(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/client/qwaylandshmbackingstore_p.h b/src/client/qwaylandshmbackingstore_p.h index 5068519d8..a5b809c76 100644 --- a/src/client/qwaylandshmbackingstore_p.h +++ b/src/client/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/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 8e40f3b37..d16746bac 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/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/client/shellintegration/qwaylandshellintegrationfactory.cpp b/src/client/shellintegration/qwaylandshellintegrationfactory.cpp index da622d13f..8bee45c74 100644 --- a/src/client/shellintegration/qwaylandshellintegrationfactory.cpp +++ b/src/client/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); diff --git a/src/compositor/compositor_api/qwaylandinputmethodcontrol.cpp b/src/compositor/compositor_api/qwaylandinputmethodcontrol.cpp index 68279bb97..539fc1b7d 100644 --- a/src/compositor/compositor_api/qwaylandinputmethodcontrol.cpp +++ b/src/compositor/compositor_api/qwaylandinputmethodcontrol.cpp @@ -54,7 +54,7 @@ QWaylandInputMethodControl::QWaylandInputMethodControl(QWaylandSurface *surface) if (textInput) { connect(textInput, &QWaylandTextInput::surfaceEnabled, this, &QWaylandInputMethodControl::surfaceEnabled); connect(textInput, &QWaylandTextInput::surfaceDisabled, this, &QWaylandInputMethodControl::surfaceDisabled); -#ifndef QT_NO_IM +#if QT_CONFIG(im) connect(textInput, &QWaylandTextInput::updateInputMethod, this, &QWaylandInputMethodControl::updateInputMethod); #endif } @@ -101,7 +101,7 @@ void QWaylandInputMethodControl::setEnabled(bool enabled) d->enabled = enabled; emit enabledChanged(enabled); -#ifndef QT_NO_IM +#if QT_CONFIG(im) emit updateInputMethod(Qt::ImQueryInput); #endif } diff --git a/src/compositor/compositor_api/qwaylandinputmethodcontrol.h b/src/compositor/compositor_api/qwaylandinputmethodcontrol.h index ab894c9c5..af02e1ae5 100644 --- a/src/compositor/compositor_api/qwaylandinputmethodcontrol.h +++ b/src/compositor/compositor_api/qwaylandinputmethodcontrol.h @@ -37,6 +37,7 @@ #ifndef QWAYLANDINPUTMETHODCONTROL_H #define QWAYLANDINPUTMETHODCONTROL_H +#include #include QT_BEGIN_NAMESPACE @@ -56,7 +57,7 @@ class QWaylandInputMethodControl : public QObject public: explicit QWaylandInputMethodControl(QWaylandSurface *surface); -#ifndef QT_NO_IM +#if QT_CONFIG(im) QVariant inputMethodQuery(Qt::InputMethodQuery query, QVariant argument) const; #endif @@ -69,7 +70,7 @@ public: Q_SIGNALS: void enabledChanged(bool enabled); -#ifndef QT_NO_IM +#if QT_CONFIG(im) void updateInputMethod(Qt::InputMethodQueries queries); #endif diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp index 9bf428136..4c5bf0757 100644 --- a/src/compositor/compositor_api/qwaylandquickitem.cpp +++ b/src/compositor/compositor_api/qwaylandquickitem.cpp @@ -667,7 +667,7 @@ void QWaylandQuickItem::touchEvent(QTouchEvent *event) } } -#ifndef QT_NO_IM +#if QT_CONFIG(im) /*! * \internal */ @@ -836,7 +836,7 @@ void QWaylandQuickItem::handleSurfaceChanged() disconnect(d->oldSurface, &QWaylandSurface::redraw, this, &QQuickItem::update); disconnect(d->oldSurface, &QWaylandSurface::childAdded, this, &QWaylandQuickItem::handleSubsurfaceAdded); disconnect(d->oldSurface, &QWaylandSurface::dragStarted, this, &QWaylandQuickItem::handleDragStarted); -#ifndef QT_NO_IM +#if QT_CONFIG(im) disconnect(d->oldSurface->inputMethodControl(), &QWaylandInputMethodControl::updateInputMethod, this, &QWaylandQuickItem::updateInputMethod); #endif } @@ -849,7 +849,7 @@ void QWaylandQuickItem::handleSurfaceChanged() connect(newSurface, &QWaylandSurface::redraw, this, &QQuickItem::update); connect(newSurface, &QWaylandSurface::childAdded, this, &QWaylandQuickItem::handleSubsurfaceAdded); connect(newSurface, &QWaylandSurface::dragStarted, this, &QWaylandQuickItem::handleDragStarted); -#ifndef QT_NO_IM +#if QT_CONFIG(im) connect(newSurface->inputMethodControl(), &QWaylandInputMethodControl::updateInputMethod, this, &QWaylandQuickItem::updateInputMethod); #endif @@ -866,7 +866,7 @@ void QWaylandQuickItem::handleSurfaceChanged() } surfaceChangedEvent(d->view->surface(), d->oldSurface); d->oldSurface = d->view->surface(); -#ifndef QT_NO_IM +#if QT_CONFIG(im) updateInputMethod(Qt::ImQueryInput); #endif } @@ -1013,7 +1013,7 @@ void QWaylandQuickItem::setSizeFollowsSurface(bool sizeFollowsSurface) emit sizeFollowsSurfaceChanged(); } -#ifndef QT_NO_IM +#if QT_CONFIG(im) QVariant QWaylandQuickItem::inputMethodQuery(Qt::InputMethodQuery query) const { return inputMethodQuery(query, QVariant()); @@ -1111,7 +1111,7 @@ void QWaylandQuickItem::beforeSync() } } -#ifndef QT_NO_IM +#if QT_CONFIG(im) void QWaylandQuickItem::updateInputMethod(Qt::InputMethodQueries queries) { Q_D(QWaylandQuickItem); diff --git a/src/compositor/compositor_api/qwaylandquickitem.h b/src/compositor/compositor_api/qwaylandquickitem.h index 524813c4c..87d10b024 100644 --- a/src/compositor/compositor_api/qwaylandquickitem.h +++ b/src/compositor/compositor_api/qwaylandquickitem.h @@ -102,7 +102,7 @@ public: bool sizeFollowsSurface() const; void setSizeFollowsSurface(bool sizeFollowsSurface); -#ifndef QT_NO_IM +#if QT_CONFIG(im) QVariant inputMethodQuery(Qt::InputMethodQuery query) const Q_DECL_OVERRIDE; Q_INVOKABLE QVariant inputMethodQuery(Qt::InputMethodQuery query, QVariant argument) const; #endif @@ -135,7 +135,7 @@ protected: void touchEvent(QTouchEvent *event) Q_DECL_OVERRIDE; -#ifndef QT_NO_IM +#if QT_CONFIG(im) void inputMethodEvent(QInputMethodEvent *event) Q_DECL_OVERRIDE; #endif @@ -157,7 +157,7 @@ private Q_SLOTS: void handleSubsurfaceAdded(QWaylandSurface *childSurface); void handleSubsurfacePosition(const QPoint &pos); void handleDragStarted(QWaylandDrag *drag); -#ifndef QT_NO_IM +#if QT_CONFIG(im) void updateInputMethod(Qt::InputMethodQueries queries); #endif diff --git a/src/compositor/hardware_integration/qwlclientbufferintegrationfactory.cpp b/src/compositor/hardware_integration/qwlclientbufferintegrationfactory.cpp index 36ac56cf2..e805f498a 100644 --- a/src/compositor/hardware_integration/qwlclientbufferintegrationfactory.cpp +++ b/src/compositor/hardware_integration/qwlclientbufferintegrationfactory.cpp @@ -45,7 +45,7 @@ QT_BEGIN_NAMESPACE namespace QtWayland { -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QtWaylandClientBufferIntegrationFactoryInterface_iid, QLatin1String("/wayland-graphics-integration-server"), Qt::CaseInsensitive)) Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader, @@ -54,7 +54,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader, QStringList ClientBufferIntegrationFactory::keys(const QString &pluginPath) { -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) QStringList list; if (!pluginPath.isEmpty()) { QCoreApplication::addLibraryPath(pluginPath); @@ -77,7 +77,7 @@ QStringList ClientBufferIntegrationFactory::keys(const QString &pluginPath) ClientBufferIntegration *ClientBufferIntegrationFactory::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/compositor/hardware_integration/qwlserverbufferintegrationfactory.cpp b/src/compositor/hardware_integration/qwlserverbufferintegrationfactory.cpp index 05f16e525..c366921f8 100644 --- a/src/compositor/hardware_integration/qwlserverbufferintegrationfactory.cpp +++ b/src/compositor/hardware_integration/qwlserverbufferintegrationfactory.cpp @@ -45,7 +45,7 @@ QT_BEGIN_NAMESPACE namespace QtWayland { -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QtWaylandServerBufferIntegrationFactoryInterface_iid, QLatin1String("/wayland-graphics-integration-server"), Qt::CaseInsensitive)) Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader, @@ -54,7 +54,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader, QStringList ServerBufferIntegrationFactory::keys(const QString &pluginPath) { -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) QStringList list; if (!pluginPath.isEmpty()) { QCoreApplication::addLibraryPath(pluginPath); @@ -77,7 +77,7 @@ QStringList ServerBufferIntegrationFactory::keys(const QString &pluginPath) ServerBufferIntegration *ServerBufferIntegrationFactory::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/decorations/bradient/main.cpp b/src/plugins/decorations/bradient/main.cpp index f7ce0fca6..f57b816e8 100644 --- a/src/plugins/decorations/bradient/main.cpp +++ b/src/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 -- cgit v1.2.3