From 41516caed988d3086640742cdafc1239358d4b9c Mon Sep 17 00:00:00 2001
From: Alexander Golubev <fatzer2@gmail.com>
Date: Sat, 4 Apr 2026 18:22:41 +0300
Subject:  q => tq rebranding: rename internal qt_ symbols from tqapplication*

Rename all functions and variables found in src/kernel/tqapplication*
files which were still started with qt_ to tqt_.

The rename was done with next script:

  grep -horE '\<qt_\w*' src/kernel/tqapplication* | sort -u | \
      sed 's!.*!s/\\<&\\>/t&/g'! > /tmp/qt-rename.sed
  find * -type f -exec sed -i -f /tmp/qt-rename.sed '{}' \+

with some minor manual tweaks afterwards.

Besides that {qt_qt_ => tqt_}scrolldone was renamed.

All those are purely internal symbols and shouldn't affect neither API
nor ABI. Those that are declared in tqapplication.h and tqwidget.h
are private variables and supposed to be used only on MacOS.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
---
 doc/html/tqapplication-h.html                      |  16 +-
 doc/html/tqwidget-h.html                           |   2 +-
 .../src/inputmethods/xim/qximinputcontext_x11.cpp  |  94 +--
 src/dialogs/tqfiledialog.cpp                       |   2 +-
 src/kernel/tqapplication.cpp                       |  38 +-
 src/kernel/tqapplication.h                         |  16 +-
 src/kernel/tqapplication_p.h                       |   8 +-
 src/kernel/tqapplication_x11.cpp                   | 758 ++++++++++-----------
 src/kernel/tqclipboard_x11.cpp                     |  58 +-
 src/kernel/tqcolor_x11.cpp                         |  14 +-
 src/kernel/tqdnd_x11.cpp                           | 156 ++---
 src/kernel/tqdragobject.cpp                        |  40 +-
 src/kernel/tqeventloop_x11.cpp                     |   6 +-
 src/kernel/tqeventloop_x11_glib.cpp                |   6 +-
 src/kernel/tqmotifdnd_x11.cpp                      |  22 +-
 src/kernel/tqpainter_x11.cpp                       |   4 +-
 src/kernel/tqsizegrip.cpp                          |   6 +-
 src/kernel/tqtranslator.cpp                        |   8 +-
 src/kernel/tqwidget.cpp                            |   8 +-
 src/kernel/tqwidget.h                              |   2 +-
 src/kernel/tqwidget_p.h                            |   2 +-
 src/kernel/tqwidget_x11.cpp                        | 124 ++--
 src/tools/tqglobal.cpp                             |  12 +-
 src/widgets/tqmenubar.cpp                          |   6 +-
 src/widgets/tqtitlebar.cpp                         |   2 +-
 25 files changed, 705 insertions(+), 705 deletions(-)

diff --git a/doc/html/tqapplication-h.html b/doc/html/tqapplication-h.html
index a9400217..f21fa7ad 100644
--- a/doc/html/tqapplication-h.html
+++ b/doc/html/tqapplication-h.html
@@ -333,14 +333,14 @@ private:
     bool do_mouse_down(Point *, bool *);
     static TQMAC_PASCAL OSStatus globalEventProcessor(EventHandlerCallRef,  EventRef, void *);
     static TQMAC_PASCAL OSStatus globalAppleEventProcessor(const AppleEvent *, AppleEvent *, long);
-    static TQMAC_PASCAL void qt_context_timer_callbk(EventLoopTimerRef, void *);
-    static TQMAC_PASCAL void qt_select_timer_callbk(EventLoopTimerRef, void *);
-    static bool qt_mac_apply_settings();
+    static TQMAC_PASCAL void tqt_context_timer_callbk(EventLoopTimerRef, void *);
+    static TQMAC_PASCAL void tqt_select_timer_callbk(EventLoopTimerRef, void *);
+    static bool tqt_mac_apply_settings();
     friend class TQMacInputMethod;
-    friend TQMAC_PASCAL OSStatus qt_window_event(EventHandlerCallRef, EventRef, void *);
-    friend void qt_mac_update_os_settings();
-    friend bool qt_set_socket_handler( int, int, TQObject *, bool);
-    friend void qt_mac_destroy_widget(TQWidget *);
+    friend TQMAC_PASCAL OSStatus tqt_window_event(EventHandlerCallRef, EventRef, void *);
+    friend void tqt_mac_update_os_settings();
+    friend bool tqt_set_socket_handler( int, int, TQObject *, bool);
+    friend void tqt_mac_destroy_widget(TQWidget *);
     friend void tqt_init(int *, char **, TQApplication::Type);
 #endif
 
@@ -422,7 +422,7 @@ private:
     friend class TQEventLoop;
     friend TQ_EXPORT void tqt_ucm_initialize( TQApplication * );
 #if defined(TQ_WS_WIN)
-    friend bool qt_sendSpontaneousEvent( TQObject*, TQEvent* );
+    friend bool tqt_sendSpontaneousEvent( TQObject*, TQEvent* );
 #endif
 private: // Disabled copy constructor and operator=
 #if defined(TQ_DISABLE_COPY)
diff --git a/doc/html/tqwidget-h.html b/doc/html/tqwidget-h.html
index 0bd7b09d..ad946496 100644
--- a/doc/html/tqwidget-h.html
+++ b/doc/html/tqwidget-h.html
@@ -613,7 +613,7 @@ private:
     friend bool qt_mac_update_sizer(TQWidget *, int);
     friend TQWidget *qt_recursive_match(TQWidget *widg, int x, int y);
     friend bool qt_paint_children(TQWidget *,TQRegion &amp;, uchar ops);
-    friend TQMAC_PASCAL OSStatus qt_window_event(EventHandlerCallRef er, EventRef event, void *);
+    friend TQMAC_PASCAL OSStatus tqt_window_event(EventHandlerCallRef er, EventRef event, void *);
     friend void qt_event_request_updates(TQWidget *, const TQRegion &amp;, bool subtract);
     friend bool qt_window_rgn(WId, short, RgnHandle, bool);
     friend class TQDragManager;
diff --git a/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp b/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp
index 30d271fa..f239ddd4 100644
--- a/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp
+++ b/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp
@@ -64,15 +64,15 @@ const int XKeyRelease = KeyRelease;
 // #define QT_XIM_DEBUG
 
 // from tqapplication_x11.cpp
-static XIM	qt_xim = 0;
-extern XIMStyle	qt_xim_style;
-extern XIMStyle	qt_xim_preferred_style;
-extern char    *qt_ximServer;
+static XIM	tqt_xim = 0;
+extern XIMStyle	tqt_xim_style;
+extern XIMStyle	tqt_xim_preferred_style;
+extern char    *tqt_ximServer;
 static bool isInitXIM = false;
 static TQPtrList<TQXIMInputContext> *ximContextList = 0;
 #endif
-extern int qt_ximComposingKeycode;
-extern TQTextCodec * qt_input_mapper;
+extern int tqt_ximComposingKeycode;
+extern TQTextCodec * tqt_input_mapper;
 
 
 #if !defined(TQT_NO_XIM)
@@ -362,7 +362,7 @@ void TQXIMInputContext::setHolderWidget( TQWidget *widget )
     TQInputContext::setHolderWidget( widget );
 
 #if !defined(TQT_NO_XIM)
