fix: App proxy invalid

AddProxyProc for launched app by launcher.

Issue: https://github.com/linuxdeepin/developer-center/issues/3791
This commit is contained in:
YeShanShan
2023-03-24 15:18:01 +08:00
committed by yeshanshan
parent dcb310c0e2
commit af8d6d18f9
2 changed files with 14 additions and 7 deletions

View File

@ -22,7 +22,7 @@ void StartManagerDBusHandler::markLaunched(QString desktopFile)
QString StartManagerDBusHandler::getProxyMsg()
{
QString ret;
QDBusInterface interface = QDBusInterface("org.deepin.dde.NetworkProxy1", "/org/deepin/dde/NetworkProxy1", "org.deepin.dde.NetworkProxy1.App", QDBusConnection::systemBus());
QDBusInterface interface = QDBusInterface("org.deepin.dde.NetworkProxy1", "/org/deepin/dde/NetworkProxy1/App", "org.deepin.dde.NetworkProxy1.App", QDBusConnection::systemBus());
QDBusReply<QString> reply = interface.call("GetProxy");
if (reply.isValid())
ret = reply.value();
@ -32,6 +32,6 @@ QString StartManagerDBusHandler::getProxyMsg()
void StartManagerDBusHandler::addProxyProc(int32_t pid)
{
QDBusInterface interface = QDBusInterface("org.deepin.dde.NetworkProxy1", "/org/deepin/dde/NetworkProxy1", "org.deepin.dde.NetworkProxy1.App", QDBusConnection::systemBus());
QDBusInterface interface = QDBusInterface("org.deepin.dde.NetworkProxy1", "/org/deepin/dde/NetworkProxy1/App", "org.deepin.dde.NetworkProxy1.App", QDBusConnection::systemBus());
interface.call("AddProc", pid);
}