diff options
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.cpp | 10 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.h | 4 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbdrag.cpp | 4 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbdrag.h | 6 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbintegration.cpp | 4 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbintegration.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbmime.cpp | 4 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbmime.h | 7 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbwindow.cpp | 6 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/xcb_qpa_lib.pro | 7 |
10 files changed, 24 insertions, 30 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index 444e3a7669..879d31f29a 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -46,7 +46,9 @@ #include "qxcbscreen.h" #include "qxcbwindow.h" #include "qxcbclipboard.h" +#if QT_CONFIG(draganddrop) #include "qxcbdrag.h" +#endif #include "qxcbwmsupport.h" #include "qxcbnativeinterface.h" #include "qxcbintegration.h" @@ -604,7 +606,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra #ifndef QT_NO_CLIPBOARD m_clipboard = new QXcbClipboard(this); #endif -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) m_drag = new QXcbDrag(this); #endif @@ -648,7 +650,7 @@ QXcbConnection::~QXcbConnection() #ifndef QT_NO_CLIPBOARD delete m_clipboard; #endif -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) delete m_drag; #endif if (m_reader && m_reader->isRunning()) { @@ -1139,7 +1141,7 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event) #if QT_CONFIG(draganddrop) || QT_CONFIG(clipboard) xcb_selection_request_event_t *sr = reinterpret_cast<xcb_selection_request_event_t *>(event); #endif -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) if (sr->selection == atom(QXcbAtom::XdndSelection)) m_drag->handleSelectionRequest(sr); else @@ -1802,7 +1804,7 @@ void QXcbConnection::handleClientMessageEvent(const xcb_client_message_event_t * if (event->format != 32) return; -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) if (event->type == atom(QXcbAtom::XdndStatus)) { drag()->handleStatus(event); } else if (event->type == atom(QXcbAtom::XdndFinished)) { diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h index d9321d94d0..583659ea81 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.h +++ b/src/plugins/platforms/xcb/qxcbconnection.h @@ -424,7 +424,7 @@ public: #ifndef QT_NO_CLIPBOARD QXcbClipboard *clipboard() const { return m_clipboard; } #endif -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) QXcbDrag *drag() const { return m_drag; } #endif @@ -673,7 +673,7 @@ private: #ifndef QT_NO_CLIPBOARD QXcbClipboard *m_clipboard = nullptr; #endif -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) QXcbDrag *m_drag = nullptr; #endif QScopedPointer<QXcbWMSupport> m_wmSupport; diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp index 8ea0ebf966..c8ba33edf5 100644 --- a/src/plugins/platforms/xcb/qxcbdrag.cpp +++ b/src/plugins/platforms/xcb/qxcbdrag.cpp @@ -63,8 +63,6 @@ QT_BEGIN_NAMESPACE -#ifndef QT_NO_DRAGANDDROP - //#define DND_DEBUG #ifdef DND_DEBUG #define DEBUG qDebug @@ -1312,6 +1310,4 @@ QStringList QXcbDropData::formats_sys() const return formats; } -#endif // QT_NO_DRAGANDDROP - QT_END_NAMESPACE diff --git a/src/plugins/platforms/xcb/qxcbdrag.h b/src/plugins/platforms/xcb/qxcbdrag.h index 31f1c47d83..60287b717b 100644 --- a/src/plugins/platforms/xcb/qxcbdrag.h +++ b/src/plugins/platforms/xcb/qxcbdrag.h @@ -55,9 +55,9 @@ #include <QtCore/QDebug> -QT_BEGIN_NAMESPACE +QT_REQUIRE_CONFIG(draganddrop); -#ifndef QT_NO_DRAGANDDROP +QT_BEGIN_NAMESPACE class QWindow; class QPlatformWindow; @@ -173,8 +173,6 @@ private: }; Q_DECLARE_TYPEINFO(QXcbDrag::Transaction, Q_MOVABLE_TYPE); -#endif // QT_NO_DRAGANDDROP - QT_END_NAMESPACE #endif diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index 471287eb44..7b6fd844e0 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -46,7 +46,9 @@ #include "qxcbbackingstore.h" #include "qxcbnativeinterface.h" #include "qxcbclipboard.h" +#if QT_CONFIG(draganddrop) #include "qxcbdrag.h" +#endif #include "qxcbglintegration.h" #ifndef QT_NO_SESSIONMANAGER @@ -376,7 +378,7 @@ QPlatformClipboard *QXcbIntegration::clipboard() const } #endif -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) QPlatformDrag *QXcbIntegration::drag() const { return m_connections.at(0)->drag(); diff --git a/src/plugins/platforms/xcb/qxcbintegration.h b/src/plugins/platforms/xcb/qxcbintegration.h index 186b6c5ddd..69e49cb7f6 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.h +++ b/src/plugins/platforms/xcb/qxcbintegration.h @@ -84,7 +84,7 @@ public: #ifndef QT_NO_CLIPBOARD QPlatformClipboard *clipboard() const override; #endif -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) QPlatformDrag *drag() const override; #endif diff --git a/src/plugins/platforms/xcb/qxcbmime.cpp b/src/plugins/platforms/xcb/qxcbmime.cpp index 58e2e8c0e6..7170d259fd 100644 --- a/src/plugins/platforms/xcb/qxcbmime.cpp +++ b/src/plugins/platforms/xcb/qxcbmime.cpp @@ -46,8 +46,6 @@ QT_BEGIN_NAMESPACE -#if !(defined(QT_NO_DRAGANDDROP) && defined(QT_NO_CLIPBOARD)) - QXcbMime::QXcbMime() : QInternalMimeData() { } @@ -320,6 +318,4 @@ xcb_atom_t QXcbMime::mimeAtomForFormat(QXcbConnection *connection, const QString return 0; } -#endif // !(defined(QT_NO_DRAGANDDROP) && defined(QT_NO_CLIPBOARD)) - QT_END_NAMESPACE diff --git a/src/plugins/platforms/xcb/qxcbmime.h b/src/plugins/platforms/xcb/qxcbmime.h index 561631a377..f2136ec9f4 100644 --- a/src/plugins/platforms/xcb/qxcbmime.h +++ b/src/plugins/platforms/xcb/qxcbmime.h @@ -40,7 +40,7 @@ #ifndef QXCBMIME_H #define QXCBMIME_H -#include <private/qdnd_p.h> +#include <QtGui/private/qinternalmimedata_p.h> #include <QtGui/QClipboard> @@ -49,8 +49,6 @@ QT_BEGIN_NAMESPACE -#if !(defined(QT_NO_DRAGANDDROP) && defined(QT_NO_CLIPBOARD)) - class QXcbMime : public QInternalMimeData { Q_OBJECT public: @@ -67,9 +65,6 @@ public: const QVector<xcb_atom_t> &atoms, QByteArray *requestedEncoding); }; -#endif // !(defined(QT_NO_DRAGANDDROP) && defined(QT_NO_CLIPBOARD)) - - QT_END_NAMESPACE #endif // QXCBMIME_H diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index f87da28ee0..731b00f8fd 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -49,7 +49,9 @@ #include "qxcbintegration.h" #include "qxcbconnection.h" #include "qxcbscreen.h" +#if QT_CONFIG(draganddrop) #include "qxcbdrag.h" +#endif #include "qxcbkeyboard.h" #include "qxcbimage.h" #include "qxcbwmsupport.h" @@ -541,7 +543,7 @@ void QXcbWindow::create() XSync(static_cast<Display*>(platformScreen->connection()->xlib_display()), false); #endif -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) connection()->drag()->dndEnable(this, true); #endif @@ -1983,7 +1985,7 @@ void QXcbWindow::handleClientMessageEvent(const xcb_client_message_event_t *even qCWarning(lcQpaXcb, "Unhandled WM_PROTOCOLS (%s)", connection()->atomName(protocolAtom).constData()); } -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) } else if (event->type == atom(QXcbAtom::XdndEnter)) { connection()->drag()->handleEnter(this, event); } else if (event->type == atom(QXcbAtom::XdndPosition)) { diff --git a/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/src/plugins/platforms/xcb/xcb_qpa_lib.pro index ffc8a29116..9c4797ac26 100644 --- a/src/plugins/platforms/xcb/xcb_qpa_lib.pro +++ b/src/plugins/platforms/xcb/xcb_qpa_lib.pro @@ -19,7 +19,6 @@ SOURCES = \ qxcbintegration.cpp \ qxcbkeyboard.cpp \ qxcbmime.cpp \ - qxcbdrag.cpp \ qxcbscreen.cpp \ qxcbwindow.cpp \ qxcbbackingstore.cpp \ @@ -35,7 +34,6 @@ HEADERS = \ qxcbconnection.h \ qxcbintegration.h \ qxcbkeyboard.h \ - qxcbdrag.h \ qxcbmime.h \ qxcbobject.h \ qxcbscreen.h \ @@ -49,6 +47,11 @@ HEADERS = \ qxcbsystemtraytracker.h \ qxcbxkbcommon.h +qtConfig(draganddrop) { + SOURCES += qxcbdrag.cpp + HEADERS += qxcbdrag.h +} + load(qt_build_paths) DEFINES += QT_BUILD_XCB_PLUGIN |