fix(单例):使用QtSingleApplication处理单例

This commit is contained in:
jzxc95 2023-09-28 09:46:24 +08:00
parent dfd58e3f61
commit 0e88ecccf8
2 changed files with 15 additions and 1 deletions

10
debian/changelog vendored
View File

@ -1,3 +1,13 @@
kylin-nm (3.24.0.0-0k2.21) v101; urgency=medium
* BUG:
- #194718 【网络连接】麒麟网络设置工具可固定到任务栏
* 需求号:无
* 其他改动说明: 弹窗跳过任务栏
* 其他改动影响域:单例
-- zhaoshixu <zhaoshixu@kylinos.cn> Thu, 28 Sep 2023 09:41:09 +0800
kylin-nm (3.24.0.0-0k2.20) v101; urgency=medium kylin-nm (3.24.0.0-0k2.20) v101; urgency=medium
* BUG: * BUG:

View File

@ -135,7 +135,7 @@ int main(int argc, char *argv[])
interface.call(QStringLiteral("showKylinNM"), 1); interface.call(QStringLiteral("showKylinNM"), 1);
} else if (parser.isSet(snOption)){ } else if (parser.isSet(snOption)){
interface.call(QStringLiteral("showKylinNM"), 0); interface.call(QStringLiteral("showKylinNM"), 0);
} else { } /*else {
const QString serviceName = "com.kylin.network"; const QString serviceName = "com.kylin.network";
QDBusConnectionInterface *interface1 = QDBusConnection::sessionBus().interface(); QDBusConnectionInterface *interface1 = QDBusConnection::sessionBus().interface();
QDBusReply<uint> pid = interface1->servicePid(serviceName); QDBusReply<uint> pid = interface1->servicePid(serviceName);
@ -145,6 +145,10 @@ int main(int argc, char *argv[])
interface.call(QStringLiteral("showKylinNM"), 2); interface.call(QStringLiteral("showKylinNM"), 2);
} }
} }
return 0;*/
}
if (a.isRunning()) {
return 0; return 0;
} }