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())
{
connect(m_process, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotPreviewDone()));
connect(m_process, TQT_SIGNAL(processExited(TDEProcess *)), this, TQT_SLOT(slotPreviewDone()));
}
else
{
@ -260,7 +260,7 @@ void ComponentPage::slotPreview()
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
{

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

@ -50,7 +50,7 @@ K_EXPORT_COMPONENT_FACTORY( kcm_autostart, AutoStartFactory( "kcmautostart" ) )
AutoStartConfig::AutoStartConfig(TQWidget* parent, const char* name, const TQStringList &) :
KCModule( AutoStartFactory::instance(), parent, name )
{
KGlobal::dirs()->addResourceType("autostart", "share/autostart");
TDEGlobal::dirs()->addResourceType("autostart", "share/autostart");
TDEAboutData *about =
new TDEAboutData( I18N_NOOP( "kcmautostart" ), I18N_NOOP( "TDE Service Manager" ),
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() {
_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++ )
{

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

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

@ -32,7 +32,7 @@
class ImmutableStatus;
class KConfig;
class KProcess;
class TDEProcess;
class KSimpleConfig;
class KioskGui;
@ -75,7 +75,7 @@ public:
void forceSycocaUpdate();
// 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
DCOPRef dcopRef(const TQCString &appId, const TQCString &objId);
@ -180,7 +180,7 @@ protected:
void shutdownRuntimeEnv();
void setupConfigEnv();
void shutdownConfigEnv();
void applyEnvironment(KProcess *p);
void applyEnvironment(TDEProcess *p);
TQString saveImmutableStatus(const TQString &filename);
bool restoreImmutableStatus(const TQString &filename, bool force);

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

Loading…
Cancel
Save