From 6e8a7cc94c1eb8b67e91e6dc2f864dfeec51d9cc Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 19 Jan 2013 18:23:12 -0600 Subject: [PATCH] Rename qt_argc and qt_argv methods to avoid conflicts with KDE4 symbols --- DEBUG | 2 +- tdecore/kapplication.cpp | 14 +++++++------- tdecore/kcmdlineargs.cpp | 30 +++++++++++++++--------------- tdecore/kcmdlineargs.h | 4 ++-- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/DEBUG b/DEBUG index 47a8fe871..c5df1299b 100644 --- a/DEBUG +++ b/DEBUG @@ -80,7 +80,7 @@ are interested in and verify that we have found the correct source line: 216 } 217 218 KApplication::KApplication( bool allowStyles, bool GUIenabled ) : -219 QApplication( *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(), +219 QApplication( *KCmdLineArgs::tqt_argc(), *KCmdLineArgs::tqt_argv(), 220 GUIenabled ), 221 KInstance( KCmdLineArgs::about), 222 d (new KApplicationPrivate) diff --git a/tdecore/kapplication.cpp b/tdecore/kapplication.cpp index b4caefc2c..87c5ffb2f 100644 --- a/tdecore/kapplication.cpp +++ b/tdecore/kapplication.cpp @@ -647,8 +647,8 @@ KApplication::KApplication( int& argc, char** argv, const TQCString& rAppName, } KApplication::KApplication( bool allowStyles, bool GUIenabled ) : -// TQApplication( *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(), TRUE ), // Qt4 requires that there always be a GUI - TQApplication( *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(), GUIenabled ), // We need to be able to run command line apps +// TQApplication( *KCmdLineArgs::tqt_argc(), *KCmdLineArgs::tqt_argv(), TRUE ), // Qt4 requires that there always be a GUI + TQApplication( *KCmdLineArgs::tqt_argc(), *KCmdLineArgs::tqt_argv(), GUIenabled ), // We need to be able to run command line apps KInstance( KCmdLineArgs::about), #ifdef Q_WS_X11 display(0L), @@ -672,7 +672,7 @@ KApplication::KApplication( bool allowStyles, bool GUIenabled ) : #ifdef Q_WS_X11 KApplication::KApplication( Display *dpy, bool allowStyles ) : - TQApplication( dpy, *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(), + TQApplication( dpy, *KCmdLineArgs::tqt_argc(), *KCmdLineArgs::tqt_argv(), getX11RGBAVisual(dpy), getX11RGBAColormap(dpy) ), KInstance( KCmdLineArgs::about), display(0L), d (new KApplicationPrivate) { @@ -688,7 +688,7 @@ KApplication::KApplication( Display *dpy, bool allowStyles ) : } KApplication::KApplication( Display *dpy, bool disable_argb, Qt::HANDLE visual, Qt::HANDLE colormap, bool allowStyles ) : - TQApplication( dpy, *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(), + TQApplication( dpy, *KCmdLineArgs::tqt_argc(), *KCmdLineArgs::tqt_argv(), disable_argb?visual:getX11RGBAVisual(dpy), disable_argb?colormap:getX11RGBAColormap(dpy) ), KInstance( KCmdLineArgs::about), display(0L), d (new KApplicationPrivate) { @@ -706,7 +706,7 @@ KApplication::KApplication( Display *dpy, bool disable_argb, Qt::HANDLE visual, KApplication::KApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap, bool allowStyles ) : - TQApplication( dpy, *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(), + TQApplication( dpy, *KCmdLineArgs::tqt_argc(), *KCmdLineArgs::tqt_argv(), visual?visual:getX11RGBAVisual(dpy), colormap?colormap:getX11RGBAColormap(dpy) ), KInstance( KCmdLineArgs::about), display(0L), d (new KApplicationPrivate) { @@ -725,7 +725,7 @@ KApplication::KApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap KApplication::KApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap, bool allowStyles, KInstance * _instance ) : - TQApplication( dpy, *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(), + TQApplication( dpy, *KCmdLineArgs::tqt_argc(), *KCmdLineArgs::tqt_argv(), visual?visual:getX11RGBAVisual(dpy), colormap?colormap:getX11RGBAColormap(dpy) ), KInstance( _instance ), display(0L), d (new KApplicationPrivate) { @@ -744,7 +744,7 @@ KApplication::KApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap #endif KApplication::KApplication( bool allowStyles, bool GUIenabled, KInstance* _instance ) : - TQApplication( *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(), + TQApplication( *KCmdLineArgs::tqt_argc(), *KCmdLineArgs::tqt_argv(), GUIenabled ), KInstance( _instance ), #ifdef Q_WS_X11 diff --git a/tdecore/kcmdlineargs.cpp b/tdecore/kcmdlineargs.cpp index 7abc46f7a..75eb9d633 100644 --- a/tdecore/kcmdlineargs.cpp +++ b/tdecore/kcmdlineargs.cpp @@ -676,14 +676,14 @@ KCmdLineArgs::parseAllArgs() * Return argc */ int * -KCmdLineArgs::qt_argc() +KCmdLineArgs::tqt_argc() { if (!argsList) KApplication::addCmdLineOptions(); // Lazy bastards! - static int qt_argc = -1; - if( qt_argc != -1 ) - return &qt_argc; + static int tqt_argc = -1; + if( tqt_argc != -1 ) + return &tqt_argc; KCmdLineArgs *args = parsedArgs("qt"); assert(args); // No qt options have been added! @@ -697,8 +697,8 @@ KCmdLineArgs::qt_argc() } assert(argc >= (args->count()+1)); - qt_argc = args->count() +1; - return &qt_argc; + tqt_argc = args->count() +1; + return &tqt_argc; } /** @@ -707,14 +707,14 @@ KCmdLineArgs::qt_argc() * Return argv */ char *** -KCmdLineArgs::qt_argv() +KCmdLineArgs::tqt_argv() { if (!argsList) KApplication::addCmdLineOptions(); // Lazy bastards! - static char** qt_argv; - if( qt_argv != NULL ) - return &qt_argv; + static char** tqt_argv; + if( tqt_argv != NULL ) + return &tqt_argv; KCmdLineArgs *args = parsedArgs("qt"); assert(args); // No qt options have been added! @@ -727,16 +727,16 @@ KCmdLineArgs::qt_argv() exit(255); } - qt_argv = new char*[ args->count() + 2 ]; - qt_argv[ 0 ] = tqstrdup( appName()); + tqt_argv = new char*[ args->count() + 2 ]; + tqt_argv[ 0 ] = tqstrdup( appName()); int i = 0; for(; i < args->count(); i++) { - qt_argv[i+1] = tqstrdup((char *) args->arg(i)); + tqt_argv[i+1] = tqstrdup((char *) args->arg(i)); } - qt_argv[i+1] = 0; + tqt_argv[i+1] = 0; - return &qt_argv; + return &tqt_argv; } void diff --git a/tdecore/kcmdlineargs.h b/tdecore/kcmdlineargs.h index dc48fc45d..7b6a33e2e 100644 --- a/tdecore/kcmdlineargs.h +++ b/tdecore/kcmdlineargs.h @@ -586,7 +586,7 @@ private: * * Return argc */ - static int *qt_argc(); + static int *tqt_argc(); /** * @internal for KApplication only: @@ -594,7 +594,7 @@ private: * Return argv */ - static char ***qt_argv(); + static char ***tqt_argv(); /** * @internal