Commit 877abc9e authored by Kurt Hindenburg's avatar Kurt Hindenburg

Change getenv to qgetenv for portable (ebn krazy)

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=846759
parent 26e66120
......@@ -144,9 +144,9 @@ FallbackProfile::FallbackProfile()
// magic path for the fallback profile which is not a valid
// non-directory file name
setProperty(Path,"FALLBACK/");
setProperty(Command,getenv("SHELL"));
setProperty(Command,qgetenv("SHELL"));
setProperty(Icon,"utilities-terminal");
setProperty(Arguments,QStringList() << getenv("SHELL"));
setProperty(Arguments,QStringList() << qgetenv("SHELL"));
setProperty(Environment,QStringList() << "TERM=xterm");
setProperty(LocalTabTitleFormat,"%d : %n");
setProperty(RemoteTabTitleFormat,"%H (%u)");
......
......@@ -287,7 +287,7 @@ QString Session::checkProgram(const QString& program) const
// if 'exec' is not specified, fall back to default shell. if that
// is not set then fall back to /bin/sh
if ( exec.isEmpty() )
exec = getenv("SHELL");
exec = qgetenv("SHELL");
if ( exec.isEmpty() )
exec = "/bin/sh";
......@@ -327,7 +327,7 @@ void Session::run()
kDebug() << "Session::run() - no command line arguments specified.";
const int CHOICE_COUNT = 3;
QString programs[CHOICE_COUNT] = {_program,getenv("SHELL"),"/bin/sh"};
QString programs[CHOICE_COUNT] = {_program,qgetenv("SHELL"),"/bin/sh"};
QString exec;
int choice = 0;
while (choice < CHOICE_COUNT)
......
......@@ -703,7 +703,7 @@ bool SessionController::confirmClose() const
// hard coded for now. In future make it possible for the user to specify which programs
// are ignored when considering whether to display a confirmation
QStringList ignoreList;
ignoreList << QString(getenv("SHELL")).section('/',-1);
ignoreList << QString(qgetenv("SHELL")).section('/',-1);
if (ignoreList.contains(title))
return true;
......
......@@ -158,7 +158,7 @@ static bool expandEnv( QString &text )
int len = pos2 - pos;
QString key = text.mid( pos+1, len-1);
QString value =
QString::fromLocal8Bit( ::getenv(key.toLocal8Bit()) );
QString::fromLocal8Bit( qgetenv(key.toLocal8Bit()) );
if ( !value.isEmpty() ) {
expanded = true;
......
......@@ -85,7 +85,7 @@ KWrited::KWrited() : QTextEdit()
pty = new KPty();
pty->open();
pty->login(KUser().loginName().toLocal8Bit().data(), getenv("DISPLAY"));
pty->login(KUser().loginName().toLocal8Bit().data(), qgetenv("DISPLAY"));
QSocketNotifier *sn = new QSocketNotifier(pty->masterFd(), QSocketNotifier::Read, this);
connect(sn, SIGNAL(activated(int)), this, SLOT(block_in(int)));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment