From 82d33e27245a5951dc08db23d412a7b97d981d06 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 12 Aug 2010 21:06:45 +0000 Subject: [PATCH] Qt3 compilation fix git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/tqtinterface@1162848 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- qtinterface/tqpaintdevice.cpp | 9 +++++++-- qtinterface/tqt.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/qtinterface/tqpaintdevice.cpp b/qtinterface/tqpaintdevice.cpp index d97a3d4..846342a 100644 --- a/qtinterface/tqpaintdevice.cpp +++ b/qtinterface/tqpaintdevice.cpp @@ -42,6 +42,8 @@ Boston, MA 02110-1301, USA. #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 @@ -75,8 +77,11 @@ static GC create_gc( int scrn, bool monochrome ) } else { Window w; XSetWindowAttributes a; - a.background_pixel = Qt::black.pixel( scrn ); - a.border_pixel = Qt::black.pixel( scrn ); + QColormap cmap_background = QColormap::instance( scrn ); + QColormap cmap_border = QColormap::instance( scrn ); + a.background_pixel = cmap_background.pixel( Qt::black ); + a.border_pixel = cmap_border.pixel( Qt::black ); + a.colormap = QPaintDevice::x11AppColormap( scrn ); w = XCreateWindow( appDpy, RootWindow( appDpy, scrn ), 0, 0, 100, 100, 0, QPaintDevice::x11AppDepth( scrn ), InputOutput, diff --git a/qtinterface/tqt.h b/qtinterface/tqt.h index 207d04f..e812b9b 100644 --- a/qtinterface/tqt.h +++ b/qtinterface/tqt.h @@ -65,7 +65,7 @@ Boston, MA 02110-1301, USA. #define TQ_Key_Super_R Key_Super_R #define TQ_Key_Hyper_L Key_Hyper_L #define TQ_Key_Hyper_R Key_Hyper_R -#define TQ_ButtonState ButtonState +#define TQ_ButtonState Qt::ButtonState #define TQ_LeftButton LeftButton #define TQ_MidButton MidButton #define TQ_RightButton RightButton