M QRemoteControl-Server.pro => QRemoteControl-Server.pro +0 -1
@@ 4,7 4,6 @@
TARGET = qremotecontrol-server
VERSION = 2.4.2
DEFINES += VERSION=\"\\\"$$VERSION\\\"\"
-DEFINES += HAVE_QT5
TRANSLATIONS = i18/de.ts i18/ru.ts i18/uk.ts i18/es.ts
M x11info.cpp => x11info.cpp +6 -6
@@ 19,7 19,7 @@
#include "x11info.h"
-#ifdef HAVE_QT5
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
# include <X11/Xlib.h>
# include <xcb/xcb.h>
# include <QtGlobal>
@@ 30,8 30,8 @@
Display* X11Info::display()
{
-#ifdef HAVE_QT5
- if (!_display) {
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
+ if (!_display) {
_display = XOpenDisplay(NULL);
}
return _display;
@@ 42,8 42,8 @@ Display* X11Info::display()
unsigned long X11Info::appRootWindow(int screen)
{
-#ifdef HAVE_QT5
- return screen == -1?
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
+ return screen == -1?
XDefaultRootWindow(display()) :
XRootWindowOfScreen(XScreenOfDisplay(display(), screen));
#else
@@ 51,7 51,7 @@ unsigned long X11Info::appRootWindow(int screen)
#endif
}
-#ifdef HAVE_QT5
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
xcb_connection_t *X11Info::xcbConnection()
{
if (!_xcb) {
M x11info.h => x11info.h +5 -3
@@ 20,15 20,17 @@
#ifndef X11INFO_H
#define X11INFO_H
+#include <qglobal.h>
+
typedef struct _XDisplay Display;
-#ifdef HAVE_QT5
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
typedef struct xcb_connection_t xcb_connection_t;
#endif
class X11Info
{
static Display *_display;
-#ifdef HAVE_QT5
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
static xcb_connection_t *_xcb;
#endif
static int _xcbPreferredScreen;
@@ 36,7 38,7 @@ class X11Info
public:
static Display* display();
static unsigned long appRootWindow(int screen = -1);
-#ifdef HAVE_QT5
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
static xcb_connection_t* xcbConnection();
static inline int xcbPreferredScreen() { return _xcbPreferredScreen; }
#endif