Replace Q_WS_* defines with TQ_WS_* equivalents

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/256/head
Michele Calgaro 3 months ago
parent 15d75fb42d
commit 03aa7238b3
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -19,7 +19,7 @@
#include <tqaccel.h> #include <tqaccel.h>
#include <tqcursor.h> #include <tqcursor.h>
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
#else #else
@ -62,7 +62,7 @@ void KFullscreenVideoWidget::windowActivationChange( bool )
bool KFullscreenVideoWidget::x11Event( XEvent *event ) bool KFullscreenVideoWidget::x11Event( XEvent *event )
{ {
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
if (event->type == ClientMessage && if (event->type == ClientMessage &&
event->xclient.message_type == event->xclient.message_type ==
XInternAtom( tqt_xdisplay(), "VPO_RESIZE_NOTIFY", False )) XInternAtom( tqt_xdisplay(), "VPO_RESIZE_NOTIFY", False ))
@ -191,7 +191,7 @@ void KVideoWidget::embed( Arts::VideoPlayObject vpo )
TQImage KVideoWidget::snapshot( Arts::VideoPlayObject vpo ) TQImage KVideoWidget::snapshot( Arts::VideoPlayObject vpo )
{ {
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
Window root; Window root;
Pixmap pixmap; Pixmap pixmap;
XImage *xImage; XImage *xImage;
@ -358,7 +358,7 @@ void KVideoWidget::resizeNotify( int width, int height )
bool KVideoWidget::x11Event( XEvent *event ) bool KVideoWidget::x11Event( XEvent *event )
{ {
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
if (event->type == ClientMessage && if (event->type == ClientMessage &&
event->xclient.message_type == event->xclient.message_type ==
XInternAtom( tqt_xdisplay(), "VPO_RESIZE_NOTIFY", False )) XInternAtom( tqt_xdisplay(), "VPO_RESIZE_NOTIFY", False ))

@ -27,7 +27,7 @@ Author: Ralph Mor, X Consortium
#define _ICELIBINT_H_ #define _ICELIBINT_H_
#include "config.h" #include "config.h"
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
#include <X11/Xos.h> #include <X11/Xos.h>
#include <X11/Xfuncs.h> #include <X11/Xfuncs.h>
#include <X11/Xmd.h> //schroder #include <X11/Xmd.h> //schroder

@ -27,7 +27,7 @@ Author: Ralph Mor, X Consortium
#define _ICEPROTO_H_ #define _ICEPROTO_H_
#include "config.h" #include "config.h"
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
#include <X11/Xmd.h> #include <X11/Xmd.h>
#else #else
#if defined(__alpha__) || defined(__ia64__) || defined(__s390x__) #if defined(__alpha__) || defined(__ia64__) || defined(__s390x__)

@ -51,7 +51,7 @@ from The Open Group.
#define _XTRANS_H_ #define _XTRANS_H_
#include "config.h" #include "config.h"
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
#include <X11/Xfuncproto.h> #include <X11/Xfuncproto.h>
#include <X11/Xos.h> #include <X11/Xos.h>
#else #else

@ -47,7 +47,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "marshall.cpp" #include "marshall.cpp"
#if defined Q_WS_X11 #if defined TQ_WS_X11
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>
#endif #endif
@ -429,7 +429,7 @@ TQStringList dcopSessionList( const TQString &user, const TQString &home )
void sendUserTime( const char* app ) void sendUserTime( const char* app )
{ {
#if defined Q_WS_X11 #if defined TQ_WS_X11
static unsigned long time = 0; static unsigned long time = 0;
if( time == 0 ) if( time == 0 )
{ {

@ -24,7 +24,7 @@
#include "config.h" #include "config.h"
#include <tqglobal.h> #include <tqglobal.h>
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/X.h> #include <X11/X.h>
#include <X11/Xproto.h> #include <X11/Xproto.h>

@ -68,7 +68,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <dcopclient.h> #include <dcopclient.h>
#include <dcopobject.h> #include <dcopobject.h>
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
#include <X11/Xmd.h> #include <X11/Xmd.h>
#endif #endif
extern "C" { extern "C" {
@ -215,7 +215,7 @@ TQCString DCOPClient::iceauthPath()
{ {
#if defined(ICEAUTH_PATH) #if defined(ICEAUTH_PATH)
if ( if (
# if defined(Q_WS_WIN) # if defined(TQ_WS_WIN)
access(ICEAUTH_PATH, 0) == 0 access(ICEAUTH_PATH, 0) == 0
# else # else
access(ICEAUTH_PATH, X_OK) == 0 access(ICEAUTH_PATH, X_OK) == 0
@ -266,9 +266,9 @@ static TQCString dcopServerFile(const TQCString &hostname, bool old)
fprintf(stderr, "Aborting. $HOME is not set.\n"); fprintf(stderr, "Aborting. $HOME is not set.\n");
exit(1); exit(1);
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
TQCString disp = getenv("DISPLAY"); TQCString disp = getenv("DISPLAY");
#elif defined(Q_WS_QWS) #elif defined(TQ_WS_QWS)
TQCString disp = getenv("QWS_DISPLAY"); TQCString disp = getenv("QWS_DISPLAY");
#else #else
TQCString disp; TQCString disp;
@ -700,7 +700,7 @@ void DCOPClient::bindToApp()
void DCOPClient::suspend() void DCOPClient::suspend()
{ {
#ifdef Q_WS_WIN //TODO: remove (win32 ports sometimes do not create notifiers) #ifdef TQ_WS_WIN //TODO: remove (win32 ports sometimes do not create notifiers)
if (!d->notifier) if (!d->notifier)
return; return;
#endif #endif
@ -710,7 +710,7 @@ void DCOPClient::suspend()
void DCOPClient::resume() void DCOPClient::resume()
{ {
#ifdef Q_WS_WIN //TODO: remove #ifdef TQ_WS_WIN //TODO: remove
if (!d->notifier) if (!d->notifier)
return; return;
#endif #endif
@ -720,7 +720,7 @@ void DCOPClient::resume()
bool DCOPClient::isSuspended() const bool DCOPClient::isSuspended() const
{ {
#if defined(Q_WS_WIN) || defined(Q_WS_MAC) //TODO: REMOVE #if defined(TQ_WS_WIN) || defined(TQ_WS_MAC) //TODO: REMOVE
if (!d->notifier) if (!d->notifier)
return false; return false;
#endif #endif

@ -37,7 +37,7 @@
#define DCOPReplyDelayed 6 #define DCOPReplyDelayed 6
#define DCOPFind 7 #define DCOPFind 7
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xmd.h> #include <X11/Xmd.h>
#endif #endif

@ -109,10 +109,10 @@ $allowed_k_dcop_accesors_re = join("|", @allowed_k_dcop_accesors);
QM_EXPORT_WORKSPACE => '', QM_EXPORT_WORKSPACE => '',
TQT_NO_REMOTE => 'TQT_NO_REMOTE', TQT_NO_REMOTE => 'TQT_NO_REMOTE',
QT_ACCESSIBILITY_SUPPORT => 'QT_ACCESSIBILITY_SUPPORT', QT_ACCESSIBILITY_SUPPORT => 'QT_ACCESSIBILITY_SUPPORT',
Q_WS_X11 => 'Q_WS_X11', TQ_WS_X11 => 'TQ_WS_X11',
TQ_DISABLE_COPY => 'TQ_DISABLE_COPY', TQ_DISABLE_COPY => 'TQ_DISABLE_COPY',
Q_WS_QWS => 'undef', TQ_WS_QWS => 'undef',
Q_WS_MAC => 'undef', TQ_WS_MAC => 'undef',
TQ_OBJECT => <<'CODE', TQ_OBJECT => <<'CODE',
public: public:
virtual QMetaObject *metaObject() const; virtual QMetaObject *metaObject() const;
@ -451,8 +451,8 @@ LOOP:
else { else {
# Skip platform-specific stuff, or #if 0 stuff # Skip platform-specific stuff, or #if 0 stuff
# or #else of something we parsed (e.g. for QKeySequence) # or #else of something we parsed (e.g. for QKeySequence)
if ( $p =~ m/^#\s*ifdef\s*Q_WS_/ or if ( $p =~ m/^#\s*ifdef\s*TQ_WS_/ or
$p =~ m/^#\s*if\s+defined\(Q_WS_/ or $p =~ m/^#\s*if\s+defined\(TQ_WS_/ or
$p =~ m/^#\s*if\s+defined\(Q_OS_/ or $p =~ m/^#\s*if\s+defined\(Q_OS_/ or
$p =~ m/^#\s*if\s+defined\(Q_CC_/ or $p =~ m/^#\s*if\s+defined\(Q_CC_/ or
$p =~ m/^#\s*if\s+defined\(TQT_THREAD_SUPPORT/ or $p =~ m/^#\s*if\s+defined\(TQT_THREAD_SUPPORT/ or

@ -34,7 +34,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <tqintdict.h> #include <tqintdict.h>
#include <tqapplication.h> #include <tqapplication.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xmd.h> #include <X11/Xmd.h>
#endif #endif

@ -54,9 +54,9 @@ static char *getDisplay()
/* /*
don't test for a value from tqglobal.h but instead distinguish don't test for a value from tqglobal.h but instead distinguish
Qt/X11 from Qt/Embedded by the fact that Qt/E apps have -DQWS Qt/X11 from Qt/Embedded by the fact that Qt/E apps have -DQWS
on the commandline (which in tqglobal.h however triggers Q_WS_QWS, on the commandline (which in tqglobal.h however triggers TQ_WS_QWS,
but we don't want to include that here) (Simon) but we don't want to include that here) (Simon)
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
*/ */
#if !defined(QWS) #if !defined(QWS)
display = getenv("DISPLAY"); display = getenv("DISPLAY");

@ -64,9 +64,9 @@ static char *getDisplay()
/* /*
don't test for a value from tqglobal.h but instead distinguish don't test for a value from tqglobal.h but instead distinguish
Qt/X11 from Qt/Embedded by the fact that Qt/E apps have -DQWS Qt/X11 from Qt/Embedded by the fact that Qt/E apps have -DQWS
on the commandline (which in tqglobal.h however triggers Q_WS_QWS, on the commandline (which in tqglobal.h however triggers TQ_WS_QWS,
but we don't want to include that here) (Simon) but we don't want to include that here) (Simon)
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
*/ */
#if !defined(QWS) #if !defined(QWS)
display = getenv("DISPLAY"); display = getenv("DISPLAY");

@ -110,7 +110,7 @@ bool KateCommands::CoreCommands::exec(Kate::View *view,
} }
else if ( cmd == "run-myself" ) else if ( cmd == "run-myself" )
{ {
#ifndef Q_WS_WIN //todo #ifndef TQ_WS_WIN //todo
return KateFactory::self()->jscript()->execute(v, v->doc()->text(), errorMsg); return KateFactory::self()->jscript()->execute(v, v->doc()->text(), errorMsg);
#else #else
return 0; return 0;

@ -60,7 +60,7 @@ class KateTextCursor
return stream; return stream;
} }
#ifndef Q_WS_WIN //not needed #ifndef TQ_WS_WIN //not needed
friend void tqSwap(KateTextCursor & c1, KateTextCursor & c2) { friend void tqSwap(KateTextCursor & c1, KateTextCursor & c2) {
KateTextCursor tmp = c1; KateTextCursor tmp = c1;
c1 = c2; c1 = c2;

@ -1986,7 +1986,7 @@ void KateDocument::configDialog()
KDialogBase::Ok, KDialogBase::Ok,
kapp->mainWidget() ); kapp->mainWidget() );
#ifndef Q_WS_WIN //TODO: reenable #ifndef TQ_WS_WIN //TODO: reenable
KWin::setIcons( kd->winId(), kapp->icon(), kapp->miniIcon() ); KWin::setIcons( kd->winId(), kapp->icon(), kapp->miniIcon() );
#endif #endif

@ -27,7 +27,7 @@
#include "kateschema.h" #include "kateschema.h"
#include "katesearch.h" #include "katesearch.h"
#include "kateconfig.h" #include "kateconfig.h"
#ifndef Q_WS_WIN //todo #ifndef TQ_WS_WIN //todo
#include "katejscript.h" #include "katejscript.h"
#endif #endif
#include "kateluaindentscript.h" #include "kateluaindentscript.h"
@ -137,7 +137,7 @@ KateFactory::KateFactory ()
// vm allocator // vm allocator
m_vm = new KVMAllocator (); m_vm = new KVMAllocator ();
#ifndef Q_WS_WIN //todo #ifndef TQ_WS_WIN //todo
// create script man (search scripts) + register commands // create script man (search scripts) + register commands
m_jscriptManager = new KateJScriptManager (); m_jscriptManager = new KateJScriptManager ();
KateCmd::self()->registerCommand (m_jscriptManager); KateCmd::self()->registerCommand (m_jscriptManager);
@ -251,7 +251,7 @@ void KateFactory::deregisterRenderer ( KateRenderer *renderer )
KateJScript *KateFactory::jscript () KateJScript *KateFactory::jscript ()
{ {
#ifndef Q_WS_WIN //todo #ifndef TQ_WS_WIN //todo
if (m_jscript) if (m_jscript)
return m_jscript; return m_jscript;

@ -57,7 +57,7 @@
//BEGIN KatePrinter //BEGIN KatePrinter
bool KatePrinter::print (KateDocument *doc) bool KatePrinter::print (KateDocument *doc)
{ {
#ifndef Q_WS_WIN //TODO: reenable #ifndef TQ_WS_WIN //TODO: reenable
KPrinter printer; KPrinter printer;
// docname is now always there, including the right Untitled name // docname is now always there, including the right Untitled name
@ -626,12 +626,12 @@ bool KatePrinter::print (KateDocument *doc)
return true; return true;
} }
#endif //!Q_WS_WIN #endif //!TQ_WS_WIN
return false; return false;
} }
//END KatePrinter //END KatePrinter
#ifndef Q_WS_WIN //TODO: reenable #ifndef TQ_WS_WIN //TODO: reenable
//BEGIN KatePrintTextSettings //BEGIN KatePrintTextSettings
KatePrintTextSettings::KatePrintTextSettings( KPrinter * /*printer*/, TQWidget *parent, const char *name ) KatePrintTextSettings::KatePrintTextSettings( KPrinter * /*printer*/, TQWidget *parent, const char *name )
: KPrintDialogPage( parent, name ) : KPrintDialogPage( parent, name )
@ -1000,4 +1000,4 @@ void KatePrintLayout::setOptions( const TQMap<TQString,TQString>& opts )
//END KatePrintLayout //END KatePrintLayout
#include "kateprinter.moc" #include "kateprinter.moc"
#endif //!Q_WS_WIN #endif //!TQ_WS_WIN

@ -40,7 +40,7 @@ class KatePrinter
static bool print (KateDocument *doc); static bool print (KateDocument *doc);
}; };
#ifndef Q_WS_WIN //TODO: reenable #ifndef TQ_WS_WIN //TODO: reenable
//BEGIN Text settings //BEGIN Text settings
/* /*
Text settings page: Text settings page:
@ -131,6 +131,6 @@ class KatePrintLayout : public KPrintDialogPage
KColorButton* kcbtnBoxColor; KColorButton* kcbtnBoxColor;
}; };
//END Layout //END Layout
#endif //!Q_WS_WIN #endif //!TQ_WS_WIN
#endif #endif

@ -48,7 +48,7 @@
#include <tdeio/global.h> #include <tdeio/global.h>
#include <kservicetype.h> #include <kservicetype.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <fixx11h.h> #include <fixx11h.h>
#endif #endif
@ -969,7 +969,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
TQByteArray data; TQByteArray data;
client->send( "*", "tdesycoca", "notifyDatabaseChanged()", data ); client->send( "*", "tdesycoca", "notifyDatabaseChanged()", data );
client->send( "ksplash", "", "upAndRunning(TQString)", TQString("kded")); client->send( "ksplash", "", "upAndRunning(TQString)", TQString("kded"));
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
XEvent e; XEvent e;
e.xclient.type = ClientMessage; e.xclient.type = ClientMessage;
e.xclient.message_type = XInternAtom( tqt_xdisplay(), "_KDE_SPLASH_PROGRESS", False ); e.xclient.message_type = XInternAtom( tqt_xdisplay(), "_KDE_SPLASH_PROGRESS", False );

@ -462,7 +462,7 @@ void KBuildSycoca::createMenu(TQString caption, TQString name, VFolderMenu::SubM
bool KBuildSycoca::recreate() bool KBuildSycoca::recreate()
{ {
TQString path(sycocaPath()); TQString path(sycocaPath());
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
printf("tdebuildsycoca: path='%s'\n", (const char*)path); printf("tdebuildsycoca: path='%s'\n", (const char*)path);
#endif #endif

@ -89,7 +89,7 @@ protected:
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
#if defined(Q_WS_QWS) || defined(Q_WS_MACX) #if defined(TQ_WS_QWS) || defined(TQ_WS_MACX)
typedef WId Window; typedef WId Window;
#endif #endif
@ -131,7 +131,7 @@ KDE_EXPORT int main(int argc, char *argv[])
saveWin = atol(args->getOption("window-id")); saveWin = atol(args->getOption("window-id"));
} }
#ifdef Q_WS_X11 //FIXME #ifdef TQ_WS_X11 //FIXME
if (args->isSet("root")) if (args->isSet("root"))
{ {
saveWin = RootWindow(tqt_xdisplay(), tqt_xscreen()); saveWin = RootWindow(tqt_xdisplay(), tqt_xscreen());

@ -22,7 +22,7 @@
#include <tqtimer.h> #include <tqtimer.h>
#include <tdeapplication.h> #include <tdeapplication.h>
#include "tdescreensaver.h" #include "tdescreensaver.h"
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <X11/Xlib.h> #include <X11/Xlib.h>
#else #else
typedef WId Window; typedef WId Window;
@ -56,7 +56,7 @@ KScreenSaver::KScreenSaver( WId id ) : TQWidget()
if ( id ) if ( id )
{ {
#ifdef Q_WS_X11 //FIXME #ifdef TQ_WS_X11 //FIXME
XGetGeometry(tqt_xdisplay(), (Drawable)id, &root, &ai, &ai, XGetGeometry(tqt_xdisplay(), (Drawable)id, &root, &ai, &ai,
&w, &h, &au, &au); &w, &h, &au, &au);
#endif #endif
@ -80,7 +80,7 @@ KScreenSaver::~KScreenSaver()
void KScreenSaver::embed( TQWidget *w ) void KScreenSaver::embed( TQWidget *w )
{ {
TDEApplication::sendPostedEvents(); TDEApplication::sendPostedEvents();
#ifdef Q_WS_X11 //FIXME #ifdef TQ_WS_X11 //FIXME
XReparentWindow(tqt_xdisplay(), w->winId(), winId(), 0, 0); XReparentWindow(tqt_xdisplay(), w->winId(), winId(), 0, 0);
#endif #endif
w->setGeometry( 0, 0, width(), height() ); w->setGeometry( 0, 0, width(), height() );

@ -62,7 +62,7 @@ static const char vroot_rcsid[] = "#Id: vroot.h,v 1.4 1991/09/30 19:23:16 stolck
#endif #endif
#include <tqwidget.h> #include <tqwidget.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <X11/X.h> #include <X11/X.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>

@ -36,7 +36,7 @@ LDAPUrl::LDAPUrl(const KURL &_url)
{ {
m_dn = path(); m_dn = path();
if ( !TQDir::isRelativePath(m_dn) ) if ( !TQDir::isRelativePath(m_dn) )
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
m_dn.remove(0,3); // e.g. "c:/" m_dn.remove(0,3); // e.g. "c:/"
#else #else
m_dn.remove(0,1); m_dn.remove(0,1);
@ -48,7 +48,7 @@ void LDAPUrl::setDn( const TQString &dn)
{ {
m_dn = dn; m_dn = dn;
if ( !TQDir::isRelativePath(m_dn) ) if ( !TQDir::isRelativePath(m_dn) )
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
m_dn.remove(0,3); // e.g. "c:/" m_dn.remove(0,3); // e.g. "c:/"
#else #else
m_dn.remove(0,1); m_dn.remove(0,1);

@ -191,7 +191,7 @@ static void setIcon(TQWidget *w, const TQString &iconName)
TQPixmap icon = DesktopIcon(iconName); TQPixmap icon = DesktopIcon(iconName);
TQPixmap miniIcon = SmallIcon(iconName); TQPixmap miniIcon = SmallIcon(iconName);
w->setIcon( icon ); //standard X11 w->setIcon( icon ); //standard X11
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
KWin::setIcons(w->winId(), icon, miniIcon ); KWin::setIcons(w->winId(), icon, miniIcon );
#endif #endif
} }

@ -53,7 +53,7 @@
#include <../tdeinit/tdelauncher_cmds.h> #include <../tdeinit/tdelauncher_cmds.h>
#if defined Q_WS_X11 #if defined TQ_WS_X11
#include <X11/Xlib.h> #include <X11/Xlib.h>
#endif #endif
@ -160,14 +160,14 @@ TDECrash::defaultCrashHandler (int sig)
// argument 0 has to be drkonqi // argument 0 has to be drkonqi
argv[i++] = "drkonqi"; argv[i++] = "drkonqi";
#if defined Q_WS_X11 #if defined TQ_WS_X11
// start up on the correct display // start up on the correct display
argv[i++] = "-display"; argv[i++] = "-display";
if ( tqt_xdisplay() ) if ( tqt_xdisplay() )
argv[i++] = XDisplayString(tqt_xdisplay()); argv[i++] = XDisplayString(tqt_xdisplay());
else else
argv[i++] = getenv("DISPLAY"); argv[i++] = getenv("DISPLAY");
#elif defined(Q_WS_QWS) #elif defined(TQ_WS_QWS)
// start up on the correct display // start up on the correct display
argv[i++] = "-display"; argv[i++] = "-display";
argv[i++] = getenv("QWS_DISPLAY"); argv[i++] = getenv("QWS_DISPLAY");
@ -351,9 +351,9 @@ static char *getDisplay()
/* /*
don't test for a value from tqglobal.h but instead distinguish don't test for a value from tqglobal.h but instead distinguish
Qt/X11 from Qt/Embedded by the fact that Qt/E apps have -DQWS Qt/X11 from Qt/Embedded by the fact that Qt/E apps have -DQWS
on the commandline (which in tqglobal.h however triggers Q_WS_QWS, on the commandline (which in tqglobal.h however triggers TQ_WS_QWS,
but we don't want to include that here) (Simon) but we don't want to include that here) (Simon)
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
*/ */
#if !defined(QWS) #if !defined(QWS)
display = getenv("DISPLAY"); display = getenv("DISPLAY");

@ -41,7 +41,7 @@
#ifdef __KDE_HAVE_GCC_VISIBILITY #ifdef __KDE_HAVE_GCC_VISIBILITY
#define KDE_NO_EXPORT __attribute__ ((visibility("hidden"))) #define KDE_NO_EXPORT __attribute__ ((visibility("hidden")))
#define KDE_EXPORT __attribute__ ((visibility("default"))) #define KDE_EXPORT __attribute__ ((visibility("default")))
#elif defined(Q_WS_WIN) #elif defined(TQ_WS_WIN)
#define KDE_NO_EXPORT #define KDE_NO_EXPORT
#define KDE_EXPORT __declspec(dllexport) #define KDE_EXPORT __declspec(dllexport)
#else #else

@ -40,7 +40,7 @@
#ifdef __KDE_HAVE_GCC_VISIBILITY #ifdef __KDE_HAVE_GCC_VISIBILITY
#define KDE_NO_EXPORT __attribute__ ((visibility("hidden"))) #define KDE_NO_EXPORT __attribute__ ((visibility("hidden")))
#define KDE_EXPORT __attribute__ ((visibility("default"))) #define KDE_EXPORT __attribute__ ((visibility("default")))
#elif defined(Q_WS_WIN) #elif defined(TQ_WS_WIN)
#define KDE_NO_EXPORT #define KDE_NO_EXPORT
#define KDE_EXPORT __declspec(dllexport) #define KDE_EXPORT __declspec(dllexport)
#else #else

@ -18,11 +18,11 @@
*/ */
#include "kglobalaccel.h" #include "kglobalaccel.h"
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include "kglobalaccel_x11.h" #include "kglobalaccel_x11.h"
#elif defined(Q_WS_WIN) #elif defined(TQ_WS_WIN)
#include "kglobalaccel_win.h" #include "kglobalaccel_win.h"
#elif defined(Q_WS_MACX) #elif defined(TQ_WS_MACX)
#include "kglobalaccel_mac.h" #include "kglobalaccel_mac.h"
#else #else
#include "kglobalaccel_emb.h" #include "kglobalaccel_emb.h"

@ -20,7 +20,7 @@
#include "config.h" #include "config.h"
#include <tqwindowdefs.h> #include <tqwindowdefs.h>
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
#include "kglobalaccel_win.h" #include "kglobalaccel_win.h"
#include "kglobalaccel.h" #include "kglobalaccel.h"
@ -161,7 +161,7 @@ bool TDEGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, TDE
bool failed = false; bool failed = false;
if( bGrab ) { if( bGrab ) {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
failed = handler.error( true ); // sync now failed = handler.error( true ); // sync now
#endif #endif
// If grab failed, then ungrab any grabs that could possibly succeed // If grab failed, then ungrab any grabs that could possibly succeed
@ -342,4 +342,4 @@ void TDEGlobalAccelPrivate::slotActivated( int iAction )
#include "kglobalaccel_win.moc" #include "kglobalaccel_win.moc"
#endif // !Q_WS_WIN #endif // !TQ_WS_WIN

@ -20,7 +20,7 @@
#include "config.h" #include "config.h"
#include <tqwindowdefs.h> #include <tqwindowdefs.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include "kglobalaccel_x11.h" #include "kglobalaccel_x11.h"
#include "kglobalaccel.h" #include "kglobalaccel.h"
@ -35,7 +35,7 @@
#include <kdebug.h> #include <kdebug.h>
#include <kkeynative.h> #include <kkeynative.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <kxerrorhandler.h> #include <kxerrorhandler.h>
#endif #endif
@ -197,7 +197,7 @@ bool TDEGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, TDE
return false; return false;
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
KXErrorHandler handler( XGrabErrorHandler ); KXErrorHandler handler( XGrabErrorHandler );
#endif #endif
// We'll have to grab 8 key modifier combinations in order to cover all // We'll have to grab 8 key modifier combinations in order to cover all
@ -227,7 +227,7 @@ bool TDEGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, TDE
bool failed = false; bool failed = false;
if( bGrab ) { if( bGrab ) {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
failed = handler.error( true ); // sync now failed = handler.error( true ); // sync now
#endif #endif
// If grab failed, then ungrab any grabs that could possibly succeed // If grab failed, then ungrab any grabs that could possibly succeed
@ -451,4 +451,4 @@ void TDEGlobalAccelPrivate::slotActivated( int iAction )
#include "kglobalaccel_x11.moc" #include "kglobalaccel_x11.moc"
#endif // !Q_WS_X11 #endif // !TQ_WS_X11

@ -35,7 +35,7 @@
#include <kicontheme.h> #include <kicontheme.h>
#include "kiconeffect.h" #include "kiconeffect.h"
#if defined(Q_WS_WIN) || defined(Q_WS_MACX) #if defined(TQ_WS_WIN) || defined(TQ_WS_MACX)
static bool tqt_use_xrender=true; static bool tqt_use_xrender=true;
static bool tqt_has_xft=true; static bool tqt_has_xft=true;
#else #else

@ -21,18 +21,18 @@
#include "kidna.h" #include "kidna.h"
#ifndef Q_WS_WIN //TODO kresolver not ported #ifndef TQ_WS_WIN //TODO kresolver not ported
#include "kresolver.h" #include "kresolver.h"
#endif #endif
#include <kdebug.h> #include <kdebug.h>
#ifndef Q_WS_WIN //TODO knetwork not ported #ifndef TQ_WS_WIN //TODO knetwork not ported
using namespace KNetwork; using namespace KNetwork;
#endif #endif
TQCString KIDNA::toAsciiCString(const TQString &idna) TQCString KIDNA::toAsciiCString(const TQString &idna)
{ {
#ifndef Q_WS_WIN //TODO kresolver not ported #ifndef TQ_WS_WIN //TODO kresolver not ported
return KResolver::domainToAscii(idna); return KResolver::domainToAscii(idna);
#else #else
return TQCString(); return TQCString();
@ -53,7 +53,7 @@ TQString KIDNA::toAscii(const TQString &idna)
TQString KIDNA::toUnicode(const TQString &idna) TQString KIDNA::toUnicode(const TQString &idna)
{ {
#ifndef Q_WS_WIN //TODO kresolver not ported #ifndef TQ_WS_WIN //TODO kresolver not ported
if (idna.length() && (idna[0] == (TQChar)'.')) if (idna.length() && (idna[0] == (TQChar)'.'))
return idna[0] + KResolver::domainToUnicode(idna.mid(1)); return idna[0] + KResolver::domainToUnicode(idna.mid(1));
return KResolver::domainToUnicode(idna); return KResolver::domainToUnicode(idna);

@ -30,7 +30,7 @@
#include <tqevent.h> #include <tqevent.h>
#include <tqwindowdefs.h> #include <tqwindowdefs.h>
#if defined Q_WS_X11 #if defined TQ_WS_X11
#include <X11/X.h> #include <X11/X.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <kxerrorhandler.h> #include <kxerrorhandler.h>
@ -39,7 +39,7 @@
#include <kipc.h> #include <kipc.h>
#if defined Q_WS_X11 #if defined TQ_WS_X11
static long getSimpleProperty(Window w, Atom a) static long getSimpleProperty(Window w, Atom a)
{ {
Atom real_type; Atom real_type;
@ -59,7 +59,7 @@ static long getSimpleProperty(Window w, Atom a)
void KIPC::sendMessage(Message msg, WId w, int data) void KIPC::sendMessage(Message msg, WId w, int data)
{ {
#if defined Q_WS_X11 #if defined TQ_WS_X11
static Atom a = 0; static Atom a = 0;
if (a == 0) if (a == 0)
a = XInternAtom(tqt_xdisplay(), "KIPC_COMM_ATOM", False); a = XInternAtom(tqt_xdisplay(), "KIPC_COMM_ATOM", False);
@ -88,7 +88,7 @@ void KIPC::sendMessage(Message msg, WId w, int data)
void KIPC::sendMessageAll(Message msg, int data) void KIPC::sendMessageAll(Message msg, int data)
{ {
#if defined Q_WS_X11 #if defined TQ_WS_X11
unsigned int i, nrootwins; unsigned int i, nrootwins;
Window dw1, dw2, *rootwins = 0; Window dw1, dw2, *rootwins = 0;
Display *dpy = tqt_xdisplay(); Display *dpy = tqt_xdisplay();

@ -25,7 +25,7 @@
#include <tdeshortcut.h> #include <tdeshortcut.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
typedef union _XEvent XEvent; typedef union _XEvent XEvent;
#endif #endif
@ -45,7 +45,7 @@ class TDECORE_EXPORT KKeyNative
*/ */
KKeyNative(); KKeyNative();
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
/** /**
* Extracts a new native key from the given xevent. * Extracts a new native key from the given xevent.
* @param xevent the XEvent that contains the key * @param xevent the XEvent that contains the key
@ -76,7 +76,7 @@ class TDECORE_EXPORT KKeyNative
*/ */
void clear(); void clear();
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
/** /**
* Initializes the native key by extracting the information * Initializes the native key by extracting the information
* from the given xevent. * from the given xevent.
@ -205,7 +205,7 @@ class TDECORE_EXPORT KKeyNative
*/ */
static bool keyboardHasWinKey(); static bool keyboardHasWinKey();
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
/** /**
* Returns the equivalent X modifier mask of the given modifier flag. * Returns the equivalent X modifier mask of the given modifier flag.
* @param modFlag the mod flags to test * @param modFlag the mod flags to test

@ -23,7 +23,7 @@
#include <tqnamespace.h> #include <tqnamespace.h>
#include <tqwindowdefs.h> #include <tqwindowdefs.h>
#if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_MACX) // Only compile this module if we're compiling for X11, mac or win32 #if defined(TQ_WS_X11) || defined(TQ_WS_WIN) || defined(TQ_WS_MACX) // Only compile this module if we're compiling for X11, mac or win32
#include "kkeynative.h" #include "kkeynative.h"
#include "kkeyserver_x11.h" #include "kkeyserver_x11.h"
@ -34,7 +34,7 @@
#include <kdebug.h> #include <kdebug.h>
#include <tdelocale.h> #include <tdelocale.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#define XK_MISCELLANY #define XK_MISCELLANY
#define XK_XKB_KEYS #define XK_XKB_KEYS
#include <X11/X.h> #include <X11/X.h>
@ -56,7 +56,7 @@ static KKeyNative* gx_pkey = 0;
KKeyNative::KKeyNative() { clear(); } KKeyNative::KKeyNative() { clear(); }
KKeyNative::KKeyNative( const KKey& key ) { init( key ); } KKeyNative::KKeyNative( const KKey& key ) { init( key ); }
KKeyNative::KKeyNative( const KKeyNative& key ) { init( key ); } KKeyNative::KKeyNative( const KKeyNative& key ) { init( key ); }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
KKeyNative::KKeyNative( const XEvent* pEvent ) { init( pEvent ); } KKeyNative::KKeyNative( const XEvent* pEvent ) { init( pEvent ); }
#endif #endif
@ -77,7 +77,7 @@ void KKeyNative::clear()
m_sym = 0; m_sym = 0;
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
bool KKeyNative::init( const XEvent* pEvent ) bool KKeyNative::init( const XEvent* pEvent )
{ {
KeySym keySym; KeySym keySym;
@ -91,11 +91,11 @@ bool KKeyNative::init( const XEvent* pEvent )
bool KKeyNative::init( const KKey& key ) bool KKeyNative::init( const KKey& key )
{ {
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
m_sym = key.sym(); m_sym = key.sym();
m_code = m_sym; //key.keyCodeQt(); m_code = m_sym; //key.keyCodeQt();
m_mod = key.m_mod; m_mod = key.m_mod;
#elif !defined(Q_WS_WIN) && !defined(Q_WS_MACX) #elif !defined(TQ_WS_WIN) && !defined(TQ_WS_MACX)
// Get any extra mods required by the sym. // Get any extra mods required by the sym.
// E.g., XK_Plus requires SHIFT on the en layout. // E.g., XK_Plus requires SHIFT on the en layout.
m_sym = key.sym(); m_sym = key.sym();
@ -167,7 +167,7 @@ KKeyNative& KKeyNative::null()
KKey KKeyNative::key() const KKey KKeyNative::key() const
{ {
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
return KKey( m_sym, m_mod ); return KKey( m_sym, m_mod );
#else #else
uint modSpec; uint modSpec;
@ -192,7 +192,7 @@ int KKeyNative::keyCodeQt() const
bool KKeyNative::keyboardHasWinKey() { return KKeyServer::keyboardHasWinKey(); } bool KKeyNative::keyboardHasWinKey() { return KKeyServer::keyboardHasWinKey(); }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
uint KKeyNative::modX( KKey::ModFlag modFlag ) { return KKeyServer::modX( modFlag ); } uint KKeyNative::modX( KKey::ModFlag modFlag ) { return KKeyServer::modX( modFlag ); }
uint KKeyNative::accelModMaskX() { return KKeyServer::accelModMaskX(); } uint KKeyNative::accelModMaskX() { return KKeyServer::accelModMaskX(); }
uint KKeyNative::modXNumLock() { return KKeyServer::modXNumLock(); } uint KKeyNative::modXNumLock() { return KKeyServer::modXNumLock(); }
@ -201,4 +201,4 @@ uint KKeyNative::modXScrollLock() { return KKeyServer::modXScrollLo
uint KKeyNative::modXModeSwitch() { return KKeyServer::modXModeSwitch(); } uint KKeyNative::modXModeSwitch() { return KKeyServer::modXModeSwitch(); }
#endif #endif
#endif // Q_WS_X11 #endif // TQ_WS_X11

@ -25,7 +25,7 @@
#include <tqnamespace.h> #include <tqnamespace.h>
#include <tqwindowdefs.h> #include <tqwindowdefs.h>
#if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_MACX) // Only compile this module if we're compiling for X11, mac or win32 #if defined(TQ_WS_X11) || defined(TQ_WS_WIN) || defined(TQ_WS_MACX) // Only compile this module if we're compiling for X11, mac or win32
#include "kkeyserver_x11.h" #include "kkeyserver_x11.h"
#include "kkeynative.h" #include "kkeynative.h"
@ -36,7 +36,7 @@
#include <tdeglobal.h> #include <tdeglobal.h>
#include <tdelocale.h> #include <tdelocale.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
# define XK_MISCELLANY # define XK_MISCELLANY
# define XK_XKB_KEYS # define XK_XKB_KEYS
# include <X11/X.h> # include <X11/X.h>
@ -78,7 +78,7 @@ struct ModInfo
{ {
KKey::ModFlag mod; KKey::ModFlag mod;
int modQt; int modQt;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
uint modX; uint modX;
#endif #endif
const char* psName; const char* psName;
@ -140,7 +140,7 @@ static const SymName g_rgSymNames[] = {
{ 0, 0 } { 0, 0 }
}; };
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
static SymVariation g_rgSymVariation[] = static SymVariation g_rgSymVariation[] =
{ {
{ '/', XK_KP_Divide, false }, { '/', XK_KP_Divide, false },
@ -327,14 +327,14 @@ static const TransKey g_rgQtToSymX[] =
{ TQt::Key_KeyboardBrightnessDown, XF86XK_KbdBrightnessDown }, { TQt::Key_KeyboardBrightnessDown, XF86XK_KbdBrightnessDown },
#endif #endif
}; };
#endif //Q_WS_X11 #endif //TQ_WS_X11
//--------------------------------------------------------------------- //---------------------------------------------------------------------
// Initialization // Initialization
//--------------------------------------------------------------------- //---------------------------------------------------------------------
static bool g_bInitializedMods, g_bInitializedVariations, g_bInitializedKKeyLabels; static bool g_bInitializedMods, g_bInitializedVariations, g_bInitializedKKeyLabels;
static bool g_bMacLabels; static bool g_bMacLabels;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
static uint g_modXNumLock, g_modXScrollLock, g_modXModeSwitch; static uint g_modXNumLock, g_modXScrollLock, g_modXModeSwitch;
bool initializeMods() bool initializeMods()
@ -386,7 +386,7 @@ static void initializeVariations()
g_rgSymVariation[i].bActive = (XKeysymToKeycode( tqt_xdisplay(), g_rgSymVariation[i].symVariation ) != 0); g_rgSymVariation[i].bActive = (XKeysymToKeycode( tqt_xdisplay(), g_rgSymVariation[i].symVariation ) != 0);
g_bInitializedVariations = true; g_bInitializedVariations = true;
} }
#endif //Q_WS_X11 #endif //TQ_WS_X11
static void intializeKKeyLabels() static void intializeKKeyLabels()
{ {
@ -421,10 +421,10 @@ bool Sym::initQt( int keyQt )
return true; return true;
} }
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
m_sym = symQt; m_sym = symQt;
return true; return true;
#elif defined(Q_WS_X11) #elif defined(TQ_WS_X11)
for( uint i = 0; i < sizeof(g_rgQtToSymX)/sizeof(TransKey); i++ ) { for( uint i = 0; i < sizeof(g_rgQtToSymX)/sizeof(TransKey); i++ ) {
if( g_rgQtToSymX[i].keySymQt == symQt ) { if( g_rgQtToSymX[i].keySymQt == symQt ) {
m_sym = g_rgQtToSymX[i].keySymX; m_sym = g_rgQtToSymX[i].keySymX;
@ -437,7 +437,7 @@ bool Sym::initQt( int keyQt )
symQt != TQt::Key_Meta && symQt != TQt::Key_Direction_L && symQt != TQt::Key_Direction_R ) symQt != TQt::Key_Meta && symQt != TQt::Key_Direction_L && symQt != TQt::Key_Direction_R )
kdDebug(125) << "Sym::initQt( " << TQString::number(keyQt,16) << " ): failed to convert key." << endl; kdDebug(125) << "Sym::initQt( " << TQString::number(keyQt,16) << " ): failed to convert key." << endl;
return false; return false;
#elif defined(Q_WS_MACX) #elif defined(TQ_WS_MACX)
m_sym = symQt; m_sym = symQt;
return true; return true;
#endif #endif
@ -459,7 +459,7 @@ bool Sym::init( const TQString& s )
} }
} }
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
// search for name in KKeys array // search for name in KKeys array
for ( KKeys const *pKey = kde_KKEYS; pKey->code != 0xffff; pKey++) { for ( KKeys const *pKey = kde_KKEYS; pKey->code != 0xffff; pKey++) {
if( tqstricmp( s.latin1(), pKey->name ) == 0 ) { if( tqstricmp( s.latin1(), pKey->name ) == 0 ) {
@ -468,7 +468,7 @@ bool Sym::init( const TQString& s )
} }
} }
m_sym = 0; m_sym = 0;
#elif defined(Q_WS_X11) #elif defined(TQ_WS_X11)
// search X list: 's' as is, all lower, first letter in caps // search X list: 's' as is, all lower, first letter in caps
m_sym = XStringToKeysym( s.latin1() ); m_sym = XStringToKeysym( s.latin1() );
if( !m_sym ) { if( !m_sym ) {
@ -490,10 +490,10 @@ int Sym::qt() const
return TQChar(m_sym).upper(); return TQChar(m_sym).upper();
return m_sym; return m_sym;
} }
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
if( m_sym < 0x3000 ) if( m_sym < 0x3000 )
return m_sym; return m_sym;
#elif defined(Q_WS_X11) #elif defined(TQ_WS_X11)
if( m_sym < 0x3000 ) if( m_sym < 0x3000 )
return m_sym | TQt::UNICODE_ACCEL; return m_sym | TQt::UNICODE_ACCEL;
@ -511,7 +511,7 @@ TQString Sym::toString( bool bUserSpace ) const
} }
// If it's a unicode character, // If it's a unicode character,
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
else if( m_sym < 0x1000 ) { else if( m_sym < 0x1000 ) {
#else #else
else if( m_sym < 0x3000 ) { else if( m_sym < 0x3000 ) {
@ -533,9 +533,9 @@ TQString Sym::toString( bool bUserSpace ) const
} }
TQString s; TQString s;
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
s = TQKeySequence( m_sym ); s = TQKeySequence( m_sym );
#elif defined(Q_WS_X11) #elif defined(TQ_WS_X11)
// Get X-name // Get X-name
s = XKeysymToString( m_sym ); s = XKeysymToString( m_sym );
#endif #endif
@ -549,7 +549,7 @@ TQString Sym::toString() const { return toString( true ); }
uint Sym::getModsRequired() const uint Sym::getModsRequired() const
{ {
uint mod = 0; uint mod = 0;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
// FIXME: This might not be true on all keyboard layouts! // FIXME: This might not be true on all keyboard layouts!
if( m_sym == XK_Sys_Req ) return KKey::ALT; if( m_sym == XK_Sys_Req ) return KKey::ALT;
if( m_sym == XK_Break ) return KKey::CTRL; if( m_sym == XK_Break ) return KKey::CTRL;
@ -580,7 +580,7 @@ uint Sym::getModsRequired() const
uint Sym::getSymVariation() const uint Sym::getSymVariation() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( !g_bInitializedVariations ) if( !g_bInitializedVariations )
initializeVariations(); initializeVariations();
for( int i = 0; g_rgSymVariation[i].sym != 0; i++ ) for( int i = 0; g_rgSymVariation[i].sym != 0; i++ )
@ -603,7 +603,7 @@ void Sym::capitalizeKeyname( TQString& s )
// Public functions // Public functions
//--------------------------------------------------------------------- //---------------------------------------------------------------------
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
uint modX( KKey::ModFlag mod ) uint modX( KKey::ModFlag mod )
{ {
if( mod == KKey::WIN && !g_bInitializedMods ) if( mod == KKey::WIN && !g_bInitializedMods )
@ -632,7 +632,7 @@ uint accelModMaskX()
initializeMods(); initializeMods();
return ShiftMask | ControlMask | Mod1Mask | g_rgModInfo[3].modX; return ShiftMask | ControlMask | Mod1Mask | g_rgModInfo[3].modX;
} }
#endif //Q_WS_X11 #endif //TQ_WS_X11
bool keyQtToSym( int keyQt, uint& keySym ) bool keyQtToSym( int keyQt, uint& keySym )
{ {
@ -678,7 +678,7 @@ bool modToModQt( uint mod, int& modQt )
return true; return true;
} }
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
//wrapped //wrapped
bool modXToModQt( uint modX, int& modQt ) bool modXToModQt( uint modX, int& modQt )
{ {
@ -699,7 +699,7 @@ bool keyboardHasWinKey() {
return true; return true;
} }
#elif defined(Q_WS_MACX) #elif defined(TQ_WS_MACX)
bool modXToModQt(uint modX, int& modQt) bool modXToModQt(uint modX, int& modQt)
{ {
@ -715,7 +715,7 @@ bool modXToMod( uint , uint& )
{ {
return false; return false;
} }
#elif defined(Q_WS_X11) #elif defined(TQ_WS_X11)
bool modToModX( uint mod, uint& modX ) bool modToModX( uint mod, uint& modX )
{ {
@ -785,7 +785,7 @@ bool codeXToSym( uchar codeX, uint modX, uint& sym )
sym = (uint) keySym; sym = (uint) keySym;
return true; return true;
} }
#endif //!Q_WS_WIN #endif //!TQ_WS_WIN
static TQString modToString( uint mod, bool bUserSpace ) static TQString modToString( uint mod, bool bUserSpace )
{ {
@ -954,7 +954,7 @@ KKey Key::key() const
if( m_code == CODE_FOR_QT ) if( m_code == CODE_FOR_QT )
return KKey( keyCodeQt() ); return KKey( keyCodeQt() );
else { else {
#if defined(Q_WS_WIN) || defined(Q_WS_MACX) #if defined(TQ_WS_WIN) || defined(TQ_WS_MACX)
return KKey(); return KKey();
#else #else
uint mod; uint mod;
@ -1043,7 +1043,7 @@ void Variations::init( const KKey& key, bool bQt )
// Ctrl+Pause => Ctrl+Break // Ctrl+Pause => Ctrl+Break
void KKey::simplify() void KKey::simplify()
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( m_sym == XK_Sys_Req ) { if( m_sym == XK_Sys_Req ) {
m_sym = XK_Print; m_sym = XK_Print;
m_mod |= ALT; m_mod |= ALT;
@ -1066,5 +1066,5 @@ void KKey::simplify()
#endif #endif
} }
#endif //Q_WS_X11 || Q_WS_WIN #endif //TQ_WS_X11 || TQ_WS_WIN

@ -41,7 +41,7 @@ DEALINGS IN THE SOFTWARE.
#endif #endif
#include <tqobject.h> #include <tqobject.h>
#ifdef Q_WS_X11 // FIXME(E) #ifdef TQ_WS_X11 // FIXME(E)
#include "kmanagerselection.h" #include "kmanagerselection.h"

@ -28,7 +28,7 @@ DEALINGS IN THE SOFTWARE.
#include <tqobject.h> #include <tqobject.h>
#include <tdelibs_export.h> #include <tdelibs_export.h>
#ifdef Q_WS_X11 // FIXME(E) #ifdef TQ_WS_X11 // FIXME(E)
#include <X11/Xlib.h> #include <X11/Xlib.h>

@ -334,7 +334,7 @@ KMountPoint::List KMountPoint::currentMountPoints(int infoNeeded)
} }
free( mntctl_buffer ); free( mntctl_buffer );
#elif defined(Q_WS_WIN) #elif defined(TQ_WS_WIN)
//TODO? //TODO?
#else #else
STRUCT_SETMNTENT mnttab; STRUCT_SETMNTENT mnttab;

@ -31,7 +31,7 @@
#include <kdebug.h> #include <kdebug.h>
#include <kstaticdeleter.h> #include <kstaticdeleter.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <X11/X.h> #include <X11/X.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/XKBlib.h> #include <X11/XKBlib.h>
@ -77,7 +77,7 @@ static int sendNotifyEvent(const TQString &message, const TQString &text,
if (!kapp) return 0; if (!kapp) return 0;
// ensure tray icon is shown and positioned before sending event to notification daemon // ensure tray icon is shown and positioned before sending event to notification daemon
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
XFlush(tqt_xdisplay()); XFlush(tqt_xdisplay());
#endif #endif

@ -20,7 +20,7 @@
#include <tqwidget.h> #include <tqwidget.h>
#include "config.h" #include "config.h"
#ifdef Q_WS_X11 // not needed anyway :-) #ifdef TQ_WS_X11 // not needed anyway :-)
#include "krootprop.h" #include "krootprop.h"
#include "tdeglobal.h" #include "tdeglobal.h"

@ -1218,7 +1218,7 @@ void KSimpleDirWatchPrivate::emitEvent(Entry* e, int event, const TQString &file
else else
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
path += "/" + fileName; path += "/" + fileName;
#elif defined(Q_WS_WIN) #elif defined(TQ_WS_WIN)
//current drive is passed instead of / //current drive is passed instead of /
path += TQDir::currentDirPath().left(2) + "/" + fileName; path += TQDir::currentDirPath().left(2) + "/" + fileName;
#endif #endif

@ -427,14 +427,14 @@ TQString TDEStandardDirs::findResourceDir( const char *type,
for (TQStringList::ConstIterator it = candidates.begin(); for (TQStringList::ConstIterator it = candidates.begin();
it != candidates.end(); ++it) { it != candidates.end(); ++it) {
if (exists(*it + filename)) { if (exists(*it + filename)) {
#ifdef Q_WS_WIN //this ensures we're using installed .la files #ifdef TQ_WS_WIN //this ensures we're using installed .la files
if ((*it).isEmpty() && filename.right(3)==".la") { if ((*it).isEmpty() && filename.right(3)==".la") {
#ifndef NDEBUG #ifndef NDEBUG
fprintf(stderr, "TDEStandardDirs::findResourceDir() found .la in cwd: skipping. (fname=%s)\n", filename.ascii()); fprintf(stderr, "TDEStandardDirs::findResourceDir() found .la in cwd: skipping. (fname=%s)\n", filename.ascii());
#endif #endif
continue; continue;
} }
#endif //Q_WS_WIN #endif //TQ_WS_WIN
return *it; return *it;
} }
} }
@ -480,7 +480,7 @@ static void lookupDirectory(const TQString& path, const TQString &relPart,
if (!dp) if (!dp)
return; return;
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
assert(path.at(path.length() - 1) == TQChar('/') || path.at(path.length() - 1) == TQChar('\\')); assert(path.at(path.length() - 1) == TQChar('/') || path.at(path.length() - 1) == TQChar('\\'));
#else #else
assert(path.at(path.length() - 1) == TQChar('/')); assert(path.at(path.length() - 1) == TQChar('/'));
@ -571,7 +571,7 @@ static void lookupPrefix(const TQString& prefix, const TQString& relpath,
if (prefix.isEmpty()) //for sanity if (prefix.isEmpty()) //for sanity
return; return;
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
assert(prefix.at(prefix.length() - 1) == TQChar('/') || prefix.at(prefix.length() - 1) == TQChar('\\')); assert(prefix.at(prefix.length() - 1) == TQChar('/') || prefix.at(prefix.length() - 1) == TQChar('\\'));
#else #else
assert(prefix.at(prefix.length() - 1) == TQChar('/')); assert(prefix.at(prefix.length() - 1) == TQChar('/'));
@ -754,7 +754,7 @@ void TDEStandardDirs::createSpecialResource(const char *type)
} }
} }
} }
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
if (relink) if (relink)
{ {
if (!makeDir(dir, 0700)) if (!makeDir(dir, 0700))
@ -932,7 +932,7 @@ TQStringList TDEStandardDirs::systemPaths( const TQString& pstr )
TQString TDEStandardDirs::findExe( const TQString& appname, TQString TDEStandardDirs::findExe( const TQString& appname,
const TQString& pstr, bool ignore) const TQString& pstr, bool ignore)
{ {
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
TQString real_appname = appname + ".exe"; TQString real_appname = appname + ".exe";
#else #else
TQString real_appname = appname; TQString real_appname = appname;
@ -981,7 +981,7 @@ TQString TDEStandardDirs::findExe( const TQString& appname,
int TDEStandardDirs::findAllExe( TQStringList& list, const TQString& appname, int TDEStandardDirs::findAllExe( TQStringList& list, const TQString& appname,
const TQString& pstr, bool ignore ) const TQString& pstr, bool ignore )
{ {
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
TQString real_appname = appname + ".exe"; TQString real_appname = appname + ".exe";
#else #else
TQString real_appname = appname; TQString real_appname = appname;
@ -1259,7 +1259,7 @@ TQString TDEStandardDirs::kfsstnd_defaultprefix()
TDEStandardDirsSingleton* s = TDEStandardDirsSingleton::self(); TDEStandardDirsSingleton* s = TDEStandardDirsSingleton::self();
if (!s->defaultprefix.isEmpty()) if (!s->defaultprefix.isEmpty())
return s->defaultprefix; return s->defaultprefix;
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
s->defaultprefix = readEnvPath("TDEDIR"); s->defaultprefix = readEnvPath("TDEDIR");
if (s->defaultprefix.isEmpty()) { if (s->defaultprefix.isEmpty()) {
s->defaultprefix = TQFile::decodeName("c:\\kde"); s->defaultprefix = TQFile::decodeName("c:\\kde");
@ -1279,7 +1279,7 @@ TQString TDEStandardDirs::kfsstnd_defaultbindir()
TDEStandardDirsSingleton* s = TDEStandardDirsSingleton::self(); TDEStandardDirsSingleton* s = TDEStandardDirsSingleton::self();
if (!s->defaultbindir.isEmpty()) if (!s->defaultbindir.isEmpty())
return s->defaultbindir; return s->defaultbindir;
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
s->defaultbindir = kfsstnd_defaultprefix() + TQString::fromLatin1("/bin"); s->defaultbindir = kfsstnd_defaultprefix() + TQString::fromLatin1("/bin");
#else //UNIX #else //UNIX
s->defaultbindir = __TDE_BINDIR; s->defaultbindir = __TDE_BINDIR;
@ -1374,7 +1374,7 @@ void TDEStandardDirs::addKDEDefaults()
{ {
xdgdirList.clear(); xdgdirList.clear();
xdgdirList.append("/etc/xdg"); xdgdirList.append("/etc/xdg");
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
xdgdirList.append(kfsstnd_defaultprefix() + "/etc/xdg"); xdgdirList.append(kfsstnd_defaultprefix() + "/etc/xdg");
#else #else
xdgdirList.append(KDESYSCONFDIR "/xdg"); xdgdirList.append(KDESYSCONFDIR "/xdg");

@ -38,7 +38,7 @@
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <tdeaboutdata.h> #include <tdeaboutdata.h>
#if defined Q_WS_X11 #if defined TQ_WS_X11
#include <twin.h> #include <twin.h>
#include <tdestartupinfo.h> #include <tdestartupinfo.h>
#endif #endif
@ -47,12 +47,12 @@
#include "kdebug.h" #include "kdebug.h"
#include "kuniqueapplication.h" #include "kuniqueapplication.h"
#if defined Q_WS_X11 #if defined TQ_WS_X11
#include <netwm.h> #include <netwm.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#define DISPLAY "DISPLAY" #define DISPLAY "DISPLAY"
#else #else
# ifdef Q_WS_QWS # ifdef TQ_WS_QWS
# define DISPLAY "QWS_DISPLAY" # define DISPLAY "QWS_DISPLAY"
# else # else
# define DISPLAY "DISPLAY" # define DISPLAY "DISPLAY"
@ -96,7 +96,7 @@ KUniqueApplication::start()
return true; return true;
s_uniqueTestDone = true; s_uniqueTestDone = true;
addCmdLineOptions(); // Make sure to add cmd line options addCmdLineOptions(); // Make sure to add cmd line options
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
s_nofork = true; s_nofork = true;
#else #else
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs("kuniqueapp"); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs("kuniqueapp");
@ -118,7 +118,7 @@ KUniqueApplication::start()
// Check to make sure that we're actually able to register with the DCOP // Check to make sure that we're actually able to register with the DCOP
// server. // server.
#ifndef Q_WS_WIN //TODO #ifndef TQ_WS_WIN //TODO
if(dcopClient()->registerAs(appName, false).isEmpty()) { if(dcopClient()->registerAs(appName, false).isEmpty()) {
startKdeinit(); startKdeinit();
if(dcopClient()->registerAs(appName, false).isEmpty()) { if(dcopClient()->registerAs(appName, false).isEmpty()) {
@ -184,7 +184,7 @@ KUniqueApplication::start()
::write(fd[1], &result, 1); ::write(fd[1], &result, 1);
::close(fd[1]); ::close(fd[1]);
#if 0 #if 0
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
// say we're up and running ( probably no new window will appear ) // say we're up and running ( probably no new window will appear )
TDEStartupInfoId id; TDEStartupInfoId id;
if( kapp != NULL ) // TDEApplication constructor unsets the env. variable if( kapp != NULL ) // TDEApplication constructor unsets the env. variable
@ -209,7 +209,7 @@ KUniqueApplication::start()
} }
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
TDEStartupInfoId id; TDEStartupInfoId id;
if( kapp != NULL ) // TDEApplication constructor unsets the env. variable if( kapp != NULL ) // TDEApplication constructor unsets the env. variable
id.initId( kapp->startupId()); id.initId( kapp->startupId());
@ -272,7 +272,7 @@ KUniqueApplication::start()
} }
TQCString new_asn_id; TQCString new_asn_id;
#if defined Q_WS_X11 #if defined TQ_WS_X11
TDEStartupInfoId id; TDEStartupInfoId id;
if( kapp != NULL ) // TDEApplication constructor unsets the env. variable if( kapp != NULL ) // TDEApplication constructor unsets the env. variable
id.initId( kapp->startupId()); id.initId( kapp->startupId());
@ -333,7 +333,7 @@ KUniqueApplication::KUniqueApplication(bool allowStyles, bool GUIenabled, bool c
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
KUniqueApplication::KUniqueApplication(Display *display, TQt::HANDLE visual, KUniqueApplication::KUniqueApplication(Display *display, TQt::HANDLE visual,
TQt::HANDLE colormap, bool allowStyles, bool configUnique) TQt::HANDLE colormap, bool allowStyles, bool configUnique)
: TDEApplication( display, visual, colormap, allowStyles, initHack( configUnique )), : TDEApplication( display, visual, colormap, allowStyles, initHack( configUnique )),
@ -387,7 +387,7 @@ void KUniqueApplication::newInstanceNoFork()
s_handleAutoStarted = false; s_handleAutoStarted = false;
newInstance(); newInstance();
d->firstInstance = false; d->firstInstance = false;
#if defined Q_WS_X11 #if defined TQ_WS_X11
// KDE4 remove // KDE4 remove
// A hack to make startup notification stop for apps which override newInstance() // A hack to make startup notification stop for apps which override newInstance()
// and reuse an already existing window there, but use KWin::activateWindow() // and reuse an already existing window there, but use KWin::activateWindow()
@ -453,7 +453,7 @@ KUniqueApplication::processDelayed()
s_handleAutoStarted = false; s_handleAutoStarted = false;
int exitCode = newInstance(); int exitCode = newInstance();
d->firstInstance = false; d->firstInstance = false;
#if defined Q_WS_X11 #if defined TQ_WS_X11
if( s_handleAutoStarted ) if( s_handleAutoStarted )
TDEStartupInfo::handleAutoAppStartedSending(); // KDE4 remove? TDEStartupInfo::handleAutoAppStartedSending(); // KDE4 remove?
#endif #endif
@ -481,7 +481,7 @@ int KUniqueApplication::newInstance()
if ( mainWidget() ) if ( mainWidget() )
{ {
mainWidget()->show(); mainWidget()->show();
#if defined Q_WS_X11 #if defined TQ_WS_X11
// This is the line that handles window activation if necessary, // This is the line that handles window activation if necessary,
// and what's important, it does it properly. If you reimplement newInstance(), // and what's important, it does it properly. If you reimplement newInstance(),
// and don't call the inherited one, use this (but NOT when newInstance() // and don't call the inherited one, use this (but NOT when newInstance()

@ -68,7 +68,7 @@ public:
bool GUIenabled=true, bool GUIenabled=true,
bool configUnique=false); bool configUnique=false);
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
/** /**
* Constructor. Takes command line arguments from TDECmdLineArgs * Constructor. Takes command line arguments from TDECmdLineArgs
* *

@ -47,7 +47,7 @@
#include <tqtextcodec.h> #include <tqtextcodec.h>
#include <tqmutex.h> #include <tqmutex.h>
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
# define KURL_ROOTDIR_PATH "C:/" # define KURL_ROOTDIR_PATH "C:/"
#else #else
# define KURL_ROOTDIR_PATH "/" # define KURL_ROOTDIR_PATH "/"
@ -386,7 +386,7 @@ static TQString cleanpath(const TQString &_path, bool cleanDirSeparator, bool de
orig_pos = pos; orig_pos = pos;
} }
#ifdef Q_WS_WIN // prepend drive letter if exists (js) #ifdef TQ_WS_WIN // prepend drive letter if exists (js)
if (orig_pos >= 2 && isalpha(path[0].latin1()) && path[1]==':') { if (orig_pos >= 2 && isalpha(path[0].latin1()) && path[1]==':') {
result.prepend(TQString(path[0])+":"); result.prepend(TQString(path[0])+":");
} }
@ -670,7 +670,7 @@ void KURL::parse( const TQString& _url, int encoding_hint )
// Node 1: Accept alpha or slash // Node 1: Accept alpha or slash
TQChar x = buf[pos++]; TQChar x = buf[pos++];
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
/* win32: accept <letter>: or <letter>:/ or <letter>:\ */ /* win32: accept <letter>: or <letter>:/ or <letter>:\ */
const bool alpha = isalpha((int)x); const bool alpha = isalpha((int)x);
if (alpha && len<2) if (alpha && len<2)
@ -791,7 +791,7 @@ void KURL::parseURL( const TQString& _url, int encoding_hint )
// Node 1: Accept alpha or slash // Node 1: Accept alpha or slash
TQChar x = buf[pos++]; TQChar x = buf[pos++];
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
/* win32: accept <letter>: or <letter>:/ or <letter>:\ */ /* win32: accept <letter>: or <letter>:/ or <letter>:\ */
const bool alpha = isalpha((int)x); const bool alpha = isalpha((int)x);
if (alpha && len<2) if (alpha && len<2)
@ -1628,7 +1628,7 @@ TQString KURL::prettyURL( int _trailing, AdjustementFlags _flags) const
TQString u = prettyURL(_trailing); TQString u = prettyURL(_trailing);
if (_flags & StripFileProtocol && u.startsWith("file://")) { if (_flags & StripFileProtocol && u.startsWith("file://")) {
u.remove(0, 7); u.remove(0, 7);
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
return TQDir::convertSeparators(u); return TQDir::convertSeparators(u);
#endif #endif
} }

@ -150,7 +150,7 @@ bool KURLDrag::decode( const TQMimeSource *e, KURL::List &uris, TQMap<TQString,T
return false; // Couldn't decode the URLs return false; // Couldn't decode the URLs
} }
#ifdef Q_WS_QWS #ifdef TQ_WS_QWS
bool KURLDrag::decode( TQStringList const &e, KURL::List &uris ) bool KURLDrag::decode( TQStringList const &e, KURL::List &uris )
{ {
TQStringList::ConstIterator end(e.end()); TQStringList::ConstIterator end(e.end());

@ -133,7 +133,7 @@ public:
*/ */
static KURL stringToUrl(const TQCString &s); static KURL stringToUrl(const TQCString &s);
#ifdef Q_WS_QWS #ifdef TQ_WS_QWS
/** /**
* Convenience method that decodes the contents of @p e * Convenience method that decodes the contents of @p e
* into a list of KURLs for Qt versions without a MIME clipboard. * into a list of KURLs for Qt versions without a MIME clipboard.

@ -23,7 +23,7 @@
*/ */
#include <tqwidget.h> #include <tqwidget.h>
#ifdef Q_WS_X11 //FIXME #ifdef TQ_WS_X11 //FIXME
#include "kxerrorhandler.h" #include "kxerrorhandler.h"
#include <assert.h> #include <assert.h>

@ -28,7 +28,7 @@ DEALINGS IN THE SOFTWARE.
#include <tdeapplication.h> #include <tdeapplication.h>
#ifdef Q_WS_X11 // FIXME(E): Figure out what parts we can/should emulate in QT/E #ifdef TQ_WS_X11 // FIXME(E): Figure out what parts we can/should emulate in QT/E
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <kdebug.h> #include <kdebug.h>

@ -30,7 +30,7 @@ DEALINGS IN THE SOFTWARE.
#include <tqmap.h> #include <tqmap.h>
#include <tdelibs_export.h> #include <tdelibs_export.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <X11/X.h> #include <X11/X.h>
class TQString; class TQString;

@ -27,7 +27,7 @@
#include <tqwidget.h> #include <tqwidget.h>
#include <tqapplication.h> #include <tqapplication.h>
#ifdef Q_WS_X11 //FIXME #ifdef TQ_WS_X11 //FIXME
#include "netwm.h" #include "netwm.h"

@ -29,7 +29,7 @@
#include "tdelibs_export.h" #include "tdelibs_export.h"
#include <tqwidget.h> #include <tqwidget.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>

@ -34,7 +34,7 @@
#include "tdeaccelprivate.h" #include "tdeaccelprivate.h"
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
# include <X11/Xlib.h> # include <X11/Xlib.h>
# ifdef KeyPress // needed for --enable-final # ifdef KeyPress // needed for --enable-final
// defined by X11 headers // defined by X11 headers
@ -95,7 +95,7 @@ class TDEAccelEventHandler : public TQWidget
private: private:
TDEAccelEventHandler(); TDEAccelEventHandler();
# ifdef Q_WS_X11 # ifdef TQ_WS_X11
bool x11Event( XEvent* pEvent ); bool x11Event( XEvent* pEvent );
# endif # endif
@ -109,13 +109,13 @@ bool TDEAccelEventHandler::g_bAccelActivated = false;
TDEAccelEventHandler::TDEAccelEventHandler() TDEAccelEventHandler::TDEAccelEventHandler()
: TQWidget( 0, "TDEAccelEventHandler" ) : TQWidget( 0, "TDEAccelEventHandler" )
{ {
# ifdef Q_WS_X11 # ifdef TQ_WS_X11
if ( kapp ) if ( kapp )
kapp->installX11EventFilter( this ); kapp->installX11EventFilter( this );
# endif # endif
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
bool tqt_try_modal( TQWidget *, XEvent * ); bool tqt_try_modal( TQWidget *, XEvent * );
bool TDEAccelEventHandler::x11Event( XEvent* pEvent ) bool TDEAccelEventHandler::x11Event( XEvent* pEvent )
@ -157,7 +157,7 @@ bool TDEAccelEventHandler::x11Event( XEvent* pEvent )
return false; return false;
} }
#endif // Q_WS_X11 #endif // TQ_WS_X11
//--------------------------------------------------------------------- //---------------------------------------------------------------------
// TDEAccelPrivate // TDEAccelPrivate
@ -172,7 +172,7 @@ TDEAccelPrivate::TDEAccelPrivate( TDEAccel* pParent, TQWidget* pWatch )
m_bAutoUpdate = true; m_bAutoUpdate = true;
connect( (TQAccel*)m_pAccel, TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotKeyPressed(int)) ); connect( (TQAccel*)m_pAccel, TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotKeyPressed(int)) );
#ifdef Q_WS_X11 //only makes sense if TDEAccelEventHandler is working #ifdef TQ_WS_X11 //only makes sense if TDEAccelEventHandler is working
if( m_pWatch ) if( m_pWatch )
m_pWatch->installEventFilter( this ); m_pWatch->installEventFilter( this );
#endif #endif
@ -237,7 +237,7 @@ bool TDEAccelPrivate::connectKey( TDEAccelAction& action, const KKeyServer::Key&
m_mapIDToKey[nID] = keyQt; m_mapIDToKey[nID] = keyQt;
if( action.objSlotPtr() && action.methodSlotPtr() ) { if( action.objSlotPtr() && action.methodSlotPtr() ) {
#ifdef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */ #ifdef TQ_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */
((TQAccel*)m_pAccel)->connectItem( nID, action.objSlotPtr(), action.methodSlotPtr() ); ((TQAccel*)m_pAccel)->connectItem( nID, action.objSlotPtr(), action.methodSlotPtr() );
#else #else
((TQAccel*)m_pAccel)->connectItem( nID, this, TQ_SLOT(slotKeyPressed(int))); ((TQAccel*)m_pAccel)->connectItem( nID, this, TQ_SLOT(slotKeyPressed(int)));
@ -334,7 +334,7 @@ void TDEAccelPrivate::slotMenuActivated( int iAction )
{ {
kdDebug(125) << "TDEAccelPrivate::slotMenuActivated( " << iAction << " )" << endl; kdDebug(125) << "TDEAccelPrivate::slotMenuActivated( " << iAction << " )" << endl;
TDEAccelAction* pAction = actions().actionPtr( iAction ); TDEAccelAction* pAction = actions().actionPtr( iAction );
#ifdef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */ #ifdef TQ_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */
if( pAction ) { if( pAction ) {
connect( this, TQ_SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() ); connect( this, TQ_SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
emit menuItemActivated(); emit menuItemActivated();
@ -362,7 +362,7 @@ bool TDEAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent )
TDEAccelAction* pAction = m_mapIDToAction[nID]; TDEAccelAction* pAction = m_mapIDToAction[nID];
if( !pAction->isEnabled() ) if( !pAction->isEnabled() )
continue; continue;
#ifdef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */ #ifdef TQ_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */
TQGuardedPtr<TDEAccelPrivate> me = this; TQGuardedPtr<TDEAccelPrivate> me = this;
connect( this, TQ_SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() ); connect( this, TQ_SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
emit menuItemActivated(); emit menuItemActivated();
@ -384,7 +384,7 @@ bool TDEAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent )
return false; return false;
} }
#ifndef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */ #ifndef TQ_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */
void TDEAccelPrivate::emitActivatedSignal( TDEAccelAction* pAction ) void TDEAccelPrivate::emitActivatedSignal( TDEAccelAction* pAction )
{ {
if( pAction ) { if( pAction ) {

@ -246,7 +246,7 @@ connect new key sequences
} }
*/ */
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
struct TDEAccelBase::X struct TDEAccelBase::X
{ {
uint iAction, iSeq, iVari; uint iAction, iSeq, iVari;
@ -269,7 +269,7 @@ struct TDEAccelBase::X
bool operator >( const X& x ) { return compare( x ) > 0; } bool operator >( const X& x ) { return compare( x ) > 0; }
bool operator <=( const X& x ) { return compare( x ) <= 0; } bool operator <=( const X& x ) { return compare( x ) <= 0; }
}; };
#endif //Q_WS_X11 #endif //TQ_WS_X11
/* /*
#1 Ctrl+A #1 Ctrl+A
@ -315,7 +315,7 @@ struct TDEAccelBase::X
bool TDEAccelBase::updateConnections() bool TDEAccelBase::updateConnections()
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdDebug(125) << "TDEAccelBase::updateConnections() this = " << this << endl; kdDebug(125) << "TDEAccelBase::updateConnections() this = " << this << endl;
// Retrieve the list of keys to be connected, sorted by priority. // Retrieve the list of keys to be connected, sorted by priority.
// (key, variation, seq) // (key, variation, seq)
@ -414,11 +414,11 @@ bool TDEAccelBase::updateConnections()
<< (((*it).pAction) ? (*it).pAction->name() : TQString::null) << "'" << endl; << (((*it).pAction) ? (*it).pAction->name() : TQString::null) << "'" << endl;
} }
#endif #endif
#endif //Q_WS_X11 #endif //TQ_WS_X11
return true; return true;
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
// Construct a list of keys to be connected, sorted highest priority first. // Construct a list of keys to be connected, sorted highest priority first.
void TDEAccelBase::createKeyList( TQValueVector<struct X>& rgKeys ) void TDEAccelBase::createKeyList( TQValueVector<struct X>& rgKeys )
{ {
@ -455,7 +455,7 @@ void TDEAccelBase::createKeyList( TQValueVector<struct X>& rgKeys )
// sort by priority: iVariation[of first key], iSequence, iAction // sort by priority: iVariation[of first key], iSequence, iAction
qHeapSort( rgKeys.begin(), rgKeys.end() ); qHeapSort( rgKeys.begin(), rgKeys.end() );
} }
#endif //Q_WS_X11 #endif //TQ_WS_X11
bool TDEAccelBase::insertConnection( TDEAccelAction* pAction ) bool TDEAccelBase::insertConnection( TDEAccelAction* pAction )
{ {

@ -38,7 +38,7 @@ class TDECORE_EXPORT TDEAccelPrivate : public TQObject, public TDEAccelBase
void menuItemActivated(TDEAccelAction*); void menuItemActivated(TDEAccelAction*);
private: private:
#ifndef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */ #ifndef TQ_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */
void emitActivatedSignal(TDEAccelAction*); void emitActivatedSignal(TDEAccelAction*);
#endif #endif

@ -95,7 +95,7 @@
#include <kmdcodec.h> #include <kmdcodec.h>
#include <kglobalaccel.h> #include <kglobalaccel.h>
#if defined Q_WS_X11 #if defined TQ_WS_X11
#include <tdestartupinfo.h> #include <tdestartupinfo.h>
#endif #endif
@ -110,7 +110,7 @@
#include <grp.h> #include <grp.h>
#include <sys/types.h> #include <sys/types.h>
#ifndef Q_WS_WIN #ifndef TQ_WS_WIN
#include "twin.h" #include "twin.h"
#endif #endif
@ -123,8 +123,8 @@
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include <netdb.h> #include <netdb.h>
#if defined Q_WS_X11 #if defined TQ_WS_X11
//#ifndef Q_WS_QWS //FIXME(E): NetWM should talk to QWS... //#ifndef TQ_WS_QWS //FIXME(E): NetWM should talk to QWS...
#include <netwm.h> #include <netwm.h>
#endif #endif
@ -134,7 +134,7 @@
#include <paths.h> #include <paths.h>
#endif #endif
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <X11/Xlib.h> #include <X11/Xlib.h>
#ifdef COMPOSITE #ifdef COMPOSITE
#include <X11/extensions/Xrender.h> #include <X11/extensions/Xrender.h>
@ -149,7 +149,7 @@
#include <pwd.h> #include <pwd.h>
#ifndef Q_WS_WIN #ifndef TQ_WS_WIN
#include <KDE-ICE/ICElib.h> #include <KDE-ICE/ICElib.h>
#else #else
typedef void* IceIOErrorHandler; typedef void* IceIOErrorHandler;
@ -160,22 +160,22 @@ typedef void* IceIOErrorHandler;
#define Button3Mask (1<<10) #define Button3Mask (1<<10)
#endif #endif
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#define DISPLAY "DISPLAY" #define DISPLAY "DISPLAY"
#elif defined(Q_WS_QWS) #elif defined(TQ_WS_QWS)
#define DISPLAY "QWS_DISPLAY" #define DISPLAY "QWS_DISPLAY"
#endif #endif
#if defined Q_WS_X11 #if defined TQ_WS_X11
#include <kipc.h> #include <kipc.h>
#endif #endif
#ifdef Q_WS_MACX #ifdef TQ_WS_MACX
#include <Carbon/Carbon.h> #include <Carbon/Carbon.h>
#include <tqimage.h> #include <tqimage.h>
#endif #endif
#if defined Q_WS_X11 #if defined TQ_WS_X11
#include <sys/ioctl.h> #include <sys/ioctl.h>
#ifdef __linux__ #ifdef __linux__
#include <linux/vt.h> #include <linux/vt.h>
@ -197,12 +197,12 @@ bool TDEApplication::loadedByKdeinit = false;
DCOPClient *TDEApplication::s_DCOPClient = 0L; DCOPClient *TDEApplication::s_DCOPClient = 0L;
bool TDEApplication::s_dcopClientNeedsPostInit = false; bool TDEApplication::s_dcopClientNeedsPostInit = false;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
static Atom atom_DesktopWindow; static Atom atom_DesktopWindow;
static Atom atom_NetSupported; static Atom atom_NetSupported;
#endif #endif
#if defined(Q_WS_X11) && defined(COMPOSITE) #if defined(TQ_WS_X11) && defined(COMPOSITE)
static int composite_event, composite_error, composite_opcode; static int composite_event, composite_error, composite_opcode;
static bool x11_composite_error_generated; static bool x11_composite_error_generated;
static int x11_error(Display *dpy, XErrorEvent *ev) { static int x11_error(Display *dpy, XErrorEvent *ev) {
@ -221,7 +221,7 @@ TDECORE_EXPORT bool tqt_qclipboard_bailout_hack = false;
template class TQPtrList<KSessionManaged>; template class TQPtrList<KSessionManaged>;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
extern "C" { extern "C" {
static int kde_xio_errhandler( Display * dpy ) static int kde_xio_errhandler( Display * dpy )
{ {
@ -245,13 +245,13 @@ static void kde_ice_ioerrorhandler( IceConn conn )
} }
#endif #endif
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
void TDEApplication_init_windows(bool GUIenabled); void TDEApplication_init_windows(bool GUIenabled);
class QAssistantClient; class QAssistantClient;
#endif #endif
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
// -------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------
// Get the VT number X is running on // Get the VT number X is running on
// (code taken from GDM, daemon/getvt.c, GPLv2+) // (code taken from GDM, daemon/getvt.c, GPLv2+)
@ -310,7 +310,7 @@ int get_x_vtnum(Display *dpy)
return num; return num;
} }
// -------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------
#endif // Q_WS_X11 #endif // TQ_WS_X11
/* /*
Private data to make keeping binary compatibility easier Private data to make keeping binary compatibility easier
@ -328,10 +328,10 @@ public:
app_started_timer( NULL ), app_started_timer( NULL ),
m_KAppDCOPInterface( 0L ), m_KAppDCOPInterface( 0L ),
session_save( false ) session_save( false )
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
,oldXErrorHandler( NULL ) ,oldXErrorHandler( NULL )
,oldXIOErrorHandler( NULL ) ,oldXIOErrorHandler( NULL )
#elif defined Q_WS_WIN #elif defined TQ_WS_WIN
,qassistantclient( 0 ) ,qassistantclient( 0 )
#endif #endif
{ {
@ -339,7 +339,7 @@ public:
~TDEApplicationPrivate() ~TDEApplicationPrivate()
{ {
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
delete qassistantclient; delete qassistantclient;
#endif #endif
} }
@ -362,10 +362,10 @@ public:
TQTimer* app_started_timer; TQTimer* app_started_timer;
KAppDCOPInterface *m_KAppDCOPInterface; KAppDCOPInterface *m_KAppDCOPInterface;
bool session_save; bool session_save;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
int (*oldXErrorHandler)(Display*,XErrorEvent*); int (*oldXErrorHandler)(Display*,XErrorEvent*);
int (*oldXIOErrorHandler)(Display*); int (*oldXIOErrorHandler)(Display*);
#elif defined Q_WS_WIN #elif defined TQ_WS_WIN
QAssistantClient* qassistantclient; QAssistantClient* qassistantclient;
#endif #endif
@ -627,7 +627,7 @@ bool TDEApplication::notify(TQObject *receiver, TQEvent *event)
if( t == TQEvent::Show && receiver->isWidgetType()) if( t == TQEvent::Show && receiver->isWidgetType())
{ {
TQWidget* w = static_cast<TQWidget*>( receiver ); TQWidget* w = static_cast<TQWidget*>( receiver );
#if defined Q_WS_X11 #if defined TQ_WS_X11
if( w->isTopLevel() && !startupId().isEmpty() && !static_cast<TQShowEvent*>(event)->spontaneous()) // TODO better done using window group leader? if( w->isTopLevel() && !startupId().isEmpty() && !static_cast<TQShowEvent*>(event)->spontaneous()) // TODO better done using window group leader?
TDEStartupInfo::setWindowStartupId( w->winId(), startupId()); TDEStartupInfo::setWindowStartupId( w->winId(), startupId());
#endif #endif
@ -651,7 +651,7 @@ bool TDEApplication::notify(TQObject *receiver, TQEvent *event)
if( !ic->isNull()) if( !ic->isNull())
{ {
w->setIcon( *ic ); w->setIcon( *ic );
#if defined Q_WS_X11 #if defined TQ_WS_X11
KWin::setIcons( w->winId(), *ic, miniIcon()); KWin::setIcons( w->winId(), *ic, miniIcon());
#endif #endif
} }
@ -662,7 +662,7 @@ bool TDEApplication::notify(TQObject *receiver, TQEvent *event)
void TDEApplication::checkAppStartedSlot() void TDEApplication::checkAppStartedSlot()
{ {
#if defined Q_WS_X11 #if defined TQ_WS_X11
TDEStartupInfo::handleAutoAppStartedSending(); TDEStartupInfo::handleAutoAppStartedSending();
#endif #endif
} }
@ -689,7 +689,7 @@ TQString TDEApplication::sessionConfigName() const
return TQString("session/%1_%2_%3").arg(name()).arg(sessionId()).arg(sessKey); return TQString("session/%1_%2_%3").arg(name()).arg(sessionId()).arg(sessKey);
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
static SmcConn mySmcConnection = 0; static SmcConn mySmcConnection = 0;
static SmcConn tmpSmcConnection = 0; static SmcConn tmpSmcConnection = 0;
#else #else
@ -701,7 +701,7 @@ static TQTime* smModificationTime = 0;
TDEApplication::TDEApplication( int& argc, char** argv, const TQCString& rAppName, TDEApplication::TDEApplication( int& argc, char** argv, const TQCString& rAppName,
bool allowStyles, bool GUIenabled, bool SMenabled ) : bool allowStyles, bool GUIenabled, bool SMenabled ) :
TQApplication( argc, argv, GUIenabled, SMenabled ), TDEInstance(rAppName), TQApplication( argc, argv, GUIenabled, SMenabled ), TDEInstance(rAppName),
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
display(0L), display(0L),
argb_visual(false), argb_visual(false),
#endif #endif
@ -729,7 +729,7 @@ TDEApplication::TDEApplication( int& argc, char** argv, const TQCString& rAppNam
TDEApplication::TDEApplication( int& argc, char** argv, const TQCString& rAppName, TDEApplication::TDEApplication( int& argc, char** argv, const TQCString& rAppName,
bool allowStyles, bool GUIenabled ) : bool allowStyles, bool GUIenabled ) :
TQApplication( argc, argv, GUIenabled ), TDEInstance(rAppName), TQApplication( argc, argv, GUIenabled ), TDEInstance(rAppName),
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
display(0L), display(0L),
argb_visual(false), argb_visual(false),
#endif #endif
@ -754,7 +754,7 @@ TDEApplication::TDEApplication( int& argc, char** argv, const TQCString& rAppNam
TDEApplication::TDEApplication( bool allowStyles, bool GUIenabled, bool SMenabled ) : TDEApplication::TDEApplication( bool allowStyles, bool GUIenabled, bool SMenabled ) :
TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), GUIenabled, SMenabled ), // We need to be able to run command line apps TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), GUIenabled, SMenabled ), // We need to be able to run command line apps
TDEInstance( TDECmdLineArgs::about), TDEInstance( TDECmdLineArgs::about),
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
display(0L), display(0L),
argb_visual(false), argb_visual(false),
#endif #endif
@ -780,7 +780,7 @@ TDEApplication::TDEApplication( bool allowStyles, bool GUIenabled, bool SMenable
TDEApplication::TDEApplication( bool allowStyles, bool GUIenabled ) : TDEApplication::TDEApplication( bool allowStyles, bool GUIenabled ) :
TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), GUIenabled ), // We need to be able to run command line apps TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), GUIenabled ), // We need to be able to run command line apps
TDEInstance( TDECmdLineArgs::about), TDEInstance( TDECmdLineArgs::about),
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
display(0L), display(0L),
argb_visual(false), argb_visual(false),
#endif #endif
@ -800,7 +800,7 @@ TDEApplication::TDEApplication( bool allowStyles, bool GUIenabled ) :
d->m_KAppDCOPInterface = new KAppDCOPInterface(this); d->m_KAppDCOPInterface = new KAppDCOPInterface(this);
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
TDEApplication::TDEApplication( Display *dpy, bool allowStyles ) : TDEApplication::TDEApplication( Display *dpy, bool allowStyles ) :
TQApplication( dpy, *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), TQApplication( dpy, *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(),
getX11RGBAVisual(dpy), getX11RGBAColormap(dpy) ), getX11RGBAVisual(dpy), getX11RGBAColormap(dpy) ),
@ -877,7 +877,7 @@ TDEApplication::TDEApplication( bool allowStyles, bool GUIenabled, TDEInstance*
TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(),
GUIenabled ), GUIenabled ),
TDEInstance( _instance ), TDEInstance( _instance ),
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
display(0L), display(0L),
#endif #endif
argb_visual(false), argb_visual(false),
@ -897,7 +897,7 @@ TDEApplication::TDEApplication( bool allowStyles, bool GUIenabled, TDEInstance*
d->m_KAppDCOPInterface = new KAppDCOPInterface(this); d->m_KAppDCOPInterface = new KAppDCOPInterface(this);
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
TDEApplication::TDEApplication(Display *display, int& argc, char** argv, const TQCString& rAppName, TDEApplication::TDEApplication(Display *display, int& argc, char** argv, const TQCString& rAppName,
bool allowStyles, bool GUIenabled ) : bool allowStyles, bool GUIenabled ) :
TQApplication( display ), TDEInstance(rAppName), TQApplication( display ), TDEInstance(rAppName),
@ -928,7 +928,7 @@ int TDEApplication::xioErrhandler( Display* dpy )
if(kapp) if(kapp)
{ {
emit shutDown(); emit shutDown();
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
d->oldXIOErrorHandler( dpy ); d->oldXIOErrorHandler( dpy );
#else #else
Q_UNUSED(dpy); Q_UNUSED(dpy);
@ -940,7 +940,7 @@ int TDEApplication::xioErrhandler( Display* dpy )
int TDEApplication::xErrhandler( Display* dpy, void* err_ ) int TDEApplication::xErrhandler( Display* dpy, void* err_ )
{ // no idea how to make forward decl. for XErrorEvent { // no idea how to make forward decl. for XErrorEvent
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
XErrorEvent* err = static_cast< XErrorEvent* >( err_ ); XErrorEvent* err = static_cast< XErrorEvent* >( err_ );
if(kapp) if(kapp)
{ {
@ -955,7 +955,7 @@ void TDEApplication::iceIOErrorHandler( _IceConn *conn )
{ {
emit shutDown(); emit shutDown();
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if ( d->oldIceIOErrorHandler != NULL ) if ( d->oldIceIOErrorHandler != NULL )
(*d->oldIceIOErrorHandler)( conn ); (*d->oldIceIOErrorHandler)( conn );
#endif #endif
@ -1000,7 +1000,7 @@ void TDEApplication::init(bool GUIenabled)
KApp = this; KApp = this;
#ifdef Q_WS_X11 //FIXME(E) #ifdef TQ_WS_X11 //FIXME(E)
// create all required atoms in _one_ roundtrip to the X server // create all required atoms in _one_ roundtrip to the X server
if ( GUIenabled ) { if ( GUIenabled ) {
const int max = 20; const int max = 20;
@ -1031,7 +1031,7 @@ void TDEApplication::init(bool GUIenabled)
smw = 0; smw = 0;
// Initial KIPC event mask. // Initial KIPC event mask.
#if defined Q_WS_X11 #if defined TQ_WS_X11
kipcEventMask = (1 << KIPC::StyleChanged) | (1 << KIPC::PaletteChanged) | kipcEventMask = (1 << KIPC::StyleChanged) | (1 << KIPC::PaletteChanged) |
(1 << KIPC::FontChanged) | (1 << KIPC::BackgroundChanged) | (1 << KIPC::FontChanged) | (1 << KIPC::BackgroundChanged) |
(1 << KIPC::ToolbarStyleChanged) | (1 << KIPC::SettingsChanged) | (1 << KIPC::ToolbarStyleChanged) | (1 << KIPC::SettingsChanged) |
@ -1057,7 +1057,7 @@ void TDEApplication::init(bool GUIenabled)
if (GUIenabled) if (GUIenabled)
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
// this is important since we fork() to launch the help (Matthias) // this is important since we fork() to launch the help (Matthias)
fcntl(ConnectionNumber(tqt_xdisplay()), F_SETFD, FD_CLOEXEC); fcntl(ConnectionNumber(tqt_xdisplay()), F_SETFD, FD_CLOEXEC);
// set up the fancy (=robust and error ignoring ) KDE xio error handlers (Matthias) // set up the fancy (=robust and error ignoring ) KDE xio error handlers (Matthias)
@ -1067,7 +1067,7 @@ void TDEApplication::init(bool GUIenabled)
connect( this, TQ_SIGNAL( aboutToQuit() ), this, TQ_SIGNAL( shutDown() ) ); connect( this, TQ_SIGNAL( aboutToQuit() ), this, TQ_SIGNAL( shutDown() ) );
#ifdef Q_WS_X11 //FIXME(E) #ifdef TQ_WS_X11 //FIXME(E)
display = desktop()->x11Display(); display = desktop()->x11Display();
#endif #endif
@ -1102,7 +1102,7 @@ void TDEApplication::init(bool GUIenabled)
d->checkAccelerators = new KCheckAccelerators( this ); d->checkAccelerators = new KCheckAccelerators( this );
} }
#ifdef Q_WS_MACX #ifdef TQ_WS_MACX
if (GUIenabled) { if (GUIenabled) {
TQPixmap pixmap = TDEGlobal::iconLoader()->loadIcon( TDECmdLineArgs::appName(), TQPixmap pixmap = TDEGlobal::iconLoader()->loadIcon( TDECmdLineArgs::appName(),
TDEIcon::NoGroup, TDEIcon::SizeLarge, TDEIcon::DefaultState, 0L, false ); TDEIcon::NoGroup, TDEIcon::SizeLarge, TDEIcon::DefaultState, 0L, false );
@ -1145,7 +1145,7 @@ void TDEApplication::init(bool GUIenabled)
pSessionConfig = 0L; pSessionConfig = 0L;
bSessionManagement = true; bSessionManagement = true;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
// register a communication window for desktop changes (Matthias) // register a communication window for desktop changes (Matthias)
if (GUIenabled && kde_have_kipc ) if (GUIenabled && kde_have_kipc )
{ {
@ -1156,7 +1156,7 @@ void TDEApplication::init(bool GUIenabled)
32, PropModeReplace, (unsigned char *)&data, 1); 32, PropModeReplace, (unsigned char *)&data, 1);
} }
d->oldIceIOErrorHandler = IceSetIOErrorHandler( kde_ice_ioerrorhandler ); d->oldIceIOErrorHandler = IceSetIOErrorHandler( kde_ice_ioerrorhandler );
#elif defined(Q_WS_WIN) #elif defined(TQ_WS_WIN)
TDEApplication_init_windows(GUIenabled); TDEApplication_init_windows(GUIenabled);
#else #else
// FIXME(E): Implement for Qt Embedded // FIXME(E): Implement for Qt Embedded
@ -1286,7 +1286,7 @@ void TDEApplication::disableSessionManagement() {
void TDEApplication::enableSessionManagement() { void TDEApplication::enableSessionManagement() {
bSessionManagement = true; bSessionManagement = true;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
// Session management support in Qt/TDE is awfully broken. // Session management support in Qt/TDE is awfully broken.
// If konqueror disables session management right after its startup, // If konqueror disables session management right after its startup,
// and enables it later (preloading stuff), it won't be properly // and enables it later (preloading stuff), it won't be properly
@ -1311,7 +1311,7 @@ void TDEApplication::enableSessionManagement() {
bool TDEApplication::requestShutDown( bool TDEApplication::requestShutDown(
ShutdownConfirm confirm, ShutdownType sdtype, ShutdownMode sdmode ) ShutdownConfirm confirm, ShutdownType sdtype, ShutdownMode sdmode )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
TQApplication::syncX(); TQApplication::syncX();
/* use ksmserver's dcop interface if necessary */ /* use ksmserver's dcop interface if necessary */
if ( confirm == ShutdownConfirmYes || if ( confirm == ShutdownConfirmYes ||
@ -1373,7 +1373,7 @@ bool TDEApplication::requestShutDown(
void TDEApplication::propagateSessionManager() void TDEApplication::propagateSessionManager()
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
TQCString fName = TQFile::encodeName(locateLocal("socket", "KSMserver")); TQCString fName = TQFile::encodeName(locateLocal("socket", "KSMserver"));
TQCString display = ::getenv(DISPLAY); TQCString display = ::getenv(DISPLAY);
// strip the screen number from the display // strip the screen number from the display
@ -1482,7 +1482,7 @@ static void checkRestartVersion( TQSessionManager& sm )
void TDEApplication::saveState( TQSessionManager& sm ) void TDEApplication::saveState( TQSessionManager& sm )
{ {
d->session_save = true; d->session_save = true;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
static bool firstTime = true; static bool firstTime = true;
mySmcConnection = (SmcConn) sm.handle(); mySmcConnection = (SmcConn) sm.handle();
@ -1568,7 +1568,7 @@ bool TDEApplication::sessionSaving() const
void TDEApplication::startKdeinit() void TDEApplication::startKdeinit()
{ {
#ifndef Q_WS_WIN //TODO #ifndef TQ_WS_WIN //TODO
TDEInstance inst( "starttdeinitlock" ); TDEInstance inst( "starttdeinitlock" );
TDELockFile lock( locateLocal( "tmp", "starttdeinitlock", &inst )); TDELockFile lock( locateLocal( "tmp", "starttdeinitlock", &inst ));
if( lock.lock( TDELockFile::LockNoBlock ) != TDELockFile::LockOK ) { if( lock.lock( TDELockFile::LockNoBlock ) != TDELockFile::LockOK ) {
@ -1602,7 +1602,7 @@ void TDEApplication::dcopFailure(const TQString &msg)
} }
if (failureCount == 2) if (failureCount == 2)
{ {
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
TDEGlobal::config()->setGroup("General"); TDEGlobal::config()->setGroup("General");
if (TDEGlobal::config()->readBoolEntry("ignoreDCOPFailures", false)) if (TDEGlobal::config()->readBoolEntry("ignoreDCOPFailures", false))
return; return;
@ -1635,7 +1635,7 @@ void TDEApplication::dcopFailure(const TQString &msg)
static const TDECmdLineOptions qt_options[] = static const TDECmdLineOptions qt_options[] =
{ {
//FIXME: Check if other options are specific to Qt/X11 //FIXME: Check if other options are specific to Qt/X11
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
{ "display <displayname>", I18N_NOOP("Use the X-server display 'displayname'"), 0}, { "display <displayname>", I18N_NOOP("Use the X-server display 'displayname'"), 0},
#else #else
{ "display <displayname>", I18N_NOOP("Use the QWS display 'displayname'"), 0}, { "display <displayname>", I18N_NOOP("Use the QWS display 'displayname'"), 0},
@ -1656,13 +1656,13 @@ static const TDECmdLineOptions qt_options[] =
{ "button <color>", I18N_NOOP("sets the default button color"), 0}, { "button <color>", I18N_NOOP("sets the default button color"), 0},
{ "name <name>", I18N_NOOP("sets the application name"), 0}, { "name <name>", I18N_NOOP("sets the application name"), 0},
{ "title <title>", I18N_NOOP("sets the application title (caption)"), 0}, { "title <title>", I18N_NOOP("sets the application title (caption)"), 0},
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
{ "visual TrueColor", I18N_NOOP("forces the application to use a TrueColor visual on\nan 8-bit display"), 0}, { "visual TrueColor", I18N_NOOP("forces the application to use a TrueColor visual on\nan 8-bit display"), 0},
{ "inputstyle <inputstyle>", I18N_NOOP("sets XIM (X Input Method) input style. Possible\nvalues are onthespot, overthespot, offthespot and\nroot"), 0 }, { "inputstyle <inputstyle>", I18N_NOOP("sets XIM (X Input Method) input style. Possible\nvalues are onthespot, overthespot, offthespot and\nroot"), 0 },
{ "im <XIM server>", I18N_NOOP("set XIM server"),0}, { "im <XIM server>", I18N_NOOP("set XIM server"),0},
{ "noxim", I18N_NOOP("disable XIM"), 0 }, { "noxim", I18N_NOOP("disable XIM"), 0 },
#endif #endif
#ifdef Q_WS_QWS #ifdef TQ_WS_QWS
{ "qws", I18N_NOOP("forces the application to run as QWS Server"), 0}, { "qws", I18N_NOOP("forces the application to run as QWS Server"), 0},
#endif #endif
{ "reverse", I18N_NOOP("mirrors the whole layout of widgets"), 0}, { "reverse", I18N_NOOP("mirrors the whole layout of widgets"), 0},
@ -1779,7 +1779,7 @@ void TDEApplication::parseCommandLine( )
TDECrash::setApplicationName(TQString(args->appName())); TDECrash::setApplicationName(TQString(args->appName()));
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if ( args->isSet( "waitforwm" ) ) { if ( args->isSet( "waitforwm" ) ) {
Atom type; Atom type;
(void) desktop(); // trigger desktop creation, we need PropertyNotify events for the root window (void) desktop(); // trigger desktop creation, we need PropertyNotify events for the root window
@ -1874,7 +1874,7 @@ TDEApplication::~TDEApplication()
TDEProcessController::deref(); TDEProcessController::deref();
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if ( d->oldXErrorHandler != NULL ) if ( d->oldXErrorHandler != NULL )
XSetErrorHandler( d->oldXErrorHandler ); XSetErrorHandler( d->oldXErrorHandler );
if ( d->oldXIOErrorHandler != NULL ) if ( d->oldXIOErrorHandler != NULL )
@ -1886,7 +1886,7 @@ TDEApplication::~TDEApplication()
delete d; delete d;
KApp = 0; KApp = 0;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
mySmcConnection = 0; mySmcConnection = 0;
delete smModificationTime; delete smModificationTime;
smModificationTime = 0; smModificationTime = 0;
@ -1902,7 +1902,7 @@ TDEApplication::~TDEApplication()
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
class KAppX11HackWidget: public TQWidget class KAppX11HackWidget: public TQWidget
{ {
public: public:
@ -1910,7 +1910,7 @@ public:
}; };
#endif #endif
#if defined(Q_WS_X11) && defined(COMPOSITE) #if defined(TQ_WS_X11) && defined(COMPOSITE)
bool TDEApplication::isCompositionManagerAvailable() { bool TDEApplication::isCompositionManagerAvailable() {
bool have_manager = false; bool have_manager = false;
@ -2164,7 +2164,7 @@ void TDEApplication::dcopBlockUserInput( bool b )
kapp_block_user_input = b; kapp_block_user_input = b;
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
bool TDEApplication::x11EventFilter( XEvent *_event ) bool TDEApplication::x11EventFilter( XEvent *_event )
{ {
if ( kapp_block_user_input ) { if ( kapp_block_user_input ) {
@ -2261,11 +2261,11 @@ bool TDEApplication::x11EventFilter( XEvent *_event )
} }
return false; return false;
} }
#endif // Q_WS_X11 #endif // TQ_WS_X11
void TDEApplication::updateUserTimestamp( unsigned long time ) void TDEApplication::updateUserTimestamp( unsigned long time )
{ {
#if defined Q_WS_X11 #if defined TQ_WS_X11
Display *display = tqt_xdisplay(); Display *display = tqt_xdisplay();
if (!display) { if (!display) {
return; return;
@ -2289,7 +2289,7 @@ void TDEApplication::updateUserTimestamp( unsigned long time )
unsigned long TDEApplication::userTimestamp() const unsigned long TDEApplication::userTimestamp() const
{ {
#if defined Q_WS_X11 #if defined TQ_WS_X11
return get_tqt_x_user_time(); return get_tqt_x_user_time();
#else #else
return 0; return 0;
@ -2298,7 +2298,7 @@ unsigned long TDEApplication::userTimestamp() const
void TDEApplication::updateRemoteUserTimestamp( const TQCString& dcopId, unsigned long time ) void TDEApplication::updateRemoteUserTimestamp( const TQCString& dcopId, unsigned long time )
{ {
#if defined Q_WS_X11 #if defined TQ_WS_X11
if( time == 0 ) if( time == 0 )
time = get_tqt_x_user_time(); time = get_tqt_x_user_time();
DCOPRef( dcopId, "MainApplication-Interface" ).call( "updateUserTimestamp", time ); DCOPRef( dcopId, "MainApplication-Interface" ).call( "updateUserTimestamp", time );
@ -2519,7 +2519,7 @@ TQPalette TDEApplication::createApplicationPalette( TDEConfig *config, int contr
void TDEApplication::tdedisplaySetPalette() void TDEApplication::tdedisplaySetPalette()
{ {
#ifdef Q_WS_MACX #ifdef TQ_WS_MACX
//Can I have this on other platforms, please!? --Sam //Can I have this on other platforms, please!? --Sam
{ {
TDEConfig *config = TDEGlobal::config(); TDEConfig *config = TDEGlobal::config();
@ -2654,7 +2654,7 @@ void TDEApplication::invokeHelp( const TQString& anchor,
return invokeHelp( anchor, _appname, "" ); return invokeHelp( anchor, _appname, "" );
} }
#ifndef Q_WS_WIN #ifndef TQ_WS_WIN
// for win32 we're using simple help tools like Qt Assistant, // for win32 we're using simple help tools like Qt Assistant,
// see kapplication_win.cpp // see kapplication_win.cpp
void TDEApplication::invokeHelp( const TQString& anchor, void TDEApplication::invokeHelp( const TQString& anchor,
@ -2787,7 +2787,7 @@ void TDEApplication::invokeMailer(const TQString &to, const TQString &cc, const
return invokeMailer(to,cc,bcc,subject,body,messageFile,attachURLs,""); return invokeMailer(to,cc,bcc,subject,body,messageFile,attachURLs,"");
} }
#ifndef Q_WS_WIN #ifndef TQ_WS_WIN
// on win32, for invoking browser we're using win32 API // on win32, for invoking browser we're using win32 API
// see kapplication_win.cpp // see kapplication_win.cpp
@ -3000,7 +3000,7 @@ void TDEApplication::invokeBrowser( const TQString &url )
return invokeBrowser( url, "" ); return invokeBrowser( url, "" );
} }
#ifndef Q_WS_WIN #ifndef TQ_WS_WIN
// on win32, for invoking browser we're using win32 API // on win32, for invoking browser we're using win32 API
// see kapplication_win.cpp // see kapplication_win.cpp
void TDEApplication::invokeBrowser( const TQString &url, const TQCString& startup_id ) void TDEApplication::invokeBrowser( const TQString &url, const TQCString& startup_id )
@ -3094,7 +3094,7 @@ startServiceInternal( const TQCString &function,
TQByteArray replyData; TQByteArray replyData;
TQCString _launcher = TDEApplication::launcher(); TQCString _launcher = TDEApplication::launcher();
TQValueList<TQCString> envs; TQValueList<TQCString> envs;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if (tqt_xdisplay()) { if (tqt_xdisplay()) {
TQCString dpystring(XDisplayString(tqt_xdisplay())); TQCString dpystring(XDisplayString(tqt_xdisplay()));
envs.append( TQCString("DISPLAY=") + dpystring ); envs.append( TQCString("DISPLAY=") + dpystring );
@ -3104,7 +3104,7 @@ startServiceInternal( const TQCString &function,
} }
#endif #endif
stream << envs; stream << envs;
#if defined Q_WS_X11 #if defined TQ_WS_X11
// make sure there is id, so that user timestamp exists // make sure there is id, so that user timestamp exists
stream << ( startup_id.isEmpty() ? TDEStartupInfo::createNewStartupId() : startup_id ); stream << ( startup_id.isEmpty() ? TDEStartupInfo::createNewStartupId() : startup_id );
#endif #endif
@ -3343,8 +3343,8 @@ void TDEApplication::setTopWidget( TQWidget *topWidget )
// set the specified icons // set the specified icons
topWidget->setIcon( icon() ); //standard X11 topWidget->setIcon( icon() ); //standard X11
#if defined Q_WS_X11 #if defined TQ_WS_X11
//#ifdef Q_WS_X11 // FIXME(E): Implement for Qt/Embedded //#ifdef TQ_WS_X11 // FIXME(E): Implement for Qt/Embedded
KWin::setIcons(topWidget->winId(), icon(), miniIcon() ); // NET_WM hints for KWin KWin::setIcons(topWidget->winId(), icon(), miniIcon() ); // NET_WM hints for KWin
// set the app startup notification window property // set the app startup notification window property
@ -3361,7 +3361,7 @@ void TDEApplication::setStartupId( const TQCString& startup_id )
{ {
if( startup_id == d->startup_id ) if( startup_id == d->startup_id )
return; return;
#if defined Q_WS_X11 #if defined TQ_WS_X11
TDEStartupInfo::handleAutoAppStartedSending(); // finish old startup notification if needed TDEStartupInfo::handleAutoAppStartedSending(); // finish old startup notification if needed
#endif #endif
if( startup_id.isEmpty()) if( startup_id.isEmpty())
@ -3369,7 +3369,7 @@ void TDEApplication::setStartupId( const TQCString& startup_id )
else else
{ {
d->startup_id = startup_id; d->startup_id = startup_id;
#if defined Q_WS_X11 #if defined TQ_WS_X11
TDEStartupInfoId id; TDEStartupInfoId id;
id.initId( startup_id ); id.initId( startup_id );
long timestamp = id.timestamp(); long timestamp = id.timestamp();
@ -3383,7 +3383,7 @@ void TDEApplication::setStartupId( const TQCString& startup_id )
// not to propagate it to processes started from this app // not to propagate it to processes started from this app
void TDEApplication::read_app_startup_id() void TDEApplication::read_app_startup_id()
{ {
#if defined Q_WS_X11 #if defined TQ_WS_X11
TDEStartupInfoId id = TDEStartupInfo::currentStartupIdEnv(); TDEStartupInfoId id = TDEStartupInfo::currentStartupIdEnv();
TDEStartupInfo::resetStartupEnv(); TDEStartupInfo::resetStartupEnv();
d->startup_id = id.id(); d->startup_id = id.id();
@ -3591,7 +3591,7 @@ bool TDEApplication::authorizeURLAction(const TQString &action, const KURL &_bas
uint TDEApplication::keyboardModifiers() uint TDEApplication::keyboardModifiers()
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
Window root; Window root;
Window child; Window child;
int root_x, root_y, win_x, win_y; int root_x, root_y, win_x, win_y;
@ -3610,13 +3610,13 @@ uint TDEApplication::keyboardModifiers()
uint TDEApplication::mouseState() uint TDEApplication::mouseState()
{ {
uint mousestate; uint mousestate;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
Window root; Window root;
Window child; Window child;
int root_x, root_y, win_x, win_y; int root_x, root_y, win_x, win_y;
XQueryPointer( tqt_xdisplay(), tqt_xrootwin(), &root, &child, XQueryPointer( tqt_xdisplay(), tqt_xrootwin(), &root, &child,
&root_x, &root_y, &win_x, &win_y, &mousestate ); &root_x, &root_y, &win_x, &win_y, &mousestate );
#elif defined(Q_WS_WIN) #elif defined(TQ_WS_WIN)
const bool mousebtn_swapped = GetSystemMetrics(SM_SWAPBUTTON); const bool mousebtn_swapped = GetSystemMetrics(SM_SWAPBUTTON);
if (GetAsyncKeyState(VK_LBUTTON)) if (GetAsyncKeyState(VK_LBUTTON))
mousestate |= (mousebtn_swapped ? Button3Mask : Button1Mask); mousestate |= (mousebtn_swapped ? Button3Mask : Button1Mask);
@ -3624,7 +3624,7 @@ uint TDEApplication::mouseState()
mousestate |= Button2Mask; mousestate |= Button2Mask;
if (GetAsyncKeyState(VK_RBUTTON)) if (GetAsyncKeyState(VK_RBUTTON))
mousestate |= (mousebtn_swapped ? Button1Mask : Button3Mask); mousestate |= (mousebtn_swapped ? Button1Mask : Button3Mask);
#elif defined(Q_WS_MACX) #elif defined(TQ_WS_MACX)
mousestate = GetCurrentEventButtonState(); mousestate = GetCurrentEventButtonState();
#else #else
//TODO: other platforms //TODO: other platforms
@ -3635,7 +3635,7 @@ uint TDEApplication::mouseState()
TQt::ButtonState TDEApplication::keyboardMouseState() TQt::ButtonState TDEApplication::keyboardMouseState()
{ {
int ret = 0; int ret = 0;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
Window root; Window root;
Window child; Window child;
int root_x, root_y, win_x, win_y; int root_x, root_y, win_x, win_y;
@ -3657,7 +3657,7 @@ TQt::ButtonState TDEApplication::keyboardMouseState()
ret |= AltButton; ret |= AltButton;
if( state & KKeyNative::modX( KKey::WIN )) if( state & KKeyNative::modX( KKey::WIN ))
ret |= MetaButton; ret |= MetaButton;
#elif defined(Q_WS_WIN) #elif defined(TQ_WS_WIN)
const bool mousebtn_swapped = GetSystemMetrics(SM_SWAPBUTTON); const bool mousebtn_swapped = GetSystemMetrics(SM_SWAPBUTTON);
if (GetAsyncKeyState(VK_LBUTTON)) if (GetAsyncKeyState(VK_LBUTTON))
ret |= (mousebtn_swapped ? RightButton : LeftButton); ret |= (mousebtn_swapped ? RightButton : LeftButton);
@ -3679,17 +3679,17 @@ TQt::ButtonState TDEApplication::keyboardMouseState()
return static_cast< ButtonState >( ret ); return static_cast< ButtonState >( ret );
} }
#if defined Q_WS_X11 #if defined TQ_WS_X11
int TDEApplication::currentX11VT() int TDEApplication::currentX11VT()
{ {
return get_x_vtnum(TQPaintDevice::x11AppDisplay()); return get_x_vtnum(TQPaintDevice::x11AppDisplay());
} }
#else // Q_WS_X11 #else // TQ_WS_X11
int TDEApplication::currentX11VT() int TDEApplication::currentX11VT()
{ {
return -1; return -1;
} }
#endif // Q_WS_X11 #endif // TQ_WS_X11
void TDEApplication::installSigpipeHandler() void TDEApplication::installSigpipeHandler()
{ {

@ -33,7 +33,7 @@ class DCOPObject;
#include <tqtglobaldefines.h> #include <tqtglobaldefines.h>
typedef unsigned long Atom; typedef unsigned long Atom;
#if !defined(Q_WS_X11) #if !defined(TQ_WS_X11)
typedef void Display; typedef void Display;
#endif #endif
@ -140,7 +140,7 @@ public:
#endif // TDEAPPLICATION_BINARY_COMPAT_HACK #endif // TDEAPPLICATION_BINARY_COMPAT_HACK
#endif // Q_QDOC #endif // Q_QDOC
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
/** /**
* Constructor. Parses command-line arguments. Use this constructor when you * Constructor. Parses command-line arguments. Use this constructor when you
* you want ARGB support to be automatically detected and enabled. * you want ARGB support to be automatically detected and enabled.
@ -935,7 +935,7 @@ public:
*/ */
TQString checkRecoverFile( const TQString& pFilename, bool& bRecover ) const; TQString checkRecoverFile( const TQString& pFilename, bool& bRecover ) const;
#if defined(Q_WS_X11) #if defined(TQ_WS_X11)
/** /**
* @internal * @internal
* Get the X11 display * Get the X11 display
@ -1262,7 +1262,7 @@ protected:
*/ */
TDEApplication( bool allowStyles, bool GUIenabled, TDEInstance* _instance ); TDEApplication( bool allowStyles, bool GUIenabled, TDEInstance* _instance );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
/** /**
* @internal Used by KUniqueApplication * @internal Used by KUniqueApplication
*/ */
@ -1352,7 +1352,7 @@ private:
void initUrlActionRestrictions(); void initUrlActionRestrictions();
bool argb_visual; bool argb_visual;
#if defined(Q_WS_X11) #if defined(TQ_WS_X11)
TQt::HANDLE argb_x11_visual; TQt::HANDLE argb_x11_visual;
TQt::HANDLE argb_x11_colormap; TQt::HANDLE argb_x11_colormap;
#endif #endif

@ -43,13 +43,13 @@
#include <kstringhandler.h> #include <kstringhandler.h>
#include <kstaticdeleter.h> #include <kstaticdeleter.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#define DISPLAY "DISPLAY" #define DISPLAY "DISPLAY"
#elif defined(Q_WS_QWS) #elif defined(TQ_WS_QWS)
#define DISPLAY "QWS_DISPLAY" #define DISPLAY "QWS_DISPLAY"
#endif #endif
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
#include <win32_utils.h> #include <win32_utils.h>
#endif #endif
@ -184,7 +184,7 @@ TDECmdLineArgs::init(int _argc, char **_argv, const TDEAboutData *_about, bool n
parsed = false; parsed = false;
mCwd = mCwdd.setObject(mCwd, new char [PATH_MAX+1], true); mCwd = mCwdd.setObject(mCwd, new char [PATH_MAX+1], true);
(void) getcwd(mCwd, PATH_MAX); (void) getcwd(mCwd, PATH_MAX);
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
win32_slashify(mCwd, PATH_MAX); win32_slashify(mCwd, PATH_MAX);
#endif #endif
if (!noKApp) if (!noKApp)
@ -1099,7 +1099,7 @@ TDECmdLineArgs::setOption(const TQCString &opt, const char *value)
addArgument(arg); addArgument(arg);
addArgument(value); addArgument(value);
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
// Hack coming up! // Hack coming up!
if (arg == "-display") if (arg == "-display")
{ {

@ -353,7 +353,7 @@ bool TDEConfigINIBackEnd::parseConfigFiles()
TQStringList tdercs = TDEGlobal::dirs()-> TQStringList tdercs = TDEGlobal::dirs()->
findAllResources("config", TQString::fromLatin1("kdeglobals")); findAllResources("config", TQString::fromLatin1("kdeglobals"));
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
TQString etc_tderc = TQFile::decodeName( TQCString(getenv("WINDIR")) + "\\tderc" ); TQString etc_tderc = TQFile::decodeName( TQCString(getenv("WINDIR")) + "\\tderc" );
#else #else
TQString etc_tderc = TQString::fromLatin1("/etc/tderc"); TQString etc_tderc = TQString::fromLatin1("/etc/tderc");

@ -1100,7 +1100,7 @@ void TDEConfigBase::writePathEntry( const TQString& pKey, const TQString & path,
static bool cleanHomeDirPath( TQString &path, const TQString &homeDir ) static bool cleanHomeDirPath( TQString &path, const TQString &homeDir )
{ {
#ifdef Q_WS_WIN //safer #ifdef TQ_WS_WIN //safer
if (!TQDir::convertSeparators(path).startsWith(TQDir::convertSeparators(homeDir))) if (!TQDir::convertSeparators(path).startsWith(TQDir::convertSeparators(homeDir)))
return false; return false;
#else #else

@ -29,7 +29,7 @@
#include <kipc.h> #include <kipc.h>
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
#include <windows.h> #include <windows.h>
#include "qt_windows.h" #include "qt_windows.h"
#include <win32_utils.h> #include <win32_utils.h>
@ -54,7 +54,7 @@ static TQRgb qt_colorref2qrgb(COLORREF col)
#include <tqtextstream.h> #include <tqtextstream.h>
#include <tqfile.h> #include <tqfile.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <X11/Xlib.h> #include <X11/Xlib.h>
#endif #endif
@ -315,7 +315,7 @@ TQColor TDEGlobalSettings::toolBarHighlightColor()
TQColor TDEGlobalSettings::inactiveTitleColor() TQColor TDEGlobalSettings::inactiveTitleColor()
{ {
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
return qt_colorref2qrgb(GetSysColor(COLOR_INACTIVECAPTION)); return qt_colorref2qrgb(GetSysColor(COLOR_INACTIVECAPTION));
#else #else
if (!_inactiveBackground) if (!_inactiveBackground)
@ -327,7 +327,7 @@ TQColor TDEGlobalSettings::inactiveTitleColor()
TQColor TDEGlobalSettings::inactiveTextColor() TQColor TDEGlobalSettings::inactiveTextColor()
{ {
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
return qt_colorref2qrgb(GetSysColor(COLOR_INACTIVECAPTIONTEXT)); return qt_colorref2qrgb(GetSysColor(COLOR_INACTIVECAPTIONTEXT));
#else #else
if (!_inactiveForeground) if (!_inactiveForeground)
@ -339,7 +339,7 @@ TQColor TDEGlobalSettings::inactiveTextColor()
TQColor TDEGlobalSettings::activeTitleColor() TQColor TDEGlobalSettings::activeTitleColor()
{ {
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
return qt_colorref2qrgb(GetSysColor(COLOR_ACTIVECAPTION)); return qt_colorref2qrgb(GetSysColor(COLOR_ACTIVECAPTION));
#else #else
initColors(); initColors();
@ -352,7 +352,7 @@ TQColor TDEGlobalSettings::activeTitleColor()
TQColor TDEGlobalSettings::activeTextColor() TQColor TDEGlobalSettings::activeTextColor()
{ {
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
return qt_colorref2qrgb(GetSysColor(COLOR_CAPTIONTEXT)); return qt_colorref2qrgb(GetSysColor(COLOR_CAPTIONTEXT));
#else #else
TDEConfigGroup g( TDEGlobal::config(), "WM" ); TDEConfigGroup g( TDEGlobal::config(), "WM" );
@ -788,7 +788,7 @@ TDEGlobalSettings::KMouseSettings & TDEGlobalSettings::mouseSettings()
s_mouseSettings = new KMouseSettings; s_mouseSettings = new KMouseSettings;
KMouseSettings & s = *s_mouseSettings; // for convenience KMouseSettings & s = *s_mouseSettings; // for convenience
#ifndef Q_WS_WIN #ifndef TQ_WS_WIN
TDEConfigGroup g( TDEGlobal::config(), "Mouse" ); TDEConfigGroup g( TDEGlobal::config(), "Mouse" );
TQString setting = g.readEntry("MouseButtonMapping"); TQString setting = g.readEntry("MouseButtonMapping");
if (setting == "RightHanded") if (setting == "RightHanded")
@ -797,7 +797,7 @@ TDEGlobalSettings::KMouseSettings & TDEGlobalSettings::mouseSettings()
s.handed = KMouseSettings::LeftHanded; s.handed = KMouseSettings::LeftHanded;
else else
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
// get settings from X server // get settings from X server
// This is a simplified version of the code in input/mouse.cpp // This is a simplified version of the code in input/mouse.cpp
// Keep in sync ! // Keep in sync !
@ -822,9 +822,9 @@ TDEGlobalSettings::KMouseSettings & TDEGlobalSettings::mouseSettings()
// FIXME(E): Implement in Qt Embedded // FIXME(E): Implement in Qt Embedded
#endif #endif
} }
#endif //Q_WS_WIN #endif //TQ_WS_WIN
} }
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
//not cached //not cached
s_mouseSettings->handed = (GetSystemMetrics(SM_SWAPBUTTON) ? KMouseSettings::LeftHanded : KMouseSettings::RightHanded); s_mouseSettings->handed = (GetSystemMetrics(SM_SWAPBUTTON) ? KMouseSettings::LeftHanded : KMouseSettings::RightHanded);
#endif #endif
@ -833,7 +833,7 @@ TDEGlobalSettings::KMouseSettings & TDEGlobalSettings::mouseSettings()
void TDEGlobalSettings::rereadMouseSettings() void TDEGlobalSettings::rereadMouseSettings()
{ {
#ifndef Q_WS_WIN #ifndef TQ_WS_WIN
delete s_mouseSettings; delete s_mouseSettings;
s_mouseSettings = 0L; s_mouseSettings = 0L;
#endif #endif
@ -841,7 +841,7 @@ void TDEGlobalSettings::rereadMouseSettings()
bool TDEGlobalSettings::isMultiHead() bool TDEGlobalSettings::isMultiHead()
{ {
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
return GetSystemMetrics(SM_CMONITORS) > 1; return GetSystemMetrics(SM_CMONITORS) > 1;
#else #else
TQCString multiHead = getenv("TDE_MULTIHEAD"); TQCString multiHead = getenv("TDE_MULTIHEAD");

@ -26,7 +26,7 @@
/* needed, because e.g. Q_OS_UNIX is so frequently used */ /* needed, because e.g. Q_OS_UNIX is so frequently used */
#include <tqglobal.h> #include <tqglobal.h>
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
#include <tdelibs_export_win.h> #include <tdelibs_export_win.h>
#else /* Q_OS_UNIX */ #else /* Q_OS_UNIX */

@ -42,7 +42,7 @@
#include "kcalendarsystemfactory.h" #include "kcalendarsystemfactory.h"
#include "tdelocale.h" #include "tdelocale.h"
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
#include <windows.h> #include <windows.h>
#endif #endif
@ -72,7 +72,7 @@ public:
KCalendarSystem * calendar; KCalendarSystem * calendar;
bool utf8FileEncoding; bool utf8FileEncoding;
TQString appName; TQString appName;
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
char win32SystemEncoding[3+7]; //"cp " + lang ID char win32SystemEncoding[3+7]; //"cp " + lang ID
#endif #endif
bool useMainCatalogue; bool useMainCatalogue;
@ -2264,7 +2264,7 @@ TQString TDELocale::defaultCountry()
const char * TDELocale::encoding() const const char * TDELocale::encoding() const
{ {
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
if (0==qstrcmp("System", codecForEncoding()->name())) if (0==qstrcmp("System", codecForEncoding()->name()))
{ {
//win32 returns "System" codec name here but KDE apps expect a real name: //win32 returns "System" codec name here but KDE apps expect a real name:

@ -33,8 +33,8 @@ DEALINGS IN THE SOFTWARE.
#include <tqwidget.h> #include <tqwidget.h>
#include "config.h" #include "config.h"
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
//#ifdef Q_WS_X11 // FIXME(E): Re-implement in a less X11 specific way //#ifdef TQ_WS_X11 // FIXME(E): Re-implement in a less X11 specific way
#include <tqglobal.h> #include <tqglobal.h>
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
@ -46,13 +46,13 @@ DEALINGS IN THE SOFTWARE.
#include <sys/time.h> #include <sys/time.h>
#include <stdlib.h> #include <stdlib.h>
#include <tqtimer.h> #include <tqtimer.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <netwm.h> #include <netwm.h>
#endif #endif
#include <kdebug.h> #include <kdebug.h>
#include <tdeapplication.h> #include <tdeapplication.h>
#include <signal.h> #include <signal.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <twinmodule.h> #include <twinmodule.h>
#include <kxmessages.h> #include <kxmessages.h>
#include <twin.h> #include <twin.h>
@ -93,7 +93,7 @@ struct TDEStartupInfoPrivate
TQMap< TDEStartupInfoId, TDEStartupInfo::Data > silent_startups; TQMap< TDEStartupInfoId, TDEStartupInfo::Data > silent_startups;
// contains ASN's that had change: but no new: yet // contains ASN's that had change: but no new: yet
TQMap< TDEStartupInfoId, TDEStartupInfo::Data > uninited_startups; TQMap< TDEStartupInfoId, TDEStartupInfo::Data > uninited_startups;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
KWinModule* wm_module; KWinModule* wm_module;
KXMessages msgs; KXMessages msgs;
#endif #endif
@ -101,7 +101,7 @@ struct TDEStartupInfoPrivate
int flags; int flags;
TDEStartupInfoPrivate( int flags_P ) TDEStartupInfoPrivate( int flags_P )
: :
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
msgs( NET_STARTUP_MSG, NULL, false ), msgs( NET_STARTUP_MSG, NULL, false ),
#endif #endif
flags( flags_P ) {} flags( flags_P ) {}
@ -130,7 +130,7 @@ void TDEStartupInfo::init( int flags_P )
return; return;
d = new TDEStartupInfoPrivate( flags_P ); d = new TDEStartupInfoPrivate( flags_P );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( !( d->flags & DisableKWinModule )) if( !( d->flags & DisableKWinModule ))
{ {
d->wm_module = new KWinModule( this ); d->wm_module = new KWinModule( this );
@ -505,7 +505,7 @@ void TDEStartupInfo::appStarted( const TQCString& startup_id )
TDEStartupInfo::sendFinish( id ); TDEStartupInfo::sendFinish( id );
else if( getenv( "DISPLAY" ) != NULL ) // don't rely on tqt_xdisplay() else if( getenv( "DISPLAY" ) != NULL ) // don't rely on tqt_xdisplay()
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
Display* disp = XOpenDisplay( NULL ); Display* disp = XOpenDisplay( NULL );
if( disp != NULL ) if( disp != NULL )
{ {
@ -612,7 +612,7 @@ TDEStartupInfo::startup_t TDEStartupInfo::check_startup_internal( WId w_P, TDESt
} }
return find_id( id, id_O, data_O ) ? Match : NoMatch; return find_id( id, id_O, data_O ) ? Match : NoMatch;
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETWinInfo info( tqt_xdisplay(), w_P, tqt_xrootwin(), NETWinInfo info( tqt_xdisplay(), w_P, tqt_xrootwin(),
NET::WMWindowType | NET::WMPid | NET::WMState ); NET::WMWindowType | NET::WMPid | NET::WMState );
pid_t pid = info.pid(); pid_t pid = info.pid();
@ -729,7 +729,7 @@ bool TDEStartupInfo::find_wclass( TQCString res_name, TQCString res_class,
return false; return false;
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
static Atom net_startup_atom = None; static Atom net_startup_atom = None;
static TQCString read_startup_id_property( WId w_P ) static TQCString read_startup_id_property( WId w_P )
@ -755,7 +755,7 @@ static TQCString read_startup_id_property( WId w_P )
TQCString TDEStartupInfo::windowStartupId( WId w_P ) TQCString TDEStartupInfo::windowStartupId( WId w_P )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( net_startup_atom == None ) if( net_startup_atom == None )
net_startup_atom = XInternAtom( tqt_xdisplay(), NET_STARTUP_WINDOW, False ); net_startup_atom = XInternAtom( tqt_xdisplay(), NET_STARTUP_WINDOW, False );
if( utf8_string_atom == None ) if( utf8_string_atom == None )
@ -777,7 +777,7 @@ TQCString TDEStartupInfo::windowStartupId( WId w_P )
void TDEStartupInfo::setWindowStartupId( WId w_P, const TQCString& id_P ) void TDEStartupInfo::setWindowStartupId( WId w_P, const TQCString& id_P )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( id_P.isNull()) if( id_P.isNull())
return; return;
if( net_startup_atom == None ) if( net_startup_atom == None )
@ -791,7 +791,7 @@ void TDEStartupInfo::setWindowStartupId( WId w_P, const TQCString& id_P )
TQCString TDEStartupInfo::get_window_hostname( WId w_P ) TQCString TDEStartupInfo::get_window_hostname( WId w_P )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
XTextProperty tp; XTextProperty tp;
char** hh; char** hh;
int cnt; int cnt;

@ -28,7 +28,7 @@ DEALINGS IN THE SOFTWARE.
#include <sys/types.h> #include <sys/types.h>
#include <tqobject.h> #include <tqobject.h>
#ifdef Q_WS_X11 // FIXME(E): Redo in a less X11-specific way #ifdef TQ_WS_X11 // FIXME(E): Redo in a less X11-specific way
#include <tqcstring.h> #include <tqcstring.h>
#include <tqstring.h> #include <tqstring.h>
@ -688,6 +688,6 @@ class TDECORE_EXPORT TDEStartupInfoData
TDEStartupInfoDataPrivate* d; TDEStartupInfoDataPrivate* d;
}; };
#endif //Q_WS_X11 #endif //TQ_WS_X11
#endif #endif

@ -45,7 +45,7 @@
#include <tdelocale.h> #include <tdelocale.h>
#include <dcopclient.h> #include <dcopclient.h>
#include <dcopref.h> #include <dcopref.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <tdestartupinfo.h> #include <tdestartupinfo.h>
#include <kxerrorhandler.h> #include <kxerrorhandler.h>
@ -103,7 +103,7 @@ static void twin_net_create_atoms() {
/* /*
Sends a client message to the ROOT window. Sends a client message to the ROOT window.
*/ */
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
static void sendClientMessageToRoot(Window w, Atom a, long x, long y = 0, long z = 0 ){ static void sendClientMessageToRoot(Window w, Atom a, long x, long y = 0, long z = 0 ){
XEvent ev; XEvent ev;
long mask; long mask;
@ -124,7 +124,7 @@ static void sendClientMessageToRoot(Window w, Atom a, long x, long y = 0, long z
/* /*
Send a client message to window w Send a client message to window w
*/ */
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
static void sendClientMessage(Window w, Atom a, long x){ static void sendClientMessage(Window w, Atom a, long x){
XEvent ev; XEvent ev;
long mask; long mask;
@ -145,7 +145,7 @@ static void sendClientMessage(Window w, Atom a, long x){
bool KWin::compositingActive() bool KWin::compositingActive()
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
twin_net_create_atoms(); twin_net_create_atoms();
return XGetSelectionOwner( tqt_xdisplay(), net_wm_cm ) != None; return XGetSelectionOwner( tqt_xdisplay(), net_wm_cm ) != None;
#else #else
@ -153,7 +153,7 @@ bool KWin::compositingActive()
#endif #endif
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
namespace namespace
{ {
class ContextWidget : public TQWidget class ContextWidget : public TQWidget
@ -213,14 +213,14 @@ bool ContextWidget::x11Event( XEvent * ev)
void KWin::invokeContextHelp() void KWin::invokeContextHelp()
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
ContextWidget w; ContextWidget w;
#endif #endif
} }
void KWin::setSystemTrayWindowFor( WId trayWin, WId forWin ) void KWin::setSystemTrayWindowFor( WId trayWin, WId forWin )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETWinInfo info( tqt_xdisplay(), trayWin, tqt_xrootwin(), 0 ); NETWinInfo info( tqt_xdisplay(), trayWin, tqt_xrootwin(), 0 );
if ( !forWin ) if ( !forWin )
forWin = tqt_xrootwin(); forWin = tqt_xrootwin();
@ -236,30 +236,30 @@ void KWin::setSystemTrayWindowFor( WId trayWin, WId forWin )
void KWin::activateWindow( WId win, long time ) void KWin::activateWindow( WId win, long time )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETRootInfo info( tqt_xdisplay(), 0 ); NETRootInfo info( tqt_xdisplay(), 0 );
if( time == 0 ) if( time == 0 )
time = get_tqt_x_user_time(); time = get_tqt_x_user_time();
info.setActiveWindow( win, NET::FromApplication, time, info.setActiveWindow( win, NET::FromApplication, time,
kapp->activeWindow() ? kapp->activeWindow()->winId() : 0 ); kapp->activeWindow() ? kapp->activeWindow()->winId() : 0 );
#endif // Q_WS_X11 ... #endif // TQ_WS_X11 ...
KUniqueApplication::setHandleAutoStarted(); KUniqueApplication::setHandleAutoStarted();
} }
void KWin::forceActiveWindow( WId win, long time ) void KWin::forceActiveWindow( WId win, long time )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETRootInfo info( tqt_xdisplay(), 0 ); NETRootInfo info( tqt_xdisplay(), 0 );
if( time == 0 ) if( time == 0 )
time = get_tqt_x_time(); time = get_tqt_x_time();
info.setActiveWindow( win, NET::FromTool, time, 0 ); info.setActiveWindow( win, NET::FromTool, time, 0 );
#endif // Q_WS_X11 #endif // TQ_WS_X11
KUniqueApplication::setHandleAutoStarted(); KUniqueApplication::setHandleAutoStarted();
} }
void KWin::setActiveWindow( WId win ) void KWin::setActiveWindow( WId win )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETRootInfo info( tqt_xdisplay(), 0 ); NETRootInfo info( tqt_xdisplay(), 0 );
info.setActiveWindow( win, NET::FromUnknown, 0, 0 ); info.setActiveWindow( win, NET::FromUnknown, 0, 0 );
#endif #endif
@ -268,7 +268,7 @@ void KWin::setActiveWindow( WId win )
void KWin::demandAttention( WId win, bool set ) void KWin::demandAttention( WId win, bool set )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), 0 ); NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), 0 );
info.setState( set ? NET::DemandsAttention : 0, NET::DemandsAttention ); info.setState( set ? NET::DemandsAttention : 0, NET::DemandsAttention );
#endif #endif
@ -276,7 +276,7 @@ void KWin::demandAttention( WId win, bool set )
void KWin::setUserTime( WId win, long time ) void KWin::setUserTime( WId win, long time )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), 0 ); NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), 0 );
info.setUserTime( time ); info.setUserTime( time );
#endif #endif
@ -290,7 +290,7 @@ KWin::WindowInfo KWin::windowInfo( WId win, unsigned long properties, unsigned l
WId KWin::transientFor( WId win ) WId KWin::transientFor( WId win )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
KXErrorHandler handler; // ignore badwindow KXErrorHandler handler; // ignore badwindow
Window transient_for = None; Window transient_for = None;
if( XGetTransientForHint( tqt_xdisplay(), win, &transient_for )) if( XGetTransientForHint( tqt_xdisplay(), win, &transient_for ))
@ -304,7 +304,7 @@ WId KWin::transientFor( WId win )
void KWin::setMainWindow( TQWidget* subwindow, WId mainwindow ) void KWin::setMainWindow( TQWidget* subwindow, WId mainwindow )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( mainwindow != 0 ) if( mainwindow != 0 )
{ {
/* /*
@ -326,7 +326,7 @@ void KWin::setMainWindow( TQWidget* subwindow, WId mainwindow )
WId KWin::groupLeader( WId win ) WId KWin::groupLeader( WId win )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
KXErrorHandler handler; // ignore badwindow KXErrorHandler handler; // ignore badwindow
XWMHints *hints = XGetWMHints( tqt_xdisplay(), win ); XWMHints *hints = XGetWMHints( tqt_xdisplay(), win );
Window window_group = None; Window window_group = None;
@ -347,7 +347,7 @@ WId KWin::groupLeader( WId win )
KWin::Info KWin::info( WId win ) KWin::Info KWin::info( WId win )
{ {
Info w; Info w;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETWinInfo inf( tqt_xdisplay(), win, tqt_xrootwin(), NETWinInfo inf( tqt_xdisplay(), win, tqt_xrootwin(),
NET::WMState | NET::WMState |
NET::WMStrut | NET::WMStrut |
@ -398,11 +398,11 @@ TQPixmap KWin::icon( WId win, int width, int height, bool scale )
TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags ) TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
KXErrorHandler handler; // ignore badwindow KXErrorHandler handler; // ignore badwindow
#endif #endif
TQPixmap result; TQPixmap result;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( flags & NETWM ) { if( flags & NETWM ) {
NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), NET::WMIcon ); NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), NET::WMIcon );
NETIcon ni = info.icon( width, height ); NETIcon ni = info.icon( width, height );
@ -514,7 +514,7 @@ TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
void KWin::setIcons( WId win, const TQPixmap& icon, const TQPixmap& miniIcon ) void KWin::setIcons( WId win, const TQPixmap& icon, const TQPixmap& miniIcon )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if ( icon.isNull() ) if ( icon.isNull() )
return; return;
NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), 0 ); NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), 0 );
@ -536,7 +536,7 @@ void KWin::setIcons( WId win, const TQPixmap& icon, const TQPixmap& miniIcon )
void KWin::setType( WId win, NET::WindowType windowType ) void KWin::setType( WId win, NET::WindowType windowType )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), 0 ); NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), 0 );
info.setWindowType( windowType ); info.setWindowType( windowType );
#endif #endif
@ -544,7 +544,7 @@ void KWin::setType( WId win, NET::WindowType windowType )
void KWin::setState( WId win, unsigned long state ) void KWin::setState( WId win, unsigned long state )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), NET::WMState ); NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), NET::WMState );
info.setState( state, state ); info.setState( state, state );
#endif #endif
@ -552,7 +552,7 @@ void KWin::setState( WId win, unsigned long state )
void KWin::clearState( WId win, unsigned long state ) void KWin::clearState( WId win, unsigned long state )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), NET::WMState ); NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), NET::WMState );
info.setState( 0, state ); info.setState( 0, state );
#endif #endif
@ -560,7 +560,7 @@ void KWin::clearState( WId win, unsigned long state )
void KWin::setOpacity( WId win, uint percent ) void KWin::setOpacity( WId win, uint percent )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
twin_net_create_atoms(); twin_net_create_atoms();
if (percent > 99) if (percent > 99)
XDeleteProperty (tqt_xdisplay(), win, kde_wm_window_opacity); XDeleteProperty (tqt_xdisplay(), win, kde_wm_window_opacity);
@ -574,7 +574,7 @@ void KWin::setOpacity( WId win, uint percent )
void KWin::setShadowSize( WId win, uint percent ) void KWin::setShadowSize( WId win, uint percent )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
twin_net_create_atoms(); twin_net_create_atoms();
long shadowSize = long(0xFFFFFFFF/100.0*percent); long shadowSize = long(0xFFFFFFFF/100.0*percent);
XChangeProperty(tqt_xdisplay(), win, kde_wm_window_shadow, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &shadowSize, 1L); XChangeProperty(tqt_xdisplay(), win, kde_wm_window_shadow, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &shadowSize, 1L);
@ -583,7 +583,7 @@ void KWin::setShadowSize( WId win, uint percent )
void KWin::setOnAllDesktops( WId win, bool b ) void KWin::setOnAllDesktops( WId win, bool b )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), NET::WMDesktop ); NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), NET::WMDesktop );
if ( b ) if ( b )
info.setDesktop( NETWinInfo::OnAllDesktops ); info.setDesktop( NETWinInfo::OnAllDesktops );
@ -596,7 +596,7 @@ void KWin::setOnAllDesktops( WId win, bool b )
void KWin::setOnDesktop( WId win, int desktop ) void KWin::setOnDesktop( WId win, int desktop )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), NET::WMDesktop ); NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), NET::WMDesktop );
info.setDesktop( desktop ); info.setDesktop( desktop );
#endif #endif
@ -606,7 +606,7 @@ void KWin::setExtendedStrut( WId win, int left_width, int left_start, int left_e
int right_width, int right_start, int right_end, int top_width, int top_start, int top_end, int right_width, int right_start, int right_end, int top_width, int top_start, int top_end,
int bottom_width, int bottom_start, int bottom_end ) int bottom_width, int bottom_start, int bottom_end )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), 0 ); NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), 0 );
NETExtendedStrut strut; NETExtendedStrut strut;
strut.left_width = left_width; strut.left_width = left_width;
@ -627,7 +627,7 @@ void KWin::setExtendedStrut( WId win, int left_width, int left_start, int left_e
void KWin::setStrut( WId win, int left, int right, int top, int bottom ) void KWin::setStrut( WId win, int left, int right, int top, int bottom )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), 0 ); NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), 0 );
NETStrut strut; NETStrut strut;
strut.left = left; strut.left = left;
@ -640,11 +640,11 @@ void KWin::setStrut( WId win, int left, int right, int top, int bottom )
int KWin::currentDesktop() int KWin::currentDesktop()
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if (!tqt_xdisplay()) if (!tqt_xdisplay())
#endif #endif
return 1; return 1;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETRootInfo info( tqt_xdisplay(), NET::CurrentDesktop ); NETRootInfo info( tqt_xdisplay(), NET::CurrentDesktop );
return info.currentDesktop(); return info.currentDesktop();
#endif #endif
@ -652,11 +652,11 @@ int KWin::currentDesktop()
int KWin::numberOfDesktops() int KWin::numberOfDesktops()
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if (!tqt_xdisplay()) if (!tqt_xdisplay())
#endif #endif
return 0; return 0;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETRootInfo info( tqt_xdisplay(), NET::NumberOfDesktops ); NETRootInfo info( tqt_xdisplay(), NET::NumberOfDesktops );
return info.numberOfDesktops(); return info.numberOfDesktops();
#endif #endif
@ -664,7 +664,7 @@ int KWin::numberOfDesktops()
void KWin::setCurrentDesktop( int desktop ) void KWin::setCurrentDesktop( int desktop )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETRootInfo info( tqt_xdisplay(), NET::CurrentDesktop ); NETRootInfo info( tqt_xdisplay(), NET::CurrentDesktop );
info.setCurrentDesktop( desktop ); info.setCurrentDesktop( desktop );
#endif #endif
@ -672,7 +672,7 @@ void KWin::setCurrentDesktop( int desktop )
void KWin::setCurrentDesktopViewport( int desktop, TQPoint viewport ) void KWin::setCurrentDesktopViewport( int desktop, TQPoint viewport )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETRootInfo info( tqt_xdisplay(), NET::CurrentDesktop ); NETRootInfo info( tqt_xdisplay(), NET::CurrentDesktop );
NETPoint netview; NETPoint netview;
netview.x = viewport.x(); netview.x = viewport.x();
@ -683,7 +683,7 @@ void KWin::setCurrentDesktopViewport( int desktop, TQPoint viewport )
void KWin::iconifyWindow( WId win, bool animation) void KWin::iconifyWindow( WId win, bool animation)
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if ( !animation ) if ( !animation )
{ {
twin_net_create_atoms(); twin_net_create_atoms();
@ -696,7 +696,7 @@ void KWin::iconifyWindow( WId win, bool animation)
void KWin::deIconifyWindow( WId win, bool animation ) void KWin::deIconifyWindow( WId win, bool animation )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if ( !animation ) if ( !animation )
{ {
twin_net_create_atoms(); twin_net_create_atoms();
@ -708,7 +708,7 @@ void KWin::deIconifyWindow( WId win, bool animation )
void KWin::raiseWindow( WId win ) void KWin::raiseWindow( WId win )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETRootInfo info( tqt_xdisplay(), NET::Supported ); NETRootInfo info( tqt_xdisplay(), NET::Supported );
if( info.isSupported( NET::WM2RestackWindow )) if( info.isSupported( NET::WM2RestackWindow ))
info.restackRequest( win, None, Above ); info.restackRequest( win, None, Above );
@ -719,7 +719,7 @@ void KWin::raiseWindow( WId win )
void KWin::lowerWindow( WId win ) void KWin::lowerWindow( WId win )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETRootInfo info( tqt_xdisplay(), NET::Supported ); NETRootInfo info( tqt_xdisplay(), NET::Supported );
if( info.isSupported( NET::WM2RestackWindow )) if( info.isSupported( NET::WM2RestackWindow ))
info.restackRequest( win, None, Below ); info.restackRequest( win, None, Below );
@ -730,7 +730,7 @@ void KWin::lowerWindow( WId win )
void KWin::appStarted() void KWin::appStarted()
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
TDEStartupInfo::appStarted(); TDEStartupInfo::appStarted();
#endif #endif
} }
@ -739,11 +739,11 @@ class KWin::WindowInfoPrivate
{ {
public: public:
WindowInfoPrivate() WindowInfoPrivate()
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
: info( NULL ) : info( NULL )
#endif #endif
{} {}
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
~WindowInfoPrivate() { delete info; } ~WindowInfoPrivate() { delete info; }
NETWinInfo* info; NETWinInfo* info;
#endif #endif
@ -762,7 +762,7 @@ class KWin::WindowInfoPrivate
// KWin::info() should be updated too if something has to be changed here // KWin::info() should be updated too if something has to be changed here
KWin::WindowInfo::WindowInfo( WId win, unsigned long properties, unsigned long properties2 ) KWin::WindowInfo::WindowInfo( WId win, unsigned long properties, unsigned long properties2 )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
KXErrorHandler handler; KXErrorHandler handler;
d = new WindowInfoPrivate; d = new WindowInfoPrivate;
d->ref = 1; d->ref = 1;
@ -862,7 +862,7 @@ WId KWin::WindowInfo::win() const
unsigned long KWin::WindowInfo::state() const unsigned long KWin::WindowInfo::state() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMState ) == 0, 176 ) kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMState ) == 0, 176 )
<< "Pass NET::WMState to KWin::windowInfo()" << endl; << "Pass NET::WMState to KWin::windowInfo()" << endl;
return d->info->state(); return d->info->state();
@ -873,7 +873,7 @@ unsigned long KWin::WindowInfo::state() const
NET::MappingState KWin::WindowInfo::mappingState() const NET::MappingState KWin::WindowInfo::mappingState() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::XAWMState ) == 0, 176 ) kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::XAWMState ) == 0, 176 )
<< "Pass NET::XAWMState to KWin::windowInfo()" << endl; << "Pass NET::XAWMState to KWin::windowInfo()" << endl;
return d->info->mappingState(); return d->info->mappingState();
@ -884,7 +884,7 @@ NET::MappingState KWin::WindowInfo::mappingState() const
NETExtendedStrut KWin::WindowInfo::extendedStrut() const NETExtendedStrut KWin::WindowInfo::extendedStrut() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2ExtendedStrut ) == 0, 176 ) kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2ExtendedStrut ) == 0, 176 )
<< "Pass NET::WM2ExtendedStrut to second argument of KWin::windowInfo()" << endl; << "Pass NET::WM2ExtendedStrut to second argument of KWin::windowInfo()" << endl;
NETExtendedStrut ext = d->info->extendedStrut(); NETExtendedStrut ext = d->info->extendedStrut();
@ -922,7 +922,7 @@ NETExtendedStrut KWin::WindowInfo::extendedStrut() const
NETStrut KWin::WindowInfo::strut() const NETStrut KWin::WindowInfo::strut() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMStrut ) == 0, 176 ) kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMStrut ) == 0, 176 )
<< "Pass NET::WMStrut to KWin::windowInfo()" << endl; << "Pass NET::WMStrut to KWin::windowInfo()" << endl;
return d->info->strut(); return d->info->strut();
@ -934,7 +934,7 @@ NETStrut KWin::WindowInfo::strut() const
NET::WindowType KWin::WindowInfo::windowType( int supported_types ) const NET::WindowType KWin::WindowInfo::windowType( int supported_types ) const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMWindowType ) == 0, 176 ) kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMWindowType ) == 0, 176 )
<< "Pass NET::WMWindowType to KWin::windowInfo()" << endl; << "Pass NET::WMWindowType to KWin::windowInfo()" << endl;
return d->info->windowType( supported_types ); return d->info->windowType( supported_types );
@ -965,7 +965,7 @@ TQString KWin::Info::visibleNameWithState() const
TQString KWin::WindowInfo::visibleName() const TQString KWin::WindowInfo::visibleName() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMVisibleName ) == 0, 176 ) kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMVisibleName ) == 0, 176 )
<< "Pass NET::WMVisibleName to KWin::windowInfo()" << endl; << "Pass NET::WMVisibleName to KWin::windowInfo()" << endl;
return d->info->visibleName() && d->info->visibleName()[ 0 ] != '\0' return d->info->visibleName() && d->info->visibleName()[ 0 ] != '\0'
@ -977,7 +977,7 @@ TQString KWin::WindowInfo::visibleName() const
TQString KWin::WindowInfo::name() const TQString KWin::WindowInfo::name() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMName ) == 0, 176 ) kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMName ) == 0, 176 )
<< "Pass NET::WMName to KWin::windowInfo()" << endl; << "Pass NET::WMName to KWin::windowInfo()" << endl;
return d->name_; return d->name_;
@ -998,7 +998,7 @@ TQString KWin::WindowInfo::visibleIconNameWithState() const
TQString KWin::WindowInfo::visibleIconName() const TQString KWin::WindowInfo::visibleIconName() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMVisibleIconName ) == 0, 176 ) kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMVisibleIconName ) == 0, 176 )
<< "Pass NET::WMVisibleIconName to KWin::windowInfo()" << endl; << "Pass NET::WMVisibleIconName to KWin::windowInfo()" << endl;
if( d->info->visibleIconName() && d->info->visibleIconName()[ 0 ] != '\0' ) if( d->info->visibleIconName() && d->info->visibleIconName()[ 0 ] != '\0' )
@ -1013,7 +1013,7 @@ TQString KWin::WindowInfo::visibleIconName() const
TQString KWin::WindowInfo::iconName() const TQString KWin::WindowInfo::iconName() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMIconName ) == 0, 176 ) kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMIconName ) == 0, 176 )
<< "Pass NET::WMIconName to KWin::windowInfo()" << endl; << "Pass NET::WMIconName to KWin::windowInfo()" << endl;
if( d->info->iconName() && d->info->iconName()[ 0 ] != '\0' ) if( d->info->iconName() && d->info->iconName()[ 0 ] != '\0' )
@ -1026,7 +1026,7 @@ TQString KWin::WindowInfo::iconName() const
bool KWin::WindowInfo::isOnCurrentDesktop() const bool KWin::WindowInfo::isOnCurrentDesktop() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
return isOnDesktop( KWin::currentDesktop()); return isOnDesktop( KWin::currentDesktop());
#else #else
return false; return false;
@ -1035,7 +1035,7 @@ bool KWin::WindowInfo::isOnCurrentDesktop() const
bool KWin::WindowInfo::isOnDesktop( int desktop ) const bool KWin::WindowInfo::isOnDesktop( int desktop ) const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMDesktop ) == 0, 176 ) kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMDesktop ) == 0, 176 )
<< "Pass NET::WMDesktop to KWin::windowInfo()" << endl; << "Pass NET::WMDesktop to KWin::windowInfo()" << endl;
return d->info->desktop() == desktop || d->info->desktop() == NET::OnAllDesktops; return d->info->desktop() == desktop || d->info->desktop() == NET::OnAllDesktops;
@ -1046,7 +1046,7 @@ bool KWin::WindowInfo::isOnDesktop( int desktop ) const
bool KWin::WindowInfo::onAllDesktops() const bool KWin::WindowInfo::onAllDesktops() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMDesktop ) == 0, 176 ) kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMDesktop ) == 0, 176 )
<< "Pass NET::WMDesktop to KWin::windowInfo()" << endl; << "Pass NET::WMDesktop to KWin::windowInfo()" << endl;
return d->info->desktop() == NET::OnAllDesktops; return d->info->desktop() == NET::OnAllDesktops;
@ -1057,7 +1057,7 @@ bool KWin::WindowInfo::onAllDesktops() const
int KWin::WindowInfo::desktop() const int KWin::WindowInfo::desktop() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMDesktop ) == 0, 176 ) kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMDesktop ) == 0, 176 )
<< "Pass NET::WMDesktop to KWin::windowInfo()" << endl; << "Pass NET::WMDesktop to KWin::windowInfo()" << endl;
return d->info->desktop(); return d->info->desktop();
@ -1068,7 +1068,7 @@ int KWin::WindowInfo::desktop() const
TQRect KWin::WindowInfo::geometry() const TQRect KWin::WindowInfo::geometry() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMGeometry ) == 0, 176 ) kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMGeometry ) == 0, 176 )
<< "Pass NET::WMGeometry to KWin::windowInfo()" << endl; << "Pass NET::WMGeometry to KWin::windowInfo()" << endl;
return d->geometry_; return d->geometry_;
@ -1079,7 +1079,7 @@ TQRect KWin::WindowInfo::geometry() const
TQRect KWin::WindowInfo::frameGeometry() const TQRect KWin::WindowInfo::frameGeometry() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMKDEFrameStrut ) == 0, 176 ) kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMKDEFrameStrut ) == 0, 176 )
<< "Pass NET::WMKDEFrameStrut to KWin::windowInfo()" << endl; << "Pass NET::WMKDEFrameStrut to KWin::windowInfo()" << endl;
return d->frame_geometry_; return d->frame_geometry_;
@ -1090,7 +1090,7 @@ TQRect KWin::WindowInfo::frameGeometry() const
WId KWin::WindowInfo::transientFor() const WId KWin::WindowInfo::transientFor() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2TransientFor ) == 0, 176 ) kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2TransientFor ) == 0, 176 )
<< "Pass NET::WM2TransientFor to KWin::windowInfo()" << endl; << "Pass NET::WM2TransientFor to KWin::windowInfo()" << endl;
return d->info->transientFor(); return d->info->transientFor();
@ -1101,7 +1101,7 @@ WId KWin::WindowInfo::transientFor() const
WId KWin::WindowInfo::groupLeader() const WId KWin::WindowInfo::groupLeader() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2GroupLeader ) == 0, 176 ) kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2GroupLeader ) == 0, 176 )
<< "Pass NET::WM2GroupLeader to KWin::windowInfo()" << endl; << "Pass NET::WM2GroupLeader to KWin::windowInfo()" << endl;
return d->info->groupLeader(); return d->info->groupLeader();
@ -1112,7 +1112,7 @@ WId KWin::WindowInfo::groupLeader() const
TQCString KWin::WindowInfo::windowClassClass() const TQCString KWin::WindowInfo::windowClassClass() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2WindowClass ) == 0, 176 ) kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2WindowClass ) == 0, 176 )
<< "Pass NET::WM2WindowClass to KWin::windowInfo()" << endl; << "Pass NET::WM2WindowClass to KWin::windowInfo()" << endl;
return d->info->windowClassClass(); return d->info->windowClassClass();
@ -1123,7 +1123,7 @@ TQCString KWin::WindowInfo::windowClassClass() const
TQCString KWin::WindowInfo::windowClassName() const TQCString KWin::WindowInfo::windowClassName() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2WindowClass ) == 0, 176 ) kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2WindowClass ) == 0, 176 )
<< "Pass NET::WM2WindowClass to KWin::windowInfo()" << endl; << "Pass NET::WM2WindowClass to KWin::windowInfo()" << endl;
return d->info->windowClassName(); return d->info->windowClassName();
@ -1134,7 +1134,7 @@ TQCString KWin::WindowInfo::windowClassName() const
TQCString KWin::WindowInfo::windowRole() const TQCString KWin::WindowInfo::windowRole() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2WindowRole ) == 0, 176 ) kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2WindowRole ) == 0, 176 )
<< "Pass NET::WM2WindowRole to KWin::windowInfo()" << endl; << "Pass NET::WM2WindowRole to KWin::windowInfo()" << endl;
return d->info->windowRole(); return d->info->windowRole();
@ -1145,7 +1145,7 @@ TQCString KWin::WindowInfo::windowRole() const
TQCString KWin::WindowInfo::clientMachine() const TQCString KWin::WindowInfo::clientMachine() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2ClientMachine ) == 0, 176 ) kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2ClientMachine ) == 0, 176 )
<< "Pass NET::WM2ClientMachine to KWin::windowInfo()" << endl; << "Pass NET::WM2ClientMachine to KWin::windowInfo()" << endl;
return d->info->clientMachine(); return d->info->clientMachine();
@ -1156,7 +1156,7 @@ TQCString KWin::WindowInfo::clientMachine() const
bool KWin::WindowInfo::actionSupported( NET::Action action ) const bool KWin::WindowInfo::actionSupported( NET::Action action ) const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2AllowedActions ) == 0, 176 ) kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2AllowedActions ) == 0, 176 )
<< "Pass NET::WM2AllowedActions to KWin::windowInfo()" << endl; << "Pass NET::WM2AllowedActions to KWin::windowInfo()" << endl;
if( allowedActionsSupported()) if( allowedActionsSupported())
@ -1169,7 +1169,7 @@ bool KWin::WindowInfo::actionSupported( NET::Action action ) const
// see NETWM spec section 7.6 // see NETWM spec section 7.6
bool KWin::WindowInfo::isMinimized() const bool KWin::WindowInfo::isMinimized() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( mappingState() != NET::Iconic ) if( mappingState() != NET::Iconic )
return false; return false;
// NETWM 1.2 compliant WM - uses NET::Hidden for minimized windows // NETWM 1.2 compliant WM - uses NET::Hidden for minimized windows
@ -1186,7 +1186,7 @@ bool KWin::WindowInfo::isMinimized() const
bool KWin::Info::isMinimized() const bool KWin::Info::isMinimized() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( mappingState != NET::Iconic ) if( mappingState != NET::Iconic )
return false; return false;
// NETWM 1.2 compliant WM - uses NET::Hidden for minimized windows // NETWM 1.2 compliant WM - uses NET::Hidden for minimized windows
@ -1208,7 +1208,7 @@ bool KWin::Info::isIconified() const
bool KWin::icccmCompliantMappingState() bool KWin::icccmCompliantMappingState()
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
static enum { noidea, yes, no } wm_is_1_2_compliant = noidea; static enum { noidea, yes, no } wm_is_1_2_compliant = noidea;
if( wm_is_1_2_compliant == noidea ) { if( wm_is_1_2_compliant == noidea ) {
NETRootInfo info( tqt_xdisplay(), NET::Supported ); NETRootInfo info( tqt_xdisplay(), NET::Supported );
@ -1222,7 +1222,7 @@ bool KWin::icccmCompliantMappingState()
bool KWin::allowedActionsSupported() bool KWin::allowedActionsSupported()
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
static enum { noidea, yes, no } wm_supports_allowed_actions = noidea; static enum { noidea, yes, no } wm_supports_allowed_actions = noidea;
if( wm_supports_allowed_actions == noidea ) { if( wm_supports_allowed_actions == noidea ) {
NETRootInfo info( tqt_xdisplay(), NET::Supported ); NETRootInfo info( tqt_xdisplay(), NET::Supported );
@ -1236,13 +1236,13 @@ bool KWin::allowedActionsSupported()
TQString KWin::readNameProperty( WId win, unsigned long atom ) TQString KWin::readNameProperty( WId win, unsigned long atom )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
XTextProperty tp; XTextProperty tp;
char **text = NULL; char **text = NULL;
int count; int count;
#endif #endif
TQString result; TQString result;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if ( XGetTextProperty( tqt_xdisplay(), win, &tp, atom ) != 0 && tp.value != NULL ) if ( XGetTextProperty( tqt_xdisplay(), win, &tp, atom ) != 0 && tp.value != NULL )
{ {
if (!twin_UTF8_STRING) if (!twin_UTF8_STRING)

@ -22,7 +22,7 @@
*/ */
#include <tqwidget.h> #include <tqwidget.h>
#ifdef Q_WS_X11 //FIXME #ifdef TQ_WS_X11 //FIXME
#include "twinmodule.h" #include "twinmodule.h"
#include "twin.h" #include "twin.h"
#include <X11/Xatom.h> #include <X11/Xatom.h>

@ -53,7 +53,7 @@
#include <kpixmapeffect.h> #include <kpixmapeffect.h>
#include <kimageeffect.h> #include <kimageeffect.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
# include <X11/Xlib.h> # include <X11/Xlib.h>
# ifdef HAVE_XRENDER # ifdef HAVE_XRENDER
# include <X11/extensions/Xrender.h> // schroder # include <X11/extensions/Xrender.h> // schroder
@ -2141,7 +2141,7 @@ TQImage TransparencyHandler::handleRealAlpha(TQImage img) {
// Create a shadow of thickness 4. // Create a shadow of thickness 4.
void TransparencyHandler::createShadowWindows(const TQWidget* p) void TransparencyHandler::createShadowWindows(const TQWidget* p)
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
int x2 = p->x()+p->width(); int x2 = p->x()+p->width();
int y2 = p->y()+p->height(); int y2 = p->y()+p->height();
TQRect shadow1(x2, p->y() + 4, 4, p->height()); TQRect shadow1(x2, p->y() + 4, 4, p->height());
@ -2200,7 +2200,7 @@ void TransparencyHandler::createShadowWindows(const TQWidget* p)
void TransparencyHandler::removeShadowWindows(const TQWidget* p) void TransparencyHandler::removeShadowWindows(const TQWidget* p)
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
ShadowMap::iterator it = shadowMap().find(p); ShadowMap::iterator it = shadowMap().find(p);
if (it != shadowMap().end()) if (it != shadowMap().end())
{ {
@ -2219,7 +2219,7 @@ void TransparencyHandler::removeShadowWindows(const TQWidget* p)
bool TransparencyHandler::eventFilter( TQObject* object, TQEvent* event ) bool TransparencyHandler::eventFilter( TQObject* object, TQEvent* event )
{ {
#if !defined Q_WS_MAC && !defined Q_WS_WIN #if !defined TQ_WS_MAC && !defined TQ_WS_WIN
// Transparency idea was borrowed from KDE2's "MegaGradient" Style, // Transparency idea was borrowed from KDE2's "MegaGradient" Style,
// Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org> // Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org>

@ -42,7 +42,7 @@
#include <tdeparts/browserinterface.h> #include <tdeparts/browserinterface.h>
#include <twin.h> #include <twin.h>
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
#include <twinmodule.h> // schroder #include <twinmodule.h> // schroder
#endif #endif
@ -111,7 +111,7 @@ namespace KJS {
TQGuardedPtr<TDEHTMLPart> part; TQGuardedPtr<TDEHTMLPart> part;
}; };
#ifdef Q_WS_QWS #ifdef TQ_WS_QWS
class KonquerorFunc : public DOMFunction { class KonquerorFunc : public DOMFunction {
public: public:
KonquerorFunc(ExecState *exec, const Konqueror* k, const char* name) KonquerorFunc(ExecState *exec, const Konqueror* k, const char* name)
@ -160,7 +160,7 @@ Value Screen::get(ExecState *exec, const Identifier &p) const
Value Screen::getValueProperty(ExecState *exec, int token) const Value Screen::getValueProperty(ExecState *exec, int token) const
{ {
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
KWinModule info(0, KWinModule::INFO_DESKTOP); KWinModule info(0, KWinModule::INFO_DESKTOP);
#endif #endif
TQWidget *thisWidget = Window::retrieveActive(exec)->part()->widget(); TQWidget *thisWidget = Window::retrieveActive(exec)->part()->widget();
@ -177,7 +177,7 @@ Value Screen::getValueProperty(ExecState *exec, int token) const
return Number(m.depth()); return Number(m.depth());
} }
case AvailLeft: { case AvailLeft: {
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
TQRect clipped = info.workArea().intersect(sg); TQRect clipped = info.workArea().intersect(sg);
return Number(clipped.x()-sg.x()); return Number(clipped.x()-sg.x());
#else #else
@ -185,7 +185,7 @@ Value Screen::getValueProperty(ExecState *exec, int token) const
#endif #endif
} }
case AvailTop: { case AvailTop: {
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
TQRect clipped = info.workArea().intersect(sg); TQRect clipped = info.workArea().intersect(sg);
return Number(clipped.y()-sg.y()); return Number(clipped.y()-sg.y());
#else #else
@ -193,7 +193,7 @@ Value Screen::getValueProperty(ExecState *exec, int token) const
#endif #endif
} }
case AvailHeight: { case AvailHeight: {
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
TQRect clipped = info.workArea().intersect(sg); TQRect clipped = info.workArea().intersect(sg);
return Number(clipped.height()); return Number(clipped.height());
#else #else
@ -201,7 +201,7 @@ Value Screen::getValueProperty(ExecState *exec, int token) const
#endif #endif
} }
case AvailWidth: { case AvailWidth: {
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
TQRect clipped = info.workArea().intersect(sg); TQRect clipped = info.workArea().intersect(sg);
return Number(clipped.width()); return Number(clipped.width());
#else #else
@ -848,7 +848,7 @@ Value Window::get(ExecState *exec, const Identifier &p) const
const_cast<Window *>(this)->put(exec, "clientInformation", nav, DontDelete|ReadOnly|Internal); const_cast<Window *>(this)->put(exec, "clientInformation", nav, DontDelete|ReadOnly|Internal);
return nav; return nav;
} }
#ifdef Q_WS_QWS #ifdef TQ_WS_QWS
case _Konqueror: { case _Konqueror: {
Value k( new Konqueror(part) ); Value k( new Konqueror(part) );
const_cast<Window *>(this)->put(exec, "konqueror", k, DontDelete|ReadOnly|Internal); const_cast<Window *>(this)->put(exec, "konqueror", k, DontDelete|ReadOnly|Internal);
@ -860,7 +860,7 @@ Value Window::get(ExecState *exec, const Identifier &p) const
case OuterHeight: case OuterHeight:
case OuterWidth: case OuterWidth:
{ {
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
if (!part->widget()) if (!part->widget())
return Number(0); return Number(0);
KWin::WindowInfo inf = KWin::windowInfo(part->widget()->topLevelWidget()->winId()); KWin::WindowInfo inf = KWin::windowInfo(part->widget()->topLevelWidget()->winId());
@ -2865,7 +2865,7 @@ Value HistoryFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifdef Q_WS_QWS #ifdef TQ_WS_QWS
const ClassInfo Konqueror::info = { "Konqueror", 0, 0, 0 }; const ClassInfo Konqueror::info = { "Konqueror", 0, 0, 0 };

@ -288,7 +288,7 @@ namespace KJS {
TQGuardedPtr<tdehtml::ChildFrame> m_frame; TQGuardedPtr<tdehtml::ChildFrame> m_frame;
}; };
#ifdef Q_WS_QWS #ifdef TQ_WS_QWS
class Konqueror : public ObjectImp { class Konqueror : public ObjectImp {
friend class KonquerorFunc; friend class KonquerorFunc;
public: public:

@ -267,7 +267,7 @@ void HTMLAppletElementImpl::attach()
{ {
TDEHTMLView* w = getDocument()->view(); TDEHTMLView* w = getDocument()->view();
#ifndef Q_WS_QWS // FIXME? #ifndef TQ_WS_QWS // FIXME?
DOMString codeBase = getAttribute( ATTR_CODEBASE ); DOMString codeBase = getAttribute( ATTR_CODEBASE );
DOMString code = getAttribute( ATTR_CODE ); DOMString code = getAttribute( ATTR_CODE );
if ( !codeBase.isEmpty() ) if ( !codeBase.isEmpty() )

@ -23,7 +23,7 @@
#define KJAVAAPPLETWIDGET_H #define KJAVAAPPLETWIDGET_H
#include <tqwidget.h> #include <tqwidget.h>
#ifndef Q_WS_QWS //FIXME(?) I don't think this is possible with Qt Embedded #ifndef TQ_WS_QWS //FIXME(?) I don't think this is possible with Qt Embedded
#include "java/kjavaappletcontext.h" #include "java/kjavaappletcontext.h"
#include "java/kjavaapplet.h" #include "java/kjavaapplet.h"
#include <qxembed.h> #include <qxembed.h>

@ -32,7 +32,7 @@
#include <tqlabel.h> #include <tqlabel.h>
#ifndef Q_WS_QWS // We don't have Java in Qt Embedded #ifndef TQ_WS_QWS // We don't have Java in Qt Embedded
#include "java/kjavaappletwidget.h" #include "java/kjavaappletwidget.h"
#include "misc/htmltags.h" #include "misc/htmltags.h"

@ -1251,7 +1251,7 @@ bool TDEHTMLPart::javaEnabled() const
{ {
if (onlyLocalReferences()) return false; if (onlyLocalReferences()) return false;
#ifndef Q_WS_QWS #ifndef TQ_WS_QWS
if( d->m_bJavaOverride ) if( d->m_bJavaOverride )
return d->m_bJavaForce; return d->m_bJavaForce;
return d->m_bJavaEnabled; return d->m_bJavaEnabled;

@ -220,7 +220,7 @@ public:
m_jsedlg = 0; m_jsedlg = 0;
m_formNotification = TDEHTMLPart::NoNotification; m_formNotification = TDEHTMLPart::NoNotification;
#ifndef Q_WS_QWS #ifndef TQ_WS_QWS
m_javaContext = 0; m_javaContext = 0;
#endif #endif
m_cacheId = 0; m_cacheId = 0;
@ -298,7 +298,7 @@ public:
#ifndef TDEHTML_NO_WALLET #ifndef TDEHTML_NO_WALLET
delete m_wallet; delete m_wallet;
#endif #endif
#ifndef Q_WS_QWS #ifndef TQ_WS_QWS
//delete m_javaContext; //delete m_javaContext;
#endif #endif
} }
@ -350,7 +350,7 @@ public:
int m_dcop_counter; int m_dcop_counter;
DCOPObject *m_dcopobject; DCOPObject *m_dcopobject;
#ifndef Q_WS_QWS #ifndef TQ_WS_QWS
KJavaAppletContext *m_javaContext; KJavaAppletContext *m_javaContext;
#endif #endif

@ -94,7 +94,7 @@
//#define DEBUG_PIXEL //#define DEBUG_PIXEL
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <fixx11h.h> #include <fixx11h.h>
#endif #endif
@ -1268,7 +1268,7 @@ void TDEHTMLView::viewportMouseMoveEvent( TQMouseEvent * _mouse )
} }
if ( ( mailtoCursor || newWindowCursor ) && isVisible() && hasFocus() ) { if ( ( mailtoCursor || newWindowCursor ) && isVisible() && hasFocus() ) {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
TQPixmap icon_pixmap = TDEGlobal::iconLoader()->loadIcon( mailtoCursor ? "mail_generic" : "window-new", TDEIcon::Small, 0, TDEIcon::DefaultState, 0, true ); TQPixmap icon_pixmap = TDEGlobal::iconLoader()->loadIcon( mailtoCursor ? "mail_generic" : "window-new", TDEIcon::Small, 0, TDEIcon::DefaultState, 0, true );
if (d->cursor_icon_widget) { if (d->cursor_icon_widget) {

@ -68,7 +68,7 @@
#endif #endif
#endif #endif
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
#include <tdestartupinfo.h> // schroder #include <tdestartupinfo.h> // schroder
#endif #endif
@ -77,8 +77,8 @@
#include "ltdl.h" #include "ltdl.h"
#include "tdelauncher_cmds.h" #include "tdelauncher_cmds.h"
//#if defined Q_WS_X11 && ! defined K_WS_QTONLY //#if defined TQ_WS_X11 && ! defined K_WS_QTONLY
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
//#undef K_WS_QTONLY //#undef K_WS_QTONLY
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>
@ -107,8 +107,8 @@ extern "C" FcBool XftInitFtLibrary (void);
extern char **environ; extern char **environ;
extern int lt_dlopen_flag; extern int lt_dlopen_flag;
//#if defined Q_WS_X11 && ! defined K_WS_QTONLY //#if defined TQ_WS_X11 && ! defined K_WS_QTONLY
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
static int X11fd = -1; static int X11fd = -1;
static Display *X11display = 0; static Display *X11display = 0;
static int X11_startup_notify_fd = -1; static int X11_startup_notify_fd = -1;
@ -119,12 +119,12 @@ static const TDEInstance *s_instance = 0;
static char sock_file[MAX_SOCK_FILE]; static char sock_file[MAX_SOCK_FILE];
static char sock_file_old[MAX_SOCK_FILE]; static char sock_file_old[MAX_SOCK_FILE];
//#if defined Q_WS_X11 && ! defined K_WS_QTONLY //#if defined TQ_WS_X11 && ! defined K_WS_QTONLY
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#define DISPLAY "DISPLAY" #define DISPLAY "DISPLAY"
#elif defined(Q_WS_QWS) #elif defined(TQ_WS_QWS)
#define DISPLAY "QWS_DISPLAY" #define DISPLAY "QWS_DISPLAY"
#elif defined(Q_WS_MACX) #elif defined(TQ_WS_MACX)
#define DISPLAY "MAC_DISPLAY" #define DISPLAY "MAC_DISPLAY"
#elif defined(K_WS_QTONLY) #elif defined(K_WS_QTONLY)
#define DISPLAY "QT_DISPLAY" #define DISPLAY "QT_DISPLAY"
@ -159,8 +159,8 @@ static struct {
bool suicide; bool suicide;
} d; } d;
//#if defined Q_WS_X11 && ! defined K_WS_QTONLY //#if defined TQ_WS_X11 && ! defined K_WS_QTONLY
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
extern "C" { extern "C" {
int tdeinit_xio_errhandler( Display * ); int tdeinit_xio_errhandler( Display * );
int tdeinit_x_errhandler( Display *, XErrorEvent *err ); int tdeinit_x_errhandler( Display *, XErrorEvent *err );
@ -219,8 +219,8 @@ static void close_fds()
close(d.wrapper_old); close(d.wrapper_old);
d.wrapper_old = 0; d.wrapper_old = 0;
} }
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
//#ifdef Q_WS_X11 //#ifdef TQ_WS_X11
if (X11fd >= 0) if (X11fd >= 0)
{ {
close(X11fd); close(X11fd);
@ -279,8 +279,8 @@ static void setup_tty( const char* tty )
static int get_current_desktop( Display* disp ) static int get_current_desktop( Display* disp )
{ {
int desktop = 0; // no desktop by default int desktop = 0; // no desktop by default
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
//#ifdef Q_WS_X11 // Only X11 supports multiple desktops //#ifdef TQ_WS_X11 // Only X11 supports multiple desktops
Atom net_current_desktop = XInternAtom( disp, "_NET_CURRENT_DESKTOP", False ); Atom net_current_desktop = XInternAtom( disp, "_NET_CURRENT_DESKTOP", False );
Atom type_ret; Atom type_ret;
int format_ret; int format_ret;
@ -317,8 +317,8 @@ const char* get_env_var( const char* var, int envc, const char* envs )
return NULL; return NULL;
} }
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
//#ifdef Q_WS_X11 // FIXME(E): Implement for Qt/Embedded //#ifdef TQ_WS_X11 // FIXME(E): Implement for Qt/Embedded
static void init_startup_info( TDEStartupInfoId& id, const char* bin, static void init_startup_info( TDEStartupInfoId& id, const char* bin,
int envc, const char* envs ) int envc, const char* envs )
{ {
@ -481,8 +481,8 @@ static pid_t launch(int argc, const char *_name, const char *args,
return d.fork; return d.fork;
} }
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
//#ifdef Q_WS_X11 //#ifdef TQ_WS_X11
TDEStartupInfoId startup_id; TDEStartupInfoId startup_id;
startup_id.initId( startup_id_str ); startup_id.initId( startup_id_str );
if( !startup_id.none()) if( !startup_id.none())
@ -549,8 +549,8 @@ static pid_t launch(int argc, const char *_name, const char *args,
envs++; envs++;
} }
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
//#ifdef Q_WS_X11 //#ifdef TQ_WS_X11
if( startup_id.none()) if( startup_id.none())
TDEStartupInfo::resetStartupEnv(); TDEStartupInfo::resetStartupEnv();
else else
@ -744,8 +744,8 @@ static pid_t launch(int argc, const char *_name, const char *args,
d.launcher_pid = d.fork; d.launcher_pid = d.fork;
} }
} }
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
//#ifdef Q_WS_X11 //#ifdef TQ_WS_X11
if( !startup_id.none()) if( !startup_id.none())
{ {
if( d.fork && d.result == 0 ) // launched successfully if( d.fork && d.result == 0 ) // launched successfully
@ -1290,7 +1290,7 @@ static void handle_launcher_request(int sock = -1)
#ifndef NDEBUG #ifndef NDEBUG
fprintf(stderr,"[tdeinit] Terminating Trinity.\n"); fprintf(stderr,"[tdeinit] Terminating Trinity.\n");
#endif #endif
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
tdeinit_xio_errhandler( 0L ); tdeinit_xio_errhandler( 0L );
#endif #endif
} }
@ -1322,7 +1322,7 @@ static void handle_requests(pid_t waitForPid)
max_sock = d.wrapper_old; max_sock = d.wrapper_old;
if (d.launcher_pid && (d.launcher[0] > max_sock)) if (d.launcher_pid && (d.launcher[0] > max_sock))
max_sock = d.launcher[0]; max_sock = d.launcher[0];
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
//#ifdef _WS_X11 //#ifdef _WS_X11
if (X11fd > max_sock) if (X11fd > max_sock)
max_sock = X11fd; max_sock = X11fd;
@ -1383,8 +1383,8 @@ static void handle_requests(pid_t waitForPid)
FD_SET(d.wrapper_old, &rd_set); FD_SET(d.wrapper_old, &rd_set);
} }
FD_SET(d.deadpipe[0], &rd_set); FD_SET(d.deadpipe[0], &rd_set);
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
//#ifdef Q_WS_X11 //#ifdef TQ_WS_X11
if(X11fd >= 0) FD_SET(X11fd, &rd_set); if(X11fd >= 0) FD_SET(X11fd, &rd_set);
#endif #endif
@ -1442,8 +1442,8 @@ static void handle_requests(pid_t waitForPid)
return; return;
} }
//#if defined Q_WS_X11 && ! defined K_WS_QTONLY //#if defined TQ_WS_X11 && ! defined K_WS_QTONLY
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
/* Look for incoming X11 events */ /* Look for incoming X11 events */
if((result > 0) && (X11fd >= 0)) if((result > 0) && (X11fd >= 0))
{ {
@ -1586,7 +1586,7 @@ int tdeinit_xio_errhandler( Display *disp )
return 0; return 0;
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
int tdeinit_x_errhandler( Display *dpy, XErrorEvent *err ) int tdeinit_x_errhandler( Display *dpy, XErrorEvent *err )
{ {
#ifndef NDEBUG #ifndef NDEBUG
@ -1606,8 +1606,8 @@ int tdeinit_x_errhandler( Display *dpy, XErrorEvent *err )
} }
#endif #endif
//#if defined Q_WS_X11 && ! defined K_WS_QTONLY //#if defined TQ_WS_X11 && ! defined K_WS_QTONLY
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
// needs to be done sooner than initXconnection() because of also opening // needs to be done sooner than initXconnection() because of also opening
// another X connection for startup notification purposes // another X connection for startup notification purposes
static void setupX() static void setupX()
@ -1772,7 +1772,7 @@ int main(int argc, char **argv, char **envp)
d.lt_dlopen_flag = lt_dlopen_flag; d.lt_dlopen_flag = lt_dlopen_flag;
lt_dlopen_flag |= LTDL_GLOBAL; lt_dlopen_flag |= LTDL_GLOBAL;
init_signals(); init_signals();
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
setupX(); setupX();
#endif #endif
@ -1821,8 +1821,8 @@ int main(int argc, char **argv, char **envp)
handle_requests(pid); // Wait for tdelauncher to be ready handle_requests(pid); // Wait for tdelauncher to be ready
} }
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
//#ifdef Q_WS_X11 //#ifdef TQ_WS_X11
X11fd = initXconnection(); X11fd = initXconnection();
#endif #endif
@ -1837,7 +1837,7 @@ int main(int argc, char **argv, char **envp)
TQFont::initialize(); TQFont::initialize();
setlocale (LC_ALL, ""); setlocale (LC_ALL, "");
setlocale (LC_NUMERIC, "C"); setlocale (LC_NUMERIC, "C");
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if (XSupportsLocale ()) if (XSupportsLocale ())
{ {
// Similar to TQApplication::create_xim() // Similar to TQApplication::create_xim()

@ -40,7 +40,7 @@
#include <tdetempfile.h> #include <tdetempfile.h>
#include <kurl.h> #include <kurl.h>
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
#include <tdestartupinfo.h> // schroder #include <tdestartupinfo.h> // schroder
#endif #endif
@ -52,8 +52,8 @@
#include "tdelauncher.h" #include "tdelauncher.h"
#include "tdelauncher_cmds.h" #include "tdelauncher_cmds.h"
//#if defined Q_WS_X11 && ! defined K_WS_QTONLY //#if defined TQ_WS_X11 && ! defined K_WS_QTONLY
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
//#undef K_WS_QTONLY //#undef K_WS_QTONLY
#include <X11/Xlib.h> // schroder #include <X11/Xlib.h> // schroder
#endif #endif
@ -169,7 +169,7 @@ TDELauncher::TDELauncher(int _tdeinitSocket, bool new_startup)
tdeinitSocket(_tdeinitSocket), mAutoStart( new_startup ), tdeinitSocket(_tdeinitSocket), mAutoStart( new_startup ),
dontBlockReading(false), newStartup( new_startup ) dontBlockReading(false), newStartup( new_startup )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
mCached_dpy = NULL; mCached_dpy = NULL;
#endif #endif
connect(&mAutoTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotAutoStart())); connect(&mAutoTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotAutoStart()));
@ -236,8 +236,8 @@ void TDELauncher::close()
TQCString filename = TQFile::encodeName(mPoolSocketName); TQCString filename = TQFile::encodeName(mPoolSocketName);
unlink(filename.data()); unlink(filename.data());
} }
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
//#ifdef Q_WS_X11 //#ifdef TQ_WS_X11
if( mCached_dpy != NULL ) if( mCached_dpy != NULL )
XCloseDisplay( mCached_dpy ); XCloseDisplay( mCached_dpy );
#endif #endif
@ -746,8 +746,8 @@ TDELauncher::requestDone(TDELaunchRequest *request)
DCOPresult.error += ":\n" + request->errorMsg; DCOPresult.error += ":\n" + request->errorMsg;
DCOPresult.pid = 0; DCOPresult.pid = 0;
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
//#ifdef Q_WS_X11 //#ifdef TQ_WS_X11
if (!request->startup_dpy.isEmpty()) if (!request->startup_dpy.isEmpty())
{ {
Display* dpy = NULL; Display* dpy = NULL;
@ -811,7 +811,7 @@ TDELauncher::requestStart(TDELaunchRequest *request)
length += (*it).length() + 1; // Envs... length += (*it).length() + 1; // Envs...
} }
length += sizeof( long ); // avoid_loops length += sizeof( long ); // avoid_loops
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
bool startup_notify = !request->startup_id.isNull() && request->startup_id != "0"; bool startup_notify = !request->startup_id.isNull() && request->startup_id != "0";
if( startup_notify ) if( startup_notify )
length += request->startup_id.length() + 1; length += request->startup_id.length() + 1;
@ -847,7 +847,7 @@ TDELauncher::requestStart(TDELaunchRequest *request)
l = 0; // avoid_loops, always false here l = 0; // avoid_loops, always false here
memcpy(p, &l, sizeof(long)); memcpy(p, &l, sizeof(long));
p += sizeof(long); p += sizeof(long);
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( startup_notify ) if( startup_notify )
{ {
strcpy(p, request->startup_id.data()); strcpy(p, request->startup_id.data());
@ -859,7 +859,7 @@ TDELauncher::requestStart(TDELaunchRequest *request)
strcpy(p, request->cwd.data()); strcpy(p, request->cwd.data());
p += strlen( p ) + 1; p += strlen( p ) + 1;
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
request_header.cmd = startup_notify ? LAUNCHER_EXT_EXEC : LAUNCHER_EXEC_NEW; request_header.cmd = startup_notify ? LAUNCHER_EXT_EXEC : LAUNCHER_EXEC_NEW;
#else #else
request_header.cmd = LAUNCHER_EXEC_NEW; request_header.cmd = LAUNCHER_EXEC_NEW;
@ -1050,8 +1050,8 @@ void
TDELauncher::send_service_startup_info( TDELaunchRequest *request, KService::Ptr service, const TQCString& startup_id, TDELauncher::send_service_startup_info( TDELaunchRequest *request, KService::Ptr service, const TQCString& startup_id,
const TQValueList<TQCString> &envs ) const TQValueList<TQCString> &envs )
{ {
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
//#ifdef Q_WS_X11 // TDEStartup* isn't implemented for Qt/Embedded yet //#ifdef TQ_WS_X11 // TDEStartup* isn't implemented for Qt/Embedded yet
request->startup_id = "0"; request->startup_id = "0";
if( startup_id == "0" ) if( startup_id == "0" )
return; return;
@ -1105,8 +1105,8 @@ void
TDELauncher::cancel_service_startup_info( TDELaunchRequest* request, const TQCString& startup_id, TDELauncher::cancel_service_startup_info( TDELaunchRequest* request, const TQCString& startup_id,
const TQValueList<TQCString> &envs ) const TQValueList<TQCString> &envs )
{ {
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
//#ifdef Q_WS_X11 // TDEStartup* isn't implemented for Qt/Embedded yet //#ifdef TQ_WS_X11 // TDEStartup* isn't implemented for Qt/Embedded yet
if( request != NULL ) if( request != NULL )
request->startup_id = "0"; request->startup_id = "0";
if( !startup_id.isEmpty() && startup_id != "0" ) if( !startup_id.isEmpty() && startup_id != "0" )
@ -1158,7 +1158,7 @@ TDELauncher::tdeinit_exec(const TQString &app, const TQStringList &args,
request->dcop_service_type = KService::DCOP_None; request->dcop_service_type = KService::DCOP_None;
request->dcop_name = 0; request->dcop_name = 0;
request->pid = 0; request->pid = 0;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
request->startup_id = startup_id; request->startup_id = startup_id;
#endif #endif
request->envs = envs; request->envs = envs;
@ -1318,7 +1318,7 @@ TDELauncher::requestSlave(const TQString &protocol,
request->dcop_name = 0; request->dcop_name = 0;
request->dcop_service_type = KService::DCOP_None; request->dcop_service_type = KService::DCOP_None;
request->pid = 0; request->pid = 0;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
request->startup_id = "0"; request->startup_id = "0";
#endif #endif
request->status = TDELaunchRequest::Launching; request->status = TDELaunchRequest::Launching;

@ -89,7 +89,7 @@ public:
KService::DCOPServiceType_t dcop_service_type; KService::DCOPServiceType_t dcop_service_type;
bool autoStart; bool autoStart;
TQString errorMsg; TQString errorMsg;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
TQCString startup_id; // "" is the default, "0" for none TQCString startup_id; // "" is the default, "0" for none
TQCString startup_dpy; // Display to send startup notification to. TQCString startup_dpy; // Display to send startup notification to.
#endif #endif
@ -193,7 +193,7 @@ protected:
TQCString mSlaveValgrindSkin; TQCString mSlaveValgrindSkin;
bool dontBlockReading; bool dontBlockReading;
bool newStartup; bool newStartup;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
Display *mCached_dpy; Display *mCached_dpy;
#endif #endif
}; };

@ -49,9 +49,9 @@ static char *getDisplay()
/* /*
don't test for a value from tqglobal.h but instead distinguish don't test for a value from tqglobal.h but instead distinguish
Qt/X11 from Qt/Embedded by the fact that Qt/E apps have -DQWS Qt/X11 from Qt/Embedded by the fact that Qt/E apps have -DQWS
on the commandline (which in tqglobal.h however triggers Q_WS_QWS, on the commandline (which in tqglobal.h however triggers TQ_WS_QWS,
but we don't want to include that here) (Simon) but we don't want to include that here) (Simon)
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
*/ */
#if !defined(QWS) #if !defined(QWS)
display = getenv("DISPLAY"); display = getenv("DISPLAY");

@ -37,7 +37,7 @@
#include <tdewallet.h> #include <tdewallet.h>
#include "config.h" #include "config.h"
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <X11/X.h> #include <X11/X.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#endif #endif
@ -386,7 +386,7 @@ KPasswdServer::processRequest()
if (hasWalletData) if (hasWalletData)
dlg.setKeepPassword( true ); dlg.setKeepPassword( true );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
XSetTransientForHint( tqt_xdisplay(), dlg.winId(), request->windowId); XSetTransientForHint( tqt_xdisplay(), dlg.winId(), request->windowId);
#endif #endif

@ -27,7 +27,7 @@ class KOpenSSLProxyPrivate;
#include <klibloader.h> #include <klibloader.h>
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
#include "ksslconfig_win.h" #include "ksslconfig_win.h"
#else #else
#include "ksslconfig.h" #include "ksslconfig.h"

@ -49,7 +49,7 @@ class KSSLX509V3;
#include <tdelibs_export.h> #include <tdelibs_export.h>
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
#include "ksslconfig_win.h" #include "ksslconfig_win.h"
#else #else
#include "ksslconfig.h" #include "ksslconfig.h"

@ -44,7 +44,7 @@ return list;
void KSSLCertificateHome::setDefaultCertificate(TQString name, TQString host, bool send, bool prompt) { void KSSLCertificateHome::setDefaultCertificate(TQString name, TQString host, bool send, bool prompt) {
KSimpleConfig cfg("ksslauthmap", false); KSimpleConfig cfg("ksslauthmap", false);
#ifdef Q_WS_WIN //temporary #ifdef TQ_WS_WIN //temporary
cfg.setGroup(host); cfg.setGroup(host);
#else #else
cfg.setGroup(KResolver::domainToAscii(host)); cfg.setGroup(KResolver::domainToAscii(host));
@ -156,7 +156,7 @@ KSSLPKCS12* KSSLCertificateHome::getCertificateByHost(TQString host, TQString pa
TQString KSSLCertificateHome::getDefaultCertificateName(TQString host, KSSLAuthAction *aa) { TQString KSSLCertificateHome::getDefaultCertificateName(TQString host, KSSLAuthAction *aa) {
KSimpleConfig cfg("ksslauthmap", false); KSimpleConfig cfg("ksslauthmap", false);
#ifdef Q_WS_WIN //temporary #ifdef TQ_WS_WIN //temporary
if (!cfg.hasGroup(host)) { if (!cfg.hasGroup(host)) {
#else #else
if (!cfg.hasGroup(KResolver::domainToAscii(host))) { if (!cfg.hasGroup(KResolver::domainToAscii(host))) {
@ -164,7 +164,7 @@ KSimpleConfig cfg("ksslauthmap", false);
if (aa) *aa = AuthNone; if (aa) *aa = AuthNone;
return TQString::null; return TQString::null;
} else { } else {
#ifdef Q_WS_WIN //temporary #ifdef TQ_WS_WIN //temporary
cfg.setGroup(host); cfg.setGroup(host);
#else #else
cfg.setGroup(KResolver::domainToAscii(host)); cfg.setGroup(KResolver::domainToAscii(host));

@ -26,7 +26,7 @@
#include <kstaticdeleter.h> #include <kstaticdeleter.h>
#include <kurl.h> #include <kurl.h>
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
#include "ksslconfig_win.h" #include "ksslconfig_win.h"
#else #else
#include "ksslconfig.h" #include "ksslconfig.h"

@ -20,7 +20,7 @@
#ifndef __kssldefs_h #ifndef __kssldefs_h
#define __kssldefs_h #define __kssldefs_h
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
#include "ksslconfig_win.h" #include "ksslconfig_win.h"
#else #else
#include "ksslconfig.h" #include "ksslconfig.h"

@ -30,7 +30,7 @@
#include <ksockaddr.h> #include <ksockaddr.h>
#include <kextsock.h> #include <kextsock.h>
#include <netsupp.h> #include <netsupp.h>
#ifndef Q_WS_WIN //TODO kresolver not ported #ifndef TQ_WS_WIN //TODO kresolver not ported
#include "kresolver.h" #include "kresolver.h"
#endif #endif
@ -62,7 +62,7 @@ void KSSLPeerInfo::setPeerHost(TQString realHost) {
while(d->peerHost.endsWith(".")) while(d->peerHost.endsWith("."))
d->peerHost.truncate(d->peerHost.length()-1); d->peerHost.truncate(d->peerHost.length()-1);
#ifdef Q_WS_WIN //TODO kresolver not ported #ifdef TQ_WS_WIN //TODO kresolver not ported
d->peerHost = d->peerHost.lower(); d->peerHost = d->peerHost.lower();
#else #else
d->peerHost = TQString::fromLatin1(KNetwork::KResolver::domainToAscii(d->peerHost)); d->peerHost = TQString::fromLatin1(KNetwork::KResolver::domainToAscii(d->peerHost));

@ -21,7 +21,7 @@
#ifndef _KSSLPKCS12_H #ifndef _KSSLPKCS12_H
#define _KSSLPKCS12_H #define _KSSLPKCS12_H
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
#include "ksslconfig_win.h" #include "ksslconfig_win.h"
#else #else
#include "ksslconfig.h" #include "ksslconfig.h"

@ -21,7 +21,7 @@
#ifndef _KSSLPKCS7_H #ifndef _KSSLPKCS7_H
#define _KSSLPKCS7_H #define _KSSLPKCS7_H
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
#include "ksslconfig_win.h" #include "ksslconfig_win.h"
#else #else
#include "ksslconfig.h" #include "ksslconfig.h"

@ -22,7 +22,7 @@
#include <kdemacros.h> #include <kdemacros.h>
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
#include "ksslconfig_win.h" #include "ksslconfig_win.h"
#else #else
#include "ksslconfig.h" #include "ksslconfig.h"

@ -1205,7 +1205,7 @@ void UIServer::showSSLInfoDialog(const TQString &url, const TDEIO::MetaData &met
meta["ssl_cipher_bits"].toInt(), meta["ssl_cipher_bits"].toInt(),
KSSLCertificate::KSSLValidation(meta["ssl_cert_state"].toInt())); KSSLCertificate::KSSLValidation(meta["ssl_cert_state"].toInt()));
kdDebug(7024) << "Showing SSL Info dialog" << endl; kdDebug(7024) << "Showing SSL Info dialog" << endl;
#ifndef Q_WS_WIN #ifndef TQ_WS_WIN
if( mainwindow != 0 ) if( mainwindow != 0 )
KWin::setMainWindow( kid, mainwindow ); KWin::setMainWindow( kid, mainwindow );
#endif #endif
@ -1233,7 +1233,7 @@ KSSLCertDlgRet UIServer::showSSLCertDialog(const TQString& host, const TQStringL
kcd->setupDialog(certList); kcd->setupDialog(certList);
kcd->setHost(host); kcd->setHost(host);
kdDebug(7024) << "Showing SSL certificate dialog" << endl; kdDebug(7024) << "Showing SSL certificate dialog" << endl;
#ifndef Q_WS_WIN #ifndef TQ_WS_WIN
if( mainwindow != 0 ) if( mainwindow != 0 )
KWin::setMainWindow( kcd, mainwindow ); KWin::setMainWindow( kcd, mainwindow );
#endif #endif

@ -135,7 +135,7 @@ extern "C" {
#include "kpropertiesdialog.h" #include "kpropertiesdialog.h"
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
# include <win32_utils.h> # include <win32_utils.h>
#endif #endif
@ -289,7 +289,7 @@ KPropertiesDialog::KPropertiesDialog (const KURL& _tempUrl, const KURL& _current
bool KPropertiesDialog::showDialog(KFileItem* item, TQWidget* parent, bool KPropertiesDialog::showDialog(KFileItem* item, TQWidget* parent,
const char* name, bool modal) const char* name, bool modal)
{ {
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
TQString localPath = item->localPath(); TQString localPath = item->localPath();
if (!localPath.isEmpty()) if (!localPath.isEmpty())
return showWin32FilePropertyDialog(localPath); return showWin32FilePropertyDialog(localPath);
@ -301,7 +301,7 @@ bool KPropertiesDialog::showDialog(KFileItem* item, TQWidget* parent,
bool KPropertiesDialog::showDialog(const KURL& _url, TQWidget* parent, bool KPropertiesDialog::showDialog(const KURL& _url, TQWidget* parent,
const char* name, bool modal) const char* name, bool modal)
{ {
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
if (_url.isLocalFile()) if (_url.isLocalFile())
return showWin32FilePropertyDialog( _url.path() ); return showWin32FilePropertyDialog( _url.path() );
#endif #endif
@ -956,7 +956,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
box->setSpacing(20); box->setSpacing(20);
l = new TQLabel(mimeComment, box ); l = new TQLabel(mimeComment, box );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
//TODO: wrap for win32 or mac? //TODO: wrap for win32 or mac?
TQPushButton *button = new TQPushButton(box); TQPushButton *button = new TQPushButton(box);
@ -1142,7 +1142,7 @@ void KFilePropsPlugin::setFileNameReadOnly( bool ro )
void KFilePropsPlugin::slotEditFileType() void KFilePropsPlugin::slotEditFileType()
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
TQString mime; TQString mime;
if ( d->mimeType == KMimeType::defaultMimeType() ) { if ( d->mimeType == KMimeType::defaultMimeType() ) {
int pos = d->oldFileName.findRev( '.' ); int pos = d->oldFileName.findRev( '.' );

@ -88,7 +88,7 @@
#include <tdefilespeedbar.h> #include <tdefilespeedbar.h>
#include <tdefilebookmarkhandler.h> #include <tdefilebookmarkhandler.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <fixx11h.h> #include <fixx11h.h>
#endif #endif
@ -1338,7 +1338,7 @@ TQString KFileDialog::getOpenFileNameWId(const TQString& startDir,
{ {
TQWidget* parent = TQWidget::find( parent_id ); TQWidget* parent = TQWidget::find( parent_id );
KFileDialog dlg(startDir, filter, parent, "filedialog", true); KFileDialog dlg(startDir, filter, parent, "filedialog", true);
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( parent == NULL && parent_id != 0 ) if( parent == NULL && parent_id != 0 )
XSetTransientForHint( tqt_xdisplay(), dlg.winId(), parent_id ); XSetTransientForHint( tqt_xdisplay(), dlg.winId(), parent_id );
#else #else
@ -1413,7 +1413,7 @@ TQString KFileDialog::getExistingDirectory(const TQString& startDir,
TQWidget *parent, TQWidget *parent,
const TQString& caption) const TQString& caption)
{ {
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
return TQFileDialog::getExistingDirectory(startDir, parent, "getExistingDirectory", return TQFileDialog::getExistingDirectory(startDir, parent, "getExistingDirectory",
caption, true, true); caption, true, true);
#else #else
@ -1620,7 +1620,7 @@ TQString KFileDialog::getSaveFileNameWId(const TQString& dir, const TQString& fi
bool specialDir = dir.at(0) == ':'; bool specialDir = dir.at(0) == ':';
TQWidget* parent = TQWidget::find( parent_id ); TQWidget* parent = TQWidget::find( parent_id );
KFileDialog dlg( specialDir ? dir : TQString::null, filter, parent, "filedialog", true); KFileDialog dlg( specialDir ? dir : TQString::null, filter, parent, "filedialog", true);
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( parent == NULL && parent_id != 0 ) if( parent == NULL && parent_id != 0 )
XSetTransientForHint(tqt_xdisplay(), dlg.winId(), parent_id); XSetTransientForHint(tqt_xdisplay(), dlg.winId(), parent_id);
#else #else

@ -35,7 +35,7 @@
#include <kstdguiitem.h> #include <kstdguiitem.h>
#include <klineedit.h> #include <klineedit.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <twin.h> #include <twin.h>
#endif #endif
@ -86,7 +86,7 @@ void DefaultProgress::init()
{ {
d = new DefaultProgressPrivate; d = new DefaultProgressPrivate;
#ifdef Q_WS_X11 //FIXME(E): Remove once all the KWin::foo calls have been ported to QWS #ifdef TQ_WS_X11 //FIXME(E): Remove once all the KWin::foo calls have been ported to QWS
// Set a useful icon for this window! // Set a useful icon for this window!
KWin::setIcons( winId(), KWin::setIcons( winId(),
TDEGlobal::iconLoader()->loadIcon( "document-save", TDEIcon::NoGroup, 32 ), TDEGlobal::iconLoader()->loadIcon( "document-save", TDEIcon::NoGroup, 32 ),

@ -73,7 +73,7 @@ extern "C" {
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
#include <utime.h> #include <utime.h>
#endif #endif
#if defined Q_WS_X11 #if defined TQ_WS_X11
#include <netwm.h> #include <netwm.h>
#include <fixx11h.h> #include <fixx11h.h>
#endif #endif
@ -391,7 +391,7 @@ TQWidget *Job::window() const
void Job::updateUserTimestamp( unsigned long time ) void Job::updateUserTimestamp( unsigned long time )
{ {
#if defined Q_WS_X11 #if defined TQ_WS_X11
if( d->m_userTimestamp == 0 || NET::timestampCompare( time, d->m_userTimestamp ) > 0 ) if( d->m_userTimestamp == 0 || NET::timestampCompare( time, d->m_userTimestamp ) > 0 )
d->m_userTimestamp = time; d->m_userTimestamp = time;
#endif #endif
@ -4695,7 +4695,7 @@ TQString CacheInfo::cachedFileName()
TQFile *CacheInfo::cachedFile() TQFile *CacheInfo::cachedFile()
{ {
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
const char *mode = (readWrite ? "rb+" : "rb"); const char *mode = (readWrite ? "rb+" : "rb");
#else #else
const char *mode = (readWrite ? "r+" : "r"); const char *mode = (readWrite ? "r+" : "r");

@ -1249,7 +1249,7 @@ void KDirWatchPrivate::emitEvent(Entry* e, int event, const KURL &fileName)
else else
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
path += "/" + fileName.path(); path += "/" + fileName.path();
#elif defined(Q_WS_WIN) #elif defined(TQ_WS_WIN)
//current drive is passed instead of / //current drive is passed instead of /
path += TQDir::currentDirPath().left(2) + "/" + fileName.path(); path += TQDir::currentDirPath().left(2) + "/" + fileName.path();
#endif #endif

@ -24,7 +24,7 @@
#include <tdelibs_export.h> #include <tdelibs_export.h>
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
#undef ERROR //avoid conflicts #undef ERROR //avoid conflicts
#endif #endif

@ -855,7 +855,7 @@ pid_t KDEDesktopMimeType::runFSDevice( const KURL& _url, const KSimpleConfig &cf
if ( fstype == "Default" ) // KDE-1 thing if ( fstype == "Default" ) // KDE-1 thing
fstype = TQString::null; fstype = TQString::null;
TQString point = cfg.readEntry( "MountPoint" ); TQString point = cfg.readEntry( "MountPoint" );
#ifndef Q_WS_WIN #ifndef TQ_WS_WIN
(void) new KAutoMount( ro, fstype, dev, point, _url.path() ); (void) new KAutoMount( ro, fstype, dev, point, _url.path() );
#endif #endif
retval = -1; // we don't want to return 0, but we don't want to return a pid retval = -1; // we don't want to return 0, but we don't want to return a pid
@ -1138,7 +1138,7 @@ void KDEDesktopMimeType::executeService( const KURL::List& urls, KDEDesktopMimeT
if ( fstype == "Default" ) // KDE-1 thing if ( fstype == "Default" ) // KDE-1 thing
fstype = TQString::null; fstype = TQString::null;
TQString point = cfg.readEntry( "MountPoint" ); TQString point = cfg.readEntry( "MountPoint" );
#ifndef Q_WS_WIN #ifndef TQ_WS_WIN
(void)new KAutoMount( ro, fstype, dev, point, path, false ); (void)new KAutoMount( ro, fstype, dev, point, path, false );
#endif #endif
} }
@ -1148,7 +1148,7 @@ void KDEDesktopMimeType::executeService( const KURL::List& urls, KDEDesktopMimeT
if ( mp.isEmpty() ) if ( mp.isEmpty() )
return; return;
#ifndef Q_WS_WIN #ifndef TQ_WS_WIN
(void)new KAutoUnmount( mp, path ); (void)new KAutoUnmount( mp, path );
#endif #endif
} }

@ -61,7 +61,7 @@
#include <kde_file.h> #include <kde_file.h>
#include <kstringhandler.h> #include <kstringhandler.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <twin.h> #include <twin.h>
#endif #endif
@ -562,7 +562,7 @@ static pid_t runCommandInternal( TDEProcess* proc, const KService* service, cons
return 0; return 0;
} }
TQString bin = KRun::binaryName( binName, true ); TQString bin = KRun::binaryName( binName, true );
#ifdef Q_WS_X11 // Startup notification doesn't work with QT/E, service isn't needed without Startup notification #ifdef TQ_WS_X11 // Startup notification doesn't work with QT/E, service isn't needed without Startup notification
bool silent; bool silent;
TQCString wmclass; TQCString wmclass;
TDEStartupInfoId id; TDEStartupInfoId id;
@ -1471,7 +1471,7 @@ TDEProcessRunner::run(TDEProcess * p, const TQString & binName)
return (new TDEProcessRunner(p, binName))->pid(); return (new TDEProcessRunner(p, binName))->pid();
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
pid_t pid_t
TDEProcessRunner::run(TDEProcess * p, const TQString & binName, const TDEStartupInfoId& id ) TDEProcessRunner::run(TDEProcess * p, const TQString & binName, const TDEStartupInfoId& id )
{ {
@ -1493,7 +1493,7 @@ TDEProcessRunner::TDEProcessRunner(TDEProcess * p, const TQString & _binName )
slotProcessExited( process_ ); slotProcessExited( process_ );
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
TDEProcessRunner::TDEProcessRunner(TDEProcess * p, const TQString & _binName, const TDEStartupInfoId& id ) TDEProcessRunner::TDEProcessRunner(TDEProcess * p, const TQString & _binName, const TDEStartupInfoId& id )
: TQObject(), : TQObject(),
process_(p), process_(p),
@ -1545,7 +1545,7 @@ TDEProcessRunner::slotProcessExited(TDEProcess * p)
kapp->deref(); kapp->deref();
} }
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( !id_.none()) if( !id_.none())
{ {
TDEStartupInfoData data; TDEStartupInfoData data;

@ -482,7 +482,7 @@ class TDEIO_EXPORT TDEProcessRunner : public TQObject
public: public:
static pid_t run(TDEProcess *, const TQString & binName); static pid_t run(TDEProcess *, const TQString & binName);
#ifdef Q_WS_X11 // We don't have TDEStartupInfo in Qt/Embedded #ifdef TQ_WS_X11 // We don't have TDEStartupInfo in Qt/Embedded
static pid_t run(TDEProcess *, const TQString & binName, const TDEStartupInfoId& id ); static pid_t run(TDEProcess *, const TQString & binName, const TDEStartupInfoId& id );
#endif #endif
@ -497,14 +497,14 @@ class TDEIO_EXPORT TDEProcessRunner : public TQObject
private: private:
TDEProcessRunner(TDEProcess *, const TQString & binName); TDEProcessRunner(TDEProcess *, const TQString & binName);
#ifdef Q_WS_X11 // We don't have TDEStartupInfo in Qt/Embedded #ifdef TQ_WS_X11 // We don't have TDEStartupInfo in Qt/Embedded
TDEProcessRunner(TDEProcess *, const TQString & binName, const TDEStartupInfoId& id ); TDEProcessRunner(TDEProcess *, const TQString & binName, const TDEStartupInfoId& id );
#endif #endif
TDEProcessRunner(); TDEProcessRunner();
TDEProcess * process_; TDEProcess * process_;
TQString binName; TQString binName;
#ifdef Q_WS_X11 // We don't have TDEStartupInfo in Qt/Embedded #ifdef TQ_WS_X11 // We don't have TDEStartupInfo in Qt/Embedded
TDEStartupInfoId id_; TDEStartupInfoId id_;
#endif #endif
}; };

@ -234,7 +234,7 @@ KServiceType::List KServiceTypeFactory::allServiceTypes()
it != list.end(); it != list.end();
++it) ++it)
{ {
#ifndef Q_WS_QWS #ifndef TQ_WS_QWS
KServiceType *newServiceType = dynamic_cast<KServiceType *>((*it).data()); KServiceType *newServiceType = dynamic_cast<KServiceType *>((*it).data());
#else //FIXME #else //FIXME
KServiceType *newServiceType = (KServiceType*)(*it).data(); KServiceType *newServiceType = (KServiceType*)(*it).data();

@ -48,7 +48,7 @@
#include <kguiitem.h> #include <kguiitem.h>
#include <ksqueezedtextlabel.h> #include <ksqueezedtextlabel.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <twin.h> #include <twin.h>
#endif #endif
@ -99,7 +99,7 @@ RenameDlg::RenameDlg(TQWidget *parent, const TQString & _caption,
// Set "StaysOnTop", because this dialog is typically used in tdeio_uiserver, // Set "StaysOnTop", because this dialog is typically used in tdeio_uiserver,
// i.e. in a separate process. // i.e. in a separate process.
// ####### This isn't the case anymore - remove? // ####### This isn't the case anymore - remove?
#if !defined(Q_WS_QWS) && !defined(Q_WS_WIN) //FIXME(E): Implement for QT Embedded & win32 #if !defined(TQ_WS_QWS) && !defined(TQ_WS_WIN) //FIXME(E): Implement for QT Embedded & win32
if (d->modal) if (d->modal)
KWin::setState( winId(), NET::StaysOnTop ); KWin::setState( winId(), NET::StaysOnTop );
#endif #endif

@ -32,7 +32,7 @@
#include <kpushbutton.h> #include <kpushbutton.h>
#include <kstdguiitem.h> #include <kstdguiitem.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <twin.h> #include <twin.h>
#endif #endif
@ -46,7 +46,7 @@ SkipDlg::SkipDlg(TQWidget *parent, bool _multi, const TQString& _error_text, boo
// Set "StaysOnTop", because this dialog is typically used in tdeio_uiserver, // Set "StaysOnTop", because this dialog is typically used in tdeio_uiserver,
// i.e. in a separate process. // i.e. in a separate process.
#ifdef Q_WS_X11 //FIXME(E): Implement for QT Embedded, mac & win32 #ifdef TQ_WS_X11 //FIXME(E): Implement for QT Embedded, mac & win32
if (modal) if (modal)
KWin::setState( winId(), NET::StaysOnTop ); KWin::setState( winId(), NET::StaysOnTop );
#endif #endif

@ -89,7 +89,7 @@ namespace TDEIO {
void Slave::accept(TDESocket *socket) void Slave::accept(TDESocket *socket)
{ {
#ifndef Q_WS_WIN #ifndef TQ_WS_WIN
slaveconn.init(socket); slaveconn.init(socket);
#endif #endif
delete serv; delete serv;
@ -151,7 +151,7 @@ Slave::Slave(TDEServerSocket *socket, const TQString &protocol, const TQString &
idle_since = contact_started; idle_since = contact_started;
m_pid = 0; m_pid = 0;
m_port = 0; m_port = 0;
#ifndef Q_WS_WIN #ifndef TQ_WS_WIN
connect(serv, TQ_SIGNAL(accepted( TDESocket* )), connect(serv, TQ_SIGNAL(accepted( TDESocket* )),
TQ_SLOT(accept(TDESocket*) ) ); TQ_SLOT(accept(TDESocket*) ) );
#endif #endif
@ -173,7 +173,7 @@ Slave::Slave(bool /*derived*/, TDEServerSocket *socket, const TQString &protocol
m_pid = 0; m_pid = 0;
m_port = 0; m_port = 0;
if (serv != 0) { if (serv != 0) {
#ifndef Q_WS_WIN #ifndef TQ_WS_WIN
connect(serv, TQ_SIGNAL(accepted( TDESocket* )), connect(serv, TQ_SIGNAL(accepted( TDESocket* )),
TQ_SLOT(accept(TDESocket*) ) ); TQ_SLOT(accept(TDESocket*) ) );
#endif #endif
@ -376,7 +376,7 @@ Slave* Slave::createSlave( const TQString &protocol, const KURL& url, int& error
socketfile.close(); socketfile.close();
#endif #endif
#ifndef Q_WS_WIN #ifndef TQ_WS_WIN
TDEServerSocket *kss = new TDEServerSocket(TQFile::encodeName(socketfile.name()).data()); TDEServerSocket *kss = new TDEServerSocket(TQFile::encodeName(socketfile.name()).data());
Slave *slave = new Slave(kss, protocol, socketfile.name()); Slave *slave = new Slave(kss, protocol, socketfile.name());
@ -418,7 +418,7 @@ Slave* Slave::createSlave( const TQString &protocol, const KURL& url, int& error
proc.start(TDEProcess::DontCare); proc.start(TDEProcess::DontCare);
#ifndef Q_WS_WIN #ifndef TQ_WS_WIN
slave->setPID(proc.pid()); slave->setPID(proc.pid());
TQTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, slave, TQ_SLOT(timeout())); TQTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, slave, TQ_SLOT(timeout()));
#endif #endif
@ -450,7 +450,7 @@ Slave* Slave::createSlave( const TQString &protocol, const KURL& url, int& error
delete slave; delete slave;
return 0; return 0;
} }
#ifndef Q_WS_WIN #ifndef TQ_WS_WIN
slave->setPID(pid); slave->setPID(pid);
TQTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, slave, TQ_SLOT(timeout())); TQTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, slave, TQ_SLOT(timeout()));
#endif #endif
@ -478,7 +478,7 @@ Slave* Slave::holdSlave( const TQString &protocol, const KURL& url )
socketfile.unlink(); socketfile.unlink();
#endif #endif
#ifndef Q_WS_WIN #ifndef TQ_WS_WIN
TDEServerSocket *kss = new TDEServerSocket(TQFile::encodeName(socketfile.name()).data()); TDEServerSocket *kss = new TDEServerSocket(TQFile::encodeName(socketfile.name()).data());
Slave *slave = new Slave(kss, protocol, socketfile.name()); Slave *slave = new Slave(kss, protocol, socketfile.name());
@ -505,7 +505,7 @@ Slave* Slave::holdSlave( const TQString &protocol, const KURL& url )
delete slave; delete slave;
return 0; return 0;
} }
#ifndef Q_WS_WIN #ifndef TQ_WS_WIN
slave->setPID(pid); slave->setPID(pid);
TQTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, slave, TQ_SLOT(timeout())); TQTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, slave, TQ_SLOT(timeout()));
#endif #endif

@ -44,7 +44,7 @@
#include <ksslall.h> #include <ksslall.h>
#include <ksslcertdlg.h> #include <ksslcertdlg.h>
#include <tdemessagebox.h> #include <tdemessagebox.h>
#ifndef Q_WS_WIN //temporary #ifndef TQ_WS_WIN //temporary
#include <kresolver.h> #include <kresolver.h>
#endif #endif
@ -762,7 +762,7 @@ int TCPSlaveBase::verifyCertificate()
_IPmatchesCN = d->kssl->peerInfo().certMatchesAddress(); _IPmatchesCN = d->kssl->peerInfo().certMatchesAddress();
if (!_IPmatchesCN) { if (!_IPmatchesCN) {
#ifndef Q_WS_WIN //temporary #ifndef TQ_WS_WIN //temporary
KNetwork::KResolverResults res = KNetwork::KResolver::resolve(d->kssl->peerInfo().peerHost(), "80", KNetwork::KResolver::CanonName); KNetwork::KResolverResults res = KNetwork::KResolver::resolve(d->kssl->peerInfo().peerHost(), "80", KNetwork::KResolver::CanonName);
if (!res.isEmpty()) { if (!res.isEmpty()) {
TQString old = d->kssl->peerInfo().peerHost(); TQString old = d->kssl->peerInfo().peerHost();

@ -965,7 +965,7 @@ TQString KFileItem::getToolTipText(int maxcount)
if(!timeStr.isEmpty()) if(!timeStr.isEmpty())
tip += start + i18n("Modified:") + mid + tip += start + i18n("Modified:") + mid +
timeStr + end; timeStr + end;
#ifndef Q_WS_WIN //TODO: show win32-specific permissions #ifndef TQ_WS_WIN //TODO: show win32-specific permissions
TQString userStr = user(); TQString userStr = user();
TQString groupStr = group(); TQString groupStr = group();
if(!userStr.isEmpty() || !groupStr.isEmpty()) if(!userStr.isEmpty() || !groupStr.isEmpty())

@ -204,7 +204,7 @@ void KIOExec::slotRunApp()
kdDebug() << "EXEC " << KShell::joinArgs( params ) << endl; kdDebug() << "EXEC " << KShell::joinArgs( params ) << endl;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
// propagate the startup indentification to the started process // propagate the startup indentification to the started process
TDEStartupInfoId id; TDEStartupInfoId id;
id.initId( kapp->startupId()); id.initId( kapp->startupId());
@ -215,7 +215,7 @@ void KIOExec::slotRunApp()
proc << params; proc << params;
proc.start( TDEProcess::Block ); proc.start( TDEProcess::Block );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
TDEStartupInfo::resetStartupEnv(); TDEStartupInfo::resetStartupEnv();
#endif #endif

@ -65,7 +65,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <kiconloader.h> #include <kiconloader.h>
#include <tdeapplication.h> #include <tdeapplication.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <X11/Xlib.h> #include <X11/Xlib.h>
#endif #endif
@ -76,11 +76,11 @@ KCookieWin::KCookieWin( TQWidget *parent, KHttpCookieList cookieList,
int defaultButton, bool showDetails ) int defaultButton, bool showDetails )
:KDialog( parent, "cookiealert", true ) :KDialog( parent, "cookiealert", true )
{ {
#ifndef Q_WS_QWS //FIXME(E): Implement for Qt Embedded #ifndef TQ_WS_QWS //FIXME(E): Implement for Qt Embedded
setCaption( i18n("Cookie Alert") ); setCaption( i18n("Cookie Alert") );
setIcon( SmallIcon("cookie") ); setIcon( SmallIcon("cookie") );
// all cookies in the list should have the same window at this time, so let's take the first // all cookies in the list should have the same window at this time, so let's take the first
# ifdef Q_WS_X11 # ifdef TQ_WS_X11
if( cookieList.first()->windowIds().count() > 0 ) if( cookieList.first()->windowIds().count() > 0 )
{ {
XSetTransientForHint( tqt_xdisplay(), winId(), cookieList.first()->windowIds().first()); XSetTransientForHint( tqt_xdisplay(), winId(), cookieList.first()->windowIds().first());

@ -41,7 +41,7 @@
#include <tdelocale.h> #include <tdelocale.h>
#include <iostream> #include <iostream>
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
//TODO: one day gradient can be added for win98/winnt5+ //TODO: one day gradient can be added for win98/winnt5+
// ask system properties on windows // ask system properties on windows
#ifndef SPI_GETGRADIENTCAPTIONS #ifndef SPI_GETGRADIENTCAPTIONS

@ -93,7 +93,7 @@
#include "kde2laptop_closebutton.xpm" #include "kde2laptop_closebutton.xpm"
#include "kde2laptop_closebutton_menu.xpm" #include "kde2laptop_closebutton_menu.xpm"
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#ifndef NO_KDE #ifndef NO_KDE
#include <X11/X.h> // schroder #include <X11/X.h> // schroder
#include <X11/Xlib.h> // schroder #include <X11/Xlib.h> // schroder
@ -108,7 +108,7 @@
/* I hate the defines in the X11 header files. Get rid of one of them */ /* I hate the defines in the X11 header files. Get rid of one of them */
#undef KeyPress #undef KeyPress
#endif #endif
#endif // Q_WS_X11 && ! K_WS_QTONLY #endif // TQ_WS_X11 && ! K_WS_QTONLY
using namespace KParts; using namespace KParts;
@ -698,7 +698,7 @@ void KMdiMainFrm::detachWindow( KMdiChildView *pWnd, bool bShow )
pWnd->setGeometry( TQRect( m_pMdi->getCascadePoint( m_pDocumentViews->count() - 1 ), defaultChildFrmSize() ) ); pWnd->setGeometry( TQRect( m_pMdi->getCascadePoint( m_pDocumentViews->count() - 1 ), defaultChildFrmSize() ) );
} }
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if ( mdiMode() == KMdi::ToplevelMode ) if ( mdiMode() == KMdi::ToplevelMode )
{ {
XSetTransientForHint( tqt_xdisplay(), pWnd->winId(), topLevelWidget() ->winId() ); XSetTransientForHint( tqt_xdisplay(), pWnd->winId(), topLevelWidget() ->winId() );
@ -708,7 +708,7 @@ void KMdiMainFrm::detachWindow( KMdiChildView *pWnd, bool bShow )
return ; return ;
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if ( mdiMode() == KMdi::ToplevelMode ) if ( mdiMode() == KMdi::ToplevelMode )
{ {
XSetTransientForHint( tqt_xdisplay(), pWnd->winId(), topLevelWidget() ->winId() ); XSetTransientForHint( tqt_xdisplay(), pWnd->winId(), topLevelWidget() ->winId() );
@ -1421,7 +1421,7 @@ void KMdiMainFrm::switchToToplevelMode()
TQPtrListIterator<KMdiChildView> tdemdicvit( *m_pDocumentViews ); TQPtrListIterator<KMdiChildView> tdemdicvit( *m_pDocumentViews );
for ( tdemdicvit.toFirst(); ( *tdemdicvit ); ++tdemdicvit ) for ( tdemdicvit.toFirst(); ( *tdemdicvit ); ++tdemdicvit )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
XSetTransientForHint( tqt_xdisplay(), ( *tdemdicvit )->winId(), winId() ); XSetTransientForHint( tqt_xdisplay(), ( *tdemdicvit )->winId(), winId() );
#endif #endif
( *tdemdicvit )->show(); ( *tdemdicvit )->show();

@ -49,7 +49,7 @@
#define UNLOAD_OBJECT(x) if (x != 0) { delete x; x = 0; } #define UNLOAD_OBJECT(x) if (x != 0) { delete x; x = 0; }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
extern void tqt_generate_epsf( bool b ); extern void tqt_generate_epsf( bool b );
#endif #endif
@ -101,7 +101,7 @@ KMFactory::KMFactory()
// This is fixed in Qt 3.0, but for Qt 2.x we need to disable it explicitly. // This is fixed in Qt 3.0, but for Qt 2.x we need to disable it explicitly.
// If this is a problem for anyone, we can add a public method to set this flag. // If this is a problem for anyone, we can add a public method to set this flag.
// (David Faure, doing as advised by Lars Knoll) // (David Faure, doing as advised by Lars Knoll)
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
tqt_generate_epsf( false ); tqt_generate_epsf( false );
#endif #endif
#endif #endif

@ -240,7 +240,7 @@ void HighColorStyle::renderMenuBlendPixmap( KPixmap& pix, const TQColorGroup &cg
{ {
TQColor col = cg.button(); TQColor col = cg.button();
#ifdef Q_WS_X11 // Only draw menu gradients on TrueColor, X11 visuals #ifdef TQ_WS_X11 // Only draw menu gradients on TrueColor, X11 visuals
if ( TQPaintDevice::x11AppDepth() >= 24 ) if ( TQPaintDevice::x11AppDepth() >= 24 )
KPixmapEffect::gradient( pix, col.light(120), col.dark(115), KPixmapEffect::gradient( pix, col.light(120), col.dark(115),
KPixmapEffect::HorizontalGradient ); KPixmapEffect::HorizontalGradient );

@ -179,7 +179,7 @@ void KeramikStyle::renderMenuBlendPixmap( KPixmap& pix, const TQColorGroup &cg,
{ {
TQColor col = cg.button(); TQColor col = cg.button();
#ifdef Q_WS_X11 // Only draw menu gradients on TrueColor, X11 visuals #ifdef TQ_WS_X11 // Only draw menu gradients on TrueColor, X11 visuals
if ( TQPaintDevice::x11AppDepth() >= 24 ) if ( TQPaintDevice::x11AppDepth() >= 24 )
KPixmapEffect::gradient( pix, col.light(120), col.dark(115), KPixmapEffect::gradient( pix, col.light(120), col.dark(115),
KPixmapEffect::HorizontalGradient ); KPixmapEffect::HorizontalGradient );
@ -2778,7 +2778,7 @@ TQRect KeramikStyle::querySubControlMetrics( ComplexControl control,
#include <config.h> #include <config.h>
#if !defined Q_WS_X11 || defined K_WS_QTONLY #if !defined TQ_WS_X11 || defined K_WS_QTONLY
#undef HAVE_X11_EXTENSIONS_SHAPE_H #undef HAVE_X11_EXTENSIONS_SHAPE_H
#endif #endif

@ -439,7 +439,7 @@ void KThemeBase::readConfig( TQt::GUIStyle /*style*/ )
{ {
if ( config.entryList( configFileName + widgetEntries[ i ] ).size() ) if ( config.entryList( configFileName + widgetEntries[ i ] ).size() )
applyResourceGroup( &config, i ); applyResourceGroup( &config, i );
#ifndef Q_WS_QWS //FIXME #ifndef TQ_WS_QWS //FIXME
else else
{ {
@ -617,7 +617,7 @@ void KThemeBase::applyConfigFile( TQSettings& config )
d->overrideWindowForeground = false; d->overrideWindowForeground = false;
#ifndef Q_WS_QWS //FIXME #ifndef TQ_WS_QWS //FIXME
for ( int input = 0; input < WIDGETS; ++input ) for ( int input = 0; input < WIDGETS; ++input )
{ {
@ -1111,7 +1111,7 @@ TQColorGroup* KThemeBase::makeColorGroup( const TQColor &fg, const TQColor &bg,
void KThemeBase::applyMiscResourceGroup( TQSettings *config ) void KThemeBase::applyMiscResourceGroup( TQSettings *config )
{ {
#ifndef Q_WS_QWS //FIXME #ifndef TQ_WS_QWS //FIXME
d->props.erase( "Misc" ); // clear the old property d->props.erase( "Misc" ); // clear the old property
TQString base = configFileName + "Misc/"; TQString base = configFileName + "Misc/";
@ -1181,7 +1181,7 @@ static TQColor readColorEntry( Prop& prop, TQString setting, const TQColor& def
void KThemeBase::readMiscResourceGroup() void KThemeBase::readMiscResourceGroup()
{ {
#ifndef Q_WS_QWS //FIXME #ifndef TQ_WS_QWS //FIXME
Prop & prop = d->props[ "Misc" ]; Prop & prop = d->props[ "Misc" ];
sbPlacement = ( SButton ) readNumEntry( prop, "SButtonPosition", sbPlacement = ( SButton ) readNumEntry( prop, "SButtonPosition",
@ -1198,7 +1198,7 @@ void KThemeBase::readMiscResourceGroup()
void KThemeBase::applyResourceGroup( TQSettings *config, int i ) void KThemeBase::applyResourceGroup( TQSettings *config, int i )
{ {
#ifndef Q_WS_QWS //FIXME #ifndef TQ_WS_QWS //FIXME
TQString tmpStr; TQString tmpStr;
int tmpVal; int tmpVal;
@ -1357,7 +1357,7 @@ void KThemeBase::applyResourceGroup( TQSettings *config, int i )
void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdnames, void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdnames,
bool *loadArray ) bool *loadArray )
{ {
#ifndef Q_WS_QWS //FIXME #ifndef TQ_WS_QWS //FIXME
if ( loadArray[ i ] == true ) if ( loadArray[ i ] == true )
{ {
return ; // already been preloaded. return ; // already been preloaded.

@ -53,7 +53,7 @@ public:
TDEsuClient::TDEsuClient() TDEsuClient::TDEsuClient()
{ {
sockfd = -1; sockfd = -1;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
TQCString display(getenv("DISPLAY")); TQCString display(getenv("DISPLAY"));
if (display.isEmpty()) if (display.isEmpty())
{ {

@ -33,7 +33,7 @@
KCookie::KCookie() KCookie::KCookie()
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
getXCookie(); getXCookie();
#endif #endif
setDcopTransport("local"); setDcopTransport("local");
@ -85,7 +85,7 @@ void KCookie::getXCookie()
char buf[1024]; char buf[1024];
FILE *f; FILE *f;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
m_Display = getenv("DISPLAY"); m_Display = getenv("DISPLAY");
#else #else
m_Display = getenv("QWS_DISPLAY"); m_Display = getenv("QWS_DISPLAY");
@ -95,7 +95,7 @@ void KCookie::getXCookie()
kdError(900) << k_lineinfo << "$DISPLAY is not set.\n"; kdError(900) << k_lineinfo << "$DISPLAY is not set.\n";
return; return;
} }
#ifdef Q_WS_X11 // No need to mess with X Auth stuff #ifdef TQ_WS_X11 // No need to mess with X Auth stuff
TQCString disp = m_Display; TQCString disp = m_Display;
if (!memcmp(disp.data(), "localhost:", 10)) if (!memcmp(disp.data(), "localhost:", 10))
disp.remove(0, 9); disp.remove(0, 9);

@ -34,7 +34,7 @@ public:
*/ */
TQCString display() { return m_Display; } TQCString display() { return m_Display; }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
/** /**
* Returns the X11 magic cookie, if available. * Returns the X11 magic cookie, if available.
*/ */
@ -74,7 +74,7 @@ private:
bool m_bHaveICECookies; bool m_bHaveICECookies;
TQCString m_Display; TQCString m_Display;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
TQCString m_DisplayAuth; TQCString m_DisplayAuth;
#endif #endif
TQCString m_DCOPSrv; TQCString m_DCOPSrv;

@ -95,7 +95,7 @@ int StubProcess::ConverseStub(int check)
} else if (line == "display") { } else if (line == "display") {
writeLine(display()); writeLine(display());
} else if (line == "display_auth") { } else if (line == "display_auth") {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
writeLine(displayAuth()); writeLine(displayAuth());
#else #else
writeLine(""); writeLine("");

@ -98,7 +98,7 @@ protected:
* desired. By default, it returns the value returned by KCookie. * desired. By default, it returns the value returned by KCookie.
*/ */
virtual TQCString display() { return m_pCookie->display(); } virtual TQCString display() { return m_pCookie->display(); }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
/** /**
* See display. * See display.
*/ */

@ -68,7 +68,7 @@
#include "config.h" #include "config.h"
#endif #endif
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <X11/Xlib.h> #include <X11/Xlib.h>
// defined in qapplication_x11.cpp // defined in qapplication_x11.cpp
@ -930,7 +930,7 @@ public:
TQCheckBox *cbDefaultColor; TQCheckBox *cbDefaultColor;
KColor defaultColor; KColor defaultColor;
KColor selColor; KColor selColor;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
QX11EventFilter oldfilter; QX11EventFilter oldfilter;
#endif #endif
}; };
@ -944,7 +944,7 @@ KColorDialog::KColorDialog( TQWidget *parent, const char *name, bool modal )
d = new KColorDialogPrivate; d = new KColorDialogPrivate;
d->bRecursion = true; d->bRecursion = true;
d->bColorPicking = false; d->bColorPicking = false;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
d->oldfilter = 0; d->oldfilter = 0;
#endif #endif
d->cbDefaultColor = 0L; d->cbDefaultColor = 0L;
@ -1177,7 +1177,7 @@ KColorDialog::KColorDialog( TQWidget *parent, const char *name, bool modal )
KColorDialog::~KColorDialog() KColorDialog::~KColorDialog()
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if (d->bColorPicking) if (d->bColorPicking)
tqt_set_x11_event_filter(d->oldfilter); tqt_set_x11_event_filter(d->oldfilter);
#endif #endif
@ -1486,7 +1486,7 @@ void KColorDialog::showColor( const KColor &color, const TQString &name )
static TQWidget *kde_color_dlg_widget = 0; static TQWidget *kde_color_dlg_widget = 0;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
static int kde_color_dlg_handler(XEvent *event) static int kde_color_dlg_handler(XEvent *event)
{ {
if (event->type == ButtonRelease) if (event->type == ButtonRelease)
@ -1503,7 +1503,7 @@ void
KColorDialog::slotColorPicker() KColorDialog::slotColorPicker()
{ {
d->bColorPicking = true; d->bColorPicking = true;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
d->oldfilter = tqt_set_x11_event_filter(kde_color_dlg_handler); d->oldfilter = tqt_set_x11_event_filter(kde_color_dlg_handler);
#endif #endif
kde_color_dlg_widget = this; kde_color_dlg_widget = this;
@ -1517,7 +1517,7 @@ KColorDialog::mouseReleaseEvent( TQMouseEvent *e )
if (d->bColorPicking) if (d->bColorPicking)
{ {
d->bColorPicking = false; d->bColorPicking = false;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
tqt_set_x11_event_filter(d->oldfilter); tqt_set_x11_event_filter(d->oldfilter);
d->oldfilter = 0; d->oldfilter = 0;
#endif #endif
@ -1546,7 +1546,7 @@ KColorDialog::keyPressEvent( TQKeyEvent *e )
if (e->key() == Key_Escape) if (e->key() == Key_Escape)
{ {
d->bColorPicking = false; d->bColorPicking = false;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
tqt_set_x11_event_filter(d->oldfilter); tqt_set_x11_event_filter(d->oldfilter);
d->oldfilter = 0; d->oldfilter = 0;
#endif #endif

@ -25,7 +25,7 @@
#ifndef KDELIBS_KCOLORDIALOG_H #ifndef KDELIBS_KCOLORDIALOG_H
#define KDELIBS_KCOLORDIALOG_H #define KDELIBS_KCOLORDIALOG_H
#ifdef Q_WS_QWS #ifdef TQ_WS_QWS
// FIXME(E): Do we need the KColorDialog extra functionality in Qt Embedded? // FIXME(E): Do we need the KColorDialog extra functionality in Qt Embedded?
#include <tqcolordialog.h> #include <tqcolordialog.h>
#define KColorDialog QColorDialog #define KColorDialog QColorDialog
@ -491,6 +491,6 @@ class TDEUI_EXPORT KColorDialog : public KDialogBase
KColorDialogPrivate *d; KColorDialogPrivate *d;
}; };
#endif // !Q_WS_QWS #endif // !TQ_WS_QWS
#endif // KDELIBS_KCOLORDIALOG_H #endif // KDELIBS_KCOLORDIALOG_H

@ -49,7 +49,7 @@ TQCursor KCursor::handCursor()
TDEConfig *config = TDEGlobal::config(); TDEConfig *config = TDEGlobal::config();
TDEConfigGroupSaver saver( config, "General" ); TDEConfigGroupSaver saver( config, "General" );
#ifndef Q_WS_WIN // this mask doesn't work too well on win32 #ifndef TQ_WS_WIN // this mask doesn't work too well on win32
if ( config->readEntry("handCursorStyle", "Windows") == "Windows" ) if ( config->readEntry("handCursorStyle", "Windows") == "Windows" )
{ {
static const unsigned char HAND_BITS[] = { static const unsigned char HAND_BITS[] = {
@ -74,7 +74,7 @@ TQCursor KCursor::handCursor()
hand_cursor->handle(); hand_cursor->handle();
} }
else else
#endif //! Q_WS_WIN #endif //! TQ_WS_WIN
hand_cursor = new TQCursor(PointingHandCursor); hand_cursor = new TQCursor(PointingHandCursor);
} }

@ -41,7 +41,7 @@
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include "config.h" #include "config.h"
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <netwm.h> #include <netwm.h>
#endif #endif
@ -130,7 +130,7 @@ void KDialog::setPlainCaption( const TQString &caption )
{ {
TQDialog::setCaption( caption ); TQDialog::setCaption( caption );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETWinInfo info( tqt_xdisplay(), winId(), tqt_xrootwin(), 0 ); NETWinInfo info( tqt_xdisplay(), winId(), tqt_xrootwin(), 0 );
info.setName( caption.utf8().data() ); info.setName( caption.utf8().data() );
#endif #endif

@ -43,7 +43,7 @@
#include <tdeglobalsettings.h> #include <tdeglobalsettings.h>
#include "config.h" #include "config.h"
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <X11/X.h> #include <X11/X.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#endif #endif
@ -818,7 +818,7 @@ void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p )
move(p); move(p);
#ifndef NO_KDE2 #ifndef NO_KDE2
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if (d->transient && d->_parent) if (d->transient && d->_parent)
XSetTransientForHint( tqt_xdisplay(), winId(), d->_parent->winId() ); XSetTransientForHint( tqt_xdisplay(), winId(), d->_parent->winId() );
@ -828,7 +828,7 @@ void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p )
#else #else
KWin::setType( winId(), d->windowType ); KWin::setType( winId(), d->windowType );
#endif // BORDERLESS_WINDOW #endif // BORDERLESS_WINDOW
#endif // Q_WS_X11 #endif // TQ_WS_X11
#endif #endif
} }

@ -308,7 +308,7 @@ void KHelpMenu::contextHelpActivated()
TQWidget* w = TQApplication::widgetAt( TQCursor::pos(), true ); TQWidget* w = TQApplication::widgetAt( TQCursor::pos(), true );
while ( w && !w->isTopLevel() && !w->inherits("QXEmbed") ) while ( w && !w->isTopLevel() && !w->inherits("QXEmbed") )
w = w->parentWidget(); w = w->parentWidget();
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if ( w && w->inherits("QXEmbed") ) if ( w && w->inherits("QXEmbed") )
(( QXEmbed*) w )->enterWhatsThisMode(); (( QXEmbed*) w )->enterWhatsThisMode();
#endif #endif

@ -30,7 +30,7 @@
#include <tdelocale.h> #include <tdelocale.h>
#include "config.h" #include "config.h"
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#define XK_XKB_KEYS #define XK_XKB_KEYS
#define XK_MISCELLANY #define XK_MISCELLANY
#include <X11/Xlib.h> // For x11Event() #include <X11/Xlib.h> // For x11Event()
@ -46,7 +46,7 @@ const int XKeyRelease = KeyRelease;
#undef FocusOut #undef FocusOut
#undef FocusIn #undef FocusIn
#endif // KeyPress #endif // KeyPress
#endif // Q_WS_X11 #endif // TQ_WS_X11
//static const char* psTemp[] = { //static const char* psTemp[] = {
// I18N_NOOP("Primary"), I18N_NOOP("Alternate"), I18N_NOOP("Multi-Key") // I18N_NOOP("Primary"), I18N_NOOP("Alternate"), I18N_NOOP("Multi-Key")

@ -54,7 +54,7 @@
#include <tdeaboutdata.h> #include <tdeaboutdata.h>
#include <kstaticdeleter.h> #include <kstaticdeleter.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#define XK_XKB_KEYS #define XK_XKB_KEYS
#define XK_MISCELLANY #define XK_MISCELLANY
#include <X11/Xlib.h> // For x11Event() #include <X11/Xlib.h> // For x11Event()

@ -25,7 +25,7 @@
#include <tdeglobalsettings.h> #include <tdeglobalsettings.h>
#include "config.h" #include "config.h"
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <netwm.h> #include <netwm.h>
#endif #endif
@ -143,7 +143,7 @@ TQVBox * KPassivePopup::standardView(const TQString& caption,
TQString sizedCaption = caption; TQString sizedCaption = caption;
TQString sizedText = text; TQString sizedText = text;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
int max_width; int max_width;
NETRootInfo info( tqt_xdisplay(), NETRootInfo info( tqt_xdisplay(),
@ -172,7 +172,7 @@ TQVBox * KPassivePopup::standardView(const TQString& caption,
if ( !sizedCaption.isEmpty() ) { if ( !sizedCaption.isEmpty() ) {
ttl = new TQLabel( sizedCaption, hb ? hb : vb, "title_label" ); ttl = new TQLabel( sizedCaption, hb ? hb : vb, "title_label" );
TQFont fnt = ttl->font(); TQFont fnt = ttl->font();
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
truncateStringToFit(sizedCaption, fnt, max_width); truncateStringToFit(sizedCaption, fnt, max_width);
ttl->setText(sizedCaption); ttl->setText(sizedCaption);
#endif #endif
@ -186,7 +186,7 @@ TQVBox * KPassivePopup::standardView(const TQString& caption,
if ( !sizedText.isEmpty() ) { if ( !sizedText.isEmpty() ) {
msg = new TQLabel( sizedText, vb, "msg_label" ); msg = new TQLabel( sizedText, vb, "msg_label" );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
TQStringList textLines = TQStringList::split("\n", sizedText, true); TQStringList textLines = TQStringList::split("\n", sizedText, true);
for (TQStringList::Iterator it = textLines.begin(); it != textLines.end(); ++it) { for (TQStringList::Iterator it = textLines.begin(); it != textLines.end(); ++it) {
truncateStringToFit(*it, msg->font(), max_width); truncateStringToFit(*it, msg->font(), max_width);
@ -295,7 +295,7 @@ void KPassivePopup::hideEvent( TQHideEvent * )
TQRect KPassivePopup::defaultArea() const TQRect KPassivePopup::defaultArea() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETRootInfo info( tqt_xdisplay(), NETRootInfo info( tqt_xdisplay(),
NET::NumberOfDesktops | NET::NumberOfDesktops |
NET::CurrentDesktop | NET::CurrentDesktop |
@ -317,7 +317,7 @@ void KPassivePopup::positionSelf()
{ {
TQRect target; TQRect target;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if ( !window ) { if ( !window ) {
target = defaultArea(); target = defaultArea();
} }

@ -28,7 +28,7 @@
#include <sys/shm.h> #include <sys/shm.h>
#endif #endif
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <X11/X.h> #include <X11/X.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
@ -51,7 +51,7 @@ struct KPixmapIOPrivate
int threshold; int threshold;
int bpp; int bpp;
int byteorder; int byteorder;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
XImage *ximage; XImage *ximage;
#ifdef HAVE_MITSHM #ifdef HAVE_MITSHM
XShmSegmentInfo *shminfo; XShmSegmentInfo *shminfo;

@ -179,7 +179,7 @@ KProgressDialog::KProgressDialog(TQWidget* parent, const char* name,
mMinDuration(2000), mMinDuration(2000),
d(new KProgressDialogPrivate) d(new KProgressDialogPrivate)
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
#endif #endif
mShowTimer = new TQTimer(this); mShowTimer = new TQTimer(this);

@ -67,7 +67,7 @@ KProgressBoxDialog::KProgressBoxDialog(TQWidget* parent, const char* name,
mMinDuration(2000), mMinDuration(2000),
d(new KProgressBoxDialogPrivate) d(new KProgressBoxDialogPrivate)
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
#endif #endif
mShowTimer = new TQTimer(this); mShowTimer = new TQTimer(this);

@ -37,7 +37,7 @@ class KRootPixmapData
{ {
public: public:
TQWidget *toplevel; TQWidget *toplevel;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
KWinModule *twin; KWinModule *twin;
#endif #endif
}; };
@ -69,7 +69,7 @@ void KRootPixmap::init()
connect(kapp, TQ_SIGNAL(backgroundChanged(int)), TQ_SLOT(slotBackgroundChanged(int))); connect(kapp, TQ_SIGNAL(backgroundChanged(int)), TQ_SLOT(slotBackgroundChanged(int)));
connect(m_pTimer, TQ_SIGNAL(timeout()), TQ_SLOT(repaint())); connect(m_pTimer, TQ_SIGNAL(timeout()), TQ_SLOT(repaint()));
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
connect(m_pPixmap, TQ_SIGNAL(done(bool)), TQ_SLOT(slotDone(bool))); connect(m_pPixmap, TQ_SIGNAL(done(bool)), TQ_SLOT(slotDone(bool)));
d->twin = new KWinModule( this ); d->twin = new KWinModule( this );
@ -91,7 +91,7 @@ KRootPixmap::~KRootPixmap()
int KRootPixmap::currentDesktop() const int KRootPixmap::currentDesktop() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
NETRootInfo rinfo( tqt_xdisplay(), NET::CurrentDesktop ); NETRootInfo rinfo( tqt_xdisplay(), NET::CurrentDesktop );
rinfo.activate(); rinfo.activate();
return rinfo.currentDesktop(); return rinfo.currentDesktop();
@ -187,7 +187,7 @@ void KRootPixmap::desktopChanged(int desktop)
!wallpaperForDesktop(m_Desk).isNull()) !wallpaperForDesktop(m_Desk).isNull())
return; return;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if (KWin::windowInfo(m_pWidget->topLevelWidget()->winId()).desktop() == NET::OnAllDesktops && if (KWin::windowInfo(m_pWidget->topLevelWidget()->winId()).desktop() == NET::OnAllDesktops &&
pixmapName(m_Desk) != pixmapName(desktop)) pixmapName(m_Desk) != pixmapName(desktop))
#endif #endif
@ -196,7 +196,7 @@ void KRootPixmap::desktopChanged(int desktop)
void KRootPixmap::desktopChanged( WId window, unsigned int properties ) void KRootPixmap::desktopChanged( WId window, unsigned int properties )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( !(properties & NET::WMDesktop) || if( !(properties & NET::WMDesktop) ||
(window != m_pWidget->topLevelWidget()->winId())) (window != m_pWidget->topLevelWidget()->winId()))
return; return;
@ -232,7 +232,7 @@ void KRootPixmap::repaint(bool force)
return; return;
} }
m_Rect = TQRect(p1, p2); m_Rect = TQRect(p1, p2);
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
m_Desk = KWin::windowInfo(m_pWidget->topLevelWidget()->winId()).desktop(); m_Desk = KWin::windowInfo(m_pWidget->topLevelWidget()->winId()).desktop();
if ((m_Desk == NET::OnAllDesktops) || (m_Desk == 0)) { if ((m_Desk == NET::OnAllDesktops) || (m_Desk == 0)) {
m_Desk = currentDesktop(); m_Desk = currentDesktop();
@ -254,7 +254,7 @@ void KRootPixmap::repaint(bool force)
bool KRootPixmap::isAvailable() const bool KRootPixmap::isAvailable() const
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
return m_pPixmap->isAvailable(pixmapName(m_Desk)); return m_pPixmap->isAvailable(pixmapName(m_Desk));
#else #else
return m_pPixmap->isNull(); return m_pPixmap->isNull();
@ -263,7 +263,7 @@ bool KRootPixmap::isAvailable() const
TQString KRootPixmap::pixmapName(int desk) { TQString KRootPixmap::pixmapName(int desk) {
TQString pattern = TQString("DESKTOP%1"); TQString pattern = TQString("DESKTOP%1");
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
int screen_number = DefaultScreen(tqt_xdisplay()); int screen_number = DefaultScreen(tqt_xdisplay());
if (screen_number) { if (screen_number) {
pattern = TQString("SCREEN%1-DESKTOP").arg(screen_number) + "%1"; pattern = TQString("SCREEN%1-DESKTOP").arg(screen_number) + "%1";
@ -275,7 +275,7 @@ TQString KRootPixmap::pixmapName(int desk) {
void KRootPixmap::enableExports() void KRootPixmap::enableExports()
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kdDebug(270) << k_lineinfo << "activating background exports.\n"; kdDebug(270) << k_lineinfo << "activating background exports.\n";
DCOPClient *client = kapp->dcopClient(); DCOPClient *client = kapp->dcopClient();
if (!client->isAttached()) if (!client->isAttached())

@ -15,7 +15,7 @@
#include <tqcolor.h> #include <tqcolor.h>
#include <tdelibs_export.h> #include <tdelibs_export.h>
#ifndef Q_WS_QWS //FIXME #ifndef TQ_WS_QWS //FIXME
class TQRect; class TQRect;
class TQWidget; class TQWidget;
@ -235,6 +235,6 @@ private:
void init(); void init();
}; };
#endif // ! Q_WS_QWS #endif // ! TQ_WS_QWS
#endif // __KRootPixmap_h_Included__ #endif // __KRootPixmap_h_Included__

@ -20,7 +20,7 @@
#include <tqwindowdefs.h> #include <tqwindowdefs.h>
#include <tqwidget.h> #include <tqwidget.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <tdeapplication.h> #include <tdeapplication.h>
#include <krootprop.h> #include <krootprop.h>

@ -16,7 +16,7 @@
#include <kpixmap.h> #include <kpixmap.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <tqstring.h> #include <tqstring.h>
#include <tqpixmap.h> #include <tqpixmap.h>

@ -28,7 +28,7 @@
#include "tdelocale.h" #include "tdelocale.h"
#include "tdeaboutdata.h" #include "tdeaboutdata.h"
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <twin.h> #include <twin.h>
#include <twinmodule.h> #include <twinmodule.h>
#include <qxembed.h> #include <qxembed.h>
@ -61,14 +61,14 @@ public:
KSystemTray::KSystemTray( TQWidget* parent, const char* name ) KSystemTray::KSystemTray( TQWidget* parent, const char* name )
: TQLabel( parent, name, (WFlags)WType_TopLevel ) : TQLabel( parent, name, (WFlags)WType_TopLevel )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
QXEmbed::initialize(); QXEmbed::initialize();
#endif #endif
d = new KSystemTrayPrivate; d = new KSystemTrayPrivate;
d->actionCollection = new TDEActionCollection(this); d->actionCollection = new TDEActionCollection(this);
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
KWin::setSystemTrayWindowFor( winId(), parent?parent->topLevelWidget()->winId(): tqt_xrootwin() ); KWin::setSystemTrayWindowFor( winId(), parent?parent->topLevelWidget()->winId(): tqt_xrootwin() );
#endif #endif
setBackgroundMode(X11ParentRelative); setBackgroundMode(X11ParentRelative);
@ -84,7 +84,7 @@ KSystemTray::KSystemTray( TQWidget* parent, const char* name )
new TDEAction(i18n("Minimize"), "view-restore", TDEShortcut(), new TDEAction(i18n("Minimize"), "view-restore", TDEShortcut(),
this, TQ_SLOT( minimizeRestoreAction() ), this, TQ_SLOT( minimizeRestoreAction() ),
d->actionCollection, "minimizeRestore"); d->actionCollection, "minimizeRestore");
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
KWin::WindowInfo info = KWin::windowInfo( parentWidget()->winId() ); KWin::WindowInfo info = KWin::windowInfo( parentWidget()->winId() );
d->on_all_desktops = info.onAllDesktops(); d->on_all_desktops = info.onAllDesktops();
#else #else
@ -244,7 +244,7 @@ void KSystemTray::activateOrHide()
if ( !pw ) if ( !pw )
return; return;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
KWin::WindowInfo info1 = KWin::windowInfo( pw->winId(), NET::XAWMState | NET::WMState ); KWin::WindowInfo info1 = KWin::windowInfo( pw->winId(), NET::XAWMState | NET::WMState );
// mapped = visible (but possibly obscured) // mapped = visible (but possibly obscured)
bool mapped = (info1.mappingState() == NET::Visible) && !info1.isMinimized(); bool mapped = (info1.mappingState() == NET::Visible) && !info1.isMinimized();
@ -288,7 +288,7 @@ void KSystemTray::minimizeRestore( bool restore )
TQWidget* pw = parentWidget(); TQWidget* pw = parentWidget();
if( !pw ) if( !pw )
return; return;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
KWin::WindowInfo info = KWin::windowInfo( pw->winId(), NET::WMGeometry | NET::WMDesktop ); KWin::WindowInfo info = KWin::windowInfo( pw->winId(), NET::WMGeometry | NET::WMDesktop );
if ( restore ) if ( restore )
{ {
@ -333,7 +333,7 @@ void KSystemTray::setPixmap( const TQPixmap& p )
iconPixmapToSet.convertFromImage(correctedImage); iconPixmapToSet.convertFromImage(correctedImage);
} }
TQLabel::setPixmap( iconPixmapToSet ); TQLabel::setPixmap( iconPixmapToSet );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
KWin::setIcons( winId(), iconPixmapToSet, TQPixmap()); KWin::setIcons( winId(), iconPixmapToSet, TQPixmap());
#endif #endif
} }

@ -48,7 +48,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <kiconeffect.h> #include <kiconeffect.h>
#include <tdeglobalsettings.h> #include <tdeglobalsettings.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <twin.h> #include <twin.h>
#endif #endif
@ -204,7 +204,7 @@ KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name)
mDatabase = db; mDatabase = db;
setCaption(i18n("Tip of the Day")); setCaption(i18n("Tip of the Day"));
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
KWin::setIcons( winId(), KWin::setIcons( winId(),
TDEGlobal::iconLoader()->loadIcon( "idea", TDEIcon::NoGroup, 32 ), TDEGlobal::iconLoader()->loadIcon( "idea", TDEIcon::NoGroup, 32 ),
TDEGlobal::iconLoader()->loadIcon( "idea", TDEIcon::NoGroup, 16 ) ); TDEGlobal::iconLoader()->loadIcon( "idea", TDEIcon::NoGroup, 16 ) );

@ -54,7 +54,7 @@
#include <tqfocusdata.h> #include <tqfocusdata.h>
// L0001: QXEmbed works only under X windows. // L0001: QXEmbed works only under X windows.
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
# include <X11/X.h> # include <X11/X.h>
# include <X11/Xlib.h> # include <X11/Xlib.h>
@ -1399,4 +1399,4 @@ void QXEmbed::reparent( TQWidget * parent, WFlags f, const TQPoint & p, bool sho
// for KDE // for KDE
#include "qxembed.moc" #include "qxembed.moc"
#endif // Q_WS_X11 #endif // TQ_WS_X11

@ -25,7 +25,7 @@
#include <tqwidget.h> #include <tqwidget.h>
#include <tdelibs_export.h> #include <tdelibs_export.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
class QXEmbedData; class QXEmbedData;

@ -49,7 +49,7 @@
#include <tdelocale.h> #include <tdelocale.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <kstaticdeleter.h> #include <kstaticdeleter.h>
#if defined Q_WS_X11 #if defined TQ_WS_X11
#include <netwm.h> #include <netwm.h>
#endif #endif
@ -290,7 +290,7 @@ void TDEMainWindow::parseGeometry(bool parsewidth)
assert ( !kapp->geometryArgument().isNull() ); assert ( !kapp->geometryArgument().isNull() );
assert ( d->care_about_geometry ); assert ( d->care_about_geometry );
#if defined Q_WS_X11 #if defined TQ_WS_X11
int x, y; int x, y;
int w, h; int w, h;
int m = XParseGeometry( kapp->geometryArgument().latin1(), &x, &y, (unsigned int*)&w, (unsigned int*)&h); int m = XParseGeometry( kapp->geometryArgument().latin1(), &x, &y, (unsigned int*)&w, (unsigned int*)&h);
@ -600,7 +600,7 @@ void TDEMainWindow::setCaption( const TQString &caption, bool modified )
void TDEMainWindow::setPlainCaption( const TQString &caption ) void TDEMainWindow::setPlainCaption( const TQString &caption )
{ {
TQMainWindow::setCaption( caption ); TQMainWindow::setCaption( caption );
#if defined Q_WS_X11 #if defined TQ_WS_X11
NETWinInfo info( tqt_xdisplay(), winId(), tqt_xrootwin(), 0 ); NETWinInfo info( tqt_xdisplay(), winId(), tqt_xrootwin(), 0 );
info.setName( caption.utf8().data() ); info.setName( caption.utf8().data() );
#endif #endif
@ -913,7 +913,7 @@ void TDEMainWindow::saveWindowSize( TDEConfig * config ) const
int scnum = TQApplication::desktop()->screenNumber(parentWidget()); int scnum = TQApplication::desktop()->screenNumber(parentWidget());
TQRect desk = TQApplication::desktop()->screenGeometry(scnum); TQRect desk = TQApplication::desktop()->screenGeometry(scnum);
int w, h; int w, h;
#if defined Q_WS_X11 #if defined TQ_WS_X11
// save maximalization as desktop size + 1 in that direction // save maximalization as desktop size + 1 in that direction
KWin::WindowInfo info = KWin::windowInfo( winId(), NET::WMState ); KWin::WindowInfo info = KWin::windowInfo( winId(), NET::WMState );
w = info.state() & NET::MaxHoriz ? desk.width() + 1 : width(); w = info.state() & NET::MaxHoriz ? desk.width() + 1 : width();
@ -963,7 +963,7 @@ void TDEMainWindow::restoreWindowSize( TDEConfig * config )
} }
} }
if ( !size.isEmpty() ) { if ( !size.isEmpty() ) {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
int state = 0; int state = 0;
if (size.width() > desk.width()) { if (size.width() > desk.width()) {
state = state | NET::MaxHoriz; state = state | NET::MaxHoriz;
@ -1244,7 +1244,7 @@ TQSize TDEMainWindow::sizeForCentralWidgetSize(TQSize size)
void TDEMainWindow::setIcon( const TQPixmap& p ) void TDEMainWindow::setIcon( const TQPixmap& p )
{ {
TQMainWindow::setIcon( p ); TQMainWindow::setIcon( p );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
// Qt3 doesn't support _NET_WM_ICON, but TDEApplication::setTopWidget(), which // Qt3 doesn't support _NET_WM_ICON, but TDEApplication::setTopWidget(), which
// is used by TDEMainWindow, sets it // is used by TDEMainWindow, sets it
KWin::setIcons( winId(), p, TQPixmap()); KWin::setIcons( winId(), p, TQPixmap());

@ -40,7 +40,7 @@
#include <kdebug.h> #include <kdebug.h>
#include <kmanagerselection.h> #include <kmanagerselection.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <twin.h> #include <twin.h>
#include <twinmodule.h> #include <twinmodule.h>
#include <qxembed.h> #include <qxembed.h>
@ -74,7 +74,7 @@ public:
: forcedTopLevel( false ), : forcedTopLevel( false ),
topLevel( false ), topLevel( false ),
wasTopLevel( false ), wasTopLevel( false ),
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
selection( NULL ), selection( NULL ),
#endif #endif
min_size( 0, 0 ) min_size( 0, 0 )
@ -82,7 +82,7 @@ public:
} }
~KMenuBarPrivate() ~KMenuBarPrivate()
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
delete selection; delete selection;
#endif #endif
} }
@ -93,7 +93,7 @@ public:
int lineWidth; // dtto int lineWidth; // dtto
int margin; // dtto int margin; // dtto
bool fallback_mode; // dtto bool fallback_mode; // dtto
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
TDESelectionWatcher* selection; TDESelectionWatcher* selection;
#endif #endif
TQTimer selection_timer; TQTimer selection_timer;
@ -101,7 +101,7 @@ public:
static Atom makeSelectionAtom(); static Atom makeSelectionAtom();
}; };
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
static Atom selection_atom = None; static Atom selection_atom = None;
static Atom msg_type_atom = None; static Atom msg_type_atom = None;
@ -121,7 +121,7 @@ void initAtoms()
Atom KMenuBar::KMenuBarPrivate::makeSelectionAtom() Atom KMenuBar::KMenuBarPrivate::makeSelectionAtom()
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( selection_atom == None ) if( selection_atom == None )
initAtoms(); initAtoms();
return selection_atom; return selection_atom;
@ -133,7 +133,7 @@ Atom KMenuBar::KMenuBarPrivate::makeSelectionAtom()
KMenuBar::KMenuBar(TQWidget *parent, const char *name) KMenuBar::KMenuBar(TQWidget *parent, const char *name)
: TQMenuBar(parent, name) : TQMenuBar(parent, name)
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
QXEmbed::initialize(); QXEmbed::initialize();
#endif #endif
d = new KMenuBarPrivate; d = new KMenuBarPrivate;
@ -176,7 +176,7 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level)
d->topLevel = top_level; d->topLevel = top_level;
if ( isTopLevelMenu() ) if ( isTopLevelMenu() )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
d->selection = new TDESelectionWatcher( KMenuBarPrivate::makeSelectionAtom(), d->selection = new TDESelectionWatcher( KMenuBarPrivate::makeSelectionAtom(),
DefaultScreen( tqt_xdisplay())); DefaultScreen( tqt_xdisplay()));
connect( d->selection, TQ_SIGNAL( newOwner( Window )), connect( d->selection, TQ_SIGNAL( newOwner( Window )),
@ -190,7 +190,7 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level)
d->fallback_mode = false; d->fallback_mode = false;
bool wasShown = !isHidden(); bool wasShown = !isHidden();
reparent( parentWidget(), (WFlags)(WType_TopLevel | WStyle_Tool | WStyle_Customize | WStyle_NoBorder), TQPoint(0,0), false ); reparent( parentWidget(), (WFlags)(WType_TopLevel | WStyle_Tool | WStyle_Customize | WStyle_NoBorder), TQPoint(0,0), false );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
KWin::setType( winId(), NET::TopMenu ); KWin::setType( winId(), NET::TopMenu );
if( parentWidget()) if( parentWidget())
XSetTransientForHint( tqt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId()); XSetTransientForHint( tqt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId());
@ -206,7 +206,7 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level)
show(); show();
} else } else
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
delete d->selection; delete d->selection;
d->selection = NULL; d->selection = NULL;
#endif #endif
@ -259,7 +259,7 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev)
} }
if( parentWidget() && obj == parentWidget() && ev->type() == TQEvent::Reparent ) if( parentWidget() && obj == parentWidget() && ev->type() == TQEvent::Reparent )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
XSetTransientForHint( tqt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId()); XSetTransientForHint( tqt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId());
#else #else
//TODO: WIN32? //TODO: WIN32?
@ -270,7 +270,7 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev)
{ // if the parent is not toplevel, KMenuBar needs to match its visibility status { // if the parent is not toplevel, KMenuBar needs to match its visibility status
if( ev->type() == TQEvent::Show ) if( ev->type() == TQEvent::Show )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
XSetTransientForHint( tqt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId()); XSetTransientForHint( tqt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId());
#else #else
//TODO: WIN32? //TODO: WIN32?
@ -303,7 +303,7 @@ void KMenuBar::updateFallbackSize()
{ {
if( !d->topLevel ) if( !d->topLevel )
return; return;
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( d->selection->owner() != None ) if( d->selection->owner() != None )
#endif #endif
{ // somebody is managing us, don't mess anything, undo changes { // somebody is managing us, don't mess anything, undo changes
@ -340,7 +340,7 @@ void KMenuBar::selectionTimeout()
int margin = 0; int margin = 0;
move(area.left() - margin, area.top() - margin); move(area.left() - margin, area.top() - margin);
setFixedSize(area.width() + 2* margin , heightForWidth( area.width() + 2 * margin ) ); setFixedSize(area.width() + 2* margin , heightForWidth( area.width() + 2 * margin ) );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
int strut_height = height() - margin; int strut_height = height() - margin;
if( strut_height < 0 ) if( strut_height < 0 )
strut_height = 0; strut_height = 0;
@ -426,7 +426,7 @@ TQSize KMenuBar::sizeHint() const
return TQSize( w, h ); return TQSize( w, h );
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
bool KMenuBar::x11Event( XEvent* ev ) bool KMenuBar::x11Event( XEvent* ev )
{ {
if( ev->type == ClientMessage && ev->xclient.message_type == msg_type_atom if( ev->type == ClientMessage && ev->xclient.message_type == msg_type_atom

@ -91,7 +91,7 @@ protected:
virtual void showEvent( TQShowEvent* ); virtual void showEvent( TQShowEvent* );
virtual void resizeEvent( TQResizeEvent* ); virtual void resizeEvent( TQResizeEvent* );
virtual bool eventFilter(TQObject *, TQEvent *); virtual bool eventFilter(TQObject *, TQEvent *);
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
virtual bool x11Event( XEvent* ); virtual bool x11Event( XEvent* );
#endif #endif
virtual void closeEvent( TQCloseEvent* ); virtual void closeEvent( TQCloseEvent* );

@ -45,7 +45,7 @@
#include <kiconloader.h> #include <kiconloader.h>
#include <tdeglobalsettings.h> #include <tdeglobalsettings.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include <X11/Xlib.h> #include <X11/Xlib.h>
#endif #endif
@ -432,7 +432,7 @@ KMessageBox::questionYesNoListWId(WId parent_id, const TQString &text,
buttonYes, buttonNo); buttonYes, buttonNo);
if( options & PlainCaption ) if( options & PlainCaption )
dialog->setPlainCaption( caption ); dialog->setPlainCaption( caption );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( parent == NULL && parent_id ) if( parent == NULL && parent_id )
XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id ); XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id );
#endif #endif
@ -483,7 +483,7 @@ KMessageBox::questionYesNoCancelWId(WId parent_id,
buttonYes, buttonNo); buttonYes, buttonNo);
if( options & PlainCaption ) if( options & PlainCaption )
dialog->setPlainCaption( caption ); dialog->setPlainCaption( caption );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( parent == NULL && parent_id ) if( parent == NULL && parent_id )
XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id ); XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id );
#endif #endif
@ -565,7 +565,7 @@ KMessageBox::warningYesNoListWId(WId parent_id, const TQString &text,
buttonYes, buttonNo); buttonYes, buttonNo);
if( options & PlainCaption ) if( options & PlainCaption )
dialog->setPlainCaption( caption ); dialog->setPlainCaption( caption );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( parent == NULL && parent_id ) if( parent == NULL && parent_id )
XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id ); XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id );
#endif #endif
@ -637,7 +637,7 @@ KMessageBox::warningContinueCancelListWId(WId parent_id, const TQString &text,
buttonContinue, KStdGuiItem::cancel() ); buttonContinue, KStdGuiItem::cancel() );
if( options & PlainCaption ) if( options & PlainCaption )
dialog->setPlainCaption( caption ); dialog->setPlainCaption( caption );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( parent == NULL && parent_id ) if( parent == NULL && parent_id )
XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id ); XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id );
#endif #endif
@ -713,7 +713,7 @@ KMessageBox::warningYesNoCancelListWId(WId parent_id, const TQString &text,
buttonYes, buttonNo); buttonYes, buttonNo);
if( options & PlainCaption ) if( options & PlainCaption )
dialog->setPlainCaption( caption ); dialog->setPlainCaption( caption );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( parent == NULL && parent_id ) if( parent == NULL && parent_id )
XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id ); XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id );
#endif #endif
@ -764,7 +764,7 @@ KMessageBox::errorListWId(WId parent_id, const TQString &text, const TQStringLi
KStdGuiItem::ok() ); KStdGuiItem::ok() );
if( options & PlainCaption ) if( options & PlainCaption )
dialog->setPlainCaption( caption ); dialog->setPlainCaption( caption );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( parent == NULL && parent_id ) if( parent == NULL && parent_id )
XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id ); XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id );
#endif #endif
@ -794,7 +794,7 @@ KMessageBox::detailedErrorWId(WId parent_id, const TQString &text,
KStdGuiItem::ok() ); KStdGuiItem::ok() );
if( options & PlainCaption ) if( options & PlainCaption )
dialog->setPlainCaption( caption ); dialog->setPlainCaption( caption );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( parent == NULL && parent_id ) if( parent == NULL && parent_id )
XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id ); XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id );
#endif #endif
@ -841,7 +841,7 @@ KMessageBox::sorryWId(WId parent_id, const TQString &text,
KStdGuiItem::ok() ); KStdGuiItem::ok() );
if( options & PlainCaption ) if( options & PlainCaption )
dialog->setPlainCaption( caption ); dialog->setPlainCaption( caption );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( parent == NULL && parent_id ) if( parent == NULL && parent_id )
XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id ); XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id );
#endif #endif
@ -871,7 +871,7 @@ KMessageBox::detailedSorryWId(WId parent_id, const TQString &text,
KStdGuiItem::ok() ); KStdGuiItem::ok() );
if( options & PlainCaption ) if( options & PlainCaption )
dialog->setPlainCaption( caption ); dialog->setPlainCaption( caption );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( parent == NULL && parent_id ) if( parent == NULL && parent_id )
XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id ); XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id );
#endif #endif
@ -917,7 +917,7 @@ KMessageBox::informationListWId(WId parent_id,const TQString &text, const TQStri
KStdGuiItem::ok() ); KStdGuiItem::ok() );
if( options & PlainCaption ) if( options & PlainCaption )
dialog->setPlainCaption( caption ); dialog->setPlainCaption( caption );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
if( parent == NULL && parent_id ) if( parent == NULL && parent_id )
XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id ); XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id );
#endif #endif

@ -21,7 +21,7 @@
#include <tqvariant.h> #include <tqvariant.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#define XK_XKB_KEYS #define XK_XKB_KEYS
#define XK_MISCELLANY #define XK_MISCELLANY
#include <X11/Xlib.h> // For x11Event() #include <X11/Xlib.h> // For x11Event()
@ -37,7 +37,7 @@
#undef FocusOut #undef FocusOut
#undef FocusIn #undef FocusIn
#endif #endif
#elif defined(Q_WS_WIN) #elif defined(TQ_WS_WIN)
# include <kkeyserver.h> # include <kkeyserver.h>
#endif #endif
@ -121,7 +121,7 @@ TDEShortcutDialog::TDEShortcutDialog( const TDEShortcut& shortcut, bool bQtShort
s_showMore = TDEConfigGroup(TDEGlobal::config(), "General").readBoolEntry("ShowAlternativeShortcutConfig", s_showMore); s_showMore = TDEConfigGroup(TDEGlobal::config(), "General").readBoolEntry("ShowAlternativeShortcutConfig", s_showMore);
updateDetails(); updateDetails();
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
kapp->installX11EventFilter( this ); // Allow button to capture X Key Events. kapp->installX11EventFilter( this ); // Allow button to capture X Key Events.
#endif #endif
} }
@ -276,7 +276,7 @@ void TDEShortcutDialog::slotMultiKeyMode( bool bOn )
} }
} }
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
/* we don't use the generic Qt code on X11 because it allows us /* we don't use the generic Qt code on X11 because it allows us
to grab the keyboard so that all keypresses are seen to grab the keyboard so that all keypresses are seen
*/ */
@ -387,7 +387,7 @@ void TDEShortcutDialog::x11KeyReleaseEvent( XEvent* pEvent )
updateShortcutDisplay(); updateShortcutDisplay();
} }
} }
#elif defined(Q_WS_WIN) #elif defined(TQ_WS_WIN)
void TDEShortcutDialog::keyPressEvent( TQKeyEvent * e ) void TDEShortcutDialog::keyPressEvent( TQKeyEvent * e )
{ {
kdDebug() << e->text() << " " << (int)e->text()[0].latin1()<< " " << (int)e->ascii() << endl; kdDebug() << e->text() << " " << (int)e->text()[0].latin1()<< " " << (int)e->ascii() << endl;

@ -67,13 +67,13 @@ private:
void keyPressed( KKey key ); void keyPressed( KKey key );
void updateDetails(); void updateDetails();
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
virtual bool x11Event( XEvent *pEvent ); virtual bool x11Event( XEvent *pEvent );
//void x11EventKeyPress( XEvent *pEvent ); //void x11EventKeyPress( XEvent *pEvent );
void x11KeyPressEvent( XEvent* pEvent ); void x11KeyPressEvent( XEvent* pEvent );
void x11KeyReleaseEvent( XEvent* pEvent ); void x11KeyReleaseEvent( XEvent* pEvent );
#endif #endif
#ifdef Q_WS_WIN #ifdef TQ_WS_WIN
virtual void keyPressEvent( TQKeyEvent * e ); virtual void keyPressEvent( TQKeyEvent * e );
virtual bool event(TQEvent * e); virtual bool event(TQEvent * e);
#endif #endif

@ -380,7 +380,7 @@ KSpell::setUpDialog( bool reallyuseprogressbar )
connect( this, TQ_SIGNAL(progress(unsigned int)), connect( this, TQ_SIGNAL(progress(unsigned int)),
ksdlg, TQ_SLOT(slotProgress(unsigned int)) ); ksdlg, TQ_SLOT(slotProgress(unsigned int)) );
#ifdef Q_WS_X11 // FIXME(E): Implement for Qt/Embedded #ifdef TQ_WS_X11 // FIXME(E): Implement for Qt/Embedded
KWin::setIcons( ksdlg->winId(), kapp->icon(), kapp->miniIcon() ); KWin::setIcons( ksdlg->winId(), kapp->icon(), kapp->miniIcon() );
#endif #endif
if ( modaldlg ) if ( modaldlg )

@ -72,7 +72,7 @@ void KWindowInfo::message( const TQString &text, const TQPixmap &pix, int timeou
void KWindowInfo::permanent( const TQString &text ) void KWindowInfo::permanent( const TQString &text )
{ {
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
oldMiniIcon = KWin::icon( win->winId(), 16, 16, true ); oldMiniIcon = KWin::icon( win->winId(), 16, 16, true );
oldIcon = KWin::icon( win->winId(), 34, 34, false ); oldIcon = KWin::icon( win->winId(), 34, 34, false );
if ( oldIcon.isNull() ) if ( oldIcon.isNull() )
@ -117,7 +117,7 @@ void KWindowInfo::display( const TQString &text, const TQPixmap &pix )
win->setCaption( text ); win->setCaption( text );
win->setIcon( icon ); win->setIcon( icon );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
KWin::setIcons( win->winId(), icon, icon ); KWin::setIcons( win->winId(), icon, icon );
#endif #endif
} }
@ -135,7 +135,7 @@ void KWindowInfo::save()
} }
oldText = win->caption(); oldText = win->caption();
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
oldMiniIcon = KWin::icon( win->winId(), 16, 16, true ); oldMiniIcon = KWin::icon( win->winId(), 16, 16, true );
oldIcon = KWin::icon( win->winId(), 34, 34, false ); oldIcon = KWin::icon( win->winId(), 34, 34, false );
if ( oldIcon.isNull() ) if ( oldIcon.isNull() )
@ -162,7 +162,7 @@ void KWindowInfo::restore()
} }
win->setIcon( oldIcon ); win->setIcon( oldIcon );
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
KWin::setIcons( win->winId(), oldIcon, oldMiniIcon ); KWin::setIcons( win->winId(), oldIcon, oldMiniIcon );
#endif #endif
win->setCaption( oldText ); win->setCaption( oldText );

@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <tqglobal.h> #include <tqglobal.h>
#ifdef Q_WS_X11 #ifdef TQ_WS_X11
#include "config.h" #include "config.h"
#include <tqpainter.h> #include <tqpainter.h>
@ -253,5 +253,5 @@ void KWindowListMenu::slotCascadeWindows()
void KWindowListMenu::virtual_hook( int id, void* data ) void KWindowListMenu::virtual_hook( int id, void* data )
{ TDEPopupMenu::virtual_hook( id, data ); } { TDEPopupMenu::virtual_hook( id, data ); }
#endif // Q_WS_X11 #endif // TQ_WS_X11

@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <tdepopupmenu.h> #include <tdepopupmenu.h>
#include <tqmap.h> #include <tqmap.h>
#ifdef Q_WS_X11 // not yet available for non-X11 #ifdef TQ_WS_X11 // not yet available for non-X11
class KWinModule; class KWinModule;
class KWindowListMenuPrivate; class KWindowListMenuPrivate;
@ -65,6 +65,6 @@ private:
KWindowListMenuPrivate *d; KWindowListMenuPrivate *d;
}; };
#endif // Q_WS_X11 #endif // TQ_WS_X11
#endif #endif

@ -3,7 +3,7 @@
# (c) 2003-2005, Jaroslaw Staniek, js@iidea.pl # (c) 2003-2005, Jaroslaw Staniek, js@iidea.pl
# #
# to avoid a need for using Q_WS_WIN in C source code # to avoid a need for using TQ_WS_WIN in C source code
DEFINES += _WINDOWS WIN32_LEAN_AND_MEAN DEFINES += _WINDOWS WIN32_LEAN_AND_MEAN
# custom definitions, options on which KDElibs do not depend # custom definitions, options on which KDElibs do not depend

Loading…
Cancel
Save