[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/konsole/konsole
From:       Kurt Hindenburg <kurt.hindenburg () kdemail ! net>
Date:       2005-04-01 16:53:08
Message-ID: 20050401165308.1F67C490 () office ! kde ! org
[Download RAW message or body]

CVS commit by hindenburg: 

Use KShell::tildeExpand (thanks ossi).

CCBUGS: 102941


  M +2 -11     konsole.cpp   1.528


--- kdebase/konsole/konsole/konsole.cpp  #1.527:1.528
@@ -109,4 +109,5 @@ Time to start a requirement list.
 
 #include <kaction.h>
+#include <kshell.h>
 #include <qlabel.h>
 #include <kpopupmenu.h>
@@ -3069,15 +3070,5 @@ void Konsole::addSessionCommand(const QS
 
   exec = KRun::binaryName(exec, false);
-
-  if ( exec.startsWith( "~/" ) ) {        // ~/script
-    exec = exec.remove( 0, 1 );      // ~
-    exec = exec.prepend( QDir::homeDirPath() );
-  } else if ( exec.startsWith( "~" ) ) {  // ~user/script
-      // FIXME: What do when ~user != ~ ?
-      // We could check that user == current user... blah!
-    kdWarning()<<"Unable to handle Exec=~user/ (use ~/ or full path): "<<exec<<" in \
                "<<path.latin1()<<endl;
-    return;    // ignore
-  }
-
+  exec = KShell::tildeExpand(exec);
   QString pexec = KGlobal::dirs()->findExe(exec);
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic