[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 4:40:42
Message-ID: 20050401044042.D9E43490 () office ! kde ! org
[Download RAW message or body]
CVS commit by hindenburg:
Try this again... expand ~ in Exec=~/script
Qt/KDE needs a function for this.
CCBUGS: 102941
M +13 -2 konsole.cpp 1.527
--- kdebase/konsole/konsole/konsole.cpp #1.526:1.527
@@ -3068,7 +3068,18 @@ void Konsole::addSessionCommand(const QS
}
- exec = exec.replace( "~", QDir::homeDirPath() );
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
+ }
+
QString pexec = KGlobal::dirs()->findExe(exec);
+
if (typ.isEmpty() || txt.isEmpty() || typ != "KonsoleApplication"
|| ( !exec.isEmpty() && pexec.isEmpty() ) )
@@ -3076,6 +3087,6 @@ void Konsole::addSessionCommand(const QS
if (!path.isEmpty())
delete co;
+ kdWarning()<<"Unable to use "<<path.latin1()<<endl;
return; // ignore
-
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic