From 555738449439775751e63af6cb34301bd74540da Mon Sep 17 00:00:00 2001 From: Gennady Pospelov <g.pospelov@fz-juelich.de> Date: Wed, 29 Jan 2014 09:42:35 +0100 Subject: [PATCH] Qt5 ROOT related fixes --- GUI/externals/qt-root/CMakeLists.txt | 2 +- GUI/externals/qt-root/inc/x11info.h | 16 ------------- GUI/externals/qt-root/src/GQtGUI.cxx | 16 ++++++------- GUI/externals/qt-root/src/x11info.cxx | 34 --------------------------- 4 files changed, 8 insertions(+), 60 deletions(-) delete mode 100644 GUI/externals/qt-root/inc/x11info.h delete mode 100644 GUI/externals/qt-root/src/x11info.cxx diff --git a/GUI/externals/qt-root/CMakeLists.txt b/GUI/externals/qt-root/CMakeLists.txt index e1639645f42..a20c69cf75f 100644 --- a/GUI/externals/qt-root/CMakeLists.txt +++ b/GUI/externals/qt-root/CMakeLists.txt @@ -47,7 +47,7 @@ include_directories( ) target_link_libraries(${library_name} ${ROOT_LIBRARIES}) -qt5_use_modules(${library_name} Widgets) +qt5_use_modules(${library_name} Widgets X11Extras) # --- installation --- #install (TARGETS ${library_name} DESTINATION bin COMPONENT Libraries) diff --git a/GUI/externals/qt-root/inc/x11info.h b/GUI/externals/qt-root/inc/x11info.h deleted file mode 100644 index 680672d7110..00000000000 --- a/GUI/externals/qt-root/inc/x11info.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef X11INFO_H -#define X11INFO_H - -//typedef struct _XDisplay Display; - -//class X11Info -//{ -// static Display *_display; -// public: -// static Display* display(); -// static unsigned long appRootWindow(int screen = -1); -//}; - -//typedef X11Info QX11Info; - -#endif // X11INFO_H diff --git a/GUI/externals/qt-root/src/GQtGUI.cxx b/GUI/externals/qt-root/src/GQtGUI.cxx index ea7f8edfd36..9ce48e5dd91 100644 --- a/GUI/externals/qt-root/src/GQtGUI.cxx +++ b/GUI/externals/qt-root/src/GQtGUI.cxx @@ -53,8 +53,8 @@ # include <QLine> # include <QVector> #ifdef R__QTX11 -//# include <QX11Info> -#include "x11info.h" +# include <QtX11Extras/QX11Info> +#include <QtGui/qtransform.h> #endif #endif /* QT_VERSION */ @@ -1361,8 +1361,7 @@ Display_t TGQt::GetDisplay() const // Using this method makes the rest of the ROOT X11 depended #ifdef R__QTX11 -// return (Display_t)QX11Info::display(); - return 0; + return (Display_t)QX11Info::display(); #else // The dummy method to fit the X11-like interface return 0; @@ -1379,8 +1378,8 @@ Visual_t TGQt::GetVisual() const // Using this method makes the rest of the ROOT X11 depended #ifdef R__QTX11 -// return (Visual_t) QX11Info::appVisual(); - return 0; + //return (Visual_t) QX11Info::appVisual(); + return 0; #else // The dummy method to fit the X11-like interface return 0; @@ -1397,8 +1396,7 @@ Int_t TGQt::GetScreen() const // Using this method makes the rest of the ROOT X11 depended #ifdef R__QTX11 -// return QX11Info::appScreen(); - return 0; + return QX11Info::appScreen(); #else // The dummy method to fit the X11-like interface return 0; @@ -1409,7 +1407,7 @@ Int_t TGQt::GetDepth() const { // Returns depth of screen (number of bit planes). #ifdef R__QTX11 - //return QX11Info::appDepth(); +// return QX11Info::appDepth(); return QPixmap::defaultDepth(); #else return QPixmap::defaultDepth(); diff --git a/GUI/externals/qt-root/src/x11info.cxx b/GUI/externals/qt-root/src/x11info.cxx deleted file mode 100644 index f241a1c36b6..00000000000 --- a/GUI/externals/qt-root/src/x11info.cxx +++ /dev/null @@ -1,34 +0,0 @@ -#include "x11info.h" - -//#ifdef HAVE_QT5 -//# include <X11/Xlib.h> -//# include <QtGlobal> -//#else -//# include <QX11Info> -//#endif - - -//Display* X11Info::display() -//{ -//#ifdef HAVE_QT5 -// if (!_display) { -// _display = XOpenDisplay(NULL); -// } -// return _display; -//#else -// return QX11Info::display(); -//#endif -//} - -//unsigned long X11Info::appRootWindow(int screen) -//{ -//#ifdef HAVE_QT5 -// return screen == -1? -// XDefaultRootWindow(display()) : -// XRootWindowOfScreen(XScreenOfDisplay(display(), screen)); -//#else -// return QX11Info::appRootWindow(screen); -//#endif -//} - -//Display* X11Info::_display = 0; -- GitLab