UpdateProcess::UpdateProcess(QObject *parent) : QProcess(parent) { _currentCommand = NoCommand; _socksPort = 0; connect(this, SIGNAL(readyReadStandardError()), this, SLOT(readStandardError())); connect(this, SIGNAL(readyReadStandardOutput()), this, SLOT(readStandardOutput())); connect(this, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(onFinished(int, QProcess::ExitStatus))); setEnvironment(systemEnvironment()); }
void KProcess::unsetEnv(const QString &name) { QStringList env = environment(); if (env.isEmpty()) { env = systemEnvironment(); env.removeAll(QString::fromLatin1(DUMMYENV)); } QString fname(name); fname.append(QLatin1Char('=')); for (QStringList::Iterator it = env.begin(); it != env.end(); ++it) if ((*it).startsWith(fname)) { env.erase(it); if (env.isEmpty()) env.append(QString::fromLatin1(DUMMYENV)); setEnvironment(env); return; } }