diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-02-13 11:10:37 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-02-15 10:29:09 +0900 |
commit | 5e51787f9af4fd86450fab9e787b4037a772bca3 (patch) | |
tree | a792ad1d832ef77fd48f6c545d5bf35f8490d6eb /tdeinit | |
parent | 3b1a091b3f8c0e88904ed2395e9d7efe590c9495 (diff) | |
download | tdelibs-5e51787f9af4fd86450fab9e787b4037a772bca3.tar.gz tdelibs-5e51787f9af4fd86450fab9e787b4037a772bca3.zip |
Replace Q_WS_* defines with TQ_WS_* equivalents
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 03aa7238b34bb438632b6d572b008e32960f0895)
Diffstat (limited to 'tdeinit')
-rw-r--r-- | tdeinit/tdeinit.cpp | 72 | ||||
-rw-r--r-- | tdeinit/tdelauncher.cpp | 34 | ||||
-rw-r--r-- | tdeinit/tdelauncher.h | 4 | ||||
-rw-r--r-- | tdeinit/wrapper.c | 4 |
4 files changed, 57 insertions, 57 deletions
diff --git a/tdeinit/tdeinit.cpp b/tdeinit/tdeinit.cpp index 78ed1e7c4..e8c7dd2ae 100644 --- a/tdeinit/tdeinit.cpp +++ b/tdeinit/tdeinit.cpp @@ -68,7 +68,7 @@ #endif #endif -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined TQ_WS_X11 && ! defined K_WS_QTONLY #include <tdestartupinfo.h> // schroder #endif @@ -77,8 +77,8 @@ #include "ltdl.h" #include "tdelauncher_cmds.h" -//#if defined Q_WS_X11 && ! defined K_WS_QTONLY -#ifdef Q_WS_X11 +//#if defined TQ_WS_X11 && ! defined K_WS_QTONLY +#ifdef TQ_WS_X11 //#undef K_WS_QTONLY #include <X11/Xlib.h> #include <X11/Xatom.h> @@ -107,8 +107,8 @@ extern "C" FcBool XftInitFtLibrary (void); extern char **environ; extern int lt_dlopen_flag; -//#if defined Q_WS_X11 && ! defined K_WS_QTONLY -#ifdef Q_WS_X11 +//#if defined TQ_WS_X11 && ! defined K_WS_QTONLY +#ifdef TQ_WS_X11 static int X11fd = -1; static Display *X11display = 0; 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_old[MAX_SOCK_FILE]; -//#if defined Q_WS_X11 && ! defined K_WS_QTONLY -#ifdef Q_WS_X11 +//#if defined TQ_WS_X11 && ! defined K_WS_QTONLY +#ifdef TQ_WS_X11 #define DISPLAY "DISPLAY" -#elif defined(Q_WS_QWS) +#elif defined(TQ_WS_QWS) #define DISPLAY "QWS_DISPLAY" -#elif defined(Q_WS_MACX) +#elif defined(TQ_WS_MACX) #define DISPLAY "MAC_DISPLAY" #elif defined(K_WS_QTONLY) #define DISPLAY "QT_DISPLAY" @@ -159,8 +159,8 @@ static struct { bool suicide; } d; -//#if defined Q_WS_X11 && ! defined K_WS_QTONLY -#ifdef Q_WS_X11 +//#if defined TQ_WS_X11 && ! defined K_WS_QTONLY +#ifdef TQ_WS_X11 extern "C" { int tdeinit_xio_errhandler( Display * ); int tdeinit_x_errhandler( Display *, XErrorEvent *err ); @@ -219,8 +219,8 @@ static void close_fds() close(d.wrapper_old); d.wrapper_old = 0; } -#if defined Q_WS_X11 && ! defined K_WS_QTONLY -//#ifdef Q_WS_X11 +#if defined TQ_WS_X11 && ! defined K_WS_QTONLY +//#ifdef TQ_WS_X11 if (X11fd >= 0) { close(X11fd); @@ -279,8 +279,8 @@ static void setup_tty( const char* tty ) static int get_current_desktop( Display* disp ) { int desktop = 0; // no desktop by default -#if defined Q_WS_X11 && ! defined K_WS_QTONLY -//#ifdef Q_WS_X11 // Only X11 supports multiple desktops +#if defined TQ_WS_X11 && ! defined K_WS_QTONLY +//#ifdef TQ_WS_X11 // Only X11 supports multiple desktops Atom net_current_desktop = XInternAtom( disp, "_NET_CURRENT_DESKTOP", False ); Atom type_ret; int format_ret; @@ -317,8 +317,8 @@ const char* get_env_var( const char* var, int envc, const char* envs ) return NULL; } -#if defined Q_WS_X11 && ! defined K_WS_QTONLY -//#ifdef Q_WS_X11 // FIXME(E): Implement for Qt/Embedded +#if defined TQ_WS_X11 && ! defined K_WS_QTONLY +//#ifdef TQ_WS_X11 // FIXME(E): Implement for Qt/Embedded static void init_startup_info( TDEStartupInfoId& id, const char* bin, int envc, const char* envs ) { @@ -481,8 +481,8 @@ static pid_t launch(int argc, const char *_name, const char *args, return d.fork; } -#if defined Q_WS_X11 && ! defined K_WS_QTONLY -//#ifdef Q_WS_X11 +#if defined TQ_WS_X11 && ! defined K_WS_QTONLY +//#ifdef TQ_WS_X11 TDEStartupInfoId startup_id; startup_id.initId( startup_id_str ); if( !startup_id.none()) @@ -549,8 +549,8 @@ static pid_t launch(int argc, const char *_name, const char *args, envs++; } -#if defined Q_WS_X11 && ! defined K_WS_QTONLY -//#ifdef Q_WS_X11 +#if defined TQ_WS_X11 && ! defined K_WS_QTONLY +//#ifdef TQ_WS_X11 if( startup_id.none()) TDEStartupInfo::resetStartupEnv(); else @@ -744,8 +744,8 @@ static pid_t launch(int argc, const char *_name, const char *args, d.launcher_pid = d.fork; } } -#if defined Q_WS_X11 && ! defined K_WS_QTONLY -//#ifdef Q_WS_X11 +#if defined TQ_WS_X11 && ! defined K_WS_QTONLY +//#ifdef TQ_WS_X11 if( !startup_id.none()) { if( d.fork && d.result == 0 ) // launched successfully @@ -1290,7 +1290,7 @@ static void handle_launcher_request(int sock = -1) #ifndef NDEBUG fprintf(stderr,"[tdeinit] Terminating Trinity.\n"); #endif -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 tdeinit_xio_errhandler( 0L ); #endif } @@ -1322,7 +1322,7 @@ static void handle_requests(pid_t waitForPid) max_sock = d.wrapper_old; if (d.launcher_pid && (d.launcher[0] > max_sock)) 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 if (X11fd > max_sock) max_sock = X11fd; @@ -1383,8 +1383,8 @@ static void handle_requests(pid_t waitForPid) FD_SET(d.wrapper_old, &rd_set); } FD_SET(d.deadpipe[0], &rd_set); -#if defined Q_WS_X11 && ! defined K_WS_QTONLY -//#ifdef Q_WS_X11 +#if defined TQ_WS_X11 && ! defined K_WS_QTONLY +//#ifdef TQ_WS_X11 if(X11fd >= 0) FD_SET(X11fd, &rd_set); #endif @@ -1442,8 +1442,8 @@ static void handle_requests(pid_t waitForPid) return; } -//#if defined Q_WS_X11 && ! defined K_WS_QTONLY -#ifdef Q_WS_X11 +//#if defined TQ_WS_X11 && ! defined K_WS_QTONLY +#ifdef TQ_WS_X11 /* Look for incoming X11 events */ if((result > 0) && (X11fd >= 0)) { @@ -1586,7 +1586,7 @@ int tdeinit_xio_errhandler( Display *disp ) return 0; } -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 int tdeinit_x_errhandler( Display *dpy, XErrorEvent *err ) { #ifndef NDEBUG @@ -1606,8 +1606,8 @@ int tdeinit_x_errhandler( Display *dpy, XErrorEvent *err ) } #endif -//#if defined Q_WS_X11 && ! defined K_WS_QTONLY -#ifdef Q_WS_X11 +//#if defined TQ_WS_X11 && ! defined K_WS_QTONLY +#ifdef TQ_WS_X11 // needs to be done sooner than initXconnection() because of also opening // another X connection for startup notification purposes static void setupX() @@ -1772,7 +1772,7 @@ int main(int argc, char **argv, char **envp) d.lt_dlopen_flag = lt_dlopen_flag; lt_dlopen_flag |= LTDL_GLOBAL; init_signals(); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 setupX(); #endif @@ -1821,8 +1821,8 @@ int main(int argc, char **argv, char **envp) handle_requests(pid); // Wait for tdelauncher to be ready } -#if defined Q_WS_X11 && ! defined K_WS_QTONLY -//#ifdef Q_WS_X11 +#if defined TQ_WS_X11 && ! defined K_WS_QTONLY +//#ifdef TQ_WS_X11 X11fd = initXconnection(); #endif @@ -1837,7 +1837,7 @@ int main(int argc, char **argv, char **envp) TQFont::initialize(); setlocale (LC_ALL, ""); setlocale (LC_NUMERIC, "C"); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if (XSupportsLocale ()) { // Similar to TQApplication::create_xim() diff --git a/tdeinit/tdelauncher.cpp b/tdeinit/tdelauncher.cpp index 8325f3acb..c254ebaa4 100644 --- a/tdeinit/tdelauncher.cpp +++ b/tdeinit/tdelauncher.cpp @@ -40,7 +40,7 @@ #include <tdetempfile.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 #endif @@ -52,8 +52,8 @@ #include "tdelauncher.h" #include "tdelauncher_cmds.h" -//#if defined Q_WS_X11 && ! defined K_WS_QTONLY -#ifdef Q_WS_X11 +//#if defined TQ_WS_X11 && ! defined K_WS_QTONLY +#ifdef TQ_WS_X11 //#undef K_WS_QTONLY #include <X11/Xlib.h> // schroder #endif @@ -169,7 +169,7 @@ TDELauncher::TDELauncher(int _tdeinitSocket, bool new_startup) tdeinitSocket(_tdeinitSocket), mAutoStart( new_startup ), dontBlockReading(false), newStartup( new_startup ) { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 mCached_dpy = NULL; #endif connect(&mAutoTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotAutoStart())); @@ -236,8 +236,8 @@ void TDELauncher::close() TQCString filename = TQFile::encodeName(mPoolSocketName); unlink(filename.data()); } -#if defined Q_WS_X11 && ! defined K_WS_QTONLY -//#ifdef Q_WS_X11 +#if defined TQ_WS_X11 && ! defined K_WS_QTONLY +//#ifdef TQ_WS_X11 if( mCached_dpy != NULL ) XCloseDisplay( mCached_dpy ); #endif @@ -746,8 +746,8 @@ TDELauncher::requestDone(TDELaunchRequest *request) DCOPresult.error += ":\n" + request->errorMsg; DCOPresult.pid = 0; -#if defined Q_WS_X11 && ! defined K_WS_QTONLY -//#ifdef Q_WS_X11 +#if defined TQ_WS_X11 && ! defined K_WS_QTONLY +//#ifdef TQ_WS_X11 if (!request->startup_dpy.isEmpty()) { Display* dpy = NULL; @@ -811,7 +811,7 @@ TDELauncher::requestStart(TDELaunchRequest *request) length += (*it).length() + 1; // Envs... } length += sizeof( long ); // avoid_loops -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 bool startup_notify = !request->startup_id.isNull() && request->startup_id != "0"; if( startup_notify ) length += request->startup_id.length() + 1; @@ -847,7 +847,7 @@ TDELauncher::requestStart(TDELaunchRequest *request) l = 0; // avoid_loops, always false here memcpy(p, &l, sizeof(long)); p += sizeof(long); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if( startup_notify ) { strcpy(p, request->startup_id.data()); @@ -859,7 +859,7 @@ TDELauncher::requestStart(TDELaunchRequest *request) strcpy(p, request->cwd.data()); p += strlen( p ) + 1; } -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 request_header.cmd = startup_notify ? LAUNCHER_EXT_EXEC : LAUNCHER_EXEC_NEW; #else 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, const TQValueList<TQCString> &envs ) { -#if defined Q_WS_X11 && ! defined K_WS_QTONLY -//#ifdef Q_WS_X11 // TDEStartup* isn't implemented for Qt/Embedded yet +#if defined TQ_WS_X11 && ! defined K_WS_QTONLY +//#ifdef TQ_WS_X11 // TDEStartup* isn't implemented for Qt/Embedded yet request->startup_id = "0"; if( startup_id == "0" ) return; @@ -1105,8 +1105,8 @@ void TDELauncher::cancel_service_startup_info( TDELaunchRequest* request, const TQCString& startup_id, const TQValueList<TQCString> &envs ) { -#if defined Q_WS_X11 && ! defined K_WS_QTONLY -//#ifdef Q_WS_X11 // TDEStartup* isn't implemented for Qt/Embedded yet +#if defined TQ_WS_X11 && ! defined K_WS_QTONLY +//#ifdef TQ_WS_X11 // TDEStartup* isn't implemented for Qt/Embedded yet if( request != NULL ) request->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_name = 0; request->pid = 0; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 request->startup_id = startup_id; #endif request->envs = envs; @@ -1318,7 +1318,7 @@ TDELauncher::requestSlave(const TQString &protocol, request->dcop_name = 0; request->dcop_service_type = KService::DCOP_None; request->pid = 0; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 request->startup_id = "0"; #endif request->status = TDELaunchRequest::Launching; diff --git a/tdeinit/tdelauncher.h b/tdeinit/tdelauncher.h index aee6641b2..0f3a1c5c2 100644 --- a/tdeinit/tdelauncher.h +++ b/tdeinit/tdelauncher.h @@ -89,7 +89,7 @@ public: KService::DCOPServiceType_t dcop_service_type; bool autoStart; TQString errorMsg; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 TQCString startup_id; // "" is the default, "0" for none TQCString startup_dpy; // Display to send startup notification to. #endif @@ -193,7 +193,7 @@ protected: TQCString mSlaveValgrindSkin; bool dontBlockReading; bool newStartup; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 Display *mCached_dpy; #endif }; diff --git a/tdeinit/wrapper.c b/tdeinit/wrapper.c index d22ba5080..d43222d21 100644 --- a/tdeinit/wrapper.c +++ b/tdeinit/wrapper.c @@ -49,9 +49,9 @@ static char *getDisplay() /* 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 - 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) -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 */ #if !defined(QWS) display = getenv("DISPLAY"); |