Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: try to activate dialog service before init manager #219

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()
ComixHe marked this conversation as resolved.
Show resolved Hide resolved
|| !QStandardPaths::findExecutable("dde-desktop").isEmpty()) {
manager = new DFileDialogManager(dialogService, "/com/deepin/filemanager/filedialogmanager", QDBusConnection::sessionBus());
manager = new DFileDialogManager(dialogService, managerObjectPath, QDBusConnection::sessionBus());
}
}

Expand Down
Loading