From 4e7d7fc5e8a1a64520d965463ddfbb59cde2cfcf Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 12 Aug 2010 20:39:47 +0000 Subject: [PATCH] Qt3 still isn't 100% fixed... git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/tqtinterface@1162841 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- qtinterface/tqpaintdevice.cpp | 19 +++++++++++++++++++ qtinterface/tqslider.h | 6 +++--- qtinterface/tqt.h | 3 ++- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/qtinterface/tqpaintdevice.cpp b/qtinterface/tqpaintdevice.cpp index 20f41cc..d97a3d4 100644 --- a/qtinterface/tqpaintdevice.cpp +++ b/qtinterface/tqpaintdevice.cpp @@ -24,6 +24,24 @@ Boston, MA 02110-1301, USA. #ifdef USE_QT4 +// the following is necessary to work around breakage in many versions +// of XFree86's Xlib.h still in use +// ### which versions? +#if defined(_XLIB_H_) // crude hack, but... +#error "cannot include before this file" +#endif +#define XRegisterIMInstantiateCallback qt_XRegisterIMInstantiateCallback +#define XUnregisterIMInstantiateCallback qt_XUnregisterIMInstantiateCallback +#define XSetIMValues qt_XSetIMValues +#include +#undef XRegisterIMInstantiateCallback +#undef XUnregisterIMInstantiateCallback +#undef XSetIMValues + +#include +#include +#include + /*! Returns the window system handle of the paint device for XRender support. Use of this function is not portable. This function will @@ -46,6 +64,7 @@ static GC* app_gc_tmp_m = 0; // temporary GC (monochrome) static GC create_gc( int scrn, bool monochrome ) { GC gc; + Display *appDpy = QX11Info::display(); if ( monochrome ) { Pixmap pm = XCreatePixmap( appDpy, RootWindow( appDpy, scrn ), 8, 8, 1 ); gc = XCreateGC( appDpy, pm, 0, 0 ); diff --git a/qtinterface/tqslider.h b/qtinterface/tqslider.h index 2ddfafc..463f414 100644 --- a/qtinterface/tqslider.h +++ b/qtinterface/tqslider.h @@ -29,7 +29,7 @@ Boston, MA 02110-1301, USA. // Reimplement the QSlider class // For Qt3, no changes are needed -#include +#include #endif // USE_QT3 @@ -38,8 +38,8 @@ Boston, MA 02110-1301, USA. // Reimplement the QSlider class // For Qt4, some changes are needed -#include +#include #endif // USE_QT4 -#endif /* TQSLIDER_H */ \ No newline at end of file +#endif /* TQSLIDER_H */ diff --git a/qtinterface/tqt.h b/qtinterface/tqt.h index 03c8a7c..207d04f 100644 --- a/qtinterface/tqt.h +++ b/qtinterface/tqt.h @@ -673,7 +673,8 @@ class QUObject; #define TQNoBrush Qt::NoBrush #define QMetaData QMetaMethod -#define qt_xdisplay QPaintDevice::x11Display +//#define qt_xdisplay QPaintDevice::x11Display +#define qt_xdisplay QX11Info::display #define qt_xrootwin QPaintDevice::x11AppRootWindow #define qt_xscreen QPaintDevice::x11Screen #define qt_xget_temp_gc QPaintDevice::qt_xget_temp_gc