summaryrefslogtreecommitdiffstats
path: root/kded/kded.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kded/kded.cpp')
-rw-r--r--kded/kded.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/kded/kded.cpp b/kded/kded.cpp
index e1b3b6b33..85d796652 100644
--- a/kded/kded.cpp
+++ b/kded/kded.cpp
@@ -23,7 +23,7 @@
#include "kdedmodule.h"
#include <kresourcelist.h>
-#include <kcrash.h>
+#include <tdecrash.h>
#include <unistd.h>
#include <stdlib.h>
@@ -35,20 +35,20 @@
#include <dcopclient.h>
-#include <kuniqueapplication.h>
+#include <tdeuniqueapplication.h>
#include <tdecmdlineargs.h>
#include <tdeaboutdata.h>
#include <tdelocale.h>
#include <tdeglobal.h>
-#include <kprocess.h>
+#include <tdeprocess.h>
#include <kdebug.h>
#include <kdirwatch.h>
-#include <kstandarddirs.h>
+#include <tdestandarddirs.h>
#include <kdatastream.h>
#include <tdeio/global.h>
#include <kservicetype.h>
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
#include <X11/Xlib.h>
#include <fixx11h.h>
#endif
@@ -75,7 +75,7 @@ static void runBuildSycoca(TQObject *callBackObj=0, const char *callBackSlot=0)
dataStream << TQString("tdebuildsycoca") << args;
TQCString _launcher = TDEApplication::launcher();
- kapp->dcopClient()->callAsync(_launcher, _launcher, "tdeinit_exec_wait(TQString,TQStringList)", data, callBackObj, callBackSlot);
+ tdeApp->dcopClient()->callAsync(_launcher, _launcher, "tdeinit_exec_wait(TQString,TQStringList)", data, callBackObj, callBackSlot);
}
else
{
@@ -110,9 +110,9 @@ Kded::Kded(bool checkUpdates, bool new_startup)
else
cPath = tdesycoca_env;
m_pTimer = new TQTimer(this);
- connect(m_pTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(recreate()));
+ connect(m_pTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(recreate()));
- TQTimer::singleShot(100, this, TQT_SLOT(installCrashHandler()));
+ TQTimer::singleShot(100, this, TQ_SLOT(installCrashHandler()));
m_pDirWatch = 0;
@@ -148,14 +148,14 @@ bool Kded::process(const TQCString &obj, const TQCString &fun,
if (!module)
return false;
- module->setCallingDcopClient(kapp->dcopClient());
+ module->setCallingDcopClient(tdeApp->dcopClient());
return module->process(fun, data, replyType, replyData);
}
void Kded::initModules()
{
m_dontLoad.clear();
- TDEConfig *config = kapp->config();
+ TDEConfig *config = tdeApp->config();
bool tde_running = !( getenv( "TDE_FULL_SESSION" ) == NULL || getenv( "TDE_FULL_SESSION" )[ 0 ] == '\0' );
// not the same user like the one running the session (most likely we're run via sudo or something)
if( getenv( "TDE_SESSION_UID" ) != NULL && uid_t( atoi( getenv( "TDE_SESSION_UID" ))) != getuid())
@@ -227,7 +227,7 @@ void Kded::initModules()
void Kded::loadSecondPhase()
{
kdDebug(7020) << "Loading second phase autoload" << endl;
- TDEConfig *config = kapp->config();
+ TDEConfig *config = tdeApp->config();
KService::List kdedModules = KServiceType::offers("KDEDModule");
for(KService::List::ConstIterator it = kdedModules.begin(); it != kdedModules.end(); ++it)
{
@@ -316,7 +316,7 @@ KDEDModule *Kded::loadModule(const KService *s, bool onDemand)
{
m_modules.insert(obj, module);
m_libs.insert(obj, lib);
- connect(module, TQT_SIGNAL(moduleDeleted(KDEDModule *)), TQT_SLOT(slotKDEDModuleRemoved(KDEDModule *)));
+ connect(module, TQ_SIGNAL(moduleDeleted(KDEDModule *)), TQ_SLOT(slotKDEDModuleRemoved(KDEDModule *)));
kdDebug(7020) << "Successfully loaded module '" << obj << "'\n";
return module;
}
@@ -400,12 +400,12 @@ void Kded::updateDirWatch()
delete m_pDirWatch;
m_pDirWatch = new KDirWatch;
- TQObject::connect( m_pDirWatch, TQT_SIGNAL(dirty(const TQString&)),
- this, TQT_SLOT(update(const TQString&)));
- TQObject::connect( m_pDirWatch, TQT_SIGNAL(created(const TQString&)),
- this, TQT_SLOT(update(const TQString&)));
- TQObject::connect( m_pDirWatch, TQT_SIGNAL(deleted(const TQString&)),
- this, TQT_SLOT(dirDeleted(const TQString&)));
+ TQObject::connect( m_pDirWatch, TQ_SIGNAL(dirty(const TQString&)),
+ this, TQ_SLOT(update(const TQString&)));
+ TQObject::connect( m_pDirWatch, TQ_SIGNAL(created(const TQString&)),
+ this, TQ_SLOT(update(const TQString&)));
+ TQObject::connect( m_pDirWatch, TQ_SIGNAL(deleted(const TQString&)),
+ this, TQ_SLOT(dirDeleted(const TQString&)));
// For each resource
for( TQStringList::ConstIterator it = m_allResourceDirs.begin();
@@ -480,7 +480,7 @@ void Kded::recreate(bool initial)
if (!initial)
{
updateDirWatch(); // Update tree first, to be sure to miss nothing.
- runBuildSycoca(this, TQT_SLOT(recreateDone()));
+ runBuildSycoca(this, TQ_SLOT(recreateDone()));
}
else
{
@@ -491,7 +491,7 @@ void Kded::recreate(bool initial)
if(delayedCheck)
{
// do a proper tdesycoca check after a delay
- TQTimer::singleShot( 60000, this, TQT_SLOT( runDelayedCheck()));
+ TQTimer::singleShot( 60000, this, TQ_SLOT( runDelayedCheck()));
m_needDelayedCheck = true;
delayedCheck = false;
}
@@ -510,7 +510,7 @@ void Kded::recreateDone()
TQByteArray replyData;
DCOPClientTransaction *transaction = m_recreateRequests.first();
if (transaction)
- kapp->dcopClient()->endTransaction(transaction, replyType, replyData);
+ tdeApp->dcopClient()->endTransaction(transaction, replyType, replyData);
m_recreateRequests.remove(m_recreateRequests.begin());
}
m_recreateBusy = false;
@@ -553,7 +553,7 @@ bool Kded::process(const TQCString &fun, const TQByteArray &data,
}
m_recreateCount++;
}
- m_recreateRequests.append(kapp->dcopClient()->beginTransaction());
+ m_recreateRequests.append(tdeApp->dcopClient()->beginTransaction());
replyType = "void";
return true;
} else {
@@ -659,17 +659,17 @@ void Kded::unregisterWindowId(long windowId)
static void sighandler(int /*sig*/)
{
- if (kapp)
- kapp->quit();
+ if (tdeApp)
+ tdeApp->quit();
}
KUpdateD::KUpdateD()
{
m_pDirWatch = new KDirWatch;
m_pTimer = new TQTimer;
- connect(m_pTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(runKonfUpdate()));
- TQObject::connect( m_pDirWatch, TQT_SIGNAL(dirty(const TQString&)),
- this, TQT_SLOT(slotNewUpdateFile()));
+ connect(m_pTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(runKonfUpdate()));
+ TQObject::connect( m_pDirWatch, TQ_SIGNAL(dirty(const TQString&)),
+ this, TQ_SLOT(slotNewUpdateFile()));
TQStringList dirs = TDEGlobal::dirs()->findDirs("data", "tdeconf_update");
for( TQStringList::ConstIterator it = dirs.begin();
@@ -704,7 +704,7 @@ void KUpdateD::slotNewUpdateFile()
KHostnameD::KHostnameD(int pollInterval)
{
m_Timer.start(pollInterval, false /* repetitive */ );
- connect(&m_Timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(checkHostname()));
+ connect(&m_Timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(checkHostname()));
checkHostname();
}
@@ -751,9 +751,9 @@ public:
virtual bool process(const TQCString &fun, const TQByteArray &data,
TQCString& replyType, TQByteArray &replyData)
{
- if ( kapp && (fun == "quit()") )
+ if ( tdeApp && (fun == "quit()") )
{
- kapp->quit();
+ tdeApp->quit();
replyType = "void";
return true;
}
@@ -768,10 +768,10 @@ public:
}
};
-class KDEDApplication : public KUniqueApplication
+class KDEDApplication : public TDEUniqueApplication
{
public:
- KDEDApplication() : KUniqueApplication( )
+ KDEDApplication() : TDEUniqueApplication( )
{
startup = true;
dcopClient()->connectDCOPSignal( "DCOPServer", "", "terminateTDE()",
@@ -785,7 +785,7 @@ public:
if( Kded::self()->newStartup())
Kded::self()->initModules();
else
- TQTimer::singleShot(500, Kded::self(), TQT_SLOT(initModules()));
+ TQTimer::singleShot(500, Kded::self(), TQ_SLOT(initModules()));
} else
runBuildSycoca();
@@ -794,7 +794,7 @@ public:
QCStringList functions()
{
- QCStringList res = KUniqueApplication::functions();
+ QCStringList res = TDEUniqueApplication::functions();
res += "bool loadModule(TQCString)";
res += "bool unloadModule(TQCString)";
res += "void registerWindowId(long int)";
@@ -869,14 +869,14 @@ public:
replyType = "void";
return true;
}
- return KUniqueApplication::process(fun, data, replyType, replyData);
+ return TDEUniqueApplication::process(fun, data, replyType, replyData);
}
bool startup;
KDEDQtDCOPObject kdedQtDcopObject;
};
-extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
+extern "C" TDE_EXPORT int kdemain(int argc, char *argv[])
{
TDEAboutData aboutData( "kded", I18N_NOOP("TDE Daemon"),
"$Id$",
@@ -886,7 +886,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
TDECmdLineArgs::init(argc, argv, &aboutData);
- KUniqueApplication::addCmdLineOptions();
+ TDEUniqueApplication::addCmdLineOptions();
TDECmdLineArgs::addCmdLineOptions( options );
@@ -922,13 +922,13 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
exit(0);
}
- if (!KUniqueApplication::start())
+ if (!TDEUniqueApplication::start())
{
fprintf(stderr, "[kded] Daemon (kded) is already running.\n");
exit(0);
}
- KUniqueApplication::dcopClient()->setQtBridgeEnabled(false);
+ TDEUniqueApplication::dcopClient()->setQtBridgeEnabled(false);
config->setGroup("General");
int HostnamePollInterval = config->readNumEntry("HostnamePollInterval", 5000);
@@ -954,9 +954,9 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
if (bCheckHostname)
(void) new KHostnameD(HostnamePollInterval); // Watch for hostname changes
- DCOPClient *client = kapp->dcopClient();
- TQObject::connect(client, TQT_SIGNAL(applicationRemoved(const TQCString&)),
- kded, TQT_SLOT(slotApplicationRemoved(const TQCString&)));
+ DCOPClient *client = tdeApp->dcopClient();
+ TQObject::connect(client, TQ_SIGNAL(applicationRemoved(const TQCString&)),
+ kded, TQ_SLOT(slotApplicationRemoved(const TQCString&)));
client->setNotifications(true);
client->setDaemonMode( true );
@@ -969,7 +969,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
TQByteArray data;
client->send( "*", "tdesycoca", "notifyDatabaseChanged()", data );
client->send( "ksplash", "", "upAndRunning(TQString)", TQString("kded"));
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
XEvent e;
e.xclient.type = ClientMessage;
e.xclient.message_type = XInternAtom( tqt_xdisplay(), "_KDE_SPLASH_PROGRESS", False );