Re: Passing arguments to application when using KRun::runApplication
- Date: Fri, 13 Oct 2017 18:51:20 -0600
- From: Nate Graham <pointedstick@xxxxxxxx>
- Subject: Re: Passing arguments to application when using KRun::runApplication
Don't thank me, thank Kai; he wrote it!
On 10/13/2017 05:52 PM, Rodrigo Pelorosso wrote:
That's amazing, thank you Nate!
On Fri, Oct 13, 2017 at 10:35 PM, Nate Graham <pointedstick@xxxxxxxx
You probably want KIO::highlightInFileManager(), which was made for
exactly this purpose.
On 10/13/2017 03:55 PM, Rodrigo Pelorosso wrote:
I have a KService that I've found using
KMimeTypeTrader::self()->preferredService and let's say I know
it's Dolphin. I'd like to run Dolphin telling it to open a
folder and select a file in particular. I know that from the
command line I could do
dolphin --select /home/silencer/lines.svg
So I thought passing --select /home/silencer/lines.svg as
parameter when executing Dolphin using KRun::runApplication
would work, like this:
KRun::runApplication(*fileBrowserApp, list, Q_NULLPTR);
but if I do that I receive the error:
Unknown option 'select /home/silencer/lines.svg'.
From the command line I can generate this error calling
dolphin --"select /home/silencer/lines.svg"
What would be the correct way of passing this kind of parameter
to the app using KRun::runApplication?
Thank you in advance, and please let me know if I can provide
any other information,
Nusive || Software Development and IT solutions