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

pull/1/head
Timothy Pearson 12 years ago
parent a3486ce556
commit e8181caef1

@ -111,10 +111,10 @@ int main(int argc, char **argv)
executable = executableList[i];
/* Kubuntu has a bug in it - this is a workaround for it */
KGlobal::dirs()->addResourceDir("apps","/usr/share/applications/kde");
KGlobal::dirs()->addResourceDir("apps","/usr/share/applications");
TDEGlobal::dirs()->addResourceDir("apps","/usr/share/applications/kde");
TDEGlobal::dirs()->addResourceDir("apps","/usr/share/applications");
TQString deskFilePath = KGlobal::dirs()->findResource("apps",executable + ".desktop");
TQString deskFilePath = TDEGlobal::dirs()->findResource("apps",executable + ".desktop");
KDesktopFile desktopFile(deskFilePath,true);
/* icon parsing */
@ -123,7 +123,7 @@ int main(int argc, char **argv)
else
{
TQString iconName = desktopFile.readIcon();
icon = KGlobal::iconLoader()->iconPath(iconName, -1* KIcon::StdSizes(KIcon::SizeHuge), true);
icon = TDEGlobal::iconLoader()->iconPath(iconName, -1* KIcon::StdSizes(KIcon::SizeHuge), true);
}
/* generic name parsing */

@ -74,7 +74,7 @@ KdeSudo::KdeSudo(TQWidget *parent, const char *name,const TQString& icon, const
noExec = true;
}
p = new KProcess;
p = new TDEProcess;
p->clearArguments();
// Parsins args
@ -166,9 +166,9 @@ KdeSudo::KdeSudo(TQWidget *parent, const char *name,const TQString& icon, const
kdeSycoca = TQFile::encodeName(locateLocal("cache", "ksycoca"));
}
connect( p, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(receivedOut(KProcess*, char*, int)) );
connect( p, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(receivedOut(KProcess*, char*, int)) );
connect( p, TQT_SIGNAL(processExited (KProcess *)), this, TQT_SLOT(procExited(KProcess*)));
connect( p, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)), this, TQT_SLOT(receivedOut(TDEProcess*, char*, int)) );
connect( p, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), this, TQT_SLOT(receivedOut(TDEProcess*, char*, int)) );
connect( p, TQT_SIGNAL(processExited (TDEProcess *)), this, TQT_SLOT(procExited(TDEProcess*)));
TQString xauthenv = TQString(getenv("HOME")) + "/.Xauthority";
p->setEnvironment("XAUTHORITY", xauthenv);
@ -273,7 +273,7 @@ KdeSudo::KdeSudo(TQWidget *parent, const char *name,const TQString& icon, const
if (i == 0)
cmd += validArg(commandSplit[i]) + TQChar(' ');
else
cmd += KProcess::quote(validArg(commandSplit[i])) + TQChar(' ');
cmd += TDEProcess::quote(validArg(commandSplit[i])) + TQChar(' ');
}
}
@ -290,7 +290,7 @@ KdeSudo::KdeSudo(TQWidget *parent, const char *name,const TQString& icon, const
if (j == 0)
cmd += validArg(argsSplit[j]) + TQChar(' ');
else
cmd += KProcess::quote(validArg(argsSplit[j])) + TQChar(' ');
cmd += TDEProcess::quote(validArg(argsSplit[j])) + TQChar(' ');
}
}
else
@ -318,14 +318,14 @@ KdeSudo::KdeSudo(TQWidget *parent, const char *name,const TQString& icon, const
if (noExec)
exit(0);
else
p->start( KProcess::NotifyOnExit, KProcess::All );
p->start( TDEProcess::NotifyOnExit, TDEProcess::All );
}
KdeSudo::~KdeSudo()
{
}
void KdeSudo::receivedOut(KProcess*, char*buffer, int buflen)
void KdeSudo::receivedOut(TDEProcess*, char*buffer, int buflen)
{
char *pcTmp= new char[buflen+1];
strncpy(pcTmp,buffer,buflen);
@ -383,14 +383,14 @@ void KdeSudo::receivedOut(KProcess*, char*buffer, int buflen)
}
}
void KdeSudo::procExited(KProcess*)
void KdeSudo::procExited(TDEProcess*)
{
if (!keepPwd && unCleaned)
{
unCleaned = false;
p->clearArguments();
*p << "sudo" << "-k";
p->start( KProcess::NotifyOnExit, KProcess::All );
p->start( TDEProcess::NotifyOnExit, TDEProcess::All );
}
if (!newDcop && !iceauthorityFile.isEmpty())

@ -64,11 +64,11 @@ public slots: // Public slots
/*
* This slot gets exectuted if sudo creates some output
*/
void receivedOut(KProcess*proc, char*buffer, int buflen);
void receivedOut(TDEProcess*proc, char*buffer, int buflen);
/*
* This slot gets exectuted when sudo exits
*/
void procExited(KProcess *proc);
void procExited(TDEProcess *proc);
/*
* This slot overrides the slot from KPasswordDialog
* @see KPasswordDialog
@ -78,7 +78,7 @@ public slots: // Public slots
TQString validArg(TQString arg);
private: // Private attributes
KProcess * p;
TDEProcess * p;
bool bError;
bool newDcop;
bool keepPwd;

Loading…
Cancel
Save