Open Folder and select file
Dominik Haumann
dhaumann at kde.org
Sat Mar 19 20:44:02 GMT 2016
On Sat, Mar 19, 2016 at 9:34 PM, Emmanuel Pescosta
<emmanuelpescosta099 at gmail.com> wrote:
> Hi,
>
> there is a dbus interface (see ShowItems method in [1]) which does exactly
> what you want,
> at least on platforms with dbus.
>
> But Kai is already working on a nice job API (see [2]) which can do this in
> a cross-platform way. :)
Ah, that is cool.
I think I will just say
QDesktopServices::openUrl(doc->url().adjusted(QUrl::RemoveFilename));
then for now.
As soon as Kai's job is ready, I would switch then.
Thanks for the quick reply!
Dominik
> Cheers,
> Emmanuel
>
> [1] https://www.freedesktop.org/wiki/Specifications/file-manager-interface/
> [2] https://git.reviewboard.kde.org/r/127004/
>
> 2016-03-19 21:16 GMT+01:00 Dominik Haumann <dhaumann at kde.org>:
>>
>> Hi,
>>
>> in Kate's tab bar I would like to implement a context menu action
>> "Open Containing Folder". In KDE, this should open dolphin and
>> preselect the specific file. On Windows, it should open the Explorer
>> and do the same.
>>
>> It seems Qt Creator has some code to do exactly this:
>> http://stackoverflow.com/questions/3490336
>>
>> Do we have that already in KDE somewhere?
>>
>> Please note, I don't want to *open* the file itself, instead, I want
>> to open the file browser, and highlight the respective file.
>>
>> Cheers,
>> Dominik
>
>
More information about the kde-core-devel
mailing list