[Konsole-devel] Fwd: KDE/kdebase/apps/konsole/src

Kurt Hindenburg kurt.hindenburg at gmail.com
Thu Aug 14 04:00:31 UTC 2008


FYI, meant to CC here... double-check pls

---------- Forwarded message ----------
From: Kurt Hindenburg <kurt.hindenburg at gmail.com>
Date: Wed, Aug 13, 2008 at 11:56 PM
Subject: KDE/kdebase/apps/konsole/src
To: kde-commits at kde.org


SVN commit 846759 by hindenburg:

Change getenv to qgetenv for portable (ebn krazy)

 M  +2 -2      Profile.cpp
 M  +2 -2      Session.cpp
 M  +1 -1      SessionController.cpp
 M  +1 -1      ShellCommand.cpp
 M  +1 -1      kwrited.cpp


--- trunk/KDE/kdebase/apps/konsole/src/Profile.cpp #846758:846759
@@ -144,9 +144,9 @@
    // 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)");
--- trunk/KDE/kdebase/apps/konsole/src/Session.cpp #846758:846759
@@ -287,7 +287,7 @@
  // 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 @@
      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)
--- trunk/KDE/kdebase/apps/konsole/src/SessionController.cpp #846758:846759
@@ -703,7 +703,7 @@
        // 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;

--- trunk/KDE/kdebase/apps/konsole/src/ShellCommand.cpp #846758:846759
@@ -158,7 +158,7 @@
                               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;
--- trunk/KDE/kdebase/apps/konsole/src/kwrited.cpp #846758:846759
@@ -85,7 +85,7 @@

  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)));
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20080814/7d74cd63/attachment.html>


More information about the konsole-devel mailing list