fix: App blocked by hasUserManual in live system

Maunal dbus service isn't registed in live system firstly, we
should wakeup it instead of blocking UI.
  It may be cause app of `longlong` hasn't Manual when click menu
to show Maunal firstly.

Bug: https://pms.uniontech.com/bug-view-197713/.html
Log: 解决在live系统中,帮助手册dbus调用导致应用阻塞
This commit is contained in:
YeShanShan 2023-05-05 13:31:51 +08:00 committed by yeshanshan
parent 6b366af60a
commit 3196e5d7a0
1 changed files with 2 additions and 1 deletions

View File

@ -1540,7 +1540,8 @@ bool DGuiApplicationHelper::hasUserManual() const
return hasManual;
QDBusConnection conn = QDBusConnection::sessionBus();
if (!conn.isConnected()) {
if (!conn.isConnected() ||
!conn.interface()->isServiceRegistered("com.deepin.Manual.Search")) {
static LoadManualServiceWorker *manualWorker = new LoadManualServiceWorker;
manualWorker->checkManualServiceWakeUp();