fix: select item no longer work via filemanager1 dbus

This commit is contained in:
Gary Wang 2022-10-30 01:55:45 +08:00
parent 5534753786
commit de394389e9
No known key found for this signature in database
GPG Key ID: 5D30A4F15EA78760

View File

@ -751,13 +751,10 @@ void MainWindow::on_actionLocateInFileManager_triggered()
QDBusInterface fm1Iface(QStringLiteral("org.freedesktop.FileManager1"),
QStringLiteral("/org/freedesktop/FileManager1"),
QStringLiteral("org.freedesktop.FileManager1"));
if (!fm1Iface.isValid()) {
QDesktopServices::openUrl(folderUrl);
return;
}
fm1Iface.setTimeout(500);
fm1Iface.callWithArgumentList(QDBus::Block, "ShowItems", {
QStringList{currentFileUrl.toString()},
QString()
QString::number(QDateTime::currentSecsSinceEpoch())
});
#else
QDesktopServices::openUrl(folderUrl);