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>
This commit is contained in:
Lars Knoll 2016-11-16 11:10:14 +01:00
parent 1d51cabc54
commit f6912982eb
28 changed files with 67 additions and 66 deletions

View File

@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient { namespace QtWaylandClient {
#ifndef QT_NO_LIBRARY #if QT_CONFIG(library)
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QWaylandClientBufferIntegrationFactoryInterface_iid, QLatin1String("/wayland-graphics-integration-client"), Qt::CaseInsensitive)) (QWaylandClientBufferIntegrationFactoryInterface_iid, QLatin1String("/wayland-graphics-integration-client"), Qt::CaseInsensitive))
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader, Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
@ -57,7 +57,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
QStringList QWaylandClientBufferIntegrationFactory::keys(const QString &pluginPath) QStringList QWaylandClientBufferIntegrationFactory::keys(const QString &pluginPath)
{ {
#ifndef QT_NO_LIBRARY #if QT_CONFIG(library)
QStringList list; QStringList list;
if (!pluginPath.isEmpty()) { if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath); 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) 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: // Try loading the plugin from platformPluginPath first:
if (!pluginPath.isEmpty()) { if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath); QCoreApplication::addLibraryPath(pluginPath);

View File

@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient { namespace QtWaylandClient {
#ifndef QT_NO_LIBRARY #if QT_CONFIG(library)
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QWaylandServerBufferIntegrationFactoryInterface_iid, QLatin1String("/wayland-graphics-integration-client"), Qt::CaseInsensitive)) (QWaylandServerBufferIntegrationFactoryInterface_iid, QLatin1String("/wayland-graphics-integration-client"), Qt::CaseInsensitive))
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader, Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
@ -57,7 +57,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
QStringList QWaylandServerBufferIntegrationFactory::keys(const QString &pluginPath) QStringList QWaylandServerBufferIntegrationFactory::keys(const QString &pluginPath)
{ {
#ifndef QT_NO_LIBRARY #if QT_CONFIG(library)
QStringList list; QStringList list;
if (!pluginPath.isEmpty()) { if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath); 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) 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: // Try loading the plugin from platformPluginPath first:
if (!pluginPath.isEmpty()) { if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath); QCoreApplication::addLibraryPath(pluginPath);

View File

@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient { namespace QtWaylandClient {
#ifndef QT_NO_LIBRARY #if QT_CONFIG(library)
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QWaylandInputDeviceIntegrationFactoryInterface_iid, QLatin1String("/wayland-inputdevice-integration"), Qt::CaseInsensitive)) (QWaylandInputDeviceIntegrationFactoryInterface_iid, QLatin1String("/wayland-inputdevice-integration"), Qt::CaseInsensitive))
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader, Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
@ -57,7 +57,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
QStringList QWaylandInputDeviceIntegrationFactory::keys(const QString &pluginPath) QStringList QWaylandInputDeviceIntegrationFactory::keys(const QString &pluginPath)
{ {
#ifndef QT_NO_LIBRARY #if QT_CONFIG(library)
QStringList list; QStringList list;
if (!pluginPath.isEmpty()) { if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath); 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) 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: // Try loading the plugin from platformPluginPath first:
if (!pluginPath.isEmpty()) { if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath); QCoreApplication::addLibraryPath(pluginPath);

View File

@ -56,7 +56,7 @@ namespace QtWaylandClient {
#define BUTTON_SPACING 5 #define BUTTON_SPACING 5
#ifndef QT_NO_IMAGEFORMAT_XPM #if QT_CONFIG(imageformat_xpm)
# define BUTTON_WIDTH 10 # define BUTTON_WIDTH 10
static const char * const qt_close_xpm[] = { static const char * const qt_close_xpm[] = {
@ -265,7 +265,7 @@ void QWaylandBradientDecoration::paint(QPaintDevice *device)
p.restore(); p.restore();
} }
#ifndef QT_NO_IMAGEFORMAT_XPM #if QT_CONFIG(imageformat_xpm)
p.save(); p.save();
// Close button // Close button

View File

@ -44,7 +44,7 @@
#include "qwaylanddatasource_p.h" #include "qwaylanddatasource_p.h"
#include "qwaylanddatadevice_p.h" #include "qwaylanddatadevice_p.h"
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
@ -118,4 +118,4 @@ bool QWaylandClipboard::ownsMode(QClipboard::Mode mode) const
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // QT_NO_DRAGANDDROP #endif // draganddrop

View File

@ -57,7 +57,7 @@
#include <QtWaylandClient/qtwaylandclientglobal.h> #include <QtWaylandClient/qtwaylandclientglobal.h>
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
namespace QtWaylandClient { namespace QtWaylandClient {
@ -85,6 +85,6 @@ private:
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // QT_NO_DRAGANDDROP #endif // draganddrop
#endif // QWAYLANDCLIPBOARD_H #endif // QWAYLANDCLIPBOARD_H

View File

@ -56,7 +56,7 @@
#include <qpa/qplatformdrag.h> #include <qpa/qplatformdrag.h>
#include <qpa/qwindowsysteminterface.h> #include <qpa/qwindowsysteminterface.h>
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
@ -271,4 +271,4 @@ QPoint QWaylandDataDevice::calculateDragPosition(int x, int y, QWindow *wnd) con
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // QT_NO_DRAGANDDROP #endif // draganddrop

View File

@ -52,13 +52,14 @@
// We mean it. // We mean it.
// //
#include <qtwaylandclientglobal.h>
#include <QObject> #include <QObject>
#include <QPointer> #include <QPointer>
#include <QPoint> #include <QPoint>
#include <QtWaylandClient/private/qwayland-wayland.h> #include <QtWaylandClient/private/qwayland-wayland.h>
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
@ -122,6 +123,6 @@ private:
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // QT_NO_DRAGANDDROP #endif // draganddrop
#endif // QWAYLANDDATADEVICE_H #endif // QWAYLANDDATADEVICE_H

View File

@ -46,7 +46,7 @@
#include <QtCore/QDebug> #include <QtCore/QDebug>
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
@ -83,4 +83,4 @@ QWaylandDisplay *QWaylandDataDeviceManager::display() const
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // QT_NO_DRAGANDDROP #endif // draganddrop

View File

@ -54,7 +54,7 @@
#include <QtWaylandClient/qtwaylandclientglobal.h> #include <QtWaylandClient/qtwaylandclientglobal.h>
#include <QtWaylandClient/private/qwayland-wayland.h> #include <QtWaylandClient/private/qwayland-wayland.h>
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
@ -83,6 +83,6 @@ private:
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // QT_NO_DRAGANDDROP #endif // draganddrop
#endif // QWAYLANDDATADEVICEMANAGER_H #endif // QWAYLANDDATADEVICEMANAGER_H

View File

@ -47,7 +47,7 @@
#include <QtCore/QDebug> #include <QtCore/QDebug>
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
@ -184,4 +184,4 @@ int QWaylandMimeData::readData(int fd, QByteArray &data) const
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // QT_NO_DRAGANDDROP #endif // draganddrop

View File

@ -56,7 +56,7 @@
#include <QtWaylandClient/qtwaylandclientglobal.h> #include <QtWaylandClient/qtwaylandclientglobal.h>
#include <QtWaylandClient/private/qwayland-wayland.h> #include <QtWaylandClient/private/qwayland-wayland.h>
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
namespace QtWaylandClient { namespace QtWaylandClient {
@ -106,5 +106,5 @@ private:
} }
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // QT_NO_DRAGANDDROP #endif // draganddrop
#endif #endif

View File

@ -49,7 +49,7 @@
#include <unistd.h> #include <unistd.h>
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
@ -99,4 +99,4 @@ void QWaylandDataSource::data_source_target(const QString &mime_type)
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // QT_NO_DRAGANDDROP #endif // draganddrop

View File

@ -56,7 +56,7 @@
#include <QtWaylandClient/private/qwayland-wayland.h> #include <QtWaylandClient/private/qwayland-wayland.h>
#include <QtWaylandClient/qtwaylandclientglobal.h> #include <QtWaylandClient/qtwaylandclientglobal.h>
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
@ -94,6 +94,6 @@ private:
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // QT_NO_DRAGANDDROP #endif // draganddrop
#endif // QWAYLANDDATASOURCE_H #endif // QWAYLANDDATASOURCE_H

View File

@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient { namespace QtWaylandClient {
#ifndef QT_NO_LIBRARY #if QT_CONFIG(library)
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QWaylandDecorationFactoryInterface_iid, QLatin1String("/wayland-decoration-client"), Qt::CaseInsensitive)) (QWaylandDecorationFactoryInterface_iid, QLatin1String("/wayland-decoration-client"), Qt::CaseInsensitive))
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader, Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
@ -57,7 +57,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
QStringList QWaylandDecorationFactory::keys(const QString &pluginPath) QStringList QWaylandDecorationFactory::keys(const QString &pluginPath)
{ {
#ifndef QT_NO_LIBRARY #if QT_CONFIG(library)
QStringList list; QStringList list;
if (!pluginPath.isEmpty()) { if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath); 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) 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: // Try loading the plugin from platformPluginPath first:
if (!pluginPath.isEmpty()) { if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath); QCoreApplication::addLibraryPath(pluginPath);

View File

@ -120,7 +120,7 @@ QWaylandWindowManagerIntegration *QWaylandDisplay::windowManagerIntegration() co
QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration) QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration)
: mWaylandIntegration(waylandIntegration) : mWaylandIntegration(waylandIntegration)
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
, mDndSelectionHandler(0) , mDndSelectionHandler(0)
#endif #endif
, mWindowExtension(0) , mWindowExtension(0)
@ -160,7 +160,7 @@ QWaylandDisplay::~QWaylandDisplay(void)
mWaylandIntegration->destroyScreen(screen); mWaylandIntegration->destroyScreen(screen);
} }
mScreens.clear(); mScreens.clear();
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
delete mDndSelectionHandler.take(); delete mDndSelectionHandler.take();
#endif #endif
wl_display_disconnect(mDisplay); 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")) { } else if (interface == QStringLiteral("wl_seat")) {
QWaylandInputDevice *inputDevice = mWaylandIntegration->createInputDevice(this, version, id); QWaylandInputDevice *inputDevice = mWaylandIntegration->createInputDevice(this, version, id);
mInputDevices.append(inputDevice); mInputDevices.append(inputDevice);
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
} else if (interface == QStringLiteral("wl_data_device_manager")) { } else if (interface == QStringLiteral("wl_data_device_manager")) {
mDndSelectionHandler.reset(new QWaylandDataDeviceManager(this, id)); mDndSelectionHandler.reset(new QWaylandDataDeviceManager(this, id));
#endif #endif

View File

@ -137,7 +137,7 @@ public:
QList<QWaylandInputDevice *> inputDevices() const { return mInputDevices; } QList<QWaylandInputDevice *> inputDevices() const { return mInputDevices; }
QWaylandInputDevice *defaultInputDevice() const; QWaylandInputDevice *defaultInputDevice() const;
QWaylandInputDevice *currentInputDevice() const { return defaultInputDevice(); } QWaylandInputDevice *currentInputDevice() const { return defaultInputDevice(); }
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
QWaylandDataDeviceManager *dndSelectionHandler() const { return mDndSelectionHandler.data(); } QWaylandDataDeviceManager *dndSelectionHandler() const { return mDndSelectionHandler.data(); }
#endif #endif
QtWayland::qt_surface_extension *windowExtension() const { return mWindowExtension.data(); } QtWayland::qt_surface_extension *windowExtension() const { return mWindowExtension.data(); }
@ -202,7 +202,7 @@ private:
QList<QWaylandInputDevice *> mInputDevices; QList<QWaylandInputDevice *> mInputDevices;
QList<Listener> mRegistryListeners; QList<Listener> mRegistryListeners;
QWaylandIntegration *mWaylandIntegration; QWaylandIntegration *mWaylandIntegration;
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
QScopedPointer<QWaylandDataDeviceManager> mDndSelectionHandler; QScopedPointer<QWaylandDataDeviceManager> mDndSelectionHandler;
#endif #endif
QScopedPointer<QtWayland::qt_surface_extension> mWindowExtension; QScopedPointer<QtWayland::qt_surface_extension> mWindowExtension;

View File

@ -50,7 +50,7 @@
#include <QDebug> #include <QDebug>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
namespace QtWaylandClient { namespace QtWaylandClient {
QWaylandDrag::QWaylandDrag(QWaylandDisplay *display) QWaylandDrag::QWaylandDrag(QWaylandDisplay *display)
@ -131,5 +131,5 @@ void QWaylandDrag::finishDrag(const QPlatformDropQtResponse &response)
} }
} }
#endif // QT_NO_DRAGANDDROP #endif // draganddrop
QT_END_NAMESPACE QT_END_NAMESPACE

