chore: add fallback in case filemanager1 dbus failed

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

View File

@ -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