From de394389e92af8dc352dda70d227b030e427c271 Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Sun, 30 Oct 2022 01:55:45 +0800 Subject: [PATCH] fix: select item no longer work via filemanager1 dbus --- app/mainwindow.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp index e189ab9..fbbd632 100644 --- a/app/mainwindow.cpp +++ b/app/mainwindow.cpp @@ -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);