View File

@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient { namespace QtWaylandClient {
class QWaylandDisplay; class QWaylandDisplay;
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
class Q_WAYLAND_CLIENT_EXPORT QWaylandDrag : public QBasicDrag class Q_WAYLAND_CLIENT_EXPORT QWaylandDrag : public QBasicDrag
{ {
public: public:

View File

@ -190,7 +190,7 @@ QWaylandInputDevice::QWaylandInputDevice(QWaylandDisplay *display, int version,
, mSerial(0) , mSerial(0)
, mTouchDevice(0) , mTouchDevice(0)
{ {
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
if (mQDisplay->dndSelectionHandler()) { if (mQDisplay->dndSelectionHandler()) {
mDataDevice = mQDisplay->dndSelectionHandler()->getDataDevice(this); mDataDevice = mQDisplay->dndSelectionHandler()->getDataDevice(this);
} }

View File

@ -96,7 +96,7 @@ public:
const QByteArray desktopEnvironment = QGuiApplicationPrivate::platformIntegration()->services()->desktopEnvironment(); const QByteArray desktopEnvironment = QGuiApplicationPrivate::platformIntegration()->services()->desktopEnvironment();
if (desktopEnvironment == QByteArrayLiteral("KDE")) { if (desktopEnvironment == QByteArrayLiteral("KDE")) {
#ifndef QT_NO_SETTINGS #if QT_CONFIG(settings)
result.push_back(QStringLiteral("kde")); result.push_back(QStringLiteral("kde"));
#endif #endif
} else if (!desktopEnvironment.isEmpty() && } else if (!desktopEnvironment.isEmpty() &&
@ -122,7 +122,7 @@ QWaylandIntegration::QWaylandIntegration()
, mInputDeviceIntegration(Q_NULLPTR) , mInputDeviceIntegration(Q_NULLPTR)
, mFontDb(new QGenericUnixFontDatabase()) , mFontDb(new QGenericUnixFontDatabase())
, mNativeInterface(new QWaylandNativeInterface(this)) , mNativeInterface(new QWaylandNativeInterface(this))
#ifndef QT_NO_ACCESSIBILITY #if QT_CONFIG(accessibility)
, mAccessibility(new QPlatformAccessibility()) , mAccessibility(new QPlatformAccessibility())
#endif #endif
, mClientBufferIntegrationInitialized(false) , mClientBufferIntegrationInitialized(false)
@ -131,7 +131,7 @@ QWaylandIntegration::QWaylandIntegration()
{ {
initializeInputDeviceIntegration(); initializeInputDeviceIntegration();
mDisplay.reset(new QWaylandDisplay(this)); mDisplay.reset(new QWaylandDisplay(this));
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
mClipboard.reset(new QWaylandClipboard(mDisplay.data())); mClipboard.reset(new QWaylandClipboard(mDisplay.data()));
mDrag.reset(new QWaylandDrag(mDisplay.data())); mDrag.reset(new QWaylandDrag(mDisplay.data()));
#endif #endif
@ -188,14 +188,14 @@ QPlatformWindow *QWaylandIntegration::createPlatformWindow(QWindow *window) cons
return new QWaylandShmWindow(window); return new QWaylandShmWindow(window);
} }
#ifndef QT_NO_OPENGL #if QT_CONFIG(opengl)
QPlatformOpenGLContext *QWaylandIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const QPlatformOpenGLContext *QWaylandIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
{ {
if (mDisplay->clientBufferIntegration()) if (mDisplay->clientBufferIntegration())
return mDisplay->clientBufferIntegration()->createPlatformOpenGLContext(context->format(), context->shareHandle()); return mDisplay->clientBufferIntegration()->createPlatformOpenGLContext(context->format(), context->shareHandle());
return 0; return 0;
} }
#endif // QT_NO_OPENGL #endif // opengl
QPlatformBackingStore *QWaylandIntegration::createPlatformBackingStore(QWindow *window) const QPlatformBackingStore *QWaylandIntegration::createPlatformBackingStore(QWindow *window) const
{ {
@ -223,7 +223,7 @@ QPlatformFontDatabase *QWaylandIntegration::fontDatabase() const
return mFontDb.data(); return mFontDb.data();
} }
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
QPlatformClipboard *QWaylandIntegration::clipboard() const QPlatformClipboard *QWaylandIntegration::clipboard() const
{ {
return mClipboard.data(); return mClipboard.data();
@ -233,7 +233,7 @@ QPlatformDrag *QWaylandIntegration::drag() const
{ {
return mDrag.data(); return mDrag.data();
} }
#endif // QT_NO_DRAGANDDROP #endif // draganddrop
QPlatformInputContext *QWaylandIntegration::inputContext() const QPlatformInputContext *QWaylandIntegration::inputContext() const
{ {
@ -255,7 +255,7 @@ QVariant QWaylandIntegration::styleHint(StyleHint hint) const
return QPlatformIntegration::styleHint(hint); return QPlatformIntegration::styleHint(hint);
} }
#ifndef QT_NO_ACCESSIBILITY #if QT_CONFIG(accessibility)
QPlatformAccessibility *QWaylandIntegration::accessibility() const QPlatformAccessibility *QWaylandIntegration::accessibility() const
{ {
return mAccessibility.data(); return mAccessibility.data();

View File

@ -75,7 +75,7 @@ public:
bool hasCapability(QPlatformIntegration::Capability cap) const Q_DECL_OVERRIDE; bool hasCapability(QPlatformIntegration::Capability cap) const Q_DECL_OVERRIDE;
QPlatformWindow *createPlatformWindow(QWindow *window) 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; QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const Q_DECL_OVERRIDE;
#endif #endif
QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const Q_DECL_OVERRIDE; QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const Q_DECL_OVERRIDE;
@ -86,7 +86,7 @@ public:
QPlatformFontDatabase *fontDatabase() const Q_DECL_OVERRIDE; QPlatformFontDatabase *fontDatabase() const Q_DECL_OVERRIDE;
QPlatformNativeInterface *nativeInterface() const Q_DECL_OVERRIDE; QPlatformNativeInterface *nativeInterface() const Q_DECL_OVERRIDE;
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
QPlatformClipboard *clipboard() const Q_DECL_OVERRIDE; QPlatformClipboard *clipboard() const Q_DECL_OVERRIDE;
QPlatformDrag *drag() const Q_DECL_OVERRIDE; QPlatformDrag *drag() const Q_DECL_OVERRIDE;
#endif #endif
@ -94,7 +94,7 @@ public:
QVariant styleHint(StyleHint hint) const Q_DECL_OVERRIDE; QVariant styleHint(StyleHint hint) const Q_DECL_OVERRIDE;
#ifndef QT_NO_ACCESSIBILITY #if QT_CONFIG(accessibility)
QPlatformAccessibility *accessibility() const Q_DECL_OVERRIDE; QPlatformAccessibility *accessibility() const Q_DECL_OVERRIDE;
#endif #endif
@ -126,14 +126,14 @@ private:
QWaylandShellIntegration *createShellIntegration(const QString& interfaceName); QWaylandShellIntegration *createShellIntegration(const QString& interfaceName);
QScopedPointer<QPlatformFontDatabase> mFontDb; QScopedPointer<QPlatformFontDatabase> mFontDb;
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
QScopedPointer<QPlatformClipboard> mClipboard; QScopedPointer<QPlatformClipboard> mClipboard;
QScopedPointer<QPlatformDrag> mDrag; QScopedPointer<QPlatformDrag> mDrag;
#endif #endif
QScopedPointer<QWaylandDisplay> mDisplay; QScopedPointer<QWaylandDisplay> mDisplay;
QScopedPointer<QPlatformNativeInterface> mNativeInterface; QScopedPointer<QPlatformNativeInterface> mNativeInterface;
QScopedPointer<QPlatformInputContext> mInputContext; QScopedPointer<QPlatformInputContext> mInputContext;
#ifndef QT_NO_ACCESSIBILITY #if QT_CONFIG(accessibility)
QScopedPointer<QPlatformAccessibility> mAccessibility; QScopedPointer<QPlatformAccessibility> mAccessibility;
#endif #endif
bool mClientBufferIntegrationInitialized; bool mClientBufferIntegrationInitialized;

View File

@ -116,7 +116,7 @@ void *QWaylandNativeInterface::nativeResourceForScreen(const QByteArray &resourc
return nullptr; return nullptr;
} }
#ifndef QT_NO_OPENGL #if QT_CONFIG(opengl)
void *QWaylandNativeInterface::nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) void *QWaylandNativeInterface::nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context)
{ {
#if QT_CONFIG(opengl) #if QT_CONFIG(opengl)
@ -134,7 +134,7 @@ void *QWaylandNativeInterface::nativeResourceForContext(const QByteArray &resour
return nullptr; return nullptr;
} }
#endif // QT_NO_OPENGL #endif // opengl
QVariantMap QWaylandNativeInterface::windowProperties(QPlatformWindow *window) const QVariantMap QWaylandNativeInterface::windowProperties(QPlatformWindow *window) const
{ {

View File

@ -72,7 +72,7 @@ public:
QWindow *window) Q_DECL_OVERRIDE; QWindow *window) Q_DECL_OVERRIDE;
void *nativeResourceForScreen(const QByteArray &resourceString, void *nativeResourceForScreen(const QByteArray &resourceString,
QScreen *screen) Q_DECL_OVERRIDE; QScreen *screen) Q_DECL_OVERRIDE;
#ifndef QT_NO_OPENGL #if QT_CONFIG(opengl)
void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) Q_DECL_OVERRIDE; void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) Q_DECL_OVERRIDE;
#endif #endif
QVariantMap windowProperties(QPlatformWindow *window) const Q_DECL_OVERRIDE; QVariantMap windowProperties(QPlatformWindow *window) const Q_DECL_OVERRIDE;

View File

@ -348,7 +348,7 @@ QWaylandWindow *QWaylandShmBackingStore::waylandWindow() const
return static_cast<QWaylandWindow *>(window()->handle()); return static_cast<QWaylandWindow *>(window()->handle());
} }
#ifndef QT_NO_OPENGL #if QT_CONFIG(opengl)
QImage QWaylandShmBackingStore::toImage() const QImage QWaylandShmBackingStore::toImage() const
{ {
// Invoked from QPlatformBackingStore::composeAndFlush() that is called // Invoked from QPlatformBackingStore::composeAndFlush() that is called
@ -357,7 +357,7 @@ QImage QWaylandShmBackingStore::toImage() const
return *contentSurface(); return *contentSurface();
} }
#endif // QT_NO_OPENGL #endif // opengl
} }

View File

@ -107,7 +107,7 @@ public:
QWaylandWindow *waylandWindow() const; QWaylandWindow *waylandWindow() const;
void iterateBuffer(); void iterateBuffer();
#ifndef QT_NO_OPENGL #if QT_CONFIG(opengl)
QImage toImage() const Q_DECL_OVERRIDE; QImage toImage() const Q_DECL_OVERRIDE;
#endif #endif

View File

@ -795,7 +795,7 @@ void QWaylandWindow::requestActivateWindow()
void QWaylandWindow::unfocus() void QWaylandWindow::unfocus()
{ {
#ifndef QT_NO_DRAGANDDROP #if QT_CONFIG(draganddrop)
QWaylandInputDevice *inputDevice = mDisplay->currentInputDevice(); QWaylandInputDevice *inputDevice = mDisplay->currentInputDevice();
if (inputDevice && inputDevice->dataDevice()) { if (inputDevice && inputDevice->dataDevice()) {
inputDevice->dataDevice()->invalidateSelectionOffer(); inputDevice->dataDevice()->invalidateSelectionOffer();

View File

@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient { namespace QtWaylandClient {
#ifndef QT_NO_LIBRARY #if QT_CONFIG(library)
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QWaylandShellIntegrationFactoryInterface_iid, QLatin1String("/wayland-shell-integration"), Qt::CaseInsensitive)) (QWaylandShellIntegrationFactoryInterface_iid, QLatin1String("/wayland-shell-integration"), Qt::CaseInsensitive))
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader, Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
@ -57,7 +57,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
QStringList QWaylandShellIntegrationFactory::keys(const QString &pluginPath) QStringList QWaylandShellIntegrationFactory::keys(const QString &pluginPath)
{ {
#ifndef QT_NO_LIBRARY #if QT_CONFIG(library)
QStringList list; QStringList list;
if (!pluginPath.isEmpty()) { if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath); 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) 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: // Try loading the plugin from platformPluginPath first:
if (!pluginPath.isEmpty()) { if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath); QCoreApplication::addLibraryPath(pluginPath);