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