添加应用管理器接口
This commit is contained in:
parent
4ab17b5d0c
commit
3f8c573edb
|
@ -615,7 +615,7 @@ void TabletWindow::execApplication(QString desktopfp)
|
||||||
|
|
||||||
if (!g_subProjectCodeName.contains("mavis")
|
if (!g_subProjectCodeName.contains("mavis")
|
||||||
|| (g_subProjectCodeName.contains("mavis") && !QDBusReply<bool>(iface.call("LaunchApp", desktopfp)))) {
|
|| (g_subProjectCodeName.contains("mavis") && !QDBusReply<bool>(iface.call("LaunchApp", desktopfp)))) {
|
||||||
execApp(desktopfp);
|
// execApp(desktopfp);
|
||||||
QString str;
|
QString str;
|
||||||
//打开文件.desktop
|
//打开文件.desktop
|
||||||
GError **error = nullptr;
|
GError **error = nullptr;
|
||||||
|
|
|
@ -710,6 +710,15 @@ bool deleteAppRecord(QString desktopfn)
|
||||||
|
|
||||||
void execApp(QString desktopfp)
|
void execApp(QString desktopfp)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
QDBusInterface iface("com.kylin.AppManager",
|
||||||
|
"/com/kylin/AppManager",
|
||||||
|
"com.kylin.AppManager",
|
||||||
|
QDBusConnection::sessionBus());
|
||||||
|
QDBusReply<bool> res = iface.call("LaunchApp", desktopfp);
|
||||||
|
|
||||||
|
if (!res.isValid() || !res) {
|
||||||
|
|
||||||
UkuiMenuInterface interface;
|
UkuiMenuInterface interface;
|
||||||
|
|
||||||
if (interface.checkKreApp(desktopfp)) {
|
if (interface.checkKreApp(desktopfp)) {
|
||||||
|
@ -727,6 +736,7 @@ void execApp(QString desktopfp)
|
||||||
g_app_info_launch(G_APP_INFO(desktopAppInfo), nullptr, nullptr, nullptr);
|
g_app_info_launch(G_APP_INFO(desktopAppInfo), nullptr, nullptr, nullptr);
|
||||||
g_object_unref(desktopAppInfo);
|
g_object_unref(desktopAppInfo);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QFileInfo fileInfo(desktopfp);
|
QFileInfo fileInfo(desktopfp);
|
||||||
QString desktopfn = fileInfo.fileName();
|
QString desktopfn = fileInfo.fileName();
|
||||||
|
|
Loading…
Reference in New Issue