|
|
|
@ -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())
|
|
|
|
|