Review Request 113830: Allow unique apps to access command-line arguments of later invocations

David Faure faure at kde.org
Fri Nov 22 10:32:45 UTC 2013


On Wednesday 13 November 2013 17:34:45 Alex Merry wrote:
> Of course, if we wanted to support Ryan's use cases (like text editor use by
> git), thing's get a little more complicated.
> 
> He basically suggests the route of standardising application arguments,
> AFAICS, but even without that, I think he's right about wanting to pass the
> current working directory, and possibly also the environment.

Yes please add the working directory, that one is very much needed.

Which reminds me that we don't have a replacement for KCmdLineArgs::url(i) 
instead, i.e. a method that resolves "an absolute filename, a relative 
filename (given a CWD), or a URL" into a QUrl, for convenience. Many (kio-
based) apps need that. It doesn't have to be part of QCommandLineParser 
though... maybe a QUrl::fromUserInput(string, cwd), but the need to call 
QFile::exists() in there sounds like a bad location for it... I'm open to 
suggestions :)

For apps that don't support URLs, something like QDir(cwd).filePath(str) is 
enough.


To come back to the "text editor should exit once done editing", that sounds 
like a use case for DBus transactions, on the "receiving" side. i.e. calling 
setExitValue() would be mandatory, and would terminate the dbus call, and it 
wouldn't have to be called synchronously.
OTOH I don't see this as a huge priority; one can just use kwrite instead of 
kate as the text editor, in practice :)

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5



More information about the Kde-frameworks-devel mailing list