Replace Q_WS_* defines with TQ_WS_* equivalents

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/61/head
Michele Calgaro 9 months ago
parent 359ccbfc2d
commit 39ecff8fe9
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -168,7 +168,7 @@ KisAnnotationSP KisProfile::annotation() const
KisProfile * KisProfile::getScreenProfile (int screen) KisProfile * KisProfile::getScreenProfile (int screen)
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
Atom type; Atom type;
int format; int format;

@ -73,7 +73,7 @@
#include "kis_input_device.h" #include "kis_input_device.h"
#include "fixx11h.h" #include "fixx11h.h"
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <tqdesktopwidget.h> #include <tqdesktopwidget.h>
#include <tqapplication.h> #include <tqapplication.h>
@ -98,14 +98,14 @@ std::map<XID, KisCanvasWidget::X11TabletDevice> KisCanvasWidget::X11TabletDevice
#endif // EXTENDED_X11_TABLET_SUPPORT #endif // EXTENDED_X11_TABLET_SUPPORT
#endif // Q_WS_X11 #endif // TQ_WS_X11
KisCanvasWidget::KisCanvasWidget() KisCanvasWidget::KisCanvasWidget()
{ {
m_enableMoveEventCompressionHint = false; m_enableMoveEventCompressionHint = false;
m_lastPressure = 0; m_lastPressure = 0;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if (!X11SupportInitialised) { if (!X11SupportInitialised) {
initX11Support(); initX11Support();
} }
@ -180,7 +180,7 @@ void KisCanvasWidget::widgetGotTabletEvent(TQTabletEvent *e)
else { else {
KisMoveEvent ke(device, KisPoint(e->pos()), KisPoint(e->globalPos()), pressure, e->xTilt(), e->yTilt(), TQt::NoButton); KisMoveEvent ke(device, KisPoint(e->pos()), KisPoint(e->globalPos()), pressure, e->xTilt(), e->yTilt(), TQt::NoButton);
translateTabletEvent(&ke); translateTabletEvent(&ke);
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
// Fix the problem that when you change from using a tablet device to the mouse, // Fix the problem that when you change from using a tablet device to the mouse,
// the first mouse button event is not recognised. This is because we handle // the first mouse button event is not recognised. This is because we handle
// X11 core mouse move events directly so TQt does not get to see them. This breaks // X11 core mouse move events directly so TQt does not get to see them. This breaks
@ -292,7 +292,7 @@ void KisCanvasWidget::translateTabletEvent(KisEvent *e)
m_lastPressure = e->pressure(); m_lastPressure = e->pressure();
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
void KisCanvasWidget::initX11Support() void KisCanvasWidget::initX11Support()
{ {
@ -1058,7 +1058,7 @@ KisInputDevice KisCanvasWidget::findActiveInputDevice()
#endif // EXTENDED_X11_TABLET_SUPPORT #endif // EXTENDED_X11_TABLET_SUPPORT
#endif // Q_WS_X11 #endif // TQ_WS_X11
/*************************************************************************/ /*************************************************************************/

@ -36,10 +36,10 @@
#include "kis_input_device.h" #include "kis_input_device.h"
#ifdef Q_MOC_RUN #ifdef Q_MOC_RUN
#define Q_WS_X11 #define TQ_WS_X11
#endif // Q_MOC_RUN #endif // Q_MOC_RUN
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
// Irix has a different (and better) XInput tablet driver to // Irix has a different (and better) XInput tablet driver to
// the XFree/xorg driver. TQt needs a separate code path for that // the XFree/xorg driver. TQt needs a separate code path for that
@ -55,7 +55,7 @@
#include <X11/extensions/XInput.h> #include <X11/extensions/XInput.h>
#endif #endif
#endif // Q_WS_X11 #endif // TQ_WS_X11
class KisEvent; class KisEvent;
class KisMoveEvent; class KisMoveEvent;
@ -86,7 +86,7 @@ public:
static void selectTabletDeviceEvents(TQWidget *widget); static void selectTabletDeviceEvents(TQWidget *widget);
#endif #endif
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
static void initX11Support(); static void initX11Support();
#endif #endif
@ -129,7 +129,7 @@ protected:
bool m_enableMoveEventCompressionHint; bool m_enableMoveEventCompressionHint;
double m_lastPressure; double m_lastPressure;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
// On X11 systems, TQt throws away mouse move events if the application // On X11 systems, TQt throws away mouse move events if the application
// is unable to keep up with them. We override this behaviour so that // is unable to keep up with them. We override this behaviour so that
// we receive all move events, so that painting follows the mouse's motion // we receive all move events, so that painting follows the mouse's motion
@ -278,7 +278,7 @@ protected:
#endif // EXTENDED_X11_TABLET_SUPPORT #endif // EXTENDED_X11_TABLET_SUPPORT
#endif // Q_WS_X11 #endif // TQ_WS_X11
}; };
class KisCanvas : public TQObject { class KisCanvas : public TQObject {

@ -102,14 +102,14 @@ void KisOpenGLCanvasWidget::dropEvent(TQDropEvent *e)
widgetGotDropEvent(e); widgetGotDropEvent(e);
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
bool KisOpenGLCanvasWidget::x11Event(XEvent *event) bool KisOpenGLCanvasWidget::x11Event(XEvent *event)
{ {
return KisCanvasWidget::x11Event(event, x11Display(), winId(), mapToGlobal(TQPoint(0, 0))); return KisCanvasWidget::x11Event(event, x11Display(), winId(), mapToGlobal(TQPoint(0, 0)));
} }
#endif // Q_WS_X11 #endif // TQ_WS_X11
KisCanvasWidgetPainter *KisOpenGLCanvasWidget::createPainter() KisCanvasWidgetPainter *KisOpenGLCanvasWidget::createPainter()
{ {

@ -32,12 +32,12 @@
#include "kis_canvas.h" #include "kis_canvas.h"
#ifdef Q_MOC_RUN #ifdef Q_MOC_RUN
#define Q_WS_X11 #define TQ_WS_X11
#endif // Q_MOC_RUN #endif // Q_MOC_RUN
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <X11/Xlib.h> #include <X11/Xlib.h>
#endif // Q_WS_X11 #endif // TQ_WS_X11
#define KisOpenGLCanvasFormat (TQGL::DoubleBuffer|TQGL::Rgba|TQGL::DirectRendering|TQGL::NoDepthBuffer) #define KisOpenGLCanvasFormat (TQGL::DoubleBuffer|TQGL::Rgba|TQGL::DirectRendering|TQGL::NoDepthBuffer)
@ -66,9 +66,9 @@ protected:
virtual void keyReleaseEvent(TQKeyEvent *event); virtual void keyReleaseEvent(TQKeyEvent *event);
virtual void dragEnterEvent(TQDragEnterEvent *event); virtual void dragEnterEvent(TQDragEnterEvent *event);
virtual void dropEvent(TQDropEvent *event); virtual void dropEvent(TQDropEvent *event);
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
bool x11Event(XEvent *event); bool x11Event(XEvent *event);
#endif // Q_WS_X11 #endif // TQ_WS_X11
}; };
#endif // HAVE_GL #endif // HAVE_GL

@ -97,14 +97,14 @@ void KisTQPaintDeviceCanvasWidget::dropEvent(TQDropEvent *e)
widgetGotDropEvent(e); widgetGotDropEvent(e);
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
bool KisTQPaintDeviceCanvasWidget::x11Event(XEvent *event) bool KisTQPaintDeviceCanvasWidget::x11Event(XEvent *event)
{ {
return KisCanvasWidget::x11Event(event, x11Display(), winId(), mapToGlobal(TQPoint(0, 0))); return KisCanvasWidget::x11Event(event, x11Display(), winId(), mapToGlobal(TQPoint(0, 0)));
} }
#endif // Q_WS_X11 #endif // TQ_WS_X11
KisCanvasWidgetPainter *KisTQPaintDeviceCanvasWidget::createPainter() KisCanvasWidgetPainter *KisTQPaintDeviceCanvasWidget::createPainter()
{ {

@ -30,12 +30,12 @@
#include "kis_canvas.h" #include "kis_canvas.h"
#ifdef Q_MOC_RUN #ifdef Q_MOC_RUN
#define Q_WS_X11 #define TQ_WS_X11
#endif // Q_MOC_RUN #endif // Q_MOC_RUN
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <X11/Xlib.h> #include <X11/Xlib.h>
#endif // Q_WS_X11 #endif // TQ_WS_X11
class KisTQPaintDeviceCanvasWidget : public virtual TQWidget, public virtual KisCanvasWidget { class KisTQPaintDeviceCanvasWidget : public virtual TQWidget, public virtual KisCanvasWidget {
public: public:
@ -62,9 +62,9 @@ protected:
virtual void keyReleaseEvent(TQKeyEvent *event); virtual void keyReleaseEvent(TQKeyEvent *event);
virtual void dragEnterEvent(TQDragEnterEvent *event); virtual void dragEnterEvent(TQDragEnterEvent *event);
virtual void dropEvent(TQDropEvent *event); virtual void dropEvent(TQDropEvent *event);
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
bool x11Event(XEvent *event); bool x11Event(XEvent *event);
#endif // Q_WS_X11 #endif // TQ_WS_X11
}; };
#endif // KIS_TQPAINTDEVICE_CANVAS_H_ #endif // KIS_TQPAINTDEVICE_CANVAS_H_

@ -247,7 +247,7 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, TQWidget *parent, const c
setFocusPolicy( TQWidget::StrongFocus ); setFocusPolicy( TQWidget::StrongFocus );
// Must come before input devices are referenced as this detects them. // Must come before input devices are referenced as this detects them.
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
KisCanvasWidget::initX11Support(); KisCanvasWidget::initX11Support();
#endif #endif
// Install event filter before we create any child widgets so they can see // Install event filter before we create any child widgets so they can see

@ -139,7 +139,7 @@ INCLUDE_PATH =
INCLUDE_FILE_PATTERNS = INCLUDE_FILE_PATTERNS =
PREDEFINED = TQT_VERSION=320 \ PREDEFINED = TQT_VERSION=320 \
__cplusplus \ __cplusplus \
Q_WS_X11 TQ_WS_X11
EXPAND_AS_DEFINED = EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES SKIP_FUNCTION_MACROS = YES
TAGFILES = TAGFILES =

@ -61,7 +61,7 @@ KoGlobal::KoGlobal()
// Another way to get the DPI of the display would be TQPaintDeviceMetrics, // Another way to get the DPI of the display would be TQPaintDeviceMetrics,
// but we have no widget here (and moving this to KoView wouldn't allow // but we have no widget here (and moving this to KoView wouldn't allow
// using this from the document easily). // using this from the document easily).
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
m_dpiX = TQPaintDevice::x11AppDpiX(); m_dpiX = TQPaintDevice::x11AppDpiX();
m_dpiY = TQPaintDevice::x11AppDpiY(); m_dpiY = TQPaintDevice::x11AppDpiY();
#else #else

@ -446,7 +446,7 @@
#include <assert.h> #include <assert.h>
#include <limits.h> #include <limits.h>
//TODO OK? //TODO OK?
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
//workaround for bug on msvc //workaround for bug on msvc
# undef LLONG_MIN # undef LLONG_MIN
#endif #endif

@ -308,14 +308,14 @@ void StencilBarDockManager::setAllStackBarsShown(bool shown)
KoToolDockMoveManager::KoToolDockMoveManager() KoToolDockMoveManager::KoToolDockMoveManager()
: TQObject() : TQObject()
{ {
#if defined Q_WS_X11 && !defined K_WS_TQTONLY #if defined TQ_WS_X11 && !defined K_WS_TQTONLY
XGCValues gv; XGCValues gv;
#endif #endif
working=false; working=false;
noLast=true; noLast=true;
#if defined Q_WS_X11 && !defined K_WS_TQTONLY #if defined TQ_WS_X11 && !defined K_WS_TQTONLY
scr = tqt_xscreen(); scr = tqt_xscreen();
root = tqt_xrootwin(); root = tqt_xrootwin();
@ -386,7 +386,7 @@ void KoToolDockMoveManager::doMoveInternal()
if (check(xp, yp, w, h)) { if (check(xp, yp, w, h)) {
paintProcess(false,xp, yp, w, h); paintProcess(false,xp, yp, w, h);
#if defined Q_WS_X11 && !defined K_WS_TQTONLY #if defined TQ_WS_X11 && !defined K_WS_TQTONLY
XFlush(tqt_xdisplay()); XFlush(tqt_xdisplay());
XSync(tqt_xdisplay(),false); XSync(tqt_xdisplay(),false);
#endif #endif
@ -402,7 +402,7 @@ void KoToolDockMoveManager::stop()
TQApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();
paintProcess(); paintProcess();
#if defined Q_WS_X11 && !defined K_WS_TQTONLY #if defined TQ_WS_X11 && !defined K_WS_TQTONLY
XFlush(tqt_xdisplay()); XFlush(tqt_xdisplay());
#endif #endif
@ -424,7 +424,7 @@ void KoToolDockMoveManager::setGeometry(int _x, int _y, int _w, int _h)
check(_x, _y, _w, _h, true); check(_x, _y, _w, _h, true);
paintProcess(false,_x, _y, _w, _h); paintProcess(false,_x, _y, _w, _h);
#if defined Q_WS_X11 && !defined K_WS_TQTONLY #if defined TQ_WS_X11 && !defined K_WS_TQTONLY
XFlush(tqt_xdisplay()); XFlush(tqt_xdisplay());
XSync(tqt_xdisplay(),false); XSync(tqt_xdisplay(),false);
#endif #endif
@ -440,7 +440,7 @@ void KoToolDockMoveManager::drawRectangle( int _x, int _y, int _w, int _h)
ow = _w; ow = _w;
oh = _h; oh = _h;
#if defined Q_WS_X11 && !defined K_WS_TQTONLY #if defined TQ_WS_X11 && !defined K_WS_TQTONLY
XDrawRectangle(tqt_xdisplay(), root, rootgc, _x, _y, _w, _h); XDrawRectangle(tqt_xdisplay(), root, rootgc, _x, _y, _w, _h);
#endif #endif
noLast = false; noLast = false;
@ -454,7 +454,7 @@ void KoToolDockMoveManager::paintProcess( bool onlyDelete, int _x, int _y, int _
if ( ox == _x && oy == _y && ow ==_w && oh == _h ) if ( ox == _x && oy == _y && ow ==_w && oh == _h )
return; return;
#if defined Q_WS_X11 && !defined K_WS_TQTONLY #if defined TQ_WS_X11 && !defined K_WS_TQTONLY
XDrawRectangle(tqt_xdisplay(), root, rootgc, ox, oy, ow, oh); XDrawRectangle(tqt_xdisplay(), root, rootgc, ox, oy, ow, oh);
#endif #endif
noLast = true; noLast = true;
@ -546,7 +546,7 @@ void KoToolDockMoveManager::doResizeInternal()
if (check(xp, yp, w, h)) { if (check(xp, yp, w, h)) {
paintProcess(false,xp, yp, w, h); paintProcess(false,xp, yp, w, h);
#if defined Q_WS_X11 && !defined K_WS_TQTONLY #if defined TQ_WS_X11 && !defined K_WS_TQTONLY
XFlush(tqt_xdisplay()); XFlush(tqt_xdisplay());
XSync(tqt_xdisplay(),false); XSync(tqt_xdisplay(),false);
#endif #endif

@ -20,12 +20,12 @@
#define STENCILBARDOCKMANAGER_H #define STENCILBARDOCKMANAGER_H
#ifdef Q_MOC_RUN #ifdef Q_MOC_RUN
#define Q_WS_X11 #define TQ_WS_X11
#endif // Q_MOC_RUN #endif // Q_MOC_RUN
#include <tqwidget.h> #include <tqwidget.h>
#include <tqptrlist.h> #include <tqptrlist.h>
#if defined Q_WS_X11 && !defined K_WS_TQTONLY #if defined TQ_WS_X11 && !defined K_WS_TQTONLY
#include <X11/X.h> #include <X11/X.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
@ -171,7 +171,7 @@ class KoToolDockMoveManager: public TQObject
int offX, offY; int offX, offY;
/* X-stuff */ /* X-stuff */
#if defined Q_WS_X11 && !defined K_WS_TQTONLY #if defined TQ_WS_X11 && !defined K_WS_TQTONLY
Window root; Window root;
GC rootgc; GC rootgc;
int scr; int scr;

@ -929,7 +929,7 @@ INCLUDE_FILE_PATTERNS =
PREDEFINED = TQT_VERSION=320 \ PREDEFINED = TQT_VERSION=320 \
__cplusplus \ __cplusplus \
Q_WS_X11 TQ_WS_X11
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded. # this tag can be used to specify a list of macro names that should be expanded.

@ -64,7 +64,7 @@ KoGlobal::KoGlobal()
// Another way to get the DPI of the display would be TQPaintDeviceMetrics, // Another way to get the DPI of the display would be TQPaintDeviceMetrics,
// but we have no widget here (and moving this to KoView wouldn't allow // but we have no widget here (and moving this to KoView wouldn't allow
// using this from the document easily). // using this from the document easily).
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
m_dpiX = TQPaintDevice::x11AppDpiX(); m_dpiX = TQPaintDevice::x11AppDpiX();
m_dpiY = TQPaintDevice::x11AppDpiY(); m_dpiY = TQPaintDevice::x11AppDpiY();
#else #else

@ -40,7 +40,7 @@ double KoTextZoomHandler::layoutUnitToFontSize( int luSize, bool /*forPrint*/ )
{ {
// TQt will use TQPaintDevice::x11AppDpiY() to go from pt to pixel for fonts // TQt will use TQPaintDevice::x11AppDpiY() to go from pt to pixel for fonts
return layoutUnitPtToPt( luSize ) * m_zoomedResolutionY return layoutUnitPtToPt( luSize ) * m_zoomedResolutionY
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
/ POINT_TO_INCH(TQPaintDevice::x11AppDpiY()) / POINT_TO_INCH(TQPaintDevice::x11AppDpiY())
#endif #endif
; ;

Loading…
Cancel
Save