From 51e49ab8a8add1a401ce3267856d010d1a73844f Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Sun, 30 Oct 2022 12:01:58 +0800 Subject: [PATCH] chore: add fallback in case filemanager1 dbus failed --- app/mainwindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp index fbbd632..c7caa17 100644 --- a/app/mainwindow.cpp +++ b/app/mainwindow.cpp @@ -756,6 +756,9 @@ void MainWindow::on_actionLocateInFileManager_triggered() QStringList{currentFileUrl.toString()}, QString::number(QDateTime::currentSecsSinceEpoch()) }); + if (fm1Iface.lastError().isValid()) { + QDesktopServices::openUrl(folderUrl); + } #else QDesktopServices::openUrl(folderUrl); #endif // Q_OS_WIN