Skip to content

Commit

Permalink
sync: from linuxdeepin/qt5integration
Browse files Browse the repository at this point in the history
Synchronize source files from linuxdeepin/qt5integration.

Source-pull-request: linuxdeepin/qt5integration#219
  • Loading branch information
deepin-ci-robot authored and kegechen committed May 13, 2024
1 parent 9fd7cc7 commit fc4ac44
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion platformthemeplugin/qdeepinfiledialoghelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,18 @@ void QDeepinFileDialogHelper::initDBusFileDialogManager()
} else {
dialogService = DIALOG_SERVICE;
}

const auto *managerObjectPath = "/com/deepin/filemanager/filedialogmanager";
auto conn = QDBusConnection::sessionBus();
auto reply = conn.call(QDBusMessage::createMethodCall(dialogService, managerObjectPath , "org.freedesktop.DBus.Peer", "Ping"));

if(reply.type() != QDBusMessage::ReplyMessage) {
qCWarning(fileDialogHelper) << reply.errorMessage();
}

if (QDBusConnection::sessionBus().interface()->isServiceRegistered(dialogService).value()
|| !QStandardPaths::findExecutable("dde-desktop").isEmpty()) {
manager = new DFileDialogManager(dialogService, "/com/deepin/filemanager/filedialogmanager", QDBusConnection::sessionBus());
manager = new DFileDialogManager(dialogService, managerObjectPath, QDBusConnection::sessionBus());
}
}

Expand Down

0 comments on commit fc4ac44

Please sign in to comment.