mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-03 13:30:26 +01:00
[qxt] No need to check qt versionat all, Qt 5.6 is required.
So just use QX11Info
This commit is contained in:
parent
85558d242c
commit
1176d9eb93
19
3rdparty/qxt/qxtglobalshortcut_x11.cpp
vendored
19
3rdparty/qxt/qxtglobalshortcut_x11.cpp
vendored
@ -29,16 +29,8 @@
|
||||
** <http://libqxt.org> <foundation@libqxt.org>
|
||||
*****************************************************************************/
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5,0,0) || QT_VERSION > QT_VERSION_CHECK(5,6,0)
|
||||
# include <QX11Info>
|
||||
#if QT_VERSION > QT_VERSION_CHECK(5,6,0)
|
||||
# include <xcb/xcb.h>
|
||||
#endif
|
||||
#else
|
||||
# include <QApplication>
|
||||
# include <qpa/qplatformnativeinterface.h>
|
||||
# include <xcb/xcb.h>
|
||||
#endif
|
||||
#include <QX11Info>
|
||||
#include <xcb/xcb.h>
|
||||
#include <QVector>
|
||||
#include <X11/Xlib.h>
|
||||
#include "keymapper_x11.h"
|
||||
@ -95,14 +87,7 @@ class QxtX11Data {
|
||||
public:
|
||||
QxtX11Data()
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5,0,0) || QT_VERSION > QT_VERSION_CHECK(5,6,0)
|
||||
m_display = QX11Info::display();
|
||||
#else
|
||||
QPlatformNativeInterface *native = qApp->platformNativeInterface();
|
||||
void *display = native->nativeResourceForScreen(QByteArray("display"),
|
||||
QGuiApplication::primaryScreen());
|
||||
m_display = reinterpret_cast<Display *>(display);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool isValid()
|
||||
|
Loading…
Reference in New Issue
Block a user