Skip to content

Commit

Permalink
fix: call deepin-manual with dbus and application name
Browse files Browse the repository at this point in the history
Change-Id: If79fc8a25ba0ff3d425528b3270091f2ccd24ced
  • Loading branch information
Iceyer committed Mar 2, 2018
1 parent 9c38881 commit 3e4293d
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions src/widgets/dapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -669,23 +669,21 @@ void DApplication::handleHelpAction()
return;
}

#ifdef DTK_DMAN_PORTAL
// fallback to old interface
if (!qgetenv("FLATPAK_APPID").isEmpty()) {
appid = qgetenv("FLATPAK_APPID");
}
QDBusInterface legacydman("com.deepin.dman",
"/com/deepin/dman",
"com.deepin.dman");
if (legacydman.isValid()) {
legacydman.asyncCall("ShowManual", appid);
return;
}

qWarning() << "can not call dman dbus interface";
#else
QProcess::startDetached("dman", QStringList() << appid);
#endif
QDBusInterface legacydman("com.deepin.dman",
"/com/deepin/dman",
"com.deepin.dman");
if (legacydman.isValid()) {
legacydman.asyncCall("ShowManual", appid);
return;
}

qWarning() << "can not call dman dbus interface";
} else {
QProcess::startDetached("dman", QStringList() << appid);
}
#else
qWarning() << "not support dman now";
#endif
Expand Down

0 comments on commit 3e4293d

Please sign in to comment.