Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 70fa683ca9
commit 0331606068

@ -162,7 +162,7 @@ void ComponentPage::slotSetup()
if (m_process->isRunning()) if (m_process->isRunning())
{ {
connect(m_process, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotPreviewDone())); connect(m_process, TQT_SIGNAL(processExited(TDEProcess *)), this, TQT_SLOT(slotPreviewDone()));
} }
else else
{ {
@ -260,7 +260,7 @@ void ComponentPage::slotPreview()
if (m_process->isRunning()) if (m_process->isRunning())
{ {
connect(m_process, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotPreviewDone())); connect(m_process, TQT_SIGNAL(processExited(TDEProcess *)), this, TQT_SLOT(slotPreviewDone()));
} }
else else
{ {

@ -22,7 +22,7 @@
#include "componentPage_ui.h" #include "componentPage_ui.h"
#include "pageWidget.h" #include "pageWidget.h"
class KProcess; class TDEProcess;
class Component; class Component;
class ComponentData; class ComponentData;
@ -57,7 +57,7 @@ protected:
void prepareMutableFiles(); void prepareMutableFiles();
private: private:
KProcess *m_process; TDEProcess *m_process;
ComponentData *m_data; ComponentData *m_data;
Component *m_component; Component *m_component;
bool m_saveSettings; bool m_saveSettings;

@ -50,7 +50,7 @@ K_EXPORT_COMPONENT_FACTORY( kcm_autostart, AutoStartFactory( "kcmautostart" ) )
AutoStartConfig::AutoStartConfig(TQWidget* parent, const char* name, const TQStringList &) : AutoStartConfig::AutoStartConfig(TQWidget* parent, const char* name, const TQStringList &) :
KCModule( AutoStartFactory::instance(), parent, name ) KCModule( AutoStartFactory::instance(), parent, name )
{ {
KGlobal::dirs()->addResourceType("autostart", "share/autostart"); TDEGlobal::dirs()->addResourceType("autostart", "share/autostart");
TDEAboutData *about = TDEAboutData *about =
new TDEAboutData( I18N_NOOP( "kcmautostart" ), I18N_NOOP( "TDE Service Manager" ), new TDEAboutData( I18N_NOOP( "kcmautostart" ), I18N_NOOP( "TDE Service Manager" ),
0, 0, TDEAboutData::License_GPL, I18N_NOOP( "(c) 2004 Martijn Klingens" ) ); 0, 0, TDEAboutData::License_GPL, I18N_NOOP( "(c) 2004 Martijn Klingens" ) );
@ -106,7 +106,7 @@ void AutoStartConfig::setAutoloadEnabled(KConfig *config, const TQString &filena
void AutoStartConfig::load() { void AutoStartConfig::load() {
_lvStartup->clear(); _lvStartup->clear();
TQStringList files = KGlobal::dirs()->findAllResources( "autostart", TQString::fromLatin1( "*.desktop" ), false, true ); TQStringList files = TDEGlobal::dirs()->findAllResources( "autostart", TQString::fromLatin1( "*.desktop" ), false, true );
for ( TQStringList::ConstIterator it = files.begin(); it != files.end(); it++ ) for ( TQStringList::ConstIterator it = files.begin(); it != files.end(); it++ )
{ {

@ -705,7 +705,7 @@ void KioskGui::updateBackground()
m_view->setPaletteBackgroundPixmap(locate("appdata", "background.png")); m_view->setPaletteBackgroundPixmap(locate("appdata", "background.png"));
m_view->logoLabel->setPixmap(locate("appdata", "logo.png")); m_view->logoLabel->setPixmap(locate("appdata", "logo.png"));
m_view->logoLabel->setMinimumSize(TQSize(160,170)); m_view->logoLabel->setMinimumSize(TQSize(160,170));
TQString language = KGlobal::locale()->language(); TQString language = TDEGlobal::locale()->language();
TQString caption = locate("appdata", "caption-"+language+".png"); TQString caption = locate("appdata", "caption-"+language+".png");
if (caption.isEmpty()) if (caption.isEmpty())
caption = locate("appdata", "caption.png"); caption = locate("appdata", "caption.png");

@ -104,7 +104,7 @@ KioskRun::setKdeDirs(const TQStringList &dirs)
TQStringList xdgDataDirs = TQStringList::split(':', TQFile::decodeName(getenv("XDG_DATA_DIRS"))); TQStringList xdgDataDirs = TQStringList::split(':', TQFile::decodeName(getenv("XDG_DATA_DIRS")));
if (xdgDataDirs.isEmpty()) if (xdgDataDirs.isEmpty())
{ {
xdgDataDirs = TQStringList::split(':', KGlobal::dirs()->kfsstnd_prefixes()); xdgDataDirs = TQStringList::split(':', TDEGlobal::dirs()->kfsstnd_prefixes());
xdgDataDirs.pop_front(); xdgDataDirs.pop_front();
for(TQStringList::Iterator it = xdgDataDirs.begin(); for(TQStringList::Iterator it = xdgDataDirs.begin();
it != xdgDataDirs.end(); ++it) it != xdgDataDirs.end(); ++it)
@ -127,7 +127,7 @@ KioskRun::setKdeDirs(const TQStringList &dirs)
if (xdgConfigDirs.isEmpty()) if (xdgConfigDirs.isEmpty())
{ {
xdgConfigDirs << "/etc/xdg"; xdgConfigDirs << "/etc/xdg";
TQString sysconfMenuDir = KGlobal::dirs()->findDirs("xdgconf-menu", TQString()).last(); TQString sysconfMenuDir = TDEGlobal::dirs()->findDirs("xdgconf-menu", TQString()).last();
if (sysconfMenuDir.endsWith("/menus/")) if (sysconfMenuDir.endsWith("/menus/"))
xdgConfigDirs << sysconfMenuDir.left(sysconfMenuDir.length()-7); xdgConfigDirs << sysconfMenuDir.left(sysconfMenuDir.length()-7);
@ -153,13 +153,13 @@ KioskRun::deleteDir(const TQString &dir)
return; return;
Q_ASSERT(dir.startsWith(m_homeDir)); Q_ASSERT(dir.startsWith(m_homeDir));
KProcess proc; TDEProcess proc;
proc << "rm" << "-rf" << dir; proc << "rm" << "-rf" << dir;
proc.start(KProcess::Block); proc.start(TDEProcess::Block);
} }
void void
KioskRun::applyEnvironment(KProcess *p) KioskRun::applyEnvironment(TDEProcess *p)
{ {
p->setEnvironment("HOME", m_homeDir); p->setEnvironment("HOME", m_homeDir);
p->setEnvironment("TDEHOME", m_homeDir+"/.trinity"); p->setEnvironment("TDEHOME", m_homeDir+"/.trinity");
@ -201,17 +201,17 @@ KioskRun::updateSycoca()
dcopRef("kded", "kbuildsycoca").call("recreate"); dcopRef("kded", "kbuildsycoca").call("recreate");
} }
KProcess* TDEProcess*
KioskRun::run(const TQString &cmd, const TQStringList &args) KioskRun::run(const TQString &cmd, const TQStringList &args)
{ {
KProcess *proc = new KProcess(this); TDEProcess *proc = new TDEProcess(this);
applyEnvironment(proc); applyEnvironment(proc);
*proc << cmd; *proc << cmd;
*proc << args; *proc << args;
proc->start(KProcess::NotifyOnExit); proc->start(TDEProcess::NotifyOnExit);
return proc; return proc;
} }
@ -759,15 +759,15 @@ KioskRun::setupRuntimeEnv()
TQString dcopServerFile = m_homeDir+"/.trinity/DCOPserver"; TQString dcopServerFile = m_homeDir+"/.trinity/DCOPserver";
KProcess tdeinit; TDEProcess tdeinit;
applyEnvironment(&tdeinit); applyEnvironment(&tdeinit);
tdeinit << "tdeinit"; tdeinit << "tdeinit";
connect(&tdeinit, TQT_SIGNAL(processExited(KProcess *)), &dlg, TQT_SLOT(slotFinished())); connect(&tdeinit, TQT_SIGNAL(processExited(TDEProcess *)), &dlg, TQT_SLOT(slotFinished()));
tdeinit.start(KProcess::NotifyOnExit); tdeinit.start(TDEProcess::NotifyOnExit);
dlg.exec(); dlg.exec();
@ -811,19 +811,19 @@ KioskRun::shutdownRuntimeEnv()
delete m_dcopClient; delete m_dcopClient;
m_dcopClient = 0; m_dcopClient = 0;
KProcess tdeinit; TDEProcess tdeinit;
applyEnvironment(&tdeinit); applyEnvironment(&tdeinit);
tdeinit << "tdeinit_shutdown"; tdeinit << "tdeinit_shutdown";
tdeinit.start(KProcess::Block); tdeinit.start(TDEProcess::Block);
KProcess dcopserver; TDEProcess dcopserver;
applyEnvironment(&dcopserver); applyEnvironment(&dcopserver);
dcopserver << "dcopserver_shutdown"; dcopserver << "dcopserver_shutdown";
dcopserver.start(KProcess::Block); dcopserver.start(TDEProcess::Block);
} }
DCOPRef DCOPRef

@ -32,7 +32,7 @@
class ImmutableStatus; class ImmutableStatus;
class KConfig; class KConfig;
class KProcess; class TDEProcess;
class KSimpleConfig; class KSimpleConfig;
class KioskGui; class KioskGui;
@ -75,7 +75,7 @@ public:
void forceSycocaUpdate(); void forceSycocaUpdate();
// Run a program inside the runtime test environment // Run a program inside the runtime test environment
KProcess* run(const TQString &cmd, const TQStringList &args=TQStringList()); TDEProcess* run(const TQString &cmd, const TQStringList &args=TQStringList());
// A DCOPRef to make dcop calls into the runtime test environment // A DCOPRef to make dcop calls into the runtime test environment
DCOPRef dcopRef(const TQCString &appId, const TQCString &objId); DCOPRef dcopRef(const TQCString &appId, const TQCString &objId);
@ -180,7 +180,7 @@ protected:
void shutdownRuntimeEnv(); void shutdownRuntimeEnv();
void setupConfigEnv(); void setupConfigEnv();
void shutdownConfigEnv(); void shutdownConfigEnv();
void applyEnvironment(KProcess *p); void applyEnvironment(TDEProcess *p);
TQString saveImmutableStatus(const TQString &filename); TQString saveImmutableStatus(const TQString &filename);
bool restoreImmutableStatus(const TQString &filename, bool force); bool restoreImmutableStatus(const TQString &filename, bool force);

@ -131,8 +131,8 @@ int main(int argc, char **argv)
if (args->isSet("check")) if (args->isSet("check"))
{ {
(void) KGlobal::config(); // Force config file processing (void) TDEGlobal::config(); // Force config file processing
TQString dirs = KGlobal::dirs()->kfsstnd_prefixes(); TQString dirs = TDEGlobal::dirs()->kfsstnd_prefixes();
printf("%s\n", TQFile::encodeName(dirs).data()); printf("%s\n", TQFile::encodeName(dirs).data());
return 0; return 0;
} }
@ -155,7 +155,7 @@ int main(int argc, char **argv)
} }
} }
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
config->setGroup("Directories"); config->setGroup("Directories");
TQString userMapFile = config->readEntry("userProfileMapFile"); TQString userMapFile = config->readEntry("userProfileMapFile");
TQString profileDirsPrefix = config->readEntry("profileDirsPrefix"); TQString profileDirsPrefix = config->readEntry("profileDirsPrefix");

Loading…
Cancel
Save