[dolphin] [Bug 436584] dolphin --select

bugzilla_noreply at kde.org bugzilla_noreply at kde.org
Tue May 4 16:39:04 BST 2021


https://bugs.kde.org/show_bug.cgi?id=436584

--- Comment #2 from the.betrayer64 at gmail.com ---
I was trying to do a DE agnostic (In reply to Nate Graham from comment #1)
> (In reply to the.betrayer64 from comment #0)
> > You might ask "why do you even need to launch Dolphin from console"? My
> > answer is that I'm trying to make a "Reveal in Finder" kind of feature in my
> > program, so I'm launching it from the following code:
> > 
> > QProcess proc;
> > proc.startDetached("dolphin", QStringList() << "--select" <<
> > info.canonicalFilePath());
> If you're using KDE Frameworks (specifically, KIO), you can include
> KIO/OpenFileManagerWindowJob and do:
> 
> KIO::highlightInFileManager({QUrl(info.canonicalFilePath())})
> 
> Does that suffice?

This works, thank you so much!
But it has a drawback - usually Dolphin, as a really nice app, remembers opened
folders in tabs. Once I call
"KIO::highlightInFileManager({QUrl(info.canonicalFilePath())})" on closed
dolphin - all opened tabs are forgotten. It doesn't bother me personally, but
it seems like something fishy.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the kfm-devel mailing list