diff options
Diffstat (limited to 'kdesktop/main.cpp')
-rw-r--r-- | kdesktop/main.cpp | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/kdesktop/main.cpp b/kdesktop/main.cpp index b54c03cb7..0465068b6 100644 --- a/kdesktop/main.cpp +++ b/kdesktop/main.cpp @@ -18,13 +18,13 @@ */ #include <config.h> -#include <kuniqueapplication.h> +#include <tdeuniqueapplication.h> #include <tdelocale.h> #include <dcopclient.h> #include <tdeaboutdata.h> #include <tdecmdlineargs.h> #include <kopenwith.h> -#include <kcrash.h> +#include <tdecrash.h> #include <kdebug.h> #include <tdeglobalsettings.h> #include <tdeglobal.h> @@ -43,7 +43,7 @@ #include <fcntl.h> #include <stdlib.h> -#if defined(Q_WS_X11) && defined(HAVE_XRENDER) && TQT_VERSION >= 0x030300 +#if defined(TQ_WS_X11) && defined(HAVE_XRENDER) && TQT_VERSION >= 0x030300 #define COMPOSITE #endif @@ -71,7 +71,7 @@ static TDECmdLineOptions options[] = }; bool argb_visual = false; -KDesktopApp *myApp = NULL; +KDesktopApp *myApp = nullptr; // ----------------------------------------------------------------------------- @@ -94,8 +94,8 @@ static void signalHandler(int sigId) // try to cleanup all windows signal(SIGTERM, SIG_DFL); // next one kills signal(SIGHUP, SIG_DFL); // next one kills - if (kapp) - kapp->quit(); // turn catchable signals into clean shutdown + if (tdeApp) + tdeApp->quit(); // turn catchable signals into clean shutdown } void KDesktop::slotUpAndRunning() @@ -105,7 +105,7 @@ void KDesktop::slotUpAndRunning() TDECrash::setEmergencySaveFunction(crashHandler); // Try to restart on crash } -extern "C" KDE_EXPORT int kdemain( int argc, char **argv ) +extern "C" TDE_EXPORT int kdemain( int argc, char **argv ) { //setup signal handling signal(SIGTERM, signalHandler); @@ -184,7 +184,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv ) TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::addCmdLineOptions( options ); - if (!KUniqueApplication::start()) { + if (!TDEUniqueApplication::start()) { fprintf(stderr, "kdesktop is already running!\n"); exit(0); } @@ -247,11 +247,11 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv ) *qt_no_foreign_hack = true; // else argb_visual = false ... ? *shrug* if( argb_visual ) - myApp = new KDesktopApp( dpy, Qt::HANDLE( visual ), 0 ); + myApp = new KDesktopApp( dpy, TQt::HANDLE( visual ), 0 ); else XCloseDisplay( dpy ); } - if( myApp == NULL ) + if (!myApp) myApp = new KDesktopApp; #else myApp = new KDesktopApp; @@ -260,9 +260,6 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv ) KDesktopSettings::instance(kdesktop_name + "rc"); - bool x_root_hack = args->isSet("x-root"); - bool wait_for_kded = args->isSet("waitforkded"); - // This MUST be created before any widgets are created SaverEngine saver; @@ -273,22 +270,21 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv ) // Mark kdeskop as immutable if all of its config modules have been disabled if (!myApp->config()->isImmutable() && - kapp->authorizeControlModules(KRootWm::configModules()).isEmpty()) + tdeApp->authorizeControlModules(KRootWm::configModules()).isEmpty()) { myApp->config()->setReadOnly(true); myApp->config()->reparseConfiguration(); } - // for the KDE-already-running check in starttde - TDESelectionOwner kde_running( "_KDE_RUNNING", 0 ); - kde_running.claim( false ); + // for the TDE-already-running check in starttde + TDESelectionOwner tde_running( "_KDE_RUNNING", 0 ); + tde_running.claim( false ); + bool x_root_hack = args->isSet("x-root"); + bool wait_for_kded = args->isSet("waitforkded"); KDesktop desktop( &saver, x_root_hack, wait_for_kded ); args->clear(); - myApp->dcopClient()->setDefaultObject( "KDesktopIface" ); - - return myApp->exec(); } |