-    if (! qt_xim) {
+    if (! tqt_xim) {
 	tqWarning("TQInputContext: no input method context available");
 	return;
     }
@@ -380,7 +380,7 @@ void TQXIMInputContext::setHolderWidget( TQWidget *widget )
     font = widget->font();
     fontset = getFontSet( font );
 
-    if (qt_xim_style & XIMPreeditArea) {
+    if (tqt_xim_style & XIMPreeditArea) {
 	rect.x = 0;
 	rect.y = 0;
 	rect.width = widget->width();
@@ -390,7 +390,7 @@ void TQXIMInputContext::setHolderWidget( TQWidget *widget )
 					   XNArea, &rect,
 					   XNFontSet, fontset,
 					   (char *) 0);
-    } else if (qt_xim_style & XIMPreeditPosition) {
+    } else if (tqt_xim_style & XIMPreeditPosition) {
 	spot.x = 1;
 	spot.y = 1;
 
@@ -398,7 +398,7 @@ void TQXIMInputContext::setHolderWidget( TQWidget *widget )
 					   XNSpotLocation, &spot,
 					   XNFontSet, fontset,
 					   (char *) 0);
-    } else if (qt_xim_style & XIMPreeditCallbacks) {
+    } else if (tqt_xim_style & XIMPreeditCallbacks) {
 	startcallback.client_data = (XPointer) this;
 	startcallback.callback = (XIMProc) xic_start_callback;
 	drawcallback.client_data = (XPointer) this;
@@ -414,15 +414,15 @@ void TQXIMInputContext::setHolderWidget( TQWidget *widget )
     }
 
     if (preedit_attr) {
-	ic = XCreateIC(qt_xim,
-		       XNInputStyle, qt_xim_style,
+	ic = XCreateIC(tqt_xim,
+		       XNInputStyle, tqt_xim_style,
 		       XNClientWindow, widget->winId(),
 		       XNPreeditAttributes, preedit_attr,
 		       (char *) 0);
 	XFree(preedit_attr);
     } else
-	ic = XCreateIC(qt_xim,
-		       XNInputStyle, qt_xim_style,
+	ic = XCreateIC(tqt_xim,
+		       XNInputStyle, tqt_xim_style,
 		       XNClientWindow, widget->winId(),
 		       (char *) 0);
 
@@ -456,10 +456,10 @@ TQXIMInputContext::~TQXIMInputContext()
 	ximContextList->remove( this );
 	if(ximContextList->isEmpty()) {
 	    // Calling XCloseIM gives a Purify FMR error
-	    // XCloseIM( qt_xim );
+	    // XCloseIM( tqt_xim );
 	    // We prefer a less serious memory leak
-	    if( qt_xim ) {
-		qt_xim = 0;
+	    if( tqt_xim ) {
+		tqt_xim = 0;
 		isInitXIM = false;
 	    }
 
@@ -478,9 +478,9 @@ void TQXIMInputContext::init_xim()
     if(!isInitXIM)
 	isInitXIM = true;
 
-    qt_xim = 0;
-    TQString ximServerName(qt_ximServer);
-    if (qt_ximServer)
+    tqt_xim = 0;
+    TQString ximServerName(tqt_ximServer);
+    if (tqt_ximServer)
 	ximServerName.prepend("@im=");
     else
 	ximServerName = "";
@@ -517,50 +517,50 @@ void TQXIMInputContext::create_xim()
 {
 #ifndef TQT_NO_XIM
     Display *appDpy = TQPaintDevice::x11AppDisplay();
-    qt_xim = XOpenIM( appDpy, 0, 0, 0 );
-    if ( qt_xim ) {
+    tqt_xim = XOpenIM( appDpy, 0, 0, 0 );
+    if ( tqt_xim ) {
 
 #ifdef USE_X11R6_XIM
 	XIMCallback destroy;
 	destroy.callback = (XIMProc) xim_destroy_callback;
 	destroy.client_data = 0;
-	if ( XSetIMValues( qt_xim, XNDestroyCallback, &destroy, (char *) 0 ) != 0 )
+	if ( XSetIMValues( tqt_xim, XNDestroyCallback, &destroy, (char *) 0 ) != 0 )
 	    tqWarning( "Xlib doesn't support destroy callback");
 #endif // USE_X11R6_XIM
 
 	XIMStyles *styles = 0;
-	XGetIMValues(qt_xim, XNQueryInputStyle, &styles, (char *) 0, (char *) 0);
+	XGetIMValues(tqt_xim, XNQueryInputStyle, &styles, (char *) 0, (char *) 0);
 	if ( styles ) {
 	    int i;
-	    for ( i = 0; !qt_xim_style && i < styles->count_styles; i++ ) {
-		if ( styles->supported_styles[i] == qt_xim_preferred_style ) {
-		    qt_xim_style = qt_xim_preferred_style;
+	    for ( i = 0; !tqt_xim_style && i < styles->count_styles; i++ ) {
+		if ( styles->supported_styles[i] == tqt_xim_preferred_style ) {
+		    tqt_xim_style = tqt_xim_preferred_style;
 		    break;
 		}
 	    }
 	    // if the preferred input style couldn't be found, look for
 	    // Nothing
-	    for ( i = 0; !qt_xim_style && i < styles->count_styles; i++ ) {
+	    for ( i = 0; !tqt_xim_style && i < styles->count_styles; i++ ) {
 		if ( styles->supported_styles[i] == (XIMPreeditNothing |
 						     XIMStatusNothing) ) {
-		    qt_xim_style = XIMPreeditNothing | XIMStatusNothing;
+		    tqt_xim_style = XIMPreeditNothing | XIMStatusNothing;
 		    break;
 		}
 	    }
 	    // ... and failing that, None.
-	    for ( i = 0; !qt_xim_style && i < styles->count_styles; i++ ) {
+	    for ( i = 0; !tqt_xim_style && i < styles->count_styles; i++ ) {
 		if ( styles->supported_styles[i] == (XIMPreeditNone |
 						     XIMStatusNone) ) {
-		    qt_xim_style = XIMPreeditNone | XIMStatusNone;
+		    tqt_xim_style = XIMPreeditNone | XIMStatusNone;
 		    break;
 		}
 	    }
 
-	    // tqDebug("TQApplication: using im style %lx", qt_xim_style);
+	    // tqDebug("TQApplication: using im style %lx", tqt_xim_style);
 	    XFree( (char *)styles );
 	}
 
-	if ( qt_xim_style ) {
+	if ( tqt_xim_style ) {
 
 #ifdef USE_X11R6_XIM
 	    XUnregisterIMInstantiateCallback(appDpy, 0, 0, 0,
@@ -587,10 +587,10 @@ void TQXIMInputContext::close_xim()
     TQString errMsg( "TQXIMInputContext::close_xim() has been called" );
 
     // Calling XCloseIM gives a Purify FMR error
-    // XCloseIM( qt_xim );
+    // XCloseIM( tqt_xim );
     // We prefer a less serious memory leak
 
-    qt_xim = 0;
+    tqt_xim = 0;
     if( ximContextList ) {
 	TQPtrList<TQXIMInputContext> contexts( *ximContextList );
 	TQPtrList<TQXIMInputContext>::Iterator it = contexts.begin();
@@ -609,12 +609,12 @@ bool TQXIMInputContext::x11FilterEvent( TQWidget *keywidget, XEvent *event )
 #ifndef TQT_NO_XIM
     int xkey_keycode = event->xkey.keycode;
     if ( XFilterEvent( event, keywidget->topLevelWidget()->winId() ) ) {
-	qt_ximComposingKeycode = xkey_keycode; // ### not documented in xlib
+	tqt_ximComposingKeycode = xkey_keycode; // ### not documented in xlib
 
 	// Cancel of the composition is realizable even if
 	// follwing codes don't exist
 #if 0
-	if ( event->type != XKeyPress || ! (qt_xim_style & XIMPreeditCallbacks) )
+	if ( event->type != XKeyPress || ! (tqt_xim_style & XIMPreeditCallbacks) )
 	    return true;
 
 	/*
@@ -684,9 +684,9 @@ bool TQXIMInputContext::x11FilterEvent( TQWidget *keywidget, XEvent *event )
 	    TQString inputText;
 	    int count = lookupString( &(event->xkey), data, &sym, &status );
 	    if ( count > 0 )
-	        inputText = qt_input_mapper->toUnicode( data, count );
+	        inputText = tqt_input_mapper->toUnicode( data, count );
 
-	    if ( ! ( qt_xim_style & XIMPreeditCallbacks ) || ! isComposing() ) {
+	    if ( ! ( tqt_xim_style & XIMPreeditCallbacks ) || ! isComposing() ) {
 		// there is no composing state
 		sendIMEvent( TQEvent::IMStart );
 	    }
@@ -759,7 +759,7 @@ bool TQXIMInputContext::hasFocus() const
 void TQXIMInputContext::setMicroFocus(int x, int y, int, int h, TQFont *f)
 {
     TQWidget *widget = focusWidget();
-    if ( qt_xim && widget ) {
+    if ( tqt_xim && widget ) {
 	TQPoint p( x, y );
 	TQPoint p2 = widget->mapTo( widget->topLevelWidget(), TQPoint( 0, 0 ) );
 	p = widget->topLevelWidget()->mapFromGlobal( p );
@@ -789,7 +789,7 @@ void TQXIMInputContext::mouseHandler( int , TQEvent::Type type,
 void TQXIMInputContext::setComposePosition(int x, int y)
 {
 #if !defined(TQT_NO_XIM)
-    if (qt_xim && ic) {
+    if (tqt_xim && ic) {
 	XPoint point;
 	point.x = x;
 	point.y = y;
@@ -809,7 +809,7 @@ void TQXIMInputContext::setComposePosition(int x, int y)
 void TQXIMInputContext::setComposeArea(int x, int y, int w, int h)
 {
 #if !defined(TQT_NO_XIM)
-    if (qt_xim && ic) {
+    if (tqt_xim && ic) {
 	XRectangle rect;
 	rect.x = x;
 	rect.y = y;
@@ -852,7 +852,7 @@ int TQXIMInputContext::lookupString(XKeyEvent *event, TQCString &chars,
     int count = 0;
 
 #if !defined(TQT_NO_XIM)
-    if (qt_xim && ic) {
+    if (tqt_xim && ic) {
 	count = XmbLookupString((XIC) ic, event, chars.data(),
 				chars.size(), key, status);
 
@@ -871,7 +871,7 @@ int TQXIMInputContext::lookupString(XKeyEvent *event, TQCString &chars,
 void TQXIMInputContext::setFocus()
 {
 #if !defined(TQT_NO_XIM)
-    if ( qt_xim && ic )
+    if ( tqt_xim && ic )
 	XSetICFocus((XIC) ic);
 #endif // !TQT_NO_XIM
 }
@@ -879,7 +879,7 @@ void TQXIMInputContext::setFocus()
 void TQXIMInputContext::unsetFocus()
 {
 #if !defined(TQT_NO_XIM)
-    if (qt_xim && ic)
+    if (tqt_xim && ic)
 	XUnsetICFocus((XIC) ic);
 #endif // !TQT_NO_XIM
 
@@ -915,8 +915,8 @@ TQString TQXIMInputContext::identifierName()
 TQString TQXIMInputContext::language()
 {
 #if !defined(TQT_NO_XIM)
-    if ( qt_xim ) {
-	TQString locale( XLocaleOfIM( qt_xim ) );
+    if ( tqt_xim ) {
+	TQString locale( XLocaleOfIM( tqt_xim ) );
 
 	if ( locale.startsWith( "zh" ) ) {
 	    // Chinese language should be formed as "zh_CN", "zh_TW", "zh_HK"
diff --git a/src/dialogs/tqfiledialog.cpp b/src/dialogs/tqfiledialog.cpp
index 36cf6069..472dd8f4 100644
--- a/src/dialogs/tqfiledialog.cpp
+++ b/src/dialogs/tqfiledialog.cpp
@@ -2670,7 +2670,7 @@ void TQFileDialog::init()
 
     d->previewContents = new TQToolButton( this, "preview info view" );
 #if defined(TQ_WS_WIN) && !defined(Q_OS_TEMP)
-    if ( (qt_winver & WV_NT_based) > TQt::WV_NT )
+    if ( (tqt_winver & WV_NT_based) > TQt::WV_NT )
 #else
     if ( !qstrcmp(style().className(), "TQWindowsStyle") )
 #endif
diff --git a/src/kernel/tqapplication.cpp b/src/kernel/tqapplication.cpp
index 6f9e2872..1564b18a 100644
--- a/src/kernel/tqapplication.cpp
+++ b/src/kernel/tqapplication.cpp
@@ -1263,8 +1263,8 @@ TQApplication::~TQApplication()
 #endif
 
 #ifndef TQT_NO_DRAGANDDROP
-    extern TQDragManager *qt_dnd_manager;
-    delete qt_dnd_manager;
+    extern TQDragManager *tqt_dnd_manager;
+    delete tqt_dnd_manager;
 #endif
 
     tqt_cleanup();
@@ -1397,7 +1397,7 @@ TQApplication::~TQApplication()
 
 #ifndef TQT_NO_STYLE
 
-static TQString *qt_style_override = 0;
+static TQString *tqt_style_override = 0;
 
 /*!
   Returns the application's style object.
@@ -1413,17 +1413,17 @@ TQStyle& TQApplication::style()
 	tqFatal( "No style available in non-gui applications!" );
 
 #if defined(TQ_WS_X11)
-    if(!qt_style_override)
+    if(!tqt_style_override)
 	x11_initialize_style(); // run-time search for default style
 #endif
     if ( !app_style ) {
 	// Compile-time search for default style
 	//
 	TQString style;
-	if ( qt_style_override ) {
-	    style = *qt_style_override;
-	    delete qt_style_override;
-	    qt_style_override = 0;
+	if ( tqt_style_override ) {
+	    style = *tqt_style_override;
+	    delete tqt_style_override;
+	    tqt_style_override = 0;
 	} else {
 #  if defined(TQ_WS_WIN) && defined(Q_OS_TEMP)
 	    style = "PocketPC";
@@ -1577,10 +1577,10 @@ TQStyle* TQApplication::setStyle( const TQString& style )
 #endif // TQ_WS_X11
 
     if ( startingUp() ) {
-	if(qt_style_override)
-	    *qt_style_override = style;
+	if(tqt_style_override)
+	    *tqt_style_override = style;
 	else
-	    qt_style_override = new TQString(style);
+	    tqt_style_override = new TQString(style);
 	return 0;
     }
     TQStyle *s = TQStyleFactory::create( style );
@@ -3212,13 +3212,13 @@ void TQApplication::syncX()	{}		// do nothing
 #if defined(Q_OS_CYGWIN)
 TQt::WindowsVersion TQApplication::winVersion()
 {
-    return qt_winver;
+    return tqt_winver;
 }
 #endif
 
 #ifndef TQT_NO_TRANSLATION
 
-bool qt_detectRTLLanguage()
+bool tqt_detectRTLLanguage()
 {
     return TQApplication::tr( "QT_LAYOUT_DIRECTION",
 	    "Translate this string to the string 'LTR' in left-to-right"
@@ -3253,7 +3253,7 @@ void TQApplication::installTranslator( TQTranslator * mf )
 #endif
 
     // hook to set the layout direction of dialogs
-    setReverseLayout( qt_detectRTLLanguage() );
+    setReverseLayout( tqt_detectRTLLanguage() );
 
     TQWidgetList *list = topLevelWidgets();
     TQWidgetListIt it( *list );
@@ -3280,7 +3280,7 @@ void TQApplication::removeTranslator( TQTranslator * mf )
 	return;
 
     if ( translators->remove( mf ) && ! tqApp->closingDown() ) {
-	setReverseLayout( qt_detectRTLLanguage() );
+	setReverseLayout( tqt_detectRTLLanguage() );
 
 	TQWidgetList *list = topLevelWidgets();
 	TQWidgetListIt it( *list );
@@ -4860,11 +4860,11 @@ public:
     TQSessionManager::RestartHint restartHint;
 };
 
-TQSessionManager* qt_session_manager_self = 0;
+TQSessionManager* tqt_session_manager_self = 0;
 TQSessionManager::TQSessionManager( TQApplication * app, TQString &id, TQString &key )
-    : TQObject( app, "qt_sessionmanager" )
+    : TQObject( app, "tqt_sessionmanager" )
 {
-    qt_session_manager_self = this;
+    tqt_session_manager_self = this;
     d = new TQSessionManagerData;
 #if defined(TQ_WS_WIN) && !defined(Q_OS_TEMP)
     wchar_t guidstr[40];
@@ -4884,7 +4884,7 @@ TQSessionManager::TQSessionManager( TQApplication * app, TQString &id, TQString
 TQSessionManager::~TQSessionManager()
 {
     delete d;
-    qt_session_manager_self = 0;
+    tqt_session_manager_self = 0;
 }
 
 TQString TQSessionManager::sessionId() const
diff --git a/src/kernel/tqapplication.h b/src/kernel/tqapplication.h
index 0d375c1e..ef105077 100644
--- a/src/kernel/tqapplication.h
+++ b/src/kernel/tqapplication.h
@@ -317,14 +317,14 @@ private:
     bool do_mouse_down(Point *, bool *);
     static TQMAC_PASCAL OSStatus globalEventProcessor(EventHandlerCallRef,  EventRef, void *);
     static TQMAC_PASCAL OSStatus globalAppleEventProcessor(const AppleEvent *, AppleEvent *, long);
-    static TQMAC_PASCAL void qt_context_timer_callbk(EventLoopTimerRef, void *);
-    static TQMAC_PASCAL void qt_select_timer_callbk(EventLoopTimerRef, void *);
-    static bool qt_mac_apply_settings();
+    static TQMAC_PASCAL void tqt_context_timer_callbk(EventLoopTimerRef, void *);
+    static TQMAC_PASCAL void tqt_select_timer_callbk(EventLoopTimerRef, void *);
+    static bool tqt_mac_apply_settings();
     friend class TQMacInputMethod;
-    friend TQMAC_PASCAL OSStatus qt_window_event(EventHandlerCallRef, EventRef, void *);
-    friend void qt_mac_update_os_settings();
-    friend bool qt_set_socket_handler( int, int, TQObject *, bool);
-    friend void qt_mac_destroy_widget(TQWidget *);
+    friend TQMAC_PASCAL OSStatus tqt_window_event(EventHandlerCallRef, EventRef, void *);
+    friend void tqt_mac_update_os_settings();
+    friend bool tqt_set_socket_handler( int, int, TQObject *, bool);
+    friend void tqt_mac_destroy_widget(TQWidget *);
     friend void tqt_init(int *, char **, TQApplication::Type);
 #endif
 
@@ -423,7 +423,7 @@ private:
     friend class TQEventLoop;
     friend TQ_EXPORT void tqt_ucm_initialize( TQApplication * );
 #if defined(TQ_WS_WIN)
-    friend bool qt_sendSpontaneousEvent( TQObject*, TQEvent* );
+    friend bool tqt_sendSpontaneousEvent( TQObject*, TQEvent* );
 #endif
 private: // Disabled copy constructor and operator=
 #if defined(TQ_DISABLE_COPY)
diff --git a/src/kernel/tqapplication_p.h b/src/kernel/tqapplication_p.h
index 742870dc..3ba8b084 100644
--- a/src/kernel/tqapplication_p.h
+++ b/src/kernel/tqapplication_p.h
@@ -75,17 +75,17 @@ extern TQClipboard *tqt_clipboard;
 #endif
 
 #if defined (Q_OS_WIN32) || defined (Q_OS_CYGWIN)
-extern TQt::WindowsVersion qt_winver;
+extern TQt::WindowsVersion tqt_winver;
 const int QT_TABLET_NPACKETQSIZE = 128;
 # ifdef Q_OS_TEMP
-  extern DWORD qt_cever;
+  extern DWORD tqt_cever;
 # endif
 #elif defined (Q_OS_MAC)
-extern TQt::MacintoshVersion qt_macver;
+extern TQt::MacintoshVersion tqt_macver;
 #endif
 
 #if defined (TQ_WS_X11)
-extern int qt_ncols_option;
+extern int tqt_ncols_option;
 #endif
 
 
diff --git a/src/kernel/tqapplication_x11.cpp b/src/kernel/tqapplication_x11.cpp
index e43d3654..518f5d2f 100644
--- a/src/kernel/tqapplication_x11.cpp
+++ b/src/kernel/tqapplication_x11.cpp
@@ -192,7 +192,7 @@ static const char *appBTNCol	= 0;		// application btn color
 static const char *mwGeometry	= 0;		// main widget geometry
 static const char *mwTitle	= 0;		// main widget title
 //Ming-Che 10/10
-TQ_EXPORT char    *qt_ximServer	= 0;		// XIM Server will connect to
+TQ_EXPORT char    *tqt_ximServer	= 0;		// XIM Server will connect to
 static bool	mwIconic	= false;	// main widget iconified
 //Ming-Che 10/10
 static Display *appDpy		= 0;		// X11 application display
@@ -218,36 +218,36 @@ TQ_EXPORT Atom	tqt_wm_protocols	= 0;	// window manager protocols
 TQ_EXPORT Atom	tqt_wm_delete_window	= 0;	// delete window protocol
 TQ_EXPORT Atom	tqt_wm_take_focus	= 0;	// take focus window protocol
 
-Atom		qt_qt_scrolldone	= 0;	// scroll synchronization
+Atom		tqt_scrolldone	= 0;	// scroll synchronization
 Atom		tqt_net_wm_context_help	= 0;	// context help
 Atom		tqt_net_wm_ping		= 0;	// _NET_WM_PING protocol
 
-static Atom	qt_xsetroot_id		= 0;
-Atom            qt_xa_clipboard         = 0;
-Atom		qt_selection_property	= 0;
+static Atom	tqt_xsetroot_id		= 0;
+Atom            tqt_xa_clipboard         = 0;
+Atom		tqt_selection_property	= 0;
 Atom            tqt_clipboard_sentinel  = 0;
-Atom		qt_selection_sentinel	= 0;
+Atom		tqt_selection_sentinel	= 0;
 TQ_EXPORT Atom	tqt_wm_state		= 0;
-Atom		qt_wm_change_state	= 0;
-static Atom     qt_settings_timestamp	= 0;    // TQt >=3 settings timestamp
-static Atom	qt_input_encoding	= 0;	// TQt desktop properties
-static Atom	qt_resource_manager	= 0;	// X11 Resource manager
-Atom		qt_sizegrip		= 0;	// sizegrip
-Atom		qt_wm_client_leader	= 0;
+Atom		tqt_wm_change_state	= 0;
+static Atom     tqt_settings_timestamp	= 0;    // TQt >=3 settings timestamp
+static Atom	tqt_input_encoding	= 0;	// TQt desktop properties
+static Atom	tqt_resource_manager	= 0;	// X11 Resource manager
+Atom		tqt_sizegrip		= 0;	// sizegrip
+Atom		tqt_wm_client_leader	= 0;
 TQ_EXPORT Atom	tqt_window_role		= 0;
 TQ_EXPORT Atom	tqt_sm_client_id		= 0;
-Atom		qt_xa_motif_wm_hints	= 0;
-Atom		qt_cde_running		= 0;
-Atom		qt_twin_running	= 0;
-Atom		qt_kwm_running	= 0;
-Atom		qt_gbackground_properties	= 0;
-Atom		qt_x_incr		= 0;
-Atom		qt_utf8_string = 0;
+Atom		tqt_xa_motif_wm_hints	= 0;
+Atom		tqt_cde_running		= 0;
+Atom		tqt_twin_running	= 0;
+Atom		tqt_kwm_running	= 0;
+Atom		tqt_gbackground_properties	= 0;
+Atom		tqt_x_incr		= 0;
+Atom		tqt_utf8_string = 0;
 
 // detect broken window managers
-Atom            qt_sgi_desks_manager    = 0;
-bool		qt_broken_wm		= false;
-static void qt_detect_broken_window_manager();
+Atom            tqt_sgi_desks_manager    = 0;
+bool		tqt_broken_wm		= false;
+static void tqt_detect_broken_window_manager();
 
 // NET WM support
 Atom		tqt_net_supported	= 0;
@@ -293,7 +293,7 @@ Atom		tqt_net_wm_pid		= 0;
 Atom		tqt_net_wm_user_time	= 0;
 Atom            tqt_net_wm_full_placement = 0; // KDE extension
 // Enlightenment support
-Atom		qt_enlightenment_desktop	= 0;
+Atom		tqt_enlightenment_desktop	= 0;
 
 // window managers list of supported "stuff"
 Atom		*tqt_net_supported_list	= 0;
@@ -308,7 +308,7 @@ Atom		tqt_net_wm_sync_request     	= 0;
 #endif
 
 // client leader window
-Window qt_x11_wm_client_leader = 0;
+Window tqt_x11_wm_client_leader = 0;
 
 // function to update the workarea of the screen - in tqdesktopwidget_x11.cpp
 extern void tqt_desktopwidget_update_workarea();
@@ -317,12 +317,12 @@ extern void tqt_desktopwidget_update_workarea();
 static const int FocusModel_Unknown = -1;
 static const int FocusModel_Other = 0;
 static const int FocusModel_PointerRoot = 1;
-static int qt_focus_model = -1;
+static int tqt_focus_model = -1;
 
 #ifndef TQT_NO_XRANDR
 // true if TQt is compiled w/ XRandR support and XRandR exists on the connected
 // Display
-bool	qt_use_xrandr	= false;
+bool	tqt_use_xrandr	= false;
 static int xrandr_eventbase;
 #endif
 
@@ -332,21 +332,21 @@ TQ_EXPORT bool tqt_use_xrender = false;
 
 #ifndef TQT_NO_XSYNC
 // True if SYNC extension exists on the connected display
-bool qt_use_xsync = false;
+bool tqt_use_xsync = false;
 static int xsync_eventbase;
 static int xsync_errorbase;
 #endif
 
 // modifier masks for alt/meta - detected when the application starts
-static long qt_alt_mask = 0;
-static long qt_meta_mask = 0;
+static long tqt_alt_mask = 0;
+static long tqt_meta_mask = 0;
 // modifier mask to remove mode switch from modifiers that have alt/meta set
 // this problem manifests itself on some systems, and without it
 // modifiers do not work at all...
-static long qt_mode_switch_remove_mask = 0;
+static long tqt_mode_switch_remove_mask = 0;
 
 // flags for extensions for special Languages, currently only for RTL languages
-static bool 	qt_use_rtl_extensions = false;
+static bool 	tqt_use_rtl_extensions = false;
 TQ_EXPORT bool tqt_hebrew_keyboard_hack = false;
 
 static Window	mouseActWindow	     = 0;	// window where mouse is
@@ -368,7 +368,7 @@ static bool	    popupGrabOk;
 
 static bool sm_blockUserInput = false;		// session management
 
-int qt_xfocusout_grab_counter = 0;
+int tqt_xfocusout_grab_counter = 0;
 
 #if defined (QT_TABLET_SUPPORT)
 // since XInput event classes aren't created until we actually open an XInput
@@ -381,8 +381,8 @@ XDevice *devEraser = NULL;
 XEventClass event_list_stylus[TOTAL_XINPUT_EVENTS];
 XEventClass event_list_eraser[TOTAL_XINPUT_EVENTS];
 
-int qt_curr_events_stylus = 0;
-int qt_curr_events_eraser = 0;
+int tqt_curr_events_stylus = 0;
+int tqt_curr_events_eraser = 0;
 
 // well, luckily we only need to do this once.
 static int xinput_motion = INVALID_EVENT;
@@ -405,16 +405,16 @@ static uint appliedstamp = 0;
 typedef int (*QX11EventFilter) (XEvent*);
 QX11EventFilter tqt_set_x11_event_filter(QX11EventFilter filter);
 
-static QX11EventFilter qt_x11_event_filter = 0;
+static QX11EventFilter tqt_x11_event_filter = 0;
 TQ_EXPORT QX11EventFilter tqt_set_x11_event_filter(QX11EventFilter filter)
 {
-    QX11EventFilter old_filter = qt_x11_event_filter;
-    qt_x11_event_filter = filter;
+    QX11EventFilter old_filter = tqt_x11_event_filter;
+    tqt_x11_event_filter = filter;
     return old_filter;
 }
-static bool qt_x11EventFilter( XEvent* ev )
+static bool tqt_x11EventFilter( XEvent* ev )
 {
-    if ( qt_x11_event_filter  && qt_x11_event_filter( ev )  )
+    if ( tqt_x11_event_filter  && tqt_x11_event_filter( ev )  )
 	return true;
     return tqApp->x11EventFilter( ev );
 }
@@ -424,14 +424,14 @@ static bool qt_x11EventFilter( XEvent* ev )
 
 
 #if !defined(TQT_NO_XIM)
-//XIM		qt_xim			= 0;
-TQ_EXPORT XIMStyle	qt_xim_style		= 0;
-TQ_EXPORT XIMStyle	qt_xim_preferred_style	= 0;
+//XIM		tqt_xim			= 0;
+TQ_EXPORT XIMStyle	tqt_xim_style		= 0;
+TQ_EXPORT XIMStyle	tqt_xim_preferred_style	= 0;
 static XIMStyle xim_default_style	= XIMPreeditCallbacks | XIMStatusNothing;
 #endif
 
-TQ_EXPORT int qt_ximComposingKeycode=0;
-TQ_EXPORT TQTextCodec * qt_input_mapper = 0;
+TQ_EXPORT int tqt_ximComposingKeycode=0;
+TQ_EXPORT TQTextCodec * tqt_input_mapper = 0;
 
 TQ_EXPORT Time	tqt_x_time = CurrentTime;
 TQ_EXPORT Time	tqt_x_user_time = CurrentTime;
@@ -456,16 +456,16 @@ unsigned long get_tqt_x_user_time(void)
 	return tqt_x_user_time;
 }
 
-extern bool     qt_check_clipboard_sentinel(); //def in tqclipboard_x11.cpp
-extern bool	qt_check_selection_sentinel(); //def in tqclipboard_x11.cpp
+extern bool     tqt_check_clipboard_sentinel(); //def in tqclipboard_x11.cpp
+extern bool	tqt_check_selection_sentinel(); //def in tqclipboard_x11.cpp
 
-static void	qt_save_rootinfo();
+static void	tqt_save_rootinfo();
 bool	tqt_try_modal( TQWidget *, XEvent * );
 
-int		qt_ncols_option  = 216;		// used in tqcolor_x11.cpp
-int		qt_visual_option = -1;
-bool		qt_cmap_option	 = false;
-TQWidget	       *qt_button_down	 = 0;		// widget got last button-down
+int		tqt_ncols_option  = 216;		// used in tqcolor_x11.cpp
+int		tqt_visual_option = -1;
+bool		tqt_cmap_option	 = false;
+TQWidget	       *tqt_button_down	 = 0;		// widget got last button-down
 
 extern bool tqt_tryAccelEvent( TQWidget*, TQKeyEvent* ); // def in tqaccel.cpp
 
@@ -483,72 +483,72 @@ static TQPtrList<TQScrollInProgress> *sip_list = 0;
 
 // stuff in tqdnd_x11.cpp
 // setup
-extern void qt_xdnd_setup();
+extern void tqt_xdnd_setup();
 // x event handling
-extern void qt_handle_xdnd_enter( TQWidget *, const XEvent *, bool );
-extern void qt_handle_xdnd_position( TQWidget *, const XEvent *, bool );
-extern void qt_handle_xdnd_status( TQWidget *, const XEvent *, bool );
-extern void qt_handle_xdnd_leave( TQWidget *, const XEvent *, bool );
-extern void qt_handle_xdnd_drop( TQWidget *, const XEvent *, bool );
-extern void qt_handle_xdnd_finished( TQWidget *, const XEvent *, bool );
-extern void qt_xdnd_handle_selection_request( const XSelectionRequestEvent * );
-extern bool qt_xdnd_handle_badwindow();
-
-extern void qt_motifdnd_handle_msg( TQWidget *, const XEvent *, bool );
-extern void qt_x11_motifdnd_init();
+extern void tqt_handle_xdnd_enter( TQWidget *, const XEvent *, bool );
+extern void tqt_handle_xdnd_position( TQWidget *, const XEvent *, bool );
+extern void tqt_handle_xdnd_status( TQWidget *, const XEvent *, bool );
+extern void tqt_handle_xdnd_leave( TQWidget *, const XEvent *, bool );
+extern void tqt_handle_xdnd_drop( TQWidget *, const XEvent *, bool );
+extern void tqt_handle_xdnd_finished( TQWidget *, const XEvent *, bool );
+extern void tqt_xdnd_handle_selection_request( const XSelectionRequestEvent * );
+extern bool tqt_xdnd_handle_badwindow();
+
+extern void tqt_motifdnd_handle_msg( TQWidget *, const XEvent *, bool );
+extern void tqt_x11_motifdnd_init();
 
 // client message atoms
-extern Atom qt_xdnd_enter;
-extern Atom qt_xdnd_position;
-extern Atom qt_xdnd_status;
-extern Atom qt_xdnd_leave;
-extern Atom qt_xdnd_drop;
-extern Atom qt_xdnd_finished;
+extern Atom tqt_xdnd_enter;
+extern Atom tqt_xdnd_position;
+extern Atom tqt_xdnd_status;
+extern Atom tqt_xdnd_leave;
+extern Atom tqt_xdnd_drop;
+extern Atom tqt_xdnd_finished;
 // xdnd selection atom
-extern Atom qt_xdnd_selection;
-extern bool qt_xdnd_dragging;
+extern Atom tqt_xdnd_selection;
+extern bool tqt_xdnd_dragging;
 
 // gui or non-gui from tqapplication.cpp
 extern bool tqt_is_gui_used;
 extern bool tqt_app_has_font;
 
-static bool qt_x11_cmdline_font = false;
+static bool tqt_x11_cmdline_font = false;
 
 
 extern bool tqt_resolve_symlinks; // from tqapplication.cpp
 
 // Paint event clipping magic
-extern void qt_set_paintevent_clipping( TQPaintDevice* dev, const TQRegion& region);
-extern void qt_clear_paintevent_clipping();
+extern void tqt_set_paintevent_clipping( TQPaintDevice* dev, const TQRegion& region);
+extern void tqt_clear_paintevent_clipping();
 
 
 // Palette handling
 extern TQPalette *tqt_std_pal;
 extern void tqt_create_std_palette();
 
-void qt_x11_intern_atom( const char *, Atom * );
+void tqt_x11_intern_atom( const char *, Atom * );
 
 static TQPtrList<TQWidget>* deferred_map_list = 0;
-static void qt_deferred_map_cleanup()
+static void tqt_deferred_map_cleanup()
 {
     delete deferred_map_list;
     deferred_map_list = 0;
 }
-void qt_deferred_map_add( TQWidget* w)
+void tqt_deferred_map_add( TQWidget* w)
 {
     if ( !deferred_map_list ) {
 	deferred_map_list = new TQPtrList<TQWidget>;
-	tqAddPostRoutine( qt_deferred_map_cleanup );
+	tqAddPostRoutine( tqt_deferred_map_cleanup );
     }
     deferred_map_list->append( w );
 }
-void qt_deferred_map_take( TQWidget* w )
+void tqt_deferred_map_take( TQWidget* w )
 {
     if (deferred_map_list ) {
 	deferred_map_list->remove( w );
     }
 }
-bool qt_deferred_map_contains( TQWidget* w )
+bool tqt_deferred_map_contains( TQWidget* w )
 {
     if (!deferred_map_list)
 	return false;
@@ -694,8 +694,8 @@ TQString TQApplication::defaultInputMethod()
 void TQApplication::create_im()
 {
 #ifndef TQT_NO_XIM
-    if ( ! qt_xim_preferred_style ) // no configured input style, use the default
-	qt_xim_preferred_style = xim_default_style;
+    if ( ! tqt_xim_preferred_style ) // no configured input style, use the default
+	tqt_xim_preferred_style = xim_default_style;
 #endif // TQT_NO_XIM
 }
 
@@ -722,8 +722,8 @@ void TQApplication::close_im()
 void TQApplication::create_xim()
 {
 #ifndef TQT_NO_XIM
-    if ( ! qt_xim_preferred_style ) // no configured input style, use the default
-	qt_xim_preferred_style = xim_default_style;
+    if ( ! tqt_xim_preferred_style ) // no configured input style, use the default
+	tqt_xim_preferred_style = xim_default_style;
 #endif // TQT_NO_XIM
 
     TQWidgetList *list= tqApp->topLevelWidgets();
@@ -744,11 +744,11 @@ void TQApplication::close_xim()
 {
 #ifndef TQT_NO_XIM
     // Calling XCloseIM gives a Purify FMR error
-    // XCloseIM( qt_xim );
+    // XCloseIM( tqt_xim );
     // We prefer a less serious memory leak
 
-    // if ( qt_xim )
-    // 	qt_xim = 0;
+    // if ( tqt_xim )
+    // 	tqt_xim = 0;
 
 #endif // TQT_NO_XIM
     TQWidgetList *list = tqApp->topLevelWidgets();
@@ -773,7 +773,7 @@ static bool x11_ignore_badwindow;
 static bool x11_badwindow;
 
     // starts to ignore bad window errors from X
-void qt_ignore_badwindow()
+void tqt_ignore_badwindow()
 {
     x11_ignore_badwindow = true;
     x11_badwindow = false;
@@ -781,7 +781,7 @@ void qt_ignore_badwindow()
 
     // ends ignoring bad window errors and returns whether an error
     // had happen.
-bool qt_badwindow()
+bool tqt_badwindow()
 {
     x11_ignore_badwindow = false;
     return x11_badwindow;
@@ -790,12 +790,12 @@ bool qt_badwindow()
 static int (*original_x_errhandler)( Display *dpy, XErrorEvent * );
 static int (*original_xio_errhandler)( Display *dpy );
 
-static int qt_x_errhandler( Display *dpy, XErrorEvent *err )
+static int tqt_x_errhandler( Display *dpy, XErrorEvent *err )
 {
     if ( err->error_code == BadWindow ) {
 	x11_badwindow = true;
 	if ( err->request_code == 25 /* X_SendEvent */ &&
-	     qt_xdnd_handle_badwindow() )
+	     tqt_xdnd_handle_badwindow() )
 	    return 0;
 	if ( x11_ignore_badwindow )
 	    return 0;
@@ -822,7 +822,7 @@ static int qt_x_errhandler( Display *dpy, XErrorEvent *err )
 }
 
 
-static int qt_xio_errhandler( Display * )
+static int tqt_xio_errhandler( Display * )
 {
     tqWarning( "%s: Fatal IO error: client killed", appName );
     tqApp = 0;
@@ -843,7 +843,7 @@ static TQAsciiDict<Atom> *atoms_to_be_created = 0;
 static bool create_atoms_now = 0;
 
 /*****************************************************************************
-  qt_x11_intern_atom() - efficiently interns an atom, now or later.
+  tqt_x11_intern_atom() - efficiently interns an atom, now or later.
 
   If the application is being initialized, this function stores the
   adddress of the atom and tqt_init_internal will do the actual work
@@ -852,7 +852,7 @@ static bool create_atoms_now = 0;
   Neither argument may point to temporary variables.
  *****************************************************************************/
 
-void qt_x11_intern_atom( const char *name, Atom *result)
+void tqt_x11_intern_atom( const char *name, Atom *result)
 {
     if ( !name || !result || *result )
 	return;
@@ -932,7 +932,7 @@ bool TQApplication::x11_apply_settings()
     bool update_timestamp = false;
 
     if (XGetWindowProperty(appDpy, TQPaintDevice::x11AppRootWindow( 0 ),
-			   qt_settings_timestamp, 0, 0,
+			   tqt_settings_timestamp, 0, 0,
 			   False, AnyPropertyType, &type, &format, &nitems,
 			   &after, &data) == Success && format == 8) {
 	if (data)
@@ -943,7 +943,7 @@ bool TQApplication::x11_apply_settings()
 
 	while (after > 0) {
 	    XGetWindowProperty(appDpy, TQPaintDevice::x11AppRootWindow( 0 ),
-			       qt_settings_timestamp,
+			       tqt_settings_timestamp,
 			       offset, 1024, False, AnyPropertyType,
 			       &type, &format, &nitems, &after, &data);
 	    if (format == 8) {
@@ -1024,7 +1024,7 @@ bool TQApplication::x11_apply_settings()
     }
 
     TQFont font(TQApplication::font());
-    if ( !tqt_app_has_font && !qt_x11_cmdline_font ) {
+    if ( !tqt_app_has_font && !tqt_x11_cmdline_font ) {
         // read new font
         str = settings.readEntry("/qt/font");
         if (! str.isNull() && ! str.isEmpty()) {
@@ -1120,28 +1120,28 @@ bool TQApplication::x11_apply_settings()
 	}
     }
 
-    qt_broken_wm =
-	settings.readBoolEntry("/qt/brokenWindowManager", qt_broken_wm);
+    tqt_broken_wm =
+	settings.readBoolEntry("/qt/brokenWindowManager", tqt_broken_wm);
 
     tqt_resolve_symlinks =
 	settings.readBoolEntry("/qt/resolveSymlinks", true);
 
-    qt_use_rtl_extensions =
+    tqt_use_rtl_extensions =
     	settings.readBoolEntry("/qt/useRtlExtensions", false);
 
 #ifndef TQT_NO_XIM
-    if (qt_xim_preferred_style == 0) {
+    if (tqt_xim_preferred_style == 0) {
         TQString ximInputStyle =
             settings.readEntry( "/qt/XIMInputStyle",
                                 TQString::fromLatin1( "On The Spot" ) ).lower();
         if ( ximInputStyle == "over the spot" )
-            qt_xim_preferred_style = XIMPreeditPosition | XIMStatusNothing;
+            tqt_xim_preferred_style = XIMPreeditPosition | XIMStatusNothing;
         else if ( ximInputStyle == "off the spot" )
-            qt_xim_preferred_style = XIMPreeditArea | XIMStatusArea;
+            tqt_xim_preferred_style = XIMPreeditArea | XIMStatusArea;
         else if ( ximInputStyle == "root" )
-            qt_xim_preferred_style = XIMPreeditNothing | XIMStatusNothing;
+            tqt_xim_preferred_style = XIMPreeditNothing | XIMStatusNothing;
         else // ximInputStyle == "on the spot" or others
-            qt_xim_preferred_style = XIMPreeditCallbacks | XIMStatusNothing;
+            tqt_xim_preferred_style = XIMPreeditCallbacks | XIMStatusNothing;
     }
 #endif
 
@@ -1173,7 +1173,7 @@ bool TQApplication::x11_apply_settings()
 	s << settingsstamp;
 
 	XChangeProperty(appDpy, TQPaintDevice::x11AppRootWindow( 0 ),
-			qt_settings_timestamp, qt_settings_timestamp, 8,
+			tqt_settings_timestamp, tqt_settings_timestamp, 8,
 			PropModeReplace, (unsigned char *) stamp.buffer().data(),
 			stamp.buffer().size());
     }
@@ -1184,7 +1184,7 @@ bool TQApplication::x11_apply_settings()
 
 // read the _QT_INPUT_ENCODING property and apply the settings to
 // the application
-static void qt_set_input_encoding()
+static void tqt_set_input_encoding()
 {
     Atom type;
     int format;
@@ -1192,33 +1192,33 @@ static void qt_set_input_encoding()
     const char *data;
 
     int e = XGetWindowProperty( appDpy, TQPaintDevice::x11AppRootWindow(),
-				qt_input_encoding, 0, 1024,
+				tqt_input_encoding, 0, 1024,
 				False, XA_STRING, &type, &format, &nitems,
 				&after,  (unsigned char**)&data );
     if ( e != Success || !nitems || type == None ) {
 	// Always use the locale codec, since we have no examples of non-local
 	// XIMs, and since we cannot get a sensible answer about the encoding
 	// from the XIM.
-	qt_input_mapper = TQTextCodec::codecForLocale();
+	tqt_input_mapper = TQTextCodec::codecForLocale();
 
     } else {
 	if ( !tqstricmp( data, "locale" ) )
-	    qt_input_mapper = TQTextCodec::codecForLocale();
+	    tqt_input_mapper = TQTextCodec::codecForLocale();
 	else
-	    qt_input_mapper = TQTextCodec::codecForName( data );
+	    tqt_input_mapper = TQTextCodec::codecForName( data );
 	// make sure we have an input codec
-	if( !qt_input_mapper )
-	    qt_input_mapper = TQTextCodec::codecForName( "ISO 8859-1" );
+	if( !tqt_input_mapper )
+	    tqt_input_mapper = TQTextCodec::codecForName( "ISO 8859-1" );
     }
-    if ( qt_input_mapper->mibEnum() == 11 ) // 8859-8
-	qt_input_mapper = TQTextCodec::codecForName( "ISO 8859-8-I");
+    if ( tqt_input_mapper->mibEnum() == 11 ) // 8859-8
+	tqt_input_mapper = TQTextCodec::codecForName( "ISO 8859-8-I");
     if( data )
 	XFree( (char *)data );
 }
 
 // set font, foreground and background from x11 resources. The
 // arguments may override the resource settings.
-static void qt_set_x11_resources( const char* font = 0, const char* fg = 0,
+static void tqt_set_x11_resources( const char* font = 0, const char* fg = 0,
 				  const char* bg = 0, const char* button = 0 )
 {
     if ( !tqt_std_pal )
@@ -1244,7 +1244,7 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0,
 	while (after > 0) {
 	    uchar *data;
 	    XGetWindowProperty( appDpy, TQPaintDevice::x11AppRootWindow( 0 ),
-				qt_resource_manager,
+				tqt_resource_manager,
 				offset, 8192, False, AnyPropertyType,
 				&type, &format, &nitems, &after,
 				&data );
@@ -1321,7 +1321,7 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0,
 	resFG = fg;
     if ( resBG.isEmpty() )
 	resBG = bg;
-    if ( (!tqt_app_has_font || qt_x11_cmdline_font) && !resFont.isEmpty() ) { // set application font
+    if ( (!tqt_app_has_font || tqt_x11_cmdline_font) && !resFont.isEmpty() ) { // set application font
         TQFont fnt;
         fnt.setRawName( resFont );
 
@@ -1420,7 +1420,7 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0,
 }
 
 
-static void qt_detect_broken_window_manager()
+static void tqt_detect_broken_window_manager()
 {
     Atom type;
     int format;
@@ -1429,20 +1429,20 @@ static void qt_detect_broken_window_manager()
 
     // look for SGI's 4Dwm
     int e = XGetWindowProperty(appDpy, TQPaintDevice::x11AppRootWindow(),
-                               qt_sgi_desks_manager, 0, 1, False, XA_WINDOW,
+                               tqt_sgi_desks_manager, 0, 1, False, XA_WINDOW,
                                &type, &format, &nitems, &after, &data);
     if (data)
         XFree(data);
 
     if (e == Success && type == XA_WINDOW && format == 32 && nitems == 1 && after == 0) {
         // detected SGI 4Dwm
-        qt_broken_wm = true;
+        tqt_broken_wm = true;
     }
 }
 
 
 // update the supported array
-void qt_get_net_supported()
+void tqt_get_net_supported()
 {
     Atom type;
     int format;
@@ -1510,7 +1510,7 @@ bool tqt_net_supports(Atom atom)
 
 
 // update the virtual roots array
-void qt_get_net_virtual_roots()
+void tqt_get_net_virtual_roots()
 {
     if (tqt_net_virtual_root_list)
 	delete [] tqt_net_virtual_root_list;
@@ -1561,26 +1561,26 @@ void qt_get_net_virtual_roots()
     }
 }
 
-void qt_x11_create_wm_client_leader()
+void tqt_x11_create_wm_client_leader()
 {
-    if ( qt_x11_wm_client_leader ) return;
+    if ( tqt_x11_wm_client_leader ) return;
 
-    qt_x11_wm_client_leader =
+    tqt_x11_wm_client_leader =
 	XCreateSimpleWindow( TQPaintDevice::x11AppDisplay(),
 			     TQPaintDevice::x11AppRootWindow(),
 			     0, 0, 1, 1, 0, 0, 0 );
 
     // set client leader property to itself
     XChangeProperty( TQPaintDevice::x11AppDisplay(),
-		     qt_x11_wm_client_leader, qt_wm_client_leader,
+		     tqt_x11_wm_client_leader, tqt_wm_client_leader,
 		     XA_WINDOW, 32, PropModeReplace,
-		     (unsigned char *)&qt_x11_wm_client_leader, 1 );
+		     (unsigned char *)&tqt_x11_wm_client_leader, 1 );
 
     // If we are session managed, inform the window manager about it
     TQCString session = tqApp->sessionId().latin1();
     if ( !session.isEmpty() ) {
 	XChangeProperty( TQPaintDevice::x11AppDisplay(),
-			 qt_x11_wm_client_leader, tqt_sm_client_id,
+			 tqt_x11_wm_client_leader, tqt_sm_client_id,
 			 XA_STRING, 8, PropModeReplace,
 			 (unsigned char *)session.data(), session.length() );
     }
@@ -1592,15 +1592,15 @@ static void tqt_net_update_user_time(TQWidget *tlw)
 		    32, PropModeReplace, (unsigned char *) &tqt_x_user_time, 1);
 }
 
-static void qt_check_focus_model()
+static void tqt_check_focus_model()
 {
     Window fw = None;
     int unused;
     XGetInputFocus( appDpy, &fw, &unused );
     if ( fw == PointerRoot )
-	qt_focus_model = FocusModel_PointerRoot;
+	tqt_focus_model = FocusModel_PointerRoot;
     else
-	qt_focus_model = FocusModel_Other;
+	tqt_focus_model = FocusModel_Other;
 }
 
 
@@ -1628,7 +1628,7 @@ static Visual *find_truecolor_visual( Display *dpy, int scr, int *depth, int *nc
     }
     Visual *v = DefaultVisual(dpy,scr);
     if ( !vi || (vi[best].visualid == XVisualIDFromVisual(v)) ||
-	 (vi[best].depth <= 8 && qt_visual_option != TrueColor) )
+	 (vi[best].depth <= 8 && tqt_visual_option != TrueColor) )
 	{
 	*depth = DefaultDepth(dpy,scr);
 	*ncols = DisplayCells(dpy,scr);
@@ -1642,7 +1642,7 @@ static Visual *find_truecolor_visual( Display *dpy, int scr, int *depth, int *nc
     return v;
 }
 
-static KeySym qt_x11_keycode_to_keysym(Display *dpy, KeyCode kc) {
+static KeySym tqt_x11_keycode_to_keysym(Display *dpy, KeyCode kc) {
 #ifndef TQT_NO_XKB
 	return XkbKeycodeToKeysym(dpy, kc, 0, 0);
 #else
@@ -1703,8 +1703,8 @@ void tqt_init_internal( int *argcptr, char **argv,
 	appClass = app_class;
 
 	// Install default error handlers
-	original_x_errhandler = XSetErrorHandler( qt_x_errhandler );
-	original_xio_errhandler = XSetIOErrorHandler( qt_xio_errhandler );
+	original_x_errhandler = XSetErrorHandler( tqt_x_errhandler );
+	original_xio_errhandler = XSetIOErrorHandler( tqt_xio_errhandler );
     } else {
 	// TQt controls everything (default)
 
@@ -1712,8 +1712,8 @@ void tqt_init_internal( int *argcptr, char **argv,
 	int j;
 
 	// Install default error handlers
-	original_x_errhandler = XSetErrorHandler( qt_x_errhandler );
-	original_xio_errhandler = XSetIOErrorHandler( qt_xio_errhandler );
+	original_x_errhandler = XSetErrorHandler( tqt_x_errhandler );
+	original_xio_errhandler = XSetIOErrorHandler( tqt_xio_errhandler );
 
 	// Set application name and class
 	char *app_class = 0;
@@ -1740,7 +1740,7 @@ void tqt_init_internal( int *argcptr, char **argv,
 	    } else if ( arg == "-fn" || arg == "-font" ) {
 		if ( ++i < argc ) {
 		    appFont = argv[i];
-		    qt_x11_cmdline_font = true;
+		    tqt_x11_cmdline_font = true;
 		}
 	    } else if ( arg == "-bg" || arg == "-background" ) {
 		if ( ++i < argc )
@@ -1763,17 +1763,17 @@ void tqt_init_internal( int *argcptr, char **argv,
 		//Ming-Che 10/10
 	    } else if ( arg == "-im" ) {
 		if ( ++i < argc )
-		    qt_ximServer = argv[i];
+		    tqt_ximServer = argv[i];
 	    } else if ( arg == "-iconic" ) {
 		mwIconic = !mwIconic;
 	    } else if ( arg == "-ncols" ) {   // xv and netscape use this name
 		if ( ++i < argc )
-		    qt_ncols_option = TQMAX(0,atoi(argv[i]));
+		    tqt_ncols_option = TQMAX(0,atoi(argv[i]));
 	    } else if ( arg == "-visual" ) {  // xv and netscape use this name
 		if ( ++i < argc ) {
 		    TQCString s = TQCString(argv[i]).lower();
 		    if ( s == "truecolor" ) {
-			qt_visual_option = TrueColor;
+			tqt_visual_option = TrueColor;
 		    } else {
 			// ### Should we honor any others?
 		    }
@@ -1783,21 +1783,21 @@ void tqt_init_internal( int *argcptr, char **argv,
 		if ( ++i < argc ) {
 		    TQCString s = TQCString(argv[i]).lower();
 		    if ( s == "onthespot" )
-			qt_xim_preferred_style = XIMPreeditCallbacks |
+			tqt_xim_preferred_style = XIMPreeditCallbacks |
 						 XIMStatusNothing;
 		    else if ( s == "overthespot" )
-			qt_xim_preferred_style = XIMPreeditPosition |
+			tqt_xim_preferred_style = XIMPreeditPosition |
 						 XIMStatusNothing;
 		    else if ( s == "offthespot" )
-			qt_xim_preferred_style = XIMPreeditArea |
+			tqt_xim_preferred_style = XIMPreeditArea |
 						 XIMStatusArea;
 		    else if ( s == "root" )
-			qt_xim_preferred_style = XIMPreeditNothing |
+			tqt_xim_preferred_style = XIMPreeditNothing |
 						 XIMStatusNothing;
 		}
 #endif
 	    } else if ( arg == "-cmap" ) {    // xv uses this name
-		qt_cmap_option = true;
+		tqt_cmap_option = true;
 	    }
 #if defined(QT_DEBUG)
 	    else if ( arg == "-sync" )
@@ -1924,7 +1924,7 @@ void tqt_init_internal( int *argcptr, char **argv,
 		vis = DefaultVisual(appDpy, screen);
 		TQPaintDevice::x_appdefvisual_arr[ screen ] = true;
 
-		if ( qt_visual_option == TrueColor ||
+		if ( tqt_visual_option == TrueColor ||
 		     TQApplication::colorSpec() == TQApplication::ManyColor ) {
 		    // find custom visual
 
@@ -1961,7 +1961,7 @@ void tqt_init_internal( int *argcptr, char **argv,
 			TQPaintDevice::x_appdefvisual_arr[ screen ];
 		} else {
 		    TQPaintDevice::x_appdefcolormap_arr[ screen ] =
-			!qt_cmap_option && TQPaintDevice::x_appdefvisual_arr[ screen ];
+			!tqt_cmap_option && TQPaintDevice::x_appdefvisual_arr[ screen ];
 		}
 
 		if ( TQPaintDevice::x_appdefcolormap_arr[ screen ] ) {
@@ -1993,100 +1993,100 @@ void tqt_init_internal( int *argcptr, char **argv,
 
 	// Support protocols
 
-	qt_x11_intern_atom( "WM_PROTOCOLS", &tqt_wm_protocols );
-	qt_x11_intern_atom( "WM_DELETE_WINDOW", &tqt_wm_delete_window );
-	qt_x11_intern_atom( "WM_STATE", &tqt_wm_state );
-	qt_x11_intern_atom( "WM_CHANGE_STATE", &qt_wm_change_state );
-	qt_x11_intern_atom( "WM_TAKE_FOCUS", &tqt_wm_take_focus );
-	qt_x11_intern_atom( "WM_CLIENT_LEADER", &qt_wm_client_leader);
-	qt_x11_intern_atom( "WM_WINDOW_ROLE", &tqt_window_role);
-	qt_x11_intern_atom( "SM_CLIENT_ID", &tqt_sm_client_id);
-	qt_x11_intern_atom( "CLIPBOARD", &qt_xa_clipboard );
-	qt_x11_intern_atom( "RESOURCE_MANAGER", &qt_resource_manager );
-	qt_x11_intern_atom( "INCR", &qt_x_incr );
-	qt_x11_intern_atom( "_XSETROOT_ID", &qt_xsetroot_id );
-	qt_x11_intern_atom( "_QT_SELECTION", &qt_selection_property );
-	qt_x11_intern_atom( "_QT_CLIPBOARD_SENTINEL", &tqt_clipboard_sentinel );
-	qt_x11_intern_atom( "_QT_SELECTION_SENTINEL", &qt_selection_sentinel );
-	qt_x11_intern_atom( "_QT_SCROLL_DONE", &qt_qt_scrolldone );
-	qt_x11_intern_atom( "_QT_INPUT_ENCODING", &qt_input_encoding );
-	qt_x11_intern_atom( "_QT_SIZEGRIP", &qt_sizegrip );
-	qt_x11_intern_atom( "_NET_WM_CONTEXT_HELP", &tqt_net_wm_context_help );
-	qt_x11_intern_atom( "_NET_WM_PING", &tqt_net_wm_ping );
-	qt_x11_intern_atom( "_MOTIF_WM_HINTS", &qt_xa_motif_wm_hints );
-	qt_x11_intern_atom( "DTWM_IS_RUNNING", &qt_cde_running );
-	qt_x11_intern_atom( "KWIN_RUNNING", &qt_twin_running );
-	qt_x11_intern_atom( "KWM_RUNNING", &qt_kwm_running );
-	qt_x11_intern_atom( "GNOME_BACKGROUND_PROPERTIES", &qt_gbackground_properties );
+	tqt_x11_intern_atom( "WM_PROTOCOLS", &tqt_wm_protocols );
+	tqt_x11_intern_atom( "WM_DELETE_WINDOW", &tqt_wm_delete_window );
+	tqt_x11_intern_atom( "WM_STATE", &tqt_wm_state );
+	tqt_x11_intern_atom( "WM_CHANGE_STATE", &tqt_wm_change_state );
+	tqt_x11_intern_atom( "WM_TAKE_FOCUS", &tqt_wm_take_focus );
+	tqt_x11_intern_atom( "WM_CLIENT_LEADER", &tqt_wm_client_leader);
+	tqt_x11_intern_atom( "WM_WINDOW_ROLE", &tqt_window_role);
+	tqt_x11_intern_atom( "SM_CLIENT_ID", &tqt_sm_client_id);
+	tqt_x11_intern_atom( "CLIPBOARD", &tqt_xa_clipboard );
+	tqt_x11_intern_atom( "RESOURCE_MANAGER", &tqt_resource_manager );
+	tqt_x11_intern_atom( "INCR", &tqt_x_incr );
+	tqt_x11_intern_atom( "_XSETROOT_ID", &tqt_xsetroot_id );
+	tqt_x11_intern_atom( "_QT_SELECTION", &tqt_selection_property );
+	tqt_x11_intern_atom( "_QT_CLIPBOARD_SENTINEL", &tqt_clipboard_sentinel );
+	tqt_x11_intern_atom( "_QT_SELECTION_SENTINEL", &tqt_selection_sentinel );
+	tqt_x11_intern_atom( "_QT_SCROLL_DONE", &tqt_scrolldone );
+	tqt_x11_intern_atom( "_QT_INPUT_ENCODING", &tqt_input_encoding );
+	tqt_x11_intern_atom( "_QT_SIZEGRIP", &tqt_sizegrip );
+	tqt_x11_intern_atom( "_NET_WM_CONTEXT_HELP", &tqt_net_wm_context_help );
+	tqt_x11_intern_atom( "_NET_WM_PING", &tqt_net_wm_ping );
+	tqt_x11_intern_atom( "_MOTIF_WM_HINTS", &tqt_xa_motif_wm_hints );
+	tqt_x11_intern_atom( "DTWM_IS_RUNNING", &tqt_cde_running );
+	tqt_x11_intern_atom( "KWIN_RUNNING", &tqt_twin_running );
+	tqt_x11_intern_atom( "KWM_RUNNING", &tqt_kwm_running );
+	tqt_x11_intern_atom( "GNOME_BACKGROUND_PROPERTIES", &tqt_gbackground_properties );
 
 	TQString atomname("_QT_SETTINGS_TIMESTAMP_");
 	atomname += XDisplayName(appDpyName);
-	qt_x11_intern_atom( atomname.latin1(), &qt_settings_timestamp );
-
-	qt_x11_intern_atom( "_NET_SUPPORTED", &tqt_net_supported );
-	qt_x11_intern_atom( "_NET_VIRTUAL_ROOTS", &tqt_net_virtual_roots );
-	qt_x11_intern_atom( "_NET_WORKAREA", &tqt_net_workarea );
-	qt_x11_intern_atom( "_NET_WM_STATE", &tqt_net_wm_state );
-	qt_x11_intern_atom( "_NET_WM_STATE_MODAL", &tqt_net_wm_state_modal );
-	qt_x11_intern_atom( "_NET_WM_STATE_MAXIMIZED_VERT", &tqt_net_wm_state_max_v );
-	qt_x11_intern_atom( "_NET_WM_STATE_MAXIMIZED_HORZ", &tqt_net_wm_state_max_h );
-	qt_x11_intern_atom( "_NET_WM_STATE_FULLSCREEN", &tqt_net_wm_state_fullscreen );
-	qt_x11_intern_atom( "_NET_WM_STATE_ABOVE", &tqt_net_wm_state_above );
-	qt_x11_intern_atom( "_NET_WM_ALLOWED_ACTIONS", &tqt_net_wm_action );
-	qt_x11_intern_atom( "_NET_WM_ACTION_MOVE", &tqt_net_wm_action_move );
-	qt_x11_intern_atom( "_NET_WM_ACTION_RESIZE", &tqt_net_wm_action_resize );
-	qt_x11_intern_atom( "_NET_WM_ACTION_MINIMIZE", &tqt_net_wm_action_minimize );
-	qt_x11_intern_atom( "_NET_WM_ACTION_SHADE", &tqt_net_wm_action_shade );
-	qt_x11_intern_atom( "_NET_WM_ACTION_STICK", &tqt_net_wm_action_stick );
-	qt_x11_intern_atom( "_NET_WM_ACTION_MAXIMIZE_HORZ", &tqt_net_wm_action_max_h );
-	qt_x11_intern_atom( "_NET_WM_ACTION_MAXIMIZE_VERT", &tqt_net_wm_action_max_v );
-	qt_x11_intern_atom( "_NET_WM_ACTION_FULLSCREEN", &tqt_net_wm_action_fullscreen );
-	qt_x11_intern_atom( "_NET_WM_ACTION_CHANGE_DESKTOP", &tqt_net_wm_action_change_desktop );
-	qt_x11_intern_atom( "_NET_WM_ACTION_CLOSE", &tqt_net_wm_action_close );
-	qt_x11_intern_atom( "_NET_WM_ACTION_ABOVE", &tqt_net_wm_action_above );
-	qt_x11_intern_atom( "_NET_WM_ACTION_BELOW", &tqt_net_wm_action_below );
-	qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE", &tqt_net_wm_window_type );
-	qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_NORMAL", &tqt_net_wm_window_type_normal );
-	qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_DIALOG", &tqt_net_wm_window_type_dialog );
-	qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_TOOLBAR", &tqt_net_wm_window_type_toolbar );
-	qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_MENU", &tqt_net_wm_window_type_menu );
-	qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_UTILITY", &tqt_net_wm_window_type_utility );
-	qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_SPLASH", &tqt_net_wm_window_type_splash );
-	qt_x11_intern_atom( "_KDE_NET_WM_WINDOW_TYPE_OVERRIDE", &tqt_net_wm_window_type_override );
-	qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_DROPDOWN_MENU", &tqt_net_wm_window_type_dropdown_menu );
-	qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_POPUP_MENU", &tqt_net_wm_window_type_popup_menu );
-	qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_TOOLTIP", &tqt_net_wm_window_type_tooltip );
-	qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_COMBO", &tqt_net_wm_window_type_combo );
-	qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_DND", &tqt_net_wm_window_type_dnd );
-	qt_x11_intern_atom( "_KDE_NET_WM_FRAME_STRUT", &tqt_net_wm_frame_strut );
-	qt_x11_intern_atom( "_NET_WM_STATE_STAYS_ON_TOP",
+	tqt_x11_intern_atom( atomname.latin1(), &tqt_settings_timestamp );
+
+	tqt_x11_intern_atom( "_NET_SUPPORTED", &tqt_net_supported );
+	tqt_x11_intern_atom( "_NET_VIRTUAL_ROOTS", &tqt_net_virtual_roots );
+	tqt_x11_intern_atom( "_NET_WORKAREA", &tqt_net_workarea );
+	tqt_x11_intern_atom( "_NET_WM_STATE", &tqt_net_wm_state );
+	tqt_x11_intern_atom( "_NET_WM_STATE_MODAL", &tqt_net_wm_state_modal );
+	tqt_x11_intern_atom( "_NET_WM_STATE_MAXIMIZED_VERT", &tqt_net_wm_state_max_v );
+	tqt_x11_intern_atom( "_NET_WM_STATE_MAXIMIZED_HORZ", &tqt_net_wm_state_max_h );
+	tqt_x11_intern_atom( "_NET_WM_STATE_FULLSCREEN", &tqt_net_wm_state_fullscreen );
+	tqt_x11_intern_atom( "_NET_WM_STATE_ABOVE", &tqt_net_wm_state_above );
+	tqt_x11_intern_atom( "_NET_WM_ALLOWED_ACTIONS", &tqt_net_wm_action );
+	tqt_x11_intern_atom( "_NET_WM_ACTION_MOVE", &tqt_net_wm_action_move );
+	tqt_x11_intern_atom( "_NET_WM_ACTION_RESIZE", &tqt_net_wm_action_resize );
+	tqt_x11_intern_atom( "_NET_WM_ACTION_MINIMIZE", &tqt_net_wm_action_minimize );
+	tqt_x11_intern_atom( "_NET_WM_ACTION_SHADE", &tqt_net_wm_action_shade );
+	tqt_x11_intern_atom( "_NET_WM_ACTION_STICK", &tqt_net_wm_action_stick );
+	tqt_x11_intern_atom( "_NET_WM_ACTION_MAXIMIZE_HORZ", &tqt_net_wm_action_max_h );
+	tqt_x11_intern_atom( "_NET_WM_ACTION_MAXIMIZE_VERT", &tqt_net_wm_action_max_v );
+	tqt_x11_intern_atom( "_NET_WM_ACTION_FULLSCREEN", &tqt_net_wm_action_fullscreen );
+	tqt_x11_intern_atom( "_NET_WM_ACTION_CHANGE_DESKTOP", &tqt_net_wm_action_change_desktop );
+	tqt_x11_intern_atom( "_NET_WM_ACTION_CLOSE", &tqt_net_wm_action_close );
+	tqt_x11_intern_atom( "_NET_WM_ACTION_ABOVE", &tqt_net_wm_action_above );
+	tqt_x11_intern_atom( "_NET_WM_ACTION_BELOW", &tqt_net_wm_action_below );
+	tqt_x11_intern_atom( "_NET_WM_WINDOW_TYPE", &tqt_net_wm_window_type );
+	tqt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_NORMAL", &tqt_net_wm_window_type_normal );
+	tqt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_DIALOG", &tqt_net_wm_window_type_dialog );
+	tqt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_TOOLBAR", &tqt_net_wm_window_type_toolbar );
+	tqt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_MENU", &tqt_net_wm_window_type_menu );
+	tqt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_UTILITY", &tqt_net_wm_window_type_utility );
+	tqt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_SPLASH", &tqt_net_wm_window_type_splash );
+	tqt_x11_intern_atom( "_KDE_NET_WM_WINDOW_TYPE_OVERRIDE", &tqt_net_wm_window_type_override );
+	tqt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_DROPDOWN_MENU", &tqt_net_wm_window_type_dropdown_menu );
+	tqt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_POPUP_MENU", &tqt_net_wm_window_type_popup_menu );
+	tqt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_TOOLTIP", &tqt_net_wm_window_type_tooltip );
+	tqt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_COMBO", &tqt_net_wm_window_type_combo );
+	tqt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_DND", &tqt_net_wm_window_type_dnd );
+	tqt_x11_intern_atom( "_KDE_NET_WM_FRAME_STRUT", &tqt_net_wm_frame_strut );
+	tqt_x11_intern_atom( "_NET_WM_STATE_STAYS_ON_TOP",
 			    &tqt_net_wm_state_stays_on_top );
-	qt_x11_intern_atom( "_NET_WM_PID", &tqt_net_wm_pid );
-	qt_x11_intern_atom( "_NET_WM_USER_TIME", &tqt_net_wm_user_time );
-	qt_x11_intern_atom( "_NET_WM_FULL_PLACEMENT", &tqt_net_wm_full_placement );
-	qt_x11_intern_atom( "ENLIGHTENMENT_DESKTOP", &qt_enlightenment_desktop );
-	qt_x11_intern_atom( "_NET_WM_NAME", &tqt_net_wm_name );
-	qt_x11_intern_atom( "_NET_WM_ICON_NAME", &tqt_net_wm_icon_name );
-	qt_x11_intern_atom( "UTF8_STRING", &qt_utf8_string );
-        qt_x11_intern_atom( "_SGI_DESKS_MANAGER", &qt_sgi_desks_manager );
+	tqt_x11_intern_atom( "_NET_WM_PID", &tqt_net_wm_pid );
+	tqt_x11_intern_atom( "_NET_WM_USER_TIME", &tqt_net_wm_user_time );
+	tqt_x11_intern_atom( "_NET_WM_FULL_PLACEMENT", &tqt_net_wm_full_placement );
+	tqt_x11_intern_atom( "ENLIGHTENMENT_DESKTOP", &tqt_enlightenment_desktop );
+	tqt_x11_intern_atom( "_NET_WM_NAME", &tqt_net_wm_name );
+	tqt_x11_intern_atom( "_NET_WM_ICON_NAME", &tqt_net_wm_icon_name );
+	tqt_x11_intern_atom( "UTF8_STRING", &tqt_utf8_string );
+        tqt_x11_intern_atom( "_SGI_DESKS_MANAGER", &tqt_sgi_desks_manager );
 
 #ifndef TQT_NO_XSYNC
-	qt_x11_intern_atom( "_NET_WM_SYNC_REQUEST_COUNTER", &tqt_net_wm_sync_request_counter );
-	qt_x11_intern_atom( "_NET_WM_SYNC_REQUEST", &tqt_net_wm_sync_request );
+	tqt_x11_intern_atom( "_NET_WM_SYNC_REQUEST_COUNTER", &tqt_net_wm_sync_request_counter );
+	tqt_x11_intern_atom( "_NET_WM_SYNC_REQUEST", &tqt_net_wm_sync_request );
 #endif
 
-	qt_xdnd_setup();
-	qt_x11_motifdnd_init();
+	tqt_xdnd_setup();
+	tqt_x11_motifdnd_init();
 
 	// Finally create all atoms
 	tqt_x11_process_intern_atoms();
 
         // look for broken window managers
-        qt_detect_broken_window_manager();
+        tqt_detect_broken_window_manager();
 
 	// initialize NET lists
-	qt_get_net_supported();
-	qt_get_net_virtual_roots();
+	tqt_get_net_supported();
+	tqt_get_net_virtual_roots();
 
 #ifndef TQT_NO_XRANDR
 	// See if XRandR is supported on the connected display
@@ -2094,7 +2094,7 @@ void tqt_init_internal( int *argcptr, char **argv,
 	Q_UNUSED( xrandr_eventbase );
 	if ( XRRQueryExtension( appDpy, &xrandr_eventbase, &xrandr_errorbase ) ) {
 	    // XRandR is supported
-	    qt_use_xrandr = true;
+	    tqt_use_xrandr = true;
 	}
 #endif // TQT_NO_XRANDR
 
@@ -2116,7 +2116,7 @@ void tqt_init_internal( int *argcptr, char **argv,
 	int xsync_major, xsync_minor;
 	if ( XSyncQueryExtension( appDpy, &xsync_eventbase, &xsync_errorbase ) && 
 	     XSyncInitialize( appDpy, &xsync_major,  &xsync_minor ) ) {
-	     qt_use_xsync = true;
+	     tqt_use_xsync = true;
 	}
 #endif 
 
@@ -2156,28 +2156,28 @@ void tqt_init_internal( int *argcptr, char **argv,
 	    for (maskIndex = 0; maskIndex < 8; maskIndex++) {
 		for (i = 0; i < map->max_keypermod; i++) {
 		    if (map->modifiermap[mapIndex]) {
-			KeySym sym = qt_x11_keycode_to_keysym(appDpy, map->modifiermap[ mapIndex ]);
-			if ( qt_alt_mask == 0 &&
+			KeySym sym = tqt_x11_keycode_to_keysym(appDpy, map->modifiermap[ mapIndex ]);
+			if ( tqt_alt_mask == 0 &&
 			     ( sym == XK_Alt_L || sym == XK_Alt_R ) ) {
-			    qt_alt_mask = 1 << maskIndex;
+			    tqt_alt_mask = 1 << maskIndex;
 			}
-			if ( qt_meta_mask == 0 &&
+			if ( tqt_meta_mask == 0 &&
 			     (sym == XK_Meta_L || sym == XK_Meta_R ) ) {
-			    qt_meta_mask = 1 << maskIndex;
+			    tqt_meta_mask = 1 << maskIndex;
 			}
 		    }
 		    mapIndex++;
 		}
 	    }
 
-	    // not look for mode_switch in qt_alt_mask and qt_meta_mask - if it is
-	    // present in one or both, then we set qt_mode_switch_remove_mask.
+	    // not look for mode_switch in tqt_alt_mask and tqt_meta_mask - if it is
+	    // present in one or both, then we set tqt_mode_switch_remove_mask.
 	    // see TQETWidget::translateKeyEventInternal for an explanation
 	    // of why this is needed
 	    mapIndex = 0;
 	    for ( maskIndex = 0; maskIndex < 8; maskIndex++ ) {
-		if ( qt_alt_mask  != ( 1 << maskIndex ) &&
-		     qt_meta_mask != ( 1 << maskIndex ) ) {
+		if ( tqt_alt_mask  != ( 1 << maskIndex ) &&
+		     tqt_meta_mask != ( 1 << maskIndex ) ) {
 		    for ( i = 0; i < map->max_keypermod; i++ )
 			mapIndex++;
 		    continue;
@@ -2185,9 +2185,9 @@ void tqt_init_internal( int *argcptr, char **argv,
 
 		for ( i = 0; i < map->max_keypermod; i++ ) {
 		    if ( map->modifiermap[ mapIndex ] ) {
-			KeySym sym = qt_x11_keycode_to_keysym(appDpy, map->modifiermap[ mapIndex ]);
+			KeySym sym = tqt_x11_keycode_to_keysym(appDpy, map->modifiermap[ mapIndex ]);
 			if ( sym == XK_Mode_switch ) {
-			    qt_mode_switch_remove_mask |= 1 << maskIndex;
+			    tqt_mode_switch_remove_mask |= 1 << maskIndex;
 			}
 		    }
 		    mapIndex++;
@@ -2197,9 +2197,9 @@ void tqt_init_internal( int *argcptr, char **argv,
 	    XFreeModifiermap(map);
 	} else {
 	    // assume defaults
-	    qt_alt_mask = Mod1Mask;
-	    qt_meta_mask = Mod4Mask;
-	    qt_mode_switch_remove_mask = 0;
+	    tqt_alt_mask = Mod1Mask;
+	    tqt_meta_mask = Mod4Mask;
+	    tqt_mode_switch_remove_mask = 0;
 	}
 
 	// Misc. initialization
@@ -2224,16 +2224,16 @@ void tqt_init_internal( int *argcptr, char **argv,
 			  PropertyChangeMask );
 
 #ifndef TQT_NO_XRANDR
-	    if (qt_use_xrandr)
+	    if (tqt_use_xrandr)
 		XRRSelectInput( appDpy, TQPaintDevice::x11AppRootWindow( screen ), True );
 #endif // TQT_NO_XRANDR
 	}
     }
 
     if ( tqt_is_gui_used ) {
-	qt_set_input_encoding();
+	tqt_set_input_encoding();
 
-	qt_set_x11_resources( appFont, appFGCol, appBGCol, appBTNCol);
+	tqt_set_x11_resources( appFont, appFGCol, appBGCol, appBTNCol);
 
 	// be smart about the size of the default font. most X servers have helvetica
 	// 12 point available at 2 resolutions:
@@ -2244,7 +2244,7 @@ void tqt_init_internal( int *argcptr, char **argv,
 	    (int) ( ( ( TQPaintDevice::x11AppDpiY() >= 95 ? 17. : 12. ) *
 		      72. / (float) TQPaintDevice::x11AppDpiY() ) + 0.5 );
 
-	if ( !tqt_app_has_font && !qt_x11_cmdline_font ) {
+	if ( !tqt_app_has_font && !tqt_x11_cmdline_font ) {
 	    TQFont f( "Helvetica", ptsz );
 	    TQApplication::setFont( f );
 	}
@@ -2344,7 +2344,7 @@ void tqt_init_internal( int *argcptr, char **argv,
 		// get the min/max value for pressure!
 		any = (XAnyClassPtr) ( devs->inputclassinfo );
 		if ( dev == devStylus ) {
-		    qt_curr_events_stylus = curr_event_count;
+		    tqt_curr_events_stylus = curr_event_count;
 		    for (j = 0; j < devs->num_classes; j++) {
 			if ( any->c_class == ValuatorClass ) {
 			    v = (XValuatorInfoPtr) any;
@@ -2357,7 +2357,7 @@ void tqt_init_internal( int *argcptr, char **argv,
 			any = (XAnyClassPtr) ((char *) any + any->length);
 		    }
 		} else {
-		    qt_curr_events_eraser = curr_event_count;
+		    tqt_curr_events_eraser = curr_event_count;
 		}
 		// at this point we are assuming there is only one
 		// wacom device...
@@ -2410,7 +2410,7 @@ void TQApplication::x11_initialize_style()
     unsigned long length, after;
     uchar *data;
     if ( !app_style &&
-	 XGetWindowProperty( appDpy, TQPaintDevice::x11AppRootWindow(), qt_twin_running,
+	 XGetWindowProperty( appDpy, TQPaintDevice::x11AppRootWindow(), tqt_twin_running,
 			     0, 1, False, AnyPropertyType, &type, &format, &length,
 			     &after, &data ) == Success && length ) {
 	if ( data ) XFree( (char *)data );
@@ -2420,14 +2420,14 @@ void TQApplication::x11_initialize_style()
 	    app_style = TQStyleFactory::create("windows");
     }
     if ( !app_style &&
-	 XGetWindowProperty( appDpy, TQPaintDevice::x11AppRootWindow(), qt_kwm_running,
+	 XGetWindowProperty( appDpy, TQPaintDevice::x11AppRootWindow(), tqt_kwm_running,
 			     0, 1, False, AnyPropertyType, &type, &format, &length,
 			     &after, &data ) == Success && length ) {
 	if ( data ) XFree( (char *)data );
 	app_style = TQStyleFactory::create("windows");
     }
     if ( !app_style &&
-	 XGetWindowProperty( appDpy, TQPaintDevice::x11AppRootWindow(), qt_cde_running,
+	 XGetWindowProperty( appDpy, TQPaintDevice::x11AppRootWindow(), tqt_cde_running,
 			     0, 1, False, AnyPropertyType, &type, &format, &length,
 			     &after, &data ) == Success && length ) {
 	// DTWM is running, meaning most likely CDE is running...
@@ -2437,7 +2437,7 @@ void TQApplication::x11_initialize_style()
     // maybe another desktop?
     if ( !app_style &&
 	 XGetWindowProperty( appDpy, TQPaintDevice::x11AppRootWindow(),
-			     qt_gbackground_properties, 0, 1, False, AnyPropertyType,
+			     tqt_gbackground_properties, 0, 1, False, AnyPropertyType,
 			     &type, &format, &length, &after, &data ) == Success &&
 	 length ) {
 	if ( data ) XFree( (char *)data );
@@ -2472,7 +2472,7 @@ void tqt_cleanup()
     appliedstamp = 0;
 
     if ( app_save_rootinfo )			// root window must keep state
-	qt_save_rootinfo();
+	tqt_save_rootinfo();
 
     if ( tqt_is_gui_used ) {
 	TQPixmapCache::clear();
@@ -2528,7 +2528,7 @@ void tqt_cleanup()
 	XCloseDisplay( appDpy );		// close X display
     appDpy = 0;
 
-    qt_x11_wm_client_leader = 0;
+    tqt_x11_wm_client_leader = 0;
 
     if ( TQPaintDevice::x_appdepth_arr )
 	delete [] TQPaintDevice::x_appdepth_arr;
@@ -2564,16 +2564,16 @@ void tqt_cleanup()
   Platform specific global and internal functions
  *****************************************************************************/
 
-void qt_save_rootinfo()				// save new root info
+void tqt_save_rootinfo()				// save new root info
 {
     Atom type;
     int format;
     unsigned long length, after;
     uchar *data;
 
-    if ( qt_xsetroot_id ) {			// kill old pixmap
+    if ( tqt_xsetroot_id ) {			// kill old pixmap
 	if ( XGetWindowProperty( appDpy, TQPaintDevice::x11AppRootWindow(),
-				 qt_xsetroot_id, 0, 1,
+				 tqt_xsetroot_id, 0, 1,
 				 True, AnyPropertyType, &type, &format,
 				 &length, &after, &data ) == Success ) {
 	    if ( type == XA_PIXMAP && format == 32 && length == 1 &&
@@ -2583,7 +2583,7 @@ void qt_save_rootinfo()				// save new root info
 	    Pixmap dummy = XCreatePixmap( appDpy, TQPaintDevice::x11AppRootWindow(),
 					  1, 1, 1 );
 	    XChangeProperty( appDpy, TQPaintDevice::x11AppRootWindow(),
-			     qt_xsetroot_id, XA_PIXMAP, 32,
+			     tqt_xsetroot_id, XA_PIXMAP, 32,
 			     PropModeReplace, (uchar *)&dummy, 1 );
 	    XSetCloseDownMode( appDpy, RetainPermanent );
 	}
@@ -2592,12 +2592,12 @@ void qt_save_rootinfo()				// save new root info
 	XFree( (char *)data );
 }
 
-void qt_updated_rootinfo()
+void tqt_updated_rootinfo()
 {
     app_save_rootinfo = true;
 }
 
-bool qt_wstate_iconified( WId winid )
+bool tqt_wstate_iconified( WId winid )
 {
     Atom type;
     int format;
@@ -2647,7 +2647,7 @@ WId tqt_xrootwin( int scrn )			// get X root window for screen
     return TQPaintDevice::x11AppRootWindow( scrn );
 }
 
-bool qt_nograb()				// application no-grab option
+bool tqt_nograb()				// application no-grab option
 {
 #if defined(QT_DEBUG)
     return appNoGrab;
@@ -2801,11 +2801,11 @@ void TQApplication::setMainWidget( TQWidget *mainWidget )
 	    h = TQMAX(h,minSize.height());
 	    if ( (m & XNegative) ) {
 		x = desktop()->width()  + x - w;
-		qt_widget_tlw_gravity = NorthEastGravity;
+		tqt_widget_tlw_gravity = NorthEastGravity;
 	    }
 	    if ( (m & YNegative) ) {
 		y = desktop()->height() + y - h;
-		qt_widget_tlw_gravity = (m & XNegative) ? SouthEastGravity : SouthWestGravity;
+		tqt_widget_tlw_gravity = (m & XNegative) ? SouthEastGravity : SouthWestGravity;
 	    }
 	    main_widget->setGeometry( x, y, w, h );
 	}
@@ -2996,7 +2996,7 @@ void TQApplication::setGlobalMouseTracking( bool enable )
   Routines to find a TQt widget from a screen position
  *****************************************************************************/
 
-Window qt_x11_findClientWindow( Window win, Atom property, bool leaf )
+Window tqt_x11_findClientWindow( Window win, Atom property, bool leaf )
 {
     Atom   type = None;
     int	   format, i;
@@ -3017,7 +3017,7 @@ Window qt_x11_findClientWindow( Window win, Atom property, bool leaf )
 	return 0;
     }
     for ( i=nchildren-1; !target && i >= 0; i-- )
-	target = qt_x11_findClientWindow( children[i], property, leaf );
+	target = tqt_x11_findClientWindow( children[i], property, leaf );
     if ( children )
 	XFree( (char *)children );
     return target;
@@ -3055,9 +3055,9 @@ TQWidget *TQApplication::widgetAt( int x, int y, bool child )
     w = TQWidget::find( (WId)target );
 
     if ( !w ) {
-	qt_ignore_badwindow();
-	target = qt_x11_findClientWindow( target, tqt_wm_state, true );
-	if (qt_badwindow() )
+	tqt_ignore_badwindow();
+	target = tqt_x11_findClientWindow( target, tqt_wm_state, true );
+	if (tqt_badwindow() )
 	    return 0;
 	w = TQWidget::find( (WId)target );
 #if 0
@@ -3256,26 +3256,26 @@ int TQApplication::x11ClientMessage(TQWidget* w, XEvent* event, bool passive_onl
 		    widget->handleSyncRequest( event );
 #endif
 	    }
-	} else if ( event->xclient.message_type == qt_qt_scrolldone ) {
+	} else if ( event->xclient.message_type == tqt_scrolldone ) {
 	    widget->translateScrollDoneEvent(event);
-	} else if ( event->xclient.message_type == qt_xdnd_position ) {
-	    qt_handle_xdnd_position( widget, event, passive_only );
-	} else if ( event->xclient.message_type == qt_xdnd_enter ) {
-	    qt_handle_xdnd_enter( widget, event, passive_only );
-	} else if ( event->xclient.message_type == qt_xdnd_status ) {
-	    qt_handle_xdnd_status( widget, event, passive_only );
-	} else if ( event->xclient.message_type == qt_xdnd_leave ) {
-	    qt_handle_xdnd_leave( widget, event, passive_only );
-	} else if ( event->xclient.message_type == qt_xdnd_drop ) {
-	    qt_handle_xdnd_drop( widget, event, passive_only );
-	} else if ( event->xclient.message_type == qt_xdnd_finished ) {
-	    qt_handle_xdnd_finished( widget, event, passive_only );
+	} else if ( event->xclient.message_type == tqt_xdnd_position ) {
+	    tqt_handle_xdnd_position( widget, event, passive_only );
+	} else if ( event->xclient.message_type == tqt_xdnd_enter ) {
+	    tqt_handle_xdnd_enter( widget, event, passive_only );
+	} else if ( event->xclient.message_type == tqt_xdnd_status ) {
+	    tqt_handle_xdnd_status( widget, event, passive_only );
+	} else if ( event->xclient.message_type == tqt_xdnd_leave ) {
+	    tqt_handle_xdnd_leave( widget, event, passive_only );
+	} else if ( event->xclient.message_type == tqt_xdnd_drop ) {
+	    tqt_handle_xdnd_drop( widget, event, passive_only );
+	} else if ( event->xclient.message_type == tqt_xdnd_finished ) {
+	    tqt_handle_xdnd_finished( widget, event, passive_only );
 	} else {
 	    if ( passive_only ) return 0;
 	    // All other are interactions
 	}
     } else {
-	qt_motifdnd_handle_msg( widget, event, passive_only );
+	tqt_motifdnd_handle_msg( widget, event, passive_only );
     }
 
     return 0;
@@ -3416,7 +3416,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
 	    return true;
     }
 
-    if ( qt_x11EventFilter(event) )		// send through app filter
+    if ( tqt_x11EventFilter(event) )		// send through app filter
 	return 1;
 
     if ( event->type == MappingNotify ) {	// keyboard mapping changed
@@ -3428,26 +3428,26 @@ int TQApplication::x11ProcessEvent( XEvent* event )
 	if ( event->xproperty.window == TQPaintDevice::x11AppRootWindow( 0 ) ) {
 	    // root properties for the first screen
 	    if ( event->xproperty.atom == tqt_clipboard_sentinel ) {
-		if (qt_check_clipboard_sentinel() )
+		if (tqt_check_clipboard_sentinel() )
 		    emit clipboard()->dataChanged();
-	    } else if ( event->xproperty.atom == qt_selection_sentinel ) {
-		if (qt_check_selection_sentinel() )
+	    } else if ( event->xproperty.atom == tqt_selection_sentinel ) {
+		if (tqt_check_selection_sentinel() )
 		    emit clipboard()->selectionChanged();
 	    } else if ( obey_desktop_settings ) {
-		if ( event->xproperty.atom == qt_resource_manager )
-		    qt_set_x11_resources();
-		else if ( event->xproperty.atom == qt_settings_timestamp )
+		if ( event->xproperty.atom == tqt_resource_manager )
+		    tqt_set_x11_resources();
+		else if ( event->xproperty.atom == tqt_settings_timestamp )
 		    TQApplication::x11_apply_settings();
 	    }
 	}
 	if ( event->xproperty.window == TQPaintDevice::x11AppRootWindow() ) {
 	    // root properties for the default screen
-	    if ( event->xproperty.atom == qt_input_encoding ) {
-		qt_set_input_encoding();
+	    if ( event->xproperty.atom == tqt_input_encoding ) {
+		tqt_set_input_encoding();
 	    } else if ( event->xproperty.atom == tqt_net_supported ) {
-		qt_get_net_supported();
+		tqt_get_net_supported();
 	    } else if ( event->xproperty.atom == tqt_net_virtual_roots ) {
-		qt_get_net_virtual_roots();
+		tqt_get_net_virtual_roots();
 	    } else if ( event->xproperty.atom == tqt_net_workarea ) {
 		tqt_desktopwidget_update_workarea();
 	    }
@@ -3553,7 +3553,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
 	// fall through intended
     case ButtonPress:
 	if (event->xbutton.root != RootWindow(widget->x11Display(), widget->x11Screen())
-	    && ! qt_xdnd_dragging) {
+	    && ! tqt_xdnd_dragging) {
 	    while ( activePopupWidget() )
 		activePopupWidget()->close();
 	    return 1;
@@ -3608,11 +3608,11 @@ int TQApplication::x11ProcessEvent( XEvent* event )
 	    break;
 	widget->createInputContext();
 	setActiveWindow( widget );
-	if ( qt_focus_model == FocusModel_PointerRoot ) {
+	if ( tqt_focus_model == FocusModel_PointerRoot ) {
 	    // We got real input focus from somewhere, but we were in PointerRoot
 	    // mode, so we don't trust this event.  Check the focus model to make
 	    // sure we know what focus mode we are using...
-	    qt_check_focus_model();
+	    tqt_check_focus_model();
 	}
     }
 	break;
@@ -3623,7 +3623,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
 	if ( !widget->isTopLevel() )
 	    break;
 	if ( event->xfocus.mode == NotifyGrab )
-	    qt_xfocusout_grab_counter++;
+	    tqt_xfocusout_grab_counter++;
 	if ( event->xfocus.mode != NotifyNormal )
 	    break;
 	if ( event->xfocus.detail != NotifyAncestor &&
@@ -3645,9 +3645,9 @@ int TQApplication::x11ProcessEvent( XEvent* event )
 	    break;
 	if ( event->xcrossing.focus &&
 	     !widget->isDesktop() && !widget->isActiveWindow() ) {
-	    if ( qt_focus_model == FocusModel_Unknown ) // check focus model
-		qt_check_focus_model();
-	    if ( qt_focus_model == FocusModel_PointerRoot ) // PointerRoot mode
+	    if ( tqt_focus_model == FocusModel_Unknown ) // check focus model
+		tqt_check_focus_model();
+	    if ( tqt_focus_model == FocusModel_PointerRoot ) // PointerRoot mode
 		setActiveWindow( widget );
 	}
 	tqt_dispatchEnterLeave( widget, TQWidget::find( curWin ) );
@@ -3669,7 +3669,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
 	TQWidget* enter = 0;
 	XEvent ev;
 	while ( XCheckMaskEvent( widget->x11Display(), EnterWindowMask | LeaveWindowMask , &ev )
-		&& !qt_x11EventFilter( &ev )) {
+		&& !tqt_x11EventFilter( &ev )) {
             TQWidget* event_widget = TQWidget::find( ev.xcrossing.window );
             if( event_widget && event_widget->x11Event( &ev ) )
                 break;
@@ -3685,9 +3685,9 @@ int TQApplication::x11ProcessEvent( XEvent* event )
 	    enter = event_widget;
 	    if ( ev.xcrossing.focus &&
 		 enter && !enter->isDesktop() && !enter->isActiveWindow() ) {
-		if ( qt_focus_model == FocusModel_Unknown ) // check focus model
-		    qt_check_focus_model();
-		if ( qt_focus_model == FocusModel_PointerRoot ) // PointerRoot mode
+		if ( tqt_focus_model == FocusModel_Unknown ) // check focus model
+		    tqt_check_focus_model();
+		if ( tqt_focus_model == FocusModel_PointerRoot ) // PointerRoot mode
 		    setActiveWindow( enter );
 	    }
 	    break;
@@ -3695,7 +3695,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
 
 	if ( ( ! enter || enter->isDesktop() ) &&
 	     event->xcrossing.focus && widget == active_window &&
-	     qt_focus_model == FocusModel_PointerRoot // PointerRoot mode
+	     tqt_focus_model == FocusModel_PointerRoot // PointerRoot mode
 	     ) {
 	    setActiveWindow( 0 );
 	}
@@ -3739,8 +3739,8 @@ int TQApplication::x11ProcessEvent( XEvent* event )
 	if ( event->xreparent.parent == TQPaintDevice::x11AppRootWindow() ) {
 	    if ( widget->isTopLevel() ) {
 		widget->topData()->parentWinId = event->xreparent.parent;
-		if ( qt_deferred_map_contains( widget ) ) {
-		    qt_deferred_map_take( widget );
+		if ( tqt_deferred_map_contains( widget ) ) {
+		    tqt_deferred_map_take( widget );
 		    XMapWindow( appDpy, widget->winId() );
 		}
 	    }
@@ -3752,14 +3752,14 @@ int TQApplication::x11ProcessEvent( XEvent* event )
 	    widget->topData()->fleft = widget->topData()->fright =
 	     widget->topData()->ftop = widget->topData()->fbottom = 0;
 
-	    if ( qt_focus_model != FocusModel_Unknown ) {
+	    if ( tqt_focus_model != FocusModel_Unknown ) {
 		// toplevel reparented...
 		TQWidget *newparent = TQWidget::find( event->xreparent.parent );
 		if ( ! newparent || newparent->isDesktop() ) {
 		    // we dont' know about the new parent (or we've been
 		    // reparented to root), perhaps a window manager
 		    // has been (re)started?  reset the focus model to unknown
-		    qt_focus_model = FocusModel_Unknown;
+		    tqt_focus_model = FocusModel_Unknown;
 		}
 	    }
 	}
@@ -3770,8 +3770,8 @@ int TQApplication::x11ProcessEvent( XEvent* event )
 	if (! req)
 	    break;
 
-	if ( qt_xdnd_selection && req->selection == qt_xdnd_selection ) {
-	    qt_xdnd_handle_selection_request( req );
+	if ( tqt_xdnd_selection && req->selection == tqt_xdnd_selection ) {
+	    tqt_xdnd_handle_selection_request( req );
 
 	} else if (tqt_clipboard) {
 	    TQCustomEvent e( TQEvent::Clipboard, event );
@@ -3782,7 +3782,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
     case SelectionClear: {
 	XSelectionClearEvent *req = &event->xselectionclear;
 	// don't deliver dnd events to the clipboard, it gets confused
-	if (! req || ( qt_xdnd_selection && req->selection ) == qt_xdnd_selection)
+	if (! req || ( tqt_xdnd_selection && req->selection ) == tqt_xdnd_selection)
 	    break;
 
 	if (tqt_clipboard) {
@@ -3795,7 +3795,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
     case SelectionNotify: {
 	XSelectionEvent *req = &event->xselection;
 	// don't deliver dnd events to the clipboard, it gets confused
-	if (! req || ( qt_xdnd_selection && req->selection ) == qt_xdnd_selection)
+	if (! req || ( tqt_xdnd_selection && req->selection ) == tqt_xdnd_selection)
 	    break;
 
 	if (tqt_clipboard) {
@@ -3897,7 +3897,7 @@ void tqt_leave_modal( TQWidget *widget )
 
 TQ_EXPORT bool tqt_try_modal( TQWidget *widget, XEvent *event )
 {
-    if (qt_xdnd_dragging) {
+    if (tqt_xdnd_dragging) {
 	// allow mouse events while DnD is active
 	switch (event->type) {
 	case ButtonPress:
@@ -3957,7 +3957,7 @@ void TQApplication::openPopup( TQWidget *popup )
     }
     popupWidgets->append( popup );		// add to end of list
 
-    if ( popupWidgets->count() == 1 && !qt_nograb() ){ // grab mouse/keyboard
+    if ( popupWidgets->count() == 1 && !tqt_nograb() ){ // grab mouse/keyboard
 	int r = XGrabKeyboard( popup->x11Display(), popup->winId(), false,
 			       GrabModeSync, GrabModeAsync, CurrentTime );
 	if ( (popupGrabOk = (r == GrabSuccess)) ) {
@@ -4001,7 +4001,7 @@ void TQApplication::closePopup( TQWidget *popup )
 	popupCloseDownMode = true;		// control mouse events
 	delete popupWidgets;
 	popupWidgets = 0;
-	if ( !qt_nograb() && popupGrabOk ) {	// grabbing not disabled
+	if ( !tqt_nograb() && popupGrabOk ) {	// grabbing not disabled
 	    if ( mouseButtonState != 0
 		 || popup->geometry(). contains(TQPoint(mouseGlobalXPos, mouseGlobalYPos) ) )
 		{	// mouse release event or inside
@@ -4034,7 +4034,7 @@ void TQApplication::closePopup( TQWidget *popup )
 	 else
 	     aw->setFocus();
 	 TQFocusEvent::resetReason();
-	 if ( popupWidgets->count() == 1 && !qt_nograb() ){ // grab mouse/keyboard
+	 if ( popupWidgets->count() == 1 && !tqt_nograb() ){ // grab mouse/keyboard
 	     int r = XGrabKeyboard( aw->x11Display(), aw->winId(), false,
 				    GrabModeSync, GrabModeAsync, CurrentTime );
 	     if ( (popupGrabOk = (r == GrabSuccess)) ) {
@@ -4067,7 +4067,7 @@ void TQApplication::closePopup( TQWidget *popup )
 // Keyboard event translation
 //
 
-int qt_x11_translateButtonState( int s )
+int tqt_x11_translateButtonState( int s )
 {
     int bst = 0;
     if ( s & Button1Mask )
@@ -4080,9 +4080,9 @@ int qt_x11_translateButtonState( int s )
 	bst |= TQt::ShiftButton;
     if ( s & ControlMask )
 	bst |= TQt::ControlButton;
-    if ( s & qt_alt_mask )
+    if ( s & tqt_alt_mask )
 	bst |= TQt::AltButton;
-    if ( s & qt_meta_mask )
+    if ( s & tqt_meta_mask )
 	bst |= TQt::MetaButton;
     return bst;
 }
@@ -4104,7 +4104,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
 
     if ( event->type == MotionNotify ) { // mouse move
 	if (event->xmotion.root != RootWindow(appDpy, x11Screen()) &&
-	    ! qt_xdnd_dragging )
+	    ! tqt_xdnd_dragging )
 	    return false;
 
 	XMotionEvent lastMotion = event->xmotion;
@@ -4122,7 +4122,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
 		XPutBackEvent( appDpy, &nextEvent );
 		break;
 	    }
-	    if ( !qt_x11EventFilter(&nextEvent)
+	    if ( !tqt_x11EventFilter(&nextEvent)
 		 && !x11Event( &nextEvent ) ) // send event through filter
 		lastMotion = nextEvent.xmotion;
 	    else
@@ -4133,11 +4133,11 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
 	pos.ry() = lastMotion.y;
 	globalPos.rx() = lastMotion.x_root;
 	globalPos.ry() = lastMotion.y_root;
-	state = qt_x11_translateButtonState( lastMotion.state );
-	if ( qt_button_down && (state & (LeftButton |
+	state = tqt_x11_translateButtonState( lastMotion.state );
+	if ( tqt_button_down && (state & (LeftButton |
 					 MidButton |
 					 RightButton ) ) == 0 )
-	    qt_button_down = 0;
+	    tqt_button_down = 0;
 
 	// throw away mouse move events that are sent multiple times to the same
 	// position
@@ -4157,19 +4157,19 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
 	pos.ry() = xevent->xcrossing.y;
 	globalPos.rx() = xevent->xcrossing.x_root;
 	globalPos.ry() = xevent->xcrossing.y_root;
-	state = qt_x11_translateButtonState( xevent->xcrossing.state );
-	if ( qt_button_down && (state & (LeftButton |
+	state = tqt_x11_translateButtonState( xevent->xcrossing.state );
+	if ( tqt_button_down && (state & (LeftButton |
 					 MidButton |
 					 RightButton ) ) == 0 )
-	    qt_button_down = 0;
-	if ( !qt_button_down )
+	    tqt_button_down = 0;
+	if ( !tqt_button_down )
 	    state = state & ~(LeftButton | MidButton | RightButton );
     } else {					// button press or release
 	pos.rx() = event->xbutton.x;
 	pos.ry() = event->xbutton.y;
 	globalPos.rx() = event->xbutton.x_root;
 	globalPos.ry() = event->xbutton.y_root;
-	state = qt_x11_translateButtonState( event->xbutton.state );
+	state = tqt_x11_translateButtonState( event->xbutton.state );
 	switch ( event->xbutton.button ) {
 	case Button1: button = LeftButton; break;
 	case Button2: button = MidButton; break;
@@ -4221,9 +4221,9 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
         case 9: button = HistoryForwardButton; break;
 	}
 	if ( event->type == ButtonPress ) {	// mouse button pressed
-	    qt_button_down = childAt( pos );	//magic for masked widgets
-	    if ( !qt_button_down || !qt_button_down->testWFlags(WMouseNoMask) )
-		qt_button_down = this;
+	    tqt_button_down = childAt( pos );	//magic for masked widgets
+	    if ( !tqt_button_down || !tqt_button_down->testWFlags(WMouseNoMask) )
+		tqt_button_down = this;
 	    if ( mouseActWindow == event->xbutton.window &&
 		 mouseButtonPressed == button &&
 		 (long)event->xbutton.time -(long)mouseButtonPressTime
@@ -4324,7 +4324,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
 	}
 
 	if ( releaseAfter )
-	    qt_button_down = 0;
+	    tqt_button_down = 0;
 
 	if ( tqApp->inPopupMode() ) { // still in popup mode
 	    if ( popupGrabOk )
@@ -4346,7 +4346,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
 	TQWidget *widget = this;
 	TQWidget *w = TQWidget::mouseGrabber();
 	if ( !w )
-	    w = qt_button_down;
+	    w = tqt_button_down;
 	if ( w && w != this ) {
 	    widget = w;
 	    pos = w->mapFromGlobal( globalPos );
@@ -4362,7 +4362,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
 	     (state & (~button) & ( LeftButton |
 				    MidButton |
 				    RightButton)) == 0 ) {
-	    qt_button_down = 0;
+	    tqt_button_down = 0;
 	}
 
 	int oldOpenPopupCount = openPopupCount;
@@ -4616,8 +4616,8 @@ bool TQETWidget::translatePropertyEvent(const XEvent *event)
 	    topData()->parentWinId = 0;
 	    // map the window if we were waiting for a transition to
 	    // withdrawn
-	    if ( qt_deferred_map_contains( this ) ) {
-		qt_deferred_map_take( this );
+	    if ( tqt_deferred_map_contains( this ) ) {
+		tqt_deferred_map_take( this );
 		XMapWindow( appDpy, winId() );
 	    }
 	} else if (topData()->parentWinId != TQPaintDevice::x11AppRootWindow(x11Screen())) {
@@ -4645,8 +4645,8 @@ bool TQETWidget::translatePropertyEvent(const XEvent *event)
 		    topData()->parentWinId = 0;
 		    // map the window if we were waiting for a
 		    // transition to withdrawn
-		    if ( qt_deferred_map_contains( this ) ) {
-			qt_deferred_map_take( this );
+		    if ( tqt_deferred_map_contains( this ) ) {
+			tqt_deferred_map_take( this );
 			XMapWindow( appDpy, winId() );
 		    }
 		    break;
@@ -5107,7 +5107,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
 					   int& state,
 					   char& ascii, int& code, TQEvent::Type &type, bool willRepeat, bool statefulTranslation )
 {
-    TQTextCodec *mapper = qt_input_mapper;
+    TQTextCodec *mapper = tqt_input_mapper;
     // some XmbLookupString implementations don't return buffer overflow correctly,
     // so we increase the input buffer to allow for long strings...
     // 256 chars * 2 bytes + 1 null-term == 513 bytes
@@ -5126,14 +5126,14 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
     XKeyEvent xkeyevent = event->xkey;
 
     // save the modifier state, we will use the keystate uint later by passing
-    // it to qt_x11_translateButtonState
+    // it to tqt_x11_translateButtonState
     uint keystate = event->xkey.state;
     // remove the modifiers where mode_switch exists... some machines seem
     // to have alt *AND* mode_switch both in Mod1Mask, which causes
     // XLookupString to return things like '�' (aring) for ALT-A.  This
     // completely breaks modifiers.  If we remove the modifier for Mode_switch,
     // then things work correctly...
-    xkeyevent.state &= ~qt_mode_switch_remove_mask;
+    xkeyevent.state &= ~tqt_mode_switch_remove_mask;
 
     type = (event->type == XKeyPress)
            ? TQEvent::KeyPress : TQEvent::KeyRelease;
@@ -5156,7 +5156,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
 	// widgets via TQIMEvent regardless of XIM style, so the
 	// following code is commented out.
 #if 0
-	if ( qt_xim ) {
+	if ( tqt_xim ) {
 	    TQTLWExtra*  xd = tlw->topData();
 	    TQInputContext *qic = (TQInputContext *) xd->xic;
 	    if ( qic ) {
@@ -5170,8 +5170,8 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
 				   chars.data(), chars.size(), &key, 0 );
 	}
 	if ( count && !keycode ) {
-	    keycode = qt_ximComposingKeycode;
-	    qt_ximComposingKeycode = 0;
+	    keycode = tqt_ximComposingKeycode;
+	    tqt_ximComposingKeycode = 0;
 	}
 	if ( key )
 	    keyDict->replace( keycode, (void*)key );
@@ -5245,11 +5245,11 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
     }
 #endif // !TQT_NO_XIM
 
-    state = qt_x11_translateButtonState( keystate );
+    state = tqt_x11_translateButtonState( keystate );
 
     static int directionKeyEvent = 0;
     static unsigned int lastWinId = 0;
-    if ( qt_use_rtl_extensions && type == TQEvent::KeyRelease && statefulTranslation ) {
+    if ( tqt_use_rtl_extensions && type == TQEvent::KeyRelease && statefulTranslation ) {
 	if (directionKeyEvent == Key_Direction_R || directionKeyEvent == Key_Direction_L ) {
 	    type = TQEvent::KeyPress;
 	    code = directionKeyEvent;
@@ -5269,7 +5269,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
     // (to figure out whether the Ctrl modifier is held while Shift is pressed,
     // or Shift is held while Ctrl is pressed) since the 'state' doesn't tell
     // us whether the modifier held is Left or Right.
-    if ( qt_use_rtl_extensions && type  == TQEvent::KeyPress && statefulTranslation ) {
+    if ( tqt_use_rtl_extensions && type  == TQEvent::KeyPress && statefulTranslation ) {
         if (key == XK_Control_L || key == XK_Control_R || key == XK_Shift_L || key == XK_Shift_R) {
 	    if (!directionKeyEvent) {
 	      directionKeyEvent = key;
@@ -5291,7 +5291,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
     // TQt keycodes between 128 and 255, but should rather use the
     // TQKeyEvent::text().
     //
-    if ( key < 128 || (key < 256 && (!qt_input_mapper || qt_input_mapper->mibEnum()==4)) ) {
+    if ( key < 128 || (key < 256 && (!tqt_input_mapper || tqt_input_mapper->mibEnum()==4)) ) {
 	code = isprint((int)key) ? toupper((int)key) : 0; // upper-case key, if known
     } else if ( key >= XK_F1 && key <= XK_F35 ) {
 	code = Key_F1 + ((int)key - XK_F1);	// function keys
@@ -5342,7 +5342,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
 	    chars[0] = 0;
 	}
 
-	if ( qt_use_rtl_extensions && type  == TQEvent::KeyPress && statefulTranslation ) {
+	if ( tqt_use_rtl_extensions && type  == TQEvent::KeyPress && statefulTranslation ) {
 	    if ( directionKeyEvent && lastWinId == winId() ) {
 		if ( ( key == XK_Shift_L && directionKeyEvent == XK_Control_L ) ||
 		     ( key == XK_Control_L && directionKeyEvent == XK_Shift_L ) ) {
@@ -5361,7 +5361,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
 #if 0
 #ifndef Q_EE
     static int c  = 0;
-    extern void qt_dialog_default_key();
+    extern void tqt_dialog_default_key();
 #define Q_EE(x) c = (c == x || (!c && x == 0x1000) )? x+1 : 0
     if ( tlw && state == '0' ) {
 	switch ( code ) {
@@ -5370,7 +5370,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
 	case 0x54: Q_EE(Key_Escape); break;
 	case 0x4c:
 	    if (c == Key_Return )
-		qt_dialog_default_key();
+		tqt_dialog_default_key();
 	    else
 		Q_EE(Key_Backspace);
 	    break;
@@ -5391,7 +5391,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
 }
 
 
-struct qt_auto_repeat_data
+struct tqt_auto_repeat_data
 {
     // match the window and keycode with timestamp delta of 10ms
     Window window;
@@ -5407,12 +5407,12 @@ struct qt_auto_repeat_data
 extern "C" {
 #endif
 
-static Bool qt_keypress_scanner(Display *, XEvent *event, XPointer arg)
+static Bool tqt_keypress_scanner(Display *, XEvent *event, XPointer arg)
 {
     if (event->type != XKeyPress && event->type != XKeyRelease)
         return false;
 
-    qt_auto_repeat_data *d = (qt_auto_repeat_data *) arg;
+    tqt_auto_repeat_data *d = (tqt_auto_repeat_data *) arg;
     if (d->error ||
         event->xkey.window  != d->window ||
         event->xkey.keycode != d->keycode) {
@@ -5439,9 +5439,9 @@ static Bool qt_keypress_scanner(Display *, XEvent *event, XPointer arg)
     return false;
 }
 
-static Bool qt_keyrelease_scanner(Display *, XEvent *event, XPointer arg)
+static Bool tqt_keyrelease_scanner(Display *, XEvent *event, XPointer arg)
 {
-    const qt_auto_repeat_data *d = (const qt_auto_repeat_data *) arg;
+    const tqt_auto_repeat_data *d = (const tqt_auto_repeat_data *) arg;
     return (event->type == XKeyRelease &&
             event->xkey.window  == d->window &&
             event->xkey.keycode == d->keycode);
@@ -5471,11 +5471,11 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab )
     TQString text;
 
     translateKeyEventInternal( event, count, text, state, ascii, code, type,
-			       qt_mode_switch_remove_mask != 0 );
+			       tqt_mode_switch_remove_mask != 0 );
 
     static uint curr_autorep = 0;
     // was this the last auto-repeater?
-    qt_auto_repeat_data auto_repeat_data;
+    tqt_auto_repeat_data auto_repeat_data;
     auto_repeat_data.window = event->xkey.window;
     auto_repeat_data.keycode = event->xkey.keycode;
     auto_repeat_data.timestamp = event->xkey.time;
@@ -5491,7 +5491,7 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab )
 
         auto_repeat_data.release = true;
         auto_repeat_data.error = false;
-        if (XCheckIfEvent(dpy, &nextpress, &qt_keypress_scanner,
+        if (XCheckIfEvent(dpy, &nextpress, &tqt_keypress_scanner,
                           (XPointer) &auto_repeat_data)) {
             autor = true;
 
@@ -5512,9 +5512,9 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab )
     }
 
     long save = 0;
-    if ( qt_mode_switch_remove_mask != 0 ) {
-	save = qt_mode_switch_remove_mask;
-	qt_mode_switch_remove_mask = 0;
+    if ( tqt_mode_switch_remove_mask != 0 ) {
+	save = tqt_mode_switch_remove_mask;
+	tqt_mode_switch_remove_mask = 0;
 
 	// translate the key event again, but this time apply any Mode_switch
 	// modifiers
@@ -5603,7 +5603,7 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab )
     }
 
     if ( save != 0 )
-	qt_mode_switch_remove_mask = save;
+	tqt_mode_switch_remove_mask = save;
 
     // autorepeat compression makes sense for all widgets (Windows
     // does it automatically .... )
@@ -5618,10 +5618,10 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab )
         for (;;) {
             auto_repeat_data.release = false;
             auto_repeat_data.error = false;
-            if (! XCheckIfEvent(dpy, &dummy, &qt_keypress_scanner,
+            if (! XCheckIfEvent(dpy, &dummy, &tqt_keypress_scanner,
                                 (XPointer) &auto_repeat_data))
                 break;
-            if (! XCheckIfEvent(dpy, &dummy, &qt_keyrelease_scanner,
+            if (! XCheckIfEvent(dpy, &dummy, &tqt_keyrelease_scanner,
                                 (XPointer) &auto_repeat_data))
                 break;
 
@@ -5670,7 +5670,7 @@ static Bool isPaintOrScrollDoneEvent( Display *, XEvent *ev, XPointer a )
     PaintEventInfo *info = (PaintEventInfo *)a;
     if ( ev->type == Expose || ev->type == GraphicsExpose
       ||  ( ev->type == ClientMessage
-	 && ev->xclient.message_type == qt_qt_scrolldone ) )
+	 && ev->xclient.message_type == tqt_scrolldone ) )
     {
 	if ( ev->xexpose.window == info->window )
 	    return True;
@@ -5685,7 +5685,7 @@ static Bool isPaintOrScrollDoneEvent( Display *, XEvent *ev, XPointer a )
 
 // declared above: static TQPtrList<TQScrollInProgress> *sip_list = 0;
 
-void qt_insert_sip( TQWidget* scrolled_widget, int dx, int dy )
+void tqt_insert_sip( TQWidget* scrolled_widget, int dx, int dy )
 {
     if ( !sip_list ) {
 	sip_list = new TQPtrList<TQScrollInProgress>;
@@ -5699,14 +5699,14 @@ void qt_insert_sip( TQWidget* scrolled_widget, int dx, int dy )
     client_message.type = ClientMessage;
     client_message.window = scrolled_widget->winId();
     client_message.format = 32;
-    client_message.message_type = qt_qt_scrolldone;
+    client_message.message_type = tqt_scrolldone;
     client_message.data.l[0] = sip->id;
 
     XSendEvent( appDpy, scrolled_widget->winId(), False, NoEventMask,
 	(XEvent*)&client_message );
 }
 
-int qt_sip_count( TQWidget* scrolled_widget )
+int tqt_sip_count( TQWidget* scrolled_widget )
 {
     if ( !sip_list )
 	return 0;
@@ -5765,7 +5765,7 @@ bool TQETWidget::translatePaintEvent( const XEvent *event )
 	// WARNING: this is O(number_of_events * number_of_matching_events)
 	while ( XCheckIfEvent(x11Display(),&xevent,isPaintOrScrollDoneEvent,
 			      (XPointer)&info) &&
-		!qt_x11EventFilter(&xevent)  &&
+		!tqt_x11EventFilter(&xevent)  &&
 		!x11Event( &xevent ) ) // send event through filter
 	{
 	    if ( xevent.type == Expose || xevent.type == GraphicsExpose ) {
@@ -5792,9 +5792,9 @@ bool TQETWidget::translatePaintEvent( const XEvent *event )
     setWState( WState_InPaintEvent );
     if ( !isTopLevel() && backgroundOrigin() != WidgetOrigin )
 	erase( paintRegion );
-    qt_set_paintevent_clipping( this, paintRegion );
+    tqt_set_paintevent_clipping( this, paintRegion );
     TQApplication::sendSpontaneousEvent( this, &e );
-    qt_clear_paintevent_clipping();
+    tqt_clear_paintevent_clipping();
     clearWState( WState_InPaintEvent );
     return true;
 }
@@ -5869,7 +5869,7 @@ bool TQETWidget::translateConfigEvent( const XEvent *event )
             int compressed_configs = 0;
             while ( XCheckTypedWindowEvent( x11Display(), winId(), ConfigureNotify,
                                             &otherEvent ) ) {
-                if ( qt_x11EventFilter( &otherEvent ) )
+                if ( tqt_x11EventFilter( &otherEvent ) )
                     continue;
 
                 if (x11Event( &otherEvent ) )
@@ -5932,7 +5932,7 @@ bool TQETWidget::translateConfigEvent( const XEvent *event )
     } else {
 	XEvent xevent;
 	while ( XCheckTypedWindowEvent(x11Display(),winId(), ConfigureNotify,&xevent) &&
-		!qt_x11EventFilter(&xevent)  &&
+		!tqt_x11EventFilter(&xevent)  &&
 		!x11Event( &xevent ) ) // send event through filter
 	    ;
     }
@@ -5946,7 +5946,7 @@ bool TQETWidget::translateConfigEvent( const XEvent *event )
 	// remove unnecessary paint events from the queue
 	XEvent xevent;
 	while ( XCheckTypedWindowEvent( x11Display(), winId(), Expose, &xevent ) &&
-		! qt_x11EventFilter( &xevent )  &&
+		! tqt_x11EventFilter( &xevent )  &&
 		! x11Event( &xevent ) ) // send event through filter
 	    ;
 	repaint( !testWFlags(WResizeNoErase) || transbg );
diff --git a/src/kernel/tqclipboard_x11.cpp b/src/kernel/tqclipboard_x11.cpp
index d9a5d3c6..24146be0 100644
--- a/src/kernel/tqclipboard_x11.cpp
+++ b/src/kernel/tqclipboard_x11.cpp
@@ -88,12 +88,12 @@ typedef int (*QX11EventFilter) (XEvent*);
 extern QX11EventFilter tqt_set_x11_event_filter (QX11EventFilter filter);
 
 extern Time tqt_x_time;			// def. in tqapplication_x11.cpp
-extern Time qt_x_incr;			// def. in tqapplication_x11.cpp
-extern Atom qt_xa_clipboard;
-extern Atom qt_selection_property;
+extern Time tqt_x_incr;			// def. in tqapplication_x11.cpp
+extern Atom tqt_xa_clipboard;
+extern Atom tqt_selection_property;
 extern Atom tqt_clipboard_sentinel;
-extern Atom qt_selection_sentinel;
-extern Atom qt_utf8_string;
+extern Atom tqt_selection_sentinel;
+extern Atom tqt_utf8_string;
 
 // from qdnd_x11.cpp
 extern Atom* qt_xdnd_str_to_atom( const char *mimeType );
@@ -460,9 +460,9 @@ static int qt_xclb_event_filter(XEvent *event)
 static Bool checkForClipboardEvents(Display *, XEvent *e, XPointer)
 {
     return ((e->type == SelectionRequest && (e->xselectionrequest.selection == XA_PRIMARY
-                                             || e->xselectionrequest.selection == qt_xa_clipboard))
+                                             || e->xselectionrequest.selection == tqt_xa_clipboard))
             || (e->type == SelectionClear && (e->xselectionclear.selection == XA_PRIMARY
-                                              || e->xselectionclear.selection == qt_xa_clipboard)));
+                                              || e->xselectionclear.selection == tqt_xa_clipboard)));
 }
 
 static bool selection_request_pending = false;
@@ -784,7 +784,7 @@ static Atom send_targets_selection(TQClipboardData *d, Window window, Atom prope
     if (d->source()->provides("image/pbm"))
 	atarget[n++] = XA_BITMAP;
     if (d->source()->provides("text/plain")) {
-	atarget[n++] = qt_utf8_string;
+	atarget[n++] = tqt_utf8_string;
 	atarget[n++] = xa_text;
 	atarget[n++] = xa_compound_text;
 	atarget[n++] = XA_STRING;
@@ -855,10 +855,10 @@ static Atom send_string_selection(TQClipboardData *d, Atom target, Window window
 	// see section 2.6.2
 	fmt = "text/plain;charset=ISO-8859-1";
 	xtarget = XA_STRING;
-    } else if (target == qt_utf8_string) {
+    } else if (target == tqt_utf8_string) {
 	// proposed UTF8_STRING conversion type
 	fmt = "text/plain;charset=UTF-8";
-	xtarget = qt_utf8_string;
+	xtarget = tqt_utf8_string;
     }
 
     if (xtarget == None) // should not happen
@@ -927,10 +927,10 @@ static Atom send_selection(TQClipboardData *d, Atom target, Window window, Atom
     if (data.size() > increment && allow_incr) {
 	long bytes = data.size();
 	XChangeProperty(TQPaintDevice::x11AppDisplay(), window, property,
-			qt_x_incr, 32, PropModeReplace, (uchar *) &bytes, 1);
+			tqt_x_incr, 32, PropModeReplace, (uchar *) &bytes, 1);
 
 	(void)new TQClipboardINCRTransaction(window, property, target, format, data, increment);
-	return qt_x_incr;
+	return tqt_x_incr;
     }
 
     // make sure we can perform the XChangeProperty in a single request
@@ -1040,7 +1040,7 @@ bool TQClipboard::event( TQEvent *e )
 		if ( ! pending_timer_id )
 		    pending_timer_id = TQApplication::clipboard()->startTimer( 0 );
 	    }
-	} else if (xevent->xselectionclear.selection == qt_xa_clipboard) {
+	} else if (xevent->xselectionclear.selection == tqt_xa_clipboard) {
 	    TQClipboardData *d = clipboardData();
 
 	    // ignore the event if it was generated before we gained selection ownership
@@ -1048,7 +1048,7 @@ bool TQClipboard::event( TQEvent *e )
 		break;
 
 	    TQDEBUG("TQClipboard: new clipboard owner 0x%lx at time %lx (%lx)",
-		  XGetSelectionOwner(dpy, qt_xa_clipboard),
+		  XGetSelectionOwner(dpy, tqt_xa_clipboard),
 		  xevent->xselectionclear.time, d->timestamp);
 
 	    if ( ! waiting_for_data ) {
@@ -1106,7 +1106,7 @@ bool TQClipboard::event( TQEvent *e )
 
 	    if ( req->selection == XA_PRIMARY ) {
 		d = selectionData();
-	    } else if ( req->selection == qt_xa_clipboard ) {
+	    } else if ( req->selection == tqt_xa_clipboard ) {
 		d = clipboardData();
 	    } else {
 #ifdef QT_CHECK_RANGE
@@ -1198,7 +1198,7 @@ bool TQClipboard::event( TQEvent *e )
 		} else if (target == XA_STRING
 			   || target == xa_text
 			   || target == xa_compound_text
-			   || target == qt_utf8_string) {
+			   || target == tqt_utf8_string) {
 		    ret = send_string_selection(d, target, req->requestor, property);
 		} else if (target == XA_PIXMAP
 			   || target == XA_BITMAP) {
@@ -1257,7 +1257,7 @@ TQClipboardWatcher::TQClipboardWatcher( TQClipboard::Mode mode )
 	break;
 
     case TQClipboard::Clipboard:
-	atom = qt_xa_clipboard;
+	atom = tqt_xa_clipboard;
 	break;
 
 #ifdef QT_CHECK_RANGE
@@ -1318,7 +1318,7 @@ const char* TQClipboardWatcher::format( int n ) const
 	    memset( target, 0, (size+4) * sizeof(Atom) );
 
 	    for ( i = 0; i < size; ++i ) {
-		if ( unsorted_target[i] == qt_utf8_string )
+		if ( unsorted_target[i] == tqt_utf8_string )
 		    target[0] = unsorted_target[i];
 		else if ( unsorted_target[i] == xa_compound_text )
 		    target[1] = unsorted_target[i];
@@ -1339,7 +1339,7 @@ const char* TQClipboardWatcher::format( int n ) const
 		    formatList.append("image/ppm");
 		else if ( target[i] == XA_STRING )
 		    formatList.append( "text/plain;charset=ISO-8859-1" );
-		else if ( target[i] == qt_utf8_string )
+		else if ( target[i] == tqt_utf8_string )
 		    formatList.append( "text/plain;charset=UTF-8" );
 		else if ( target[i] == xa_text ||
 			  target[i] == xa_compound_text )
@@ -1430,8 +1430,8 @@ TQByteArray TQClipboardWatcher::getDataInFormat(Atom fmtatom) const
 
     XSelectInput(dpy, win, NoEventMask); // don't listen for any events
 
-    XDeleteProperty(dpy, win, qt_selection_property);
-    XConvertSelection(dpy, atom, fmtatom, qt_selection_property, win, tqt_x_time);
+    XDeleteProperty(dpy, win, tqt_selection_property);
+    XConvertSelection(dpy, atom, fmtatom, tqt_selection_property, win, tqt_x_time);
     XSync(dpy, false);
 
     VTQDEBUG("TQClipboardWatcher::getDataInFormat: waiting for SelectionNotify event");
@@ -1448,12 +1448,12 @@ TQByteArray TQClipboardWatcher::getDataInFormat(Atom fmtatom) const
     Atom   type;
     XSelectInput(dpy, win, PropertyChangeMask);
 
-    if ( qt_xclb_read_property(dpy,win,qt_selection_property,true,
+    if ( qt_xclb_read_property(dpy,win,tqt_selection_property,true,
 			       &buf,0,&type,0,false) ) {
-	if ( type == qt_x_incr ) {
+	if ( type == tqt_x_incr ) {
 	    int nbytes = buf.size() >= 4 ? *((int*)buf.data()) : 0;
 	    buf = qt_xclb_read_incremental_property( dpy, win,
-						     qt_selection_property,
+						     tqt_selection_property,
 						     nbytes, false );
 	}
     }
@@ -1513,12 +1513,12 @@ void TQClipboard::setData( TQMimeSource* src, Mode mode )
     switch ( mode ) {
     case Selection:
 	atom = XA_PRIMARY;
-	sentinel_atom = qt_selection_sentinel;
+	sentinel_atom = tqt_selection_sentinel;
 	d = selectionData();
 	break;
 
     case Clipboard:
-	atom = qt_xa_clipboard;
+	atom = tqt_xa_clipboard;
 	sentinel_atom = tqt_clipboard_sentinel;
 	d = clipboardData();
 	break;
@@ -1581,7 +1581,7 @@ void TQClipboard::setData( TQMimeSource* src, Mode mode )
   TQClipBoard dataChanged() signal should be emitted.
 */
 
-bool qt_check_selection_sentinel()
+bool tqt_check_selection_sentinel()
 {
     bool doIt = true;
     if ( owner ) {
@@ -1604,7 +1604,7 @@ bool qt_check_selection_sentinel()
 
 	if (XGetWindowProperty(TQPaintDevice::x11AppDisplay(),
 			       TQApplication::desktop()->screen(0)->winId(),
-			       qt_selection_sentinel, 0, 2, False, XA_WINDOW,
+			       tqt_selection_sentinel, 0, 2, False, XA_WINDOW,
 			       &actualType, &actualFormat, &nitems,
 			       &bytesLeft, (unsigned char**)&owners) == Success) {
 	    if ( actualType == XA_WINDOW && actualFormat == 32 && nitems == 2 ) {
@@ -1632,7 +1632,7 @@ bool qt_check_selection_sentinel()
 }
 
 
-bool qt_check_clipboard_sentinel()
+bool tqt_check_clipboard_sentinel()
 {
     bool doIt = true;
     if (owner) {
diff --git a/src/kernel/tqcolor_x11.cpp b/src/kernel/tqcolor_x11.cpp
index 2e289cad..8efb20bc 100644
--- a/src/kernel/tqcolor_x11.cpp
+++ b/src/kernel/tqcolor_x11.cpp
@@ -278,7 +278,7 @@ void TQColor::initialize()
 	if ( spec == (int)TQApplication::ManyColor ) {
 	    screendata[scr]->color_reduce = true;
 
-	    switch ( qt_ncols_option ) {
+	    switch ( tqt_ncols_option ) {
 	    case 216:
 		// 6:6:6
 		screendata[scr]->col_div_r = screendata[scr]->col_div_g =
@@ -286,21 +286,21 @@ void TQColor::initialize()
 		break;
 	    default: {
 		// 2:3:1 proportions, solved numerically
-		if ( qt_ncols_option > 255 ) qt_ncols_option = 255;
-		if ( qt_ncols_option < 1 ) qt_ncols_option = 1;
+		if ( tqt_ncols_option > 255 ) tqt_ncols_option = 255;
+		if ( tqt_ncols_option < 1 ) tqt_ncols_option = 1;
 		int nr = 2;
 		int ng = 2;
 		int nb = 2;
 		for (;;) {
-		    if ( nb*2 < nr && (nb+1)*nr*ng < qt_ncols_option )
+		    if ( nb*2 < nr && (nb+1)*nr*ng < tqt_ncols_option )
 			nb++;
-		    else if ( nr*3 < ng*2 && nb*(nr+1)*ng < qt_ncols_option )
+		    else if ( nr*3 < ng*2 && nb*(nr+1)*ng < tqt_ncols_option )
 			nr++;
-		    else if ( nb*nr*(ng+1) < qt_ncols_option )
+		    else if ( nb*nr*(ng+1) < tqt_ncols_option )
 			ng++;
 		    else break;
 		}
-		qt_ncols_option = nr*ng*nb;
+		tqt_ncols_option = nr*ng*nb;
 		screendata[scr]->col_div_r = (255/(nr-1));
 		screendata[scr]->col_div_g = (255/(ng-1));
 		screendata[scr]->col_div_b = (255/(nb-1));
diff --git a/src/kernel/tqdnd_x11.cpp b/src/kernel/tqdnd_x11.cpp
index 4f6b54ba..4214616d 100644
--- a/src/kernel/tqdnd_x11.cpp
+++ b/src/kernel/tqdnd_x11.cpp
@@ -66,14 +66,14 @@ const int XKeyRelease = KeyRelease;
 
 // this stuff is copied from qapp_x11.cpp
 
-extern void qt_x11_intern_atom( const char *, Atom * );
+extern void tqt_x11_intern_atom( const char *, Atom * );
 
 #if defined(Q_C_CALLBACKS)
 extern "C" {
 #endif
 
-extern void qt_ignore_badwindow();
-extern bool qt_badwindow();
+extern void tqt_ignore_badwindow();
+extern bool tqt_badwindow();
 extern void tqt_enter_modal( TQWidget *widget );
 extern void tqt_leave_modal( TQWidget *widget );
 
@@ -81,7 +81,7 @@ extern void tqt_leave_modal( TQWidget *widget );
 }
 #endif
 
-extern Window qt_x11_findClientWindow( Window, Atom, bool );
+extern Window tqt_x11_findClientWindow( Window, Atom, bool );
 extern Atom tqt_wm_state;
 extern Time tqt_x_time;
 extern Time tqt_x_user_time;
@@ -99,26 +99,26 @@ extern TQByteArray qt_xclb_read_incremental_property( Display *dpy, Window win,
 						     int nbytes, bool nullterm );
 // and all this stuff is copied -into- qapp_x11.cpp
 
-void qt_xdnd_setup();
-void qt_handle_xdnd_enter( TQWidget *, const XEvent *, bool );
-void qt_handle_xdnd_position( TQWidget *, const XEvent *, bool );
-void qt_handle_xdnd_status( TQWidget *, const XEvent *, bool );
-void qt_handle_xdnd_leave( TQWidget *, const XEvent *, bool );
-void qt_handle_xdnd_drop( TQWidget *, const XEvent *, bool );
-void qt_handle_xdnd_finished( TQWidget *, const XEvent *, bool );
-void qt_xdnd_handle_selection_request( const XSelectionRequestEvent * );
-bool qt_xdnd_handle_badwindow();
+void tqt_xdnd_setup();
+void tqt_handle_xdnd_enter( TQWidget *, const XEvent *, bool );
+void tqt_handle_xdnd_position( TQWidget *, const XEvent *, bool );
+void tqt_handle_xdnd_status( TQWidget *, const XEvent *, bool );
+void tqt_handle_xdnd_leave( TQWidget *, const XEvent *, bool );
+void tqt_handle_xdnd_drop( TQWidget *, const XEvent *, bool );
+void tqt_handle_xdnd_finished( TQWidget *, const XEvent *, bool );
+void tqt_xdnd_handle_selection_request( const XSelectionRequestEvent * );
+bool tqt_xdnd_handle_badwindow();
 // client messages
-Atom qt_xdnd_enter;
-Atom qt_xdnd_position;
-Atom qt_xdnd_status;
-Atom qt_xdnd_leave;
-Atom qt_xdnd_drop;
-Atom qt_xdnd_finished;
+Atom tqt_xdnd_enter;
+Atom tqt_xdnd_position;
+Atom tqt_xdnd_status;
+Atom tqt_xdnd_leave;
+Atom tqt_xdnd_drop;
+Atom tqt_xdnd_finished;
 Atom qt_xdnd_type_list;
 const int qt_xdnd_version = 4;
 
-extern int qt_x11_translateButtonState( int s );
+extern int tqt_x11_translateButtonState( int s );
 
 // Actions
 //
@@ -163,9 +163,9 @@ static void qt_xdnd_cleanup();
 static void qt_xdnd_send_leave();
 
 // XDND selection
-Atom qt_xdnd_selection;
+Atom tqt_xdnd_selection;
 // other selection
-static Atom qt_selection_property;
+static Atom tqt_selection_property;
 // INCR
 static Atom qt_incr_atom;
 
@@ -204,7 +204,7 @@ static Time qt_xdnd_target_current_time;
 // screen number containing the pointer... -1 means default
 static int qt_xdnd_current_screen = -1;
 // state of dragging... true if dragging, false if not
-bool qt_xdnd_dragging = false;
+bool tqt_xdnd_dragging = false;
 // need to check state of keyboard modifiers
 static bool need_modifiers_check = false;
 
@@ -341,11 +341,11 @@ static bool qt_xdnd_enable( TQWidget* w, bool on )
 		XFree(proxy_id_ptr);
 		proxy_id_ptr = 0;
 		// Already exists. Real?
-		qt_ignore_badwindow();
+		tqt_ignore_badwindow();
 		XGetWindowProperty( w->x11Display(), proxy_id,
 		    qt_xdnd_proxy, 0, 1, False,
 		    XA_WINDOW, &type, &f,&n,&a,(uchar**)&proxy_id_ptr );
-		if ( qt_badwindow() || type != XA_WINDOW || !proxy_id_ptr || *proxy_id_ptr != proxy_id ) {
+		if ( tqt_badwindow() || type != XA_WINDOW || !proxy_id_ptr || *proxy_id_ptr != proxy_id ) {
 		    // Bogus - we will overwrite.
 		    proxy_id = 0;
 		}
@@ -428,7 +428,7 @@ Atom* qt_xdnd_str_to_atom( const char *mimeType )
 
     result = new Atom;
     *result = 0;
-    qt_x11_intern_atom( mimeType, result );
+    tqt_x11_intern_atom( mimeType, result );
     qt_xdnd_atom_numbers->insert( mimeType, result );
     qt_xdnd_atom_to_str( *result );
 
@@ -436,29 +436,29 @@ Atom* qt_xdnd_str_to_atom( const char *mimeType )
 }
 
 
-void qt_xdnd_setup() {
+void tqt_xdnd_setup() {
     // set up protocol atoms
-    qt_x11_intern_atom( "XdndEnter", &qt_xdnd_enter );
-    qt_x11_intern_atom( "XdndPosition", &qt_xdnd_position );
-    qt_x11_intern_atom( "XdndStatus", &qt_xdnd_status );
-    qt_x11_intern_atom( "XdndLeave", &qt_xdnd_leave );
-    qt_x11_intern_atom( "XdndDrop", &qt_xdnd_drop );
-    qt_x11_intern_atom( "XdndFinished", &qt_xdnd_finished );
-    qt_x11_intern_atom( "XdndTypeList", &qt_xdnd_type_list );
+    tqt_x11_intern_atom( "XdndEnter", &tqt_xdnd_enter );
+    tqt_x11_intern_atom( "XdndPosition", &tqt_xdnd_position );
+    tqt_x11_intern_atom( "XdndStatus", &tqt_xdnd_status );
+    tqt_x11_intern_atom( "XdndLeave", &tqt_xdnd_leave );
+    tqt_x11_intern_atom( "XdndDrop", &tqt_xdnd_drop );
+    tqt_x11_intern_atom( "XdndFinished", &tqt_xdnd_finished );
+    tqt_x11_intern_atom( "XdndTypeList", &qt_xdnd_type_list );
 
-    qt_x11_intern_atom( "XdndSelection", &qt_xdnd_selection );
+    tqt_x11_intern_atom( "XdndSelection", &tqt_xdnd_selection );
 
-    qt_x11_intern_atom( "XdndAware", &qt_xdnd_aware );
-    qt_x11_intern_atom( "XdndProxy", &qt_xdnd_proxy );
+    tqt_x11_intern_atom( "XdndAware", &qt_xdnd_aware );
+    tqt_x11_intern_atom( "XdndProxy", &qt_xdnd_proxy );
 
 
-    qt_x11_intern_atom( "XdndActionCopy", &qt_xdnd_action_copy );
-    qt_x11_intern_atom( "XdndActionLink", &qt_xdnd_action_link );
-    qt_x11_intern_atom( "XdndActionMove", &qt_xdnd_action_move );
-    qt_x11_intern_atom( "XdndActionPrivate", &qt_xdnd_action_private );
+    tqt_x11_intern_atom( "XdndActionCopy", &qt_xdnd_action_copy );
+    tqt_x11_intern_atom( "XdndActionLink", &qt_xdnd_action_link );
+    tqt_x11_intern_atom( "XdndActionMove", &qt_xdnd_action_move );
+    tqt_x11_intern_atom( "XdndActionPrivate", &qt_xdnd_action_private );
 
-    qt_x11_intern_atom( "QT_SELECTION", &qt_selection_property );
-    qt_x11_intern_atom( "INCR", &qt_incr_atom );
+    tqt_x11_intern_atom( "QT_SELECTION", &tqt_selection_property );
+    tqt_x11_intern_atom( "INCR", &qt_incr_atom );
 
     tqAddPostRoutine( qt_xdnd_cleanup );
 }
@@ -555,7 +555,7 @@ static bool checkEmbedded(TQWidget* w, const XEvent* xe)
     return false;
 }
 
-void qt_handle_xdnd_enter( TQWidget *, const XEvent * xe, bool /*passive*/ )
+void tqt_handle_xdnd_enter( TQWidget *, const XEvent * xe, bool /*passive*/ )
 {
     //if ( !w->neveHadAChildWithDropEventsOn() )
 	//return; // haven't been set up for dnd
@@ -601,7 +601,7 @@ void qt_handle_xdnd_enter( TQWidget *, const XEvent * xe, bool /*passive*/ )
 
 
 
-void qt_handle_xdnd_position( TQWidget *w, const XEvent * xe, bool passive )
+void tqt_handle_xdnd_position( TQWidget *w, const XEvent * xe, bool passive )
 {
     const unsigned long *l = (const unsigned long *)xe->xclient.data.l;
 
@@ -630,7 +630,7 @@ void qt_handle_xdnd_position( TQWidget *w, const XEvent * xe, bool passive )
     response.type = ClientMessage;
     response.window = qt_xdnd_dragsource_xid;
     response.format = 32;
-    response.message_type = qt_xdnd_status;
+    response.message_type = tqt_xdnd_status;
     response.data.l[0] = w->winId();
     response.data.l[1] = 0; // flags
     response.data.l[2] = 0; // x, y
@@ -731,14 +731,14 @@ void qt_handle_xdnd_position( TQWidget *w, const XEvent * xe, bool passive )
 	source = 0;
 
     if ( source )
-	qt_handle_xdnd_status( source, (const XEvent *)&response, passive );
+	tqt_handle_xdnd_status( source, (const XEvent *)&response, passive );
     else
 	XSendEvent( TQPaintDevice::x11AppDisplay(), qt_xdnd_dragsource_xid, False,
 		    NoEventMask, (XEvent*)&response );
 }
 
 
-void qt_handle_xdnd_status( TQWidget * w, const XEvent * xe, bool /*passive*/ )
+void tqt_handle_xdnd_status( TQWidget * w, const XEvent * xe, bool /*passive*/ )
 {
     const unsigned long *l = (const unsigned long *)xe->xclient.data.l;
     // Messy:  TQDragResponseEvent is just a call to TQDragManager function
@@ -759,7 +759,7 @@ void qt_handle_xdnd_status( TQWidget * w, const XEvent * xe, bool /*passive*/ )
 }
 
 
-void qt_handle_xdnd_leave( TQWidget *w, const XEvent * xe, bool /*passive*/ )
+void tqt_handle_xdnd_leave( TQWidget *w, const XEvent * xe, bool /*passive*/ )
 {
     //tqDebug( "xdnd leave" );
     if ( !qt_xdnd_current_widget ||
@@ -801,7 +801,7 @@ void qt_xdnd_send_leave()
     leave.type = ClientMessage;
     leave.window = qt_xdnd_current_target;
     leave.format = 32;
-    leave.message_type = qt_xdnd_leave;
+    leave.message_type = tqt_xdnd_leave;
     leave.data.l[0] = qt_xdnd_dragsource_xid;
     leave.data.l[1] = 0; // flags
     leave.data.l[2] = 0; // x, y
@@ -814,7 +814,7 @@ void qt_xdnd_send_leave()
 	w = 0;
 
     if ( w )
-	qt_handle_xdnd_leave( w, (const XEvent *)&leave, false );
+	tqt_handle_xdnd_leave( w, (const XEvent *)&leave, false );
     else
 	XSendEvent( TQPaintDevice::x11AppDisplay(), qt_xdnd_current_proxy_target, False,
 		    NoEventMask, (XEvent*)&leave );
@@ -824,7 +824,7 @@ void qt_xdnd_send_leave()
 
 
 
-void qt_handle_xdnd_drop( TQWidget *, const XEvent * xe, bool passive )
+void tqt_handle_xdnd_drop( TQWidget *, const XEvent * xe, bool passive )
 {
     if ( !qt_xdnd_current_widget ) {
 	qt_xdnd_dragsource_xid = 0;
@@ -868,7 +868,7 @@ void qt_handle_xdnd_drop( TQWidget *, const XEvent * xe, bool passive )
 	finished.type = ClientMessage;
 	finished.window = qt_xdnd_dragsource_xid;
 	finished.format = 32;
-	finished.message_type = qt_xdnd_finished;
+	finished.message_type = tqt_xdnd_finished;
 	finished.data.l[0] = qt_xdnd_current_widget?qt_xdnd_current_widget->topLevelWidget()->winId():0;
 	finished.data.l[1] = 0; // flags
 	XSendEvent( TQPaintDevice::x11AppDisplay(), qt_xdnd_dragsource_xid, False,
@@ -885,7 +885,7 @@ void qt_handle_xdnd_drop( TQWidget *, const XEvent * xe, bool passive )
 }
 
 
-void qt_handle_xdnd_finished( TQWidget *, const XEvent * xe, bool passive )
+void tqt_handle_xdnd_finished( TQWidget *, const XEvent * xe, bool passive )
 {
     const unsigned long *l = (const unsigned long *)xe->xclient.data.l;
 
@@ -912,7 +912,7 @@ void TQDragManager::timerEvent( TQTimerEvent* e )
             unsigned int mask;
             XQueryPointer( tqt_xdisplay(), tqt_xrootwin( qt_xdnd_current_screen ),
                 &root, &child, &root_x, &root_y, &win_x, &win_y, &mask );
-            if( updateMode( (ButtonState)qt_x11_translateButtonState( mask )))
+            if( updateMode( (ButtonState)tqt_x11_translateButtonState( mask )))
                 qt_xdnd_source_sameanswer = TQRect(); // force move
         }
         need_modifiers_check = true;
@@ -1166,10 +1166,10 @@ Window findRealWindow( const TQPoint & pos, Window w, int md )
 	return 0;
 
     if ( md ) {
-        qt_ignore_badwindow();
+        tqt_ignore_badwindow();
 	XWindowAttributes attr;
 	XGetWindowAttributes( TQPaintDevice::x11AppDisplay(), w, &attr );
-        if (qt_badwindow())
+        if (tqt_badwindow())
             return 0;
 
 	if ( attr.map_state == IsViewable
@@ -1308,10 +1308,10 @@ void TQDragManager::move( const TQPoint & globalPos )
 	int r, f;
 	unsigned long n, a;
 	WId *proxy_id;
-	qt_ignore_badwindow();
+	tqt_ignore_badwindow();
 	r = XGetWindowProperty( tqt_xdisplay(), target, qt_xdnd_proxy, 0,
 				1, False, XA_WINDOW, &type, &f,&n,&a,(uchar**)&proxy_id );
-	if ( ( r != Success ) || qt_badwindow() ) {
+	if ( ( r != Success ) || tqt_badwindow() ) {
 	    proxy_target = target = 0;
 	} else if ( type == XA_WINDOW && proxy_id ) {
 	    proxy_target = *proxy_id;
@@ -1319,7 +1319,7 @@ void TQDragManager::move( const TQPoint & globalPos )
 	    proxy_id = 0;
 	    r = XGetWindowProperty( tqt_xdisplay(), proxy_target, qt_xdnd_proxy, 0,
 				    1, False, XA_WINDOW, &type, &f,&n,&a,(uchar**)&proxy_id );
-	    if ( ( r != Success ) || qt_badwindow() || !type || !proxy_id || *proxy_id != proxy_target ) {
+	    if ( ( r != Success ) || tqt_badwindow() || !type || !proxy_id || *proxy_id != proxy_target ) {
 		// Bogus
 		proxy_target = 0;
 		target = 0;
@@ -1329,7 +1329,7 @@ void TQDragManager::move( const TQPoint & globalPos )
 	}
 	if ( proxy_target ) {
 	    int *tv;
-	    qt_ignore_badwindow();
+	    tqt_ignore_badwindow();
 	    r = XGetWindowProperty( tqt_xdisplay(), proxy_target, qt_xdnd_aware, 0,
 				    1, False, AnyPropertyType, &type, &f,&n,&a,(uchar**)&tv );
 	    if ( r != Success ) {
@@ -1338,7 +1338,7 @@ void TQDragManager::move( const TQPoint & globalPos )
 		target_version = TQMIN(qt_xdnd_version,tv ? *tv : 1);
 		if ( tv )
 		    XFree( tv );
-		if (!(!qt_badwindow() && type))
+		if (!(!tqt_badwindow() && type))
 		    target = 0;
 	    }
 	}
@@ -1371,7 +1371,7 @@ void TQDragManager::move( const TQPoint & globalPos )
 	    enter.type = ClientMessage;
 	    enter.window = target;
 	    enter.format = 32;
-	    enter.message_type = qt_xdnd_enter;
+	    enter.message_type = tqt_xdnd_enter;
 	    enter.data.l[0] = object->source()->winId();
 	    enter.data.l[1] = flags;
 	    enter.data.l[2] = type.size()>0 ? type[0] : 0;
@@ -1382,7 +1382,7 @@ void TQDragManager::move( const TQPoint & globalPos )
 					       globalPos.y() -2 , 5, 5 );
 
 	    if ( w ) {
-		qt_handle_xdnd_enter( w, (const XEvent *)&enter, false );
+		tqt_handle_xdnd_enter( w, (const XEvent *)&enter, false );
 	    } else if ( target ) {
 		XSendEvent( TQPaintDevice::x11AppDisplay(), proxy_target, False, NoEventMask,
 			    (XEvent*)&enter );
@@ -1395,7 +1395,7 @@ void TQDragManager::move( const TQPoint & globalPos )
 	move.type = ClientMessage;
 	move.window = target;
 	move.format = 32;
-	move.message_type = qt_xdnd_position;
+	move.message_type = tqt_xdnd_position;
 	move.window = target;
 	move.data.l[0] = object->source()->winId();
 	move.data.l[1] = 0; // flags
@@ -1404,7 +1404,7 @@ void TQDragManager::move( const TQPoint & globalPos )
 	move.data.l[4] = qtaction_to_xdndaction( global_requested_action );
 
 	if ( w )
-	    qt_handle_xdnd_position( w, (const XEvent *)&move, false );
+	    tqt_handle_xdnd_position( w, (const XEvent *)&move, false );
 	else
 	    XSendEvent( TQPaintDevice::x11AppDisplay(), proxy_target, False, NoEventMask,
 			(XEvent*)&move );
@@ -1431,7 +1431,7 @@ void TQDragManager::drop()
     drop.type = ClientMessage;
     drop.window = qt_xdnd_current_target;
     drop.format = 32;
-    drop.message_type = qt_xdnd_drop;
+    drop.message_type = tqt_xdnd_drop;
     drop.data.l[0] = object->source()->winId();
     drop.data.l[1] = 0; // flags
     drop.data.l[2] = tqt_x_time;
@@ -1444,7 +1444,7 @@ void TQDragManager::drop()
 	w = 0;
 
     if ( w )
-	qt_handle_xdnd_drop( w, (const XEvent *)&drop, false );
+	tqt_handle_xdnd_drop( w, (const XEvent *)&drop, false );
     else
 	XSendEvent( TQPaintDevice::x11AppDisplay(), qt_xdnd_current_proxy_target, False,
 		    NoEventMask, (XEvent*)&drop );
@@ -1459,7 +1459,7 @@ void TQDragManager::drop()
 
 
 
-bool qt_xdnd_handle_badwindow()
+bool tqt_xdnd_handle_badwindow()
 {
     if ( qt_xdnd_source_object && qt_xdnd_current_target ) {
 	qt_xdnd_current_target = 0;
@@ -1523,7 +1523,7 @@ bool TQDropEvent::provides( const char *mimeType ) const
     return true;
 }
 
-void qt_xdnd_handle_selection_request( const XSelectionRequestEvent * req )
+void tqt_xdnd_handle_selection_request( const XSelectionRequestEvent * req )
 {
     if ( !req )
 	return;
@@ -1583,7 +1583,7 @@ static TQByteArray qt_xdnd_obtain_data( const char *format )
 	result = *(qt_xdnd_target_data->find( (int)*a ));
     } else {
 	if ( XGetSelectionOwner( TQPaintDevice::x11AppDisplay(),
-				 qt_xdnd_selection ) == None )
+				 tqt_xdnd_selection ) == None )
 	    return result; // should never happen?
 
 	TQWidget* tw = qt_xdnd_current_widget;
@@ -1592,9 +1592,9 @@ static TQByteArray qt_xdnd_obtain_data( const char *format )
 	    tw = new TQWidget;
 	}
 	XConvertSelection( TQPaintDevice::x11AppDisplay(),
-			   qt_xdnd_selection,
+			   tqt_xdnd_selection,
                            *a,
-			   qt_xdnd_selection,
+			   tqt_xdnd_selection,
 			   tw->winId(),
                            qt_xdnd_target_current_time );
 	XFlush( TQPaintDevice::x11AppDisplay() );
@@ -1608,13 +1608,13 @@ static TQByteArray qt_xdnd_obtain_data( const char *format )
 
 	    if ( qt_xclb_read_property( TQPaintDevice::x11AppDisplay(),
 					tw->winId(),
-					qt_xdnd_selection, true,
+					tqt_xdnd_selection, true,
 					&result, 0, &type, 0, false ) ) {
 		if ( type == qt_incr_atom ) {
 		    int nbytes = result.size() >= 4 ? *((int*)result.data()) : 0;
 		    result = qt_xclb_read_incremental_property( TQPaintDevice::x11AppDisplay(),
 								tw->winId(),
-								qt_xdnd_selection,
+								tqt_xdnd_selection,
 								nbytes, false );
 		} else if ( type != *a ) {
 		    // (includes None) tqDebug( "TQt clipboard: unknown atom %ld", type);
@@ -1782,7 +1782,7 @@ bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode )
     qt_xdnd_deco->x11SetWindowTransient( dragSource->topLevelWidget());
     tqApp->installEventFilter( this );
     qt_xdnd_source_current_time = tqt_x_time;
-    XSetSelectionOwner( TQPaintDevice::x11AppDisplay(), qt_xdnd_selection,
+    XSetSelectionOwner( TQPaintDevice::x11AppDisplay(), tqt_xdnd_selection,
 			dragSource->topLevelWidget()->winId(),
 			qt_xdnd_source_current_time );
     oldstate = ButtonState(-1); // #### Should use state that caused the drag
@@ -1801,7 +1801,7 @@ bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode )
 #endif
 
     dndCancelled = false;
-    qt_xdnd_dragging = true;
+    tqt_xdnd_dragging = true;
 
     if (!TQWidget::mouseGrabber())
 	qt_xdnd_deco->grabMouse();
@@ -1817,7 +1817,7 @@ bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode )
     killTimer( heartbeat );
     heartbeat = -1;
     qt_xdnd_current_screen = -1;
-    qt_xdnd_dragging = false;
+    tqt_xdnd_dragging = false;
 
     return ((! dndCancelled) && // source del?
 	    (global_accepted_action == TQDropEvent::Copy &&
diff --git a/src/kernel/tqdragobject.cpp b/src/kernel/tqdragobject.cpp
index 7cb9c09a..82547934 100644
--- a/src/kernel/tqdragobject.cpp
+++ b/src/kernel/tqdragobject.cpp
@@ -260,7 +260,7 @@ static const char * const link_xpm[] = {
 #ifndef TQT_NO_DRAGANDDROP
 
 // the universe's only drag manager
-TQDragManager * qt_dnd_manager = 0;
+TQDragManager * tqt_dnd_manager = 0;
 
 
 TQDragManager::TQDragManager()
@@ -277,8 +277,8 @@ TQDragManager::TQDragManager()
     object = 0;
     dragSource = 0;
     dropWidget = 0;
-    if ( !qt_dnd_manager )
-	qt_dnd_manager = this;
+    if ( !tqt_dnd_manager )
+	tqt_dnd_manager = this;
     beingCancelled = false;
     restoreCursor = false;
     willDrop = false;
@@ -291,7 +291,7 @@ TQDragManager::~TQDragManager()
     if ( restoreCursor )
 	TQApplication::restoreOverrideCursor();
 #endif
-    qt_dnd_manager = 0;
+    tqt_dnd_manager = 0;
     delete [] pm_cursor;
 }
 
@@ -312,7 +312,7 @@ TQDragObject::TQDragObject( TQWidget * dragSource, const char * name )
     d = new TQDragObjectData();
     d->pm_cursor = 0;
 #ifndef TQT_NO_DRAGANDDROP
-    if ( !qt_dnd_manager && tqApp )
+    if ( !tqt_dnd_manager && tqApp )
 	(void)new TQDragManager();
 #endif
 }
@@ -326,11 +326,11 @@ TQDragObject::TQDragObject( TQWidget * dragSource, const char * name )
 TQDragObject::~TQDragObject()
 {
 #ifndef TQT_NO_DRAGANDDROP
-    if ( qt_dnd_manager && qt_dnd_manager->object == this )
-	qt_dnd_manager->cancel( false );
+    if ( tqt_dnd_manager && tqt_dnd_manager->object == this )
+	tqt_dnd_manager->cancel( false );
     if ( d->pm_cursor ) {
-	for ( int i = 0; i < qt_dnd_manager->n_cursor; i++ )
-	    qt_dnd_manager->pm_cursor[i] = d->pm_cursor[i];
+	for ( int i = 0; i < tqt_dnd_manager->n_cursor; i++ )
+	    tqt_dnd_manager->pm_cursor[i] = d->pm_cursor[i];
 	delete [] d->pm_cursor;
     }
 #endif
@@ -358,8 +358,8 @@ void TQDragObject::setPixmap(TQPixmap pm, const TQPoint& hotspot)
 {
     d->pixmap = pm;
     d->hot = hotspot;
-    if ( qt_dnd_manager && qt_dnd_manager->object == this )
-	qt_dnd_manager->updatePixmap();
+    if ( tqt_dnd_manager && tqt_dnd_manager->object == this )
+	tqt_dnd_manager->updatePixmap();
 }
 
 /*!
@@ -401,9 +401,9 @@ void TQDragObject::setCursor( DragMode m, const TQPixmap &cursor )
 {
     if ( d->pm_cursor == 0 ) {
 	// safe default cursors
-	d->pm_cursor = new TQPixmap[qt_dnd_manager->n_cursor];
-	for ( int i = 0; i < qt_dnd_manager->n_cursor; i++ )
-	    d->pm_cursor[i] = qt_dnd_manager->pm_cursor[i];
+	d->pm_cursor = new TQPixmap[tqt_dnd_manager->n_cursor];
+	for ( int i = 0; i < tqt_dnd_manager->n_cursor; i++ )
+	    d->pm_cursor[i] = tqt_dnd_manager->pm_cursor[i];
     }
 
     int index;
@@ -420,8 +420,8 @@ void TQDragObject::setCursor( DragMode m, const TQPixmap &cursor )
     }
 
     // override default cursor
-    for ( index = 0; index < qt_dnd_manager->n_cursor; index++ )
-	qt_dnd_manager->pm_cursor[index] = cursor;
+    for ( index = 0; index < tqt_dnd_manager->n_cursor; index++ )
+	tqt_dnd_manager->pm_cursor[index] = cursor;
 }
 
 /*!
@@ -446,7 +446,7 @@ TQPixmap *TQDragObject::cursor( DragMode m ) const
 	break;
     }
 
-    return qt_dnd_manager->pm_cursor+index;
+    return tqt_dnd_manager->pm_cursor+index;
 }
 
 #endif // 0
@@ -546,8 +546,8 @@ void TQDragObject::dragLink()
 */
 bool TQDragObject::drag( DragMode mode )
 {
-    if ( qt_dnd_manager )
-	return qt_dnd_manager->drag( this, mode );
+    if ( tqt_dnd_manager )
+	return tqt_dnd_manager->drag( this, mode );
     else
 	return false;
 }
@@ -1698,7 +1698,7 @@ bool TQUriDrag::decodeToUnicodeUris( const TQMimeSource* e, TQStringList& l )
 */
 TQWidget* TQDropEvent::source() const
 {
-    return qt_dnd_manager ? qt_dnd_manager->dragSource : 0;
+    return tqt_dnd_manager ? tqt_dnd_manager->dragSource : 0;
 }
 #endif
 
diff --git a/src/kernel/tqeventloop_x11.cpp b/src/kernel/tqeventloop_x11.cpp
index 74014ddb..ec777823 100644
--- a/src/kernel/tqeventloop_x11.cpp
+++ b/src/kernel/tqeventloop_x11.cpp
@@ -173,10 +173,10 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags )
 							// from tqapplication_x11.cpp
 							extern Atom tqt_wm_protocols;
 							extern Atom tqt_wm_take_focus;
-							extern Atom qt_qt_scrolldone;
+							extern Atom tqt_scrolldone;
 				
 							// only keep the wm_take_focus and
-							// qt_qt_scrolldone protocols, discard all
+							// tqt_scrolldone protocols, discard all
 							// other client messages
 							if ( event.xclient.format != 32 )
 								continue;
@@ -184,7 +184,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags )
 							if ( event.xclient.message_type == tqt_wm_protocols ||
 								(Atom) event.xclient.data.l[0] == tqt_wm_take_focus )
 								break;
-							if ( event.xclient.message_type == qt_qt_scrolldone )
+							if ( event.xclient.message_type == tqt_scrolldone )
 								break;
 							}
 				
diff --git a/src/kernel/tqeventloop_x11_glib.cpp b/src/kernel/tqeventloop_x11_glib.cpp
index d031d21e..552eb108 100644
--- a/src/kernel/tqeventloop_x11_glib.cpp
+++ b/src/kernel/tqeventloop_x11_glib.cpp
@@ -342,10 +342,10 @@ bool TQEventLoop::processX11Events()
 								// from tqapplication_x11.cpp
 								extern Atom tqt_wm_protocols;
 								extern Atom tqt_wm_take_focus;
-								extern Atom qt_qt_scrolldone;
+								extern Atom tqt_scrolldone;
 
 								// only keep the wm_take_focus and
-								// qt_qt_scrolldone protocols, discard all
+								// tqt_scrolldone protocols, discard all
 								// other client messages
 								if ( event.xclient.format != 32 )
 									continue;
@@ -353,7 +353,7 @@ bool TQEventLoop::processX11Events()
 								if ( event.xclient.message_type == tqt_wm_protocols ||
 									(Atom) event.xclient.data.l[0] == tqt_wm_take_focus )
 									break;
-								if ( event.xclient.message_type == qt_qt_scrolldone )
+								if ( event.xclient.message_type == tqt_scrolldone )
 									break;
 								}
 
diff --git a/src/kernel/tqmotifdnd_x11.cpp b/src/kernel/tqmotifdnd_x11.cpp
index 18e69b13..9435579f 100644
--- a/src/kernel/tqmotifdnd_x11.cpp
+++ b/src/kernel/tqmotifdnd_x11.cpp
@@ -317,26 +317,26 @@ static int _DndIndexToTargets(Display * display,
 			      int index,
 			      Atom ** targets);
 
-extern void qt_x11_intern_atom( const char *, Atom * );
+extern void tqt_x11_intern_atom( const char *, Atom * );
 
 /////////////////////////////////////////////////////////////////
 
-void qt_x11_motifdnd_init()
+void tqt_x11_motifdnd_init()
 {
     /* Init atoms used in the com */
 
-    qt_x11_intern_atom( "_MOTIF_DRAG_AND_DROP_MESSAGE", &atom_message_type );
-    qt_x11_intern_atom( "_MOTIF_DRAG_INITIATOR_INFO", &atom_src_property_type );
-    qt_x11_intern_atom( "_MOTIF_DRAG_RECEIVER_INFO", &atom_receiver_info );
-    qt_x11_intern_atom( "_MOTIF_DRAG_WINDOW", &atom_motif_window );
-    qt_x11_intern_atom( "_MOTIF_DRAG_TARGETS", &atom_target_list );
+    tqt_x11_intern_atom( "_MOTIF_DRAG_AND_DROP_MESSAGE", &atom_message_type );
+    tqt_x11_intern_atom( "_MOTIF_DRAG_INITIATOR_INFO", &atom_src_property_type );
+    tqt_x11_intern_atom( "_MOTIF_DRAG_RECEIVER_INFO", &atom_receiver_info );
+    tqt_x11_intern_atom( "_MOTIF_DRAG_WINDOW", &atom_motif_window );
+    tqt_x11_intern_atom( "_MOTIF_DRAG_TARGETS", &atom_target_list );
 
-    qt_x11_intern_atom( "XmTRANSFER_SUCCESS", &Dnd_transfer_success );
-    qt_x11_intern_atom( "XmTRANSFER_FAILURE", &Dnd_transfer_failure );
+    tqt_x11_intern_atom( "XmTRANSFER_SUCCESS", &Dnd_transfer_success );
+    tqt_x11_intern_atom( "XmTRANSFER_FAILURE", &Dnd_transfer_failure );
 
     char my_dnd_selection_name[30];  // 11-digit number should be enough
     sprintf(my_dnd_selection_name, "_MY_DND_SELECTION_%d", (int)getpid());
-    qt_x11_intern_atom( my_dnd_selection_name, &Dnd_selection );
+    tqt_x11_intern_atom( my_dnd_selection_name, &Dnd_selection );
 }
 
 static unsigned char DndByteOrder ()
@@ -804,7 +804,7 @@ void qt_motifdnd_enable( TQWidget *widget, bool )
 }
 
 
-void qt_motifdnd_handle_msg( TQWidget * /* w */ , const XEvent * xe, bool /* passive */ )
+void tqt_motifdnd_handle_msg( TQWidget * /* w */ , const XEvent * xe, bool /* passive */ )
 {
 
     XEvent event = *xe;
diff --git a/src/kernel/tqpainter_x11.cpp b/src/kernel/tqpainter_x11.cpp
index a2561469..9995e657 100644
--- a/src/kernel/tqpainter_x11.cpp
+++ b/src/kernel/tqpainter_x11.cpp
@@ -61,7 +61,7 @@
 static TQRegion* paintEventClipRegion = 0;
 static TQPaintDevice* paintEventDevice = 0;
 
-void qt_set_paintevent_clipping( TQPaintDevice* dev, const TQRegion& region)
+void tqt_set_paintevent_clipping( TQPaintDevice* dev, const TQRegion& region)
 {
     if ( !paintEventClipRegion )
         paintEventClipRegion = new TQRegion( region );
@@ -70,7 +70,7 @@ void qt_set_paintevent_clipping( TQPaintDevice* dev, const TQRegion& region)
     paintEventDevice = dev;
 }
 
-void qt_clear_paintevent_clipping()
+void tqt_clear_paintevent_clipping()
 {
     delete paintEventClipRegion;
     paintEventClipRegion = 0;
diff --git a/src/kernel/tqsizegrip.cpp b/src/kernel/tqsizegrip.cpp
index 928c8e7d..f2fb7fea 100644
--- a/src/kernel/tqsizegrip.cpp
+++ b/src/kernel/tqsizegrip.cpp
@@ -48,7 +48,7 @@
 
 #if defined(TQ_WS_X11)
 #include "tqt_x11_p.h"
-extern Atom qt_sizegrip;			// defined in tqapplication_x11.cpp
+extern Atom tqt_sizegrip;			// defined in tqapplication_x11.cpp
 #elif defined (TQ_WS_WIN )
 #include "tqobjectlist.h"
 #include "qt_windows.h"
@@ -124,7 +124,7 @@ TQSizeGrip::TQSizeGrip( TQWidget * parent, const char* name )
     if ( !qt_sizegrip_workspace( this ) ) {
 	WId id = winId();
 	XChangeProperty(tqt_xdisplay(), topLevelWidget()->winId(),
-			qt_sizegrip, XA_WINDOW, 32, PropModeReplace,
+			tqt_sizegrip, XA_WINDOW, 32, PropModeReplace,
 			(unsigned char *)&id, 1);
     }
 #endif
@@ -144,7 +144,7 @@ TQSizeGrip::~TQSizeGrip()
     if ( !TQApplication::closingDown() && parentWidget() ) {
 	WId id = None;
  	XChangeProperty(tqt_xdisplay(), topLevelWidget()->winId(),
- 			qt_sizegrip, XA_WINDOW, 32, PropModeReplace,
+ 			tqt_sizegrip, XA_WINDOW, 32, PropModeReplace,
  			(unsigned char *)&id, 1);
     }
 #endif
diff --git a/src/kernel/tqtranslator.cpp b/src/kernel/tqtranslator.cpp
index 2d22dfff..31f9b833 100644
--- a/src/kernel/tqtranslator.cpp
+++ b/src/kernel/tqtranslator.cpp
@@ -169,7 +169,7 @@ static uint elfHash( const char * name )
     return h;
 }
 
-extern bool qt_detectRTLLanguage();
+extern bool tqt_detectRTLLanguage();
 
 class TQTranslatorPrivate {
 public:
@@ -371,7 +371,7 @@ TQTranslator::~TQTranslator()
 }
 
 
-extern bool qt_detectRTLLanguage();
+extern bool tqt_detectRTLLanguage();
 
 /*!
     Loads \a filename, which may be an absolute file name or relative
@@ -597,7 +597,7 @@ bool TQTranslator::do_load( const uchar *data, int len )
     array.resetRawData( (const char *) data, len );
 
     if ( tqApp && tqApp->translators && tqApp->translators->contains(this) )
-	tqApp->setReverseLayout( qt_detectRTLLanguage() );
+	tqApp->setReverseLayout( tqt_detectRTLLanguage() );
     return ok;
 }
 
@@ -690,7 +690,7 @@ void TQTranslator::clear()
 #endif
 
     if ( tqApp ) {
-	tqApp->setReverseLayout( qt_detectRTLLanguage() );
+	tqApp->setReverseLayout( tqt_detectRTLLanguage() );
 
 	TQWidgetList *list = TQApplication::topLevelWidgets();
 	TQWidgetListIt it( *list );
diff --git a/src/kernel/tqwidget.cpp b/src/kernel/tqwidget.cpp
index a4b4ca21..7ab03a0b 100644
--- a/src/kernel/tqwidget.cpp
+++ b/src/kernel/tqwidget.cpp
@@ -1237,12 +1237,12 @@ void TQWidget::deactivateWidgetCleanup()
 	tqApp->setActiveWindow( 0 );
     // If the is the active mouse press widget, reset it
 #ifdef TQ_WS_MAC
-    extern TQGuardedPtr<TQWidget> qt_button_down;
+    extern TQGuardedPtr<TQWidget> tqt_button_down;
 #else
-    extern TQWidget *qt_button_down;
+    extern TQWidget *tqt_button_down;
 #endif
-    if ( this == (TQWidget *)qt_button_down )
-	qt_button_down = 0;
+    if ( this == (TQWidget *)tqt_button_down )
+	tqt_button_down = 0;
 }
 
 
diff --git a/src/kernel/tqwidget.h b/src/kernel/tqwidget.h
index c7a9733b..399c30b1 100644
--- a/src/kernel/tqwidget.h
+++ b/src/kernel/tqwidget.h
@@ -622,7 +622,7 @@ private:
     friend bool qt_mac_update_sizer(TQWidget *, int);
     friend TQWidget *qt_recursive_match(TQWidget *widg, int x, int y);
     friend bool qt_paint_children(TQWidget *,TQRegion &, uchar ops);
-    friend TQMAC_PASCAL OSStatus qt_window_event(EventHandlerCallRef er, EventRef event, void *);
+    friend TQMAC_PASCAL OSStatus tqt_window_event(EventHandlerCallRef er, EventRef event, void *);
     friend void qt_event_request_updates(TQWidget *, const TQRegion &, bool subtract);
     friend bool qt_window_rgn(WId, short, RgnHandle, bool);
     friend class TQDragManager;
diff --git a/src/kernel/tqwidget_p.h b/src/kernel/tqwidget_p.h
index 6815665c..92e28386 100644
--- a/src/kernel/tqwidget_p.h
+++ b/src/kernel/tqwidget_p.h
@@ -58,7 +58,7 @@
 #endif // QT_H 
 
 #if defined (TQ_WS_X11)
-extern int qt_widget_tlw_gravity;
+extern int tqt_widget_tlw_gravity;
 #endif
 
 #endif
diff --git a/src/kernel/tqwidget_x11.cpp b/src/kernel/tqwidget_x11.cpp
index 06fa0cb5..7521ff65 100644
--- a/src/kernel/tqwidget_x11.cpp
+++ b/src/kernel/tqwidget_x11.cpp
@@ -56,14 +56,14 @@
 // NOT REVISED
 
 // defined in tqapplication_x11.cpp
-extern Window qt_x11_wm_client_leader;
-extern void qt_x11_create_wm_client_leader();
+extern Window tqt_x11_wm_client_leader;
+extern void tqt_x11_create_wm_client_leader();
 
 // defined in tqapplication_x11.cpp
-void qt_insert_sip( TQWidget*, int, int );
-int  qt_sip_count( TQWidget* );
-bool qt_wstate_iconified( WId );
-void qt_updated_rootinfo();
+void tqt_insert_sip( TQWidget*, int, int );
+int  tqt_sip_count( TQWidget* );
+bool tqt_wstate_iconified( WId );
+void tqt_updated_rootinfo();
 
 #ifndef TQT_NO_IM
 #include "tqinputcontext.h"
@@ -71,16 +71,16 @@ void qt_updated_rootinfo();
 #endif
 
 // Paint event clipping magic
-extern void qt_set_paintevent_clipping( TQPaintDevice* dev, const TQRegion& region);
-extern void qt_clear_paintevent_clipping();
+extern void tqt_set_paintevent_clipping( TQPaintDevice* dev, const TQRegion& region);
+extern void tqt_clear_paintevent_clipping();
 
 extern bool qt_dnd_enable( TQWidget* w, bool on );
-extern bool qt_nograb();
+extern bool tqt_nograb();
 
 // defined in tqapplication_x11.cpp
-extern void qt_deferred_map_add( TQWidget* );
-extern void qt_deferred_map_take( TQWidget* );
-extern bool qt_deferred_map_contains(TQWidget *);
+extern void tqt_deferred_map_add( TQWidget* );
+extern void tqt_deferred_map_take( TQWidget* );
+extern bool tqt_deferred_map_contains(TQWidget *);
 
 static TQWidget *mouseGrb    = 0;
 static TQWidget *keyboardGrb = 0;
@@ -92,7 +92,7 @@ extern Time tqt_x_user_time;
 #ifndef TQT_NO_XSYNC
 extern Atom tqt_net_wm_sync_request_counter;
 extern Atom tqt_net_wm_sync_request;
-extern bool qt_use_xsync;
+extern bool tqt_use_xsync;
 #endif
 
 // defined in tqfont_x11.cpp
@@ -106,16 +106,16 @@ int tqt_x11_create_desktop_on_screen = -1;
 
 // defined in tqapplication_x11.cpp
 extern Atom tqt_wm_state;
-extern Atom qt_wm_change_state;
+extern Atom tqt_wm_change_state;
 extern Atom tqt_wm_delete_window;
 extern Atom tqt_wm_take_focus;
-extern Atom qt_wm_client_leader;
+extern Atom tqt_wm_client_leader;
 extern Atom tqt_window_role;
 extern Atom tqt_sm_client_id;
-extern Atom qt_utf8_string;
+extern Atom tqt_utf8_string;
 extern Atom tqt_net_wm_context_help;
 extern Atom tqt_net_wm_ping;
-extern Atom qt_xa_motif_wm_hints;
+extern Atom tqt_xa_motif_wm_hints;
 extern Atom tqt_net_wm_name;
 extern Atom tqt_net_wm_icon_name;
 extern Atom tqt_net_wm_state;
@@ -153,9 +153,9 @@ extern Atom tqt_net_wm_window_type_dnd;
 extern Atom tqt_net_wm_window_type_tooltip;
 extern Atom tqt_net_wm_pid;
 extern Atom tqt_net_wm_user_time;
-extern Atom qt_enlightenment_desktop;
+extern Atom tqt_enlightenment_desktop;
 extern Atom tqt_net_virtual_roots;
-extern bool qt_broken_wm;
+extern bool tqt_broken_wm;
 
 // defined in tqapplication_x11.cpp
 extern bool tqt_net_supports(Atom);
@@ -166,8 +166,8 @@ extern XDevice *devStylus;
 extern XDevice *devEraser;
 extern XEventClass event_list_stylus[7];
 extern XEventClass event_list_eraser[7];
-extern int qt_curr_events_stylus;
-extern int qt_curr_events_eraser;
+extern int tqt_curr_events_stylus;
+extern int tqt_curr_events_eraser;
 #endif
 
 const uint stdWidgetEventMask =			// X event mask
@@ -664,10 +664,10 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
 	wm_hints.input = True;
 	wm_hints.initial_state = NormalState;
 	wm_hints.flags = InputHint | StateHint;
-	if ( !qt_x11_wm_client_leader )
-	    qt_x11_create_wm_client_leader();
+	if ( !tqt_x11_wm_client_leader )
+	    tqt_x11_create_wm_client_leader();
 
-	wm_hints.window_group = qt_x11_wm_client_leader;
+	wm_hints.window_group = tqt_x11_wm_client_leader;
 	wm_hints.flags |= WindowGroupHint;
 
 	XClassHint class_hint;
@@ -692,10 +692,10 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
 
         // set mwm hints
         if ( mwmhints.flags != 0l )
-            XChangeProperty(dpy, id, qt_xa_motif_wm_hints, qt_xa_motif_wm_hints, 32,
+            XChangeProperty(dpy, id, tqt_xa_motif_wm_hints, tqt_xa_motif_wm_hints, 32,
                             PropModeReplace, (unsigned char *) &mwmhints, 5);
         else
-            XDeleteProperty(dpy, id, qt_xa_motif_wm_hints);
+            XDeleteProperty(dpy, id, tqt_xa_motif_wm_hints);
 
 	// set _NET_WM_WINDOW_STATE
 	if (curr_winstate > 0)
@@ -742,11 +742,11 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
 			 (unsigned char *)name(), tqstrlen( name() ) );
 
 	// set client leader property
-	if ( !qt_x11_wm_client_leader )
-	    qt_x11_create_wm_client_leader();
-	XChangeProperty( dpy, id, qt_wm_client_leader,
+	if ( !tqt_x11_wm_client_leader )
+	    tqt_x11_create_wm_client_leader();
+	XChangeProperty( dpy, id, tqt_wm_client_leader,
 			 XA_WINDOW, 32, PropModeReplace,
-			 (unsigned char *)&qt_x11_wm_client_leader, 1 );
+			 (unsigned char *)&tqt_x11_wm_client_leader, 1 );
     }
 
     if ( initializeWindow ) {
@@ -807,7 +807,7 @@ void TQWidget::destroy( bool destroyWindow, bool destroySubWindows )
 	if ( keyboardGrb == this )
 	    releaseKeyboard();
 	if ( isTopLevel() )
-	    qt_deferred_map_take( this );
+	    tqt_deferred_map_take( this );
 	if ( testWFlags(WShowModal) )		// just be sure we leave modal
 	    tqt_leave_modal( this );
 	else if ( testWFlags(WType_Popup) )
@@ -1186,7 +1186,7 @@ void TQWidget::setBackgroundPixmapDirect( const TQPixmap &pixmap )
 	extra->bg_pix->x11SetScreen( x11Screen() );
 	XSetWindowBackgroundPixmap( x11Display(), winId(), extra->bg_pix->handle() );
 	if ( testWFlags(WType_Desktop) )	// save rootinfo later
-	    qt_updated_rootinfo();
+	    tqt_updated_rootinfo();
     }
 }
 
@@ -1295,7 +1295,7 @@ void TQWidget::setCaption( const TQString &caption )
     XSetWMName( x11Display(), winId(), tqstring_to_xtp(caption) );
 
     TQCString net_wm_name = caption.utf8();
-    XChangeProperty(x11Display(), winId(), tqt_net_wm_name, qt_utf8_string, 8,
+    XChangeProperty(x11Display(), winId(), tqt_net_wm_name, tqt_utf8_string, 8,
 		    PropModeReplace, (unsigned char *)net_wm_name.data(),
 		    net_wm_name.length());
 
@@ -1380,7 +1380,7 @@ void TQWidget::setIconText( const TQString &iconText )
     XSetWMIconName( x11Display(), winId(), tqstring_to_xtp(iconText) );
 
     TQCString net_wm_icon_name = iconText.utf8();
-    XChangeProperty(x11Display(), winId(), tqt_net_wm_icon_name, qt_utf8_string, 8, PropModeReplace,
+    XChangeProperty(x11Display(), winId(), tqt_net_wm_icon_name, tqt_utf8_string, 8, PropModeReplace,
 		    (unsigned char *) net_wm_icon_name.data(), net_wm_icon_name.length());
 }
 
@@ -1407,11 +1407,11 @@ void TQWidget::setMouseTracking( bool enable )
 #if defined (QT_TABLET_SUPPORT)
  	if ( devStylus != NULL ) {
  	    XSelectExtensionEvent( x11Display(), winId(), event_list_stylus,
- 				   qt_curr_events_stylus );
+ 				   tqt_curr_events_stylus );
  	}
 	if ( devEraser != NULL ) {
 	    XSelectExtensionEvent( x11Display(), winId(), event_list_eraser,
-				   qt_curr_events_eraser );
+				   tqt_curr_events_eraser );
 	}
 #endif
     }
@@ -1445,7 +1445,7 @@ void TQWidget::setMouseTracking( bool enable )
 
 void TQWidget::grabMouse()
 {
-    if ( isVisible() && !qt_nograb() ) {
+    if ( isVisible() && !tqt_nograb() ) {
 	if ( mouseGrb )
 	    mouseGrb->releaseMouse();
 #if defined(QT_CHECK_STATE)
@@ -1488,7 +1488,7 @@ void TQWidget::grabMouse()
 
 void TQWidget::grabMouse( const TQCursor &cursor )
 {
-    if ( !qt_nograb() ) {
+    if ( !tqt_nograb() ) {
 	if ( mouseGrb != this ) {
 	    if ( mouseGrb ) {
 		mouseGrb->releaseMouse();
@@ -1525,7 +1525,7 @@ void TQWidget::grabMouse( const TQCursor &cursor )
 
 void TQWidget::releaseMouse()
 {
-    if ( !qt_nograb() && mouseGrb == this ) {
+    if ( !tqt_nograb() && mouseGrb == this ) {
 	XUngrabPointer( x11Display(),  tqt_x_time );
 	XFlush( x11Display() );
 	mouseGrb = 0;
@@ -1552,7 +1552,7 @@ void TQWidget::releaseMouse()
 
 void TQWidget::grabKeyboard()
 {
-    if ( !qt_nograb() ) {
+    if ( !tqt_nograb() ) {
 	if ( keyboardGrb != this ) {
 	    if ( keyboardGrb ) {
 		keyboardGrb->releaseKeyboard();
@@ -1571,7 +1571,7 @@ void TQWidget::grabKeyboard()
 
 void TQWidget::releaseKeyboard()
 {
-    if ( !qt_nograb() && keyboardGrb == this ) {
+    if ( !tqt_nograb() && keyboardGrb == this ) {
 	XUngrabKeyboard( x11Display(), tqt_x_time );
 	keyboardGrb = 0;
     }
@@ -1632,7 +1632,7 @@ TQWidget *TQWidget::keyboardGrabber()
 void TQWidget::setActiveWindow()
 {
     TQWidget *tlw = topLevelWidget();
-    if ( tlw->isVisible() && !tlw->topData()->embedded && !qt_deferred_map_contains(tlw) ) {
+    if ( tlw->isVisible() && !tlw->topData()->embedded && !tqt_deferred_map_contains(tlw) ) {
 	XSetInputFocus( x11Display(), tlw->winId(), RevertToNone, tqt_x_time);
 	focusInputContext();
     }
@@ -1768,7 +1768,7 @@ void TQWidget::repaint( int x, int y, int w, int h, bool erase )
 	    return; // nothing to do
 	TQPaintEvent e( r, erase );
 	if ( r != rect() )
-	    qt_set_paintevent_clipping( this, r );
+	    tqt_set_paintevent_clipping( this, r );
 	if ( erase && w != 0 && h != 0 ) {
 	    if ( backgroundOrigin() == WidgetOrigin )
 		XClearArea( x11Display(), winId(), x, y, w, h, False );
@@ -1776,7 +1776,7 @@ void TQWidget::repaint( int x, int y, int w, int h, bool erase )
 		this->erase( x, y, w, h);
 	}
 	TQApplication::sendEvent( this, &e );
-	qt_clear_paintevent_clipping();
+	tqt_clear_paintevent_clipping();
     }
 }
 
@@ -1804,11 +1804,11 @@ void TQWidget::repaint( const TQRegion& reg, bool erase )
 {
     if ( (widget_state & (WState_Visible|WState_BlockUpdates)) == WState_Visible ) {
 	TQPaintEvent e( reg, erase );
-	qt_set_paintevent_clipping( this, reg );
+	tqt_set_paintevent_clipping( this, reg );
 	if ( erase )
 	    this->erase(reg);
 	TQApplication::sendEvent( this, &e );
-	qt_clear_paintevent_clipping();
+	tqt_clear_paintevent_clipping();
     }
 }
 
@@ -1904,7 +1904,7 @@ void TQWidget::setWindowState(uint newstate)
 		if (newstate & WindowMinimized) {
 		    XEvent e;
 		    e.xclient.type = ClientMessage;
-		    e.xclient.message_type = qt_wm_change_state;
+		    e.xclient.message_type = tqt_wm_change_state;
 		    e.xclient.display = x11Display();
 		    e.xclient.window = winid;
 		    e.xclient.format = 32;
@@ -1972,7 +1972,7 @@ void TQWidget::showWindow()
 	    topData()->parentWinId &&
 	    topData()->parentWinId != TQPaintDevice::x11AppRootWindow(x11Screen()) &&
 	    !isMinimized() ) {
-	    qt_deferred_map_add( this );
+	    tqt_deferred_map_add( this );
 	    return;
 	}
 
@@ -2022,7 +2022,7 @@ void TQWidget::hideWindow()
     clearWState( WState_Exposed );
     deactivateWidgetCleanup();
     if ( isTopLevel() ) {
-	qt_deferred_map_take( this );
+	tqt_deferred_map_take( this );
 	if ( winId() ) // in nsplugin, may be 0
 	    XWithdrawWindow( x11Display(), winId(), x11Screen() );
 
@@ -2100,13 +2100,13 @@ void TQWidget::stackUnder( TQWidget* w)
 
 
 /*
-  The global variable qt_widget_tlw_gravity defines the window gravity of
+  The global variable tqt_widget_tlw_gravity defines the window gravity of
   the next top level window to be created. We do this when setting the
   main widget's geometry and the "-geometry" command line option contains
   a negative position.
 */
 
-int qt_widget_tlw_gravity = NorthWestGravity;
+int tqt_widget_tlw_gravity = NorthWestGravity;
 
 static void do_size_hints( TQWidget* widget, TQWExtra *x )
 {
@@ -2147,9 +2147,9 @@ static void do_size_hints( TQWidget* widget, TQWExtra *x )
 	}
     }
     s.flags |= PWinGravity;
-    s.win_gravity = qt_widget_tlw_gravity;	// usually NorthWest
+    s.win_gravity = tqt_widget_tlw_gravity;	// usually NorthWest
     // reset in case it was set
-    qt_widget_tlw_gravity =
+    tqt_widget_tlw_gravity =
         TQApplication::reverseLayout() ? NorthEastGravity : NorthWestGravity;
     XSetWMNormalHints( widget->x11Display(), widget->winId(), &s );
 }
@@ -2205,7 +2205,7 @@ void TQWidget::internalSetGeometry( int x, int y, int w, int h, bool isMove )
     }
 
     if ( isMove ) {
-	if (! qt_broken_wm)
+	if (! tqt_broken_wm)
 	    // pos() is right according to ICCCM 4.1.5
 	    XMoveResizeWindow( dpy, winid, pos().x(), pos().y(), w, h );
 	else
@@ -2216,7 +2216,7 @@ void TQWidget::internalSetGeometry( int x, int y, int w, int h, bool isMove )
 
     if ( isVisible() ) {
 	if ( isMove && pos() != oldPos ) {
-	    if ( ! qt_broken_wm ) {
+	    if ( ! tqt_broken_wm ) {
 		// pos() is right according to ICCCM 4.1.5
 		TQMoveEvent e( pos(), oldPos );
 		TQApplication::sendEvent( this, &e );
@@ -2236,7 +2236,7 @@ void TQWidget::internalSetGeometry( int x, int y, int w, int h, bool isMove )
 	}
     } else {
 	if ( isMove && pos() != oldPos ) {
-	    if ( ! qt_broken_wm )
+	    if ( ! tqt_broken_wm )
 		// pos() is right according to ICCCM 4.1.5
 		TQApplication::postEvent( this, new TQMoveEvent( pos(), oldPos ) );
 	    else
@@ -2498,7 +2498,7 @@ void TQWidget::scroll( int dx, int dy, const TQRect& r )
 	return;
 
     // Don't let the server be bogged-down with repaint events
-    bool repaint_immediately = qt_sip_count( this ) < 3;
+    bool repaint_immediately = tqt_sip_count( this ) < 3;
 
     if ( dx ) {
 	int x = x2 == sr.x() ? sr.x()+w : sr.x();
@@ -2515,7 +2515,7 @@ void TQWidget::scroll( int dx, int dy, const TQRect& r )
 	    XClearArea( dpy, winid, sr.x(), y, sr.width(), TQABS(dy), True );
     }
 
-    qt_insert_sip( this, dx, dy ); // #### ignores r
+    tqt_insert_sip( this, dx, dy ); // #### ignores r
 }
 
 
@@ -2674,7 +2674,7 @@ void TQWidget::checkChildrenDnd()
 // create a window's XSyncCounter
 void TQWidget::createSyncCounter()
 {
-    if( !qt_use_xsync || !isTopLevel() || topData()->syncCounter )
+    if( !tqt_use_xsync || !isTopLevel() || topData()->syncCounter )
         return;
     XSyncValue zero;
     XSyncIntToValue( &zero, 0 );
@@ -2684,7 +2684,7 @@ void TQWidget::createSyncCounter()
 // destroy a window's XSyncCounter
 void TQWidget::destroySyncCounter()
 {
-    if( !qt_use_xsync || !extra || !extra->topextra
+    if( !tqt_use_xsync || !extra || !extra->topextra
         || !extra->topextra->syncCounter )
         return;
     XSyncDestroyCounter( x11Display(), extra->topextra->syncCounter );
@@ -2694,7 +2694,7 @@ void TQWidget::destroySyncCounter()
 // increment a window's XSyncCounter
 void TQWidget::incrementSyncCounter()
 {
-    if( qt_use_xsync && topData()->syncCounter &&
+    if( tqt_use_xsync && topData()->syncCounter &&
         !(topData()->syncRequestValue[0] == 0 &&
          topData()->syncRequestValue[1] == 0) ) {
         XSyncValue val;
@@ -2857,7 +2857,7 @@ void TQWidget::updateFrameStrut() const
 	data_ret = 0;
 	if (p == r ||
 	    (XGetWindowProperty(TQPaintDevice::x11AppDisplay(), p,
-				qt_enlightenment_desktop, 0, 1, False, XA_CARDINAL,
+				tqt_enlightenment_desktop, 0, 1, False, XA_CARDINAL,
 				&type_ret, &i_unused, &l_unused, &l_unused,
 				&data_ret) == Success &&
 	     type_ret == XA_CARDINAL)) {
diff --git a/src/tools/tqglobal.cpp b/src/tools/tqglobal.cpp
index 14ed0d40..49459fe0 100644
--- a/src/tools/tqglobal.cpp
+++ b/src/tools/tqglobal.cpp
@@ -231,7 +231,7 @@ int qMacVersion()
     }
     return macver;
 }
-TQt::MacintoshVersion qt_macver = (TQt::MacintoshVersion)qMacVersion();
+TQt::MacintoshVersion tqt_macver = (TQt::MacintoshVersion)qMacVersion();
 
 // HFS+ filesystems use decomposing unicode for certain layers in unicode
 // In general these don't look great as a user visible string.
@@ -254,7 +254,7 @@ TQString qt_mac_precomposeFileName(const TQString &str)
 #elif defined(Q_OS_WIN32) || defined(Q_OS_CYGWIN) || defined(Q_OS_TEMP)
 bool qt_winunicode;
 # ifdef Q_OS_TEMP
-  DWORD qt_cever = 0;
+  DWORD tqt_cever = 0;
 # endif // Q_OS_TEMP
 
 #include "qt_windows.h"
@@ -286,8 +286,8 @@ int qWinVersion()
 	OSVERSIONINFOW osver;
 	osver.dwOSVersionInfoSize = sizeof(osver);
 	GetVersionEx( &osver );
-	qt_cever = osver.dwMajorVersion * 100;
-	qt_cever += osver.dwMinorVersion * 10;
+	tqt_cever = osver.dwMajorVersion * 100;
+	tqt_cever += osver.dwMinorVersion * 10;
 #endif
 	switch ( osver.dwPlatformId ) {
 	case VER_PLATFORM_WIN32s:
@@ -304,7 +304,7 @@ int qWinVersion()
 	    break;
 	case VER_PLATFORM_WIN32_CE:
 #ifdef Q_OS_TEMP
-	    if ( qt_cever >= 400 )
+	    if ( tqt_cever >= 400 )
 		winver = TQt::WV_CENET;
 	    else
 #endif
@@ -338,7 +338,7 @@ int qWinVersion()
     return winver;
 }
 
-TQt::WindowsVersion qt_winver = (TQt::WindowsVersion)qWinVersion();
+TQt::WindowsVersion tqt_winver = (TQt::WindowsVersion)qWinVersion();
 #endif
 
 
diff --git a/src/widgets/tqmenubar.cpp b/src/widgets/tqmenubar.cpp
index 653c00a5..aa1f9c36 100644
--- a/src/widgets/tqmenubar.cpp
+++ b/src/widgets/tqmenubar.cpp
@@ -72,7 +72,7 @@ static bool inMenu = false;
 #endif
 
 #if defined(TQ_WS_X11)
-extern int qt_xfocusout_grab_counter; // defined in tqapplication_x11.cpp
+extern int tqt_xfocusout_grab_counter; // defined in tqapplication_x11.cpp
 #endif
 
 /*!
@@ -581,7 +581,7 @@ bool TQMenuBar::eventFilter( TQObject *object, TQEvent *event )
 	    } else if ( ke->stateAfter() == AltButton ) {
 		waitforalt = 1;
 #if defined(TQ_WS_X11)
-		TQMenuData::d->aInt = qt_xfocusout_grab_counter;
+		TQMenuData::d->aInt = tqt_xfocusout_grab_counter;
 #endif
 		if ( f && f != object )
 		    f->installEventFilter( this );
@@ -607,7 +607,7 @@ bool TQMenuBar::eventFilter( TQObject *object, TQEvent *event )
 	if ( waitforalt && event->type() == TQEvent::KeyRelease &&
 	    ( ke->key() == Key_Alt || ke->key() == Key_Meta )
 #if defined(TQ_WS_X11)
-		&& TQMenuData::d->aInt == qt_xfocusout_grab_counter
+		&& TQMenuData::d->aInt == tqt_xfocusout_grab_counter
 #endif
 	    ) {
 	    setAltMode( true );
diff --git a/src/widgets/tqtitlebar.cpp b/src/widgets/tqtitlebar.cpp
index 09968c17..0fd67803 100644
--- a/src/widgets/tqtitlebar.cpp
+++ b/src/widgets/tqtitlebar.cpp
@@ -216,7 +216,7 @@ void TQTitleBar::readColors()
 	pal.setColor( TQPalette::Inactive, TQColorGroup::Highlight, qt_colorref2qrgb(GetSysColor(COLOR_INACTIVECAPTION)) );
 	pal.setColor( TQPalette::Active, TQColorGroup::HighlightedText, qt_colorref2qrgb(GetSysColor(COLOR_CAPTIONTEXT)) );
 	pal.setColor( TQPalette::Inactive, TQColorGroup::HighlightedText, qt_colorref2qrgb(GetSysColor(COLOR_INACTIVECAPTIONTEXT)) );
-	if ( qt_winver != TQt::WV_95 && qt_winver != WV_NT ) {
+	if ( tqt_winver != TQt::WV_95 && tqt_winver != WV_NT ) {
 	    colorsInitialized = true;
 	    BOOL gradient;
 	    QT_WA( {
-- 
cgit v1.2.3

