Obsolete Members for QDBusConnectionInterface
QDBusConnectionInterface 类的以下成员已被弃用。提供这些成员是为了确保旧源代码能够继续运行。我们强烈建议不要在新代码中使用它们。
信号
(deprecated) void | serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner) |
成员函数文档
[signal, deprecated] void QDBusConnectionInterface::serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner)
此函数已弃用。我们强烈建议不要在新代码中使用它。
请改用QDBusServiceWatcher 。
每当总线中发生服务所有权变更时(包括名称的出现和消失),D-Bus 服务器都会发出此信号。
该信号表示应用程序oldOwner 将总线名称name 的所有权移交给了应用程序newOwner 。如果oldOwner 为空字符串,则表示名称name 刚刚被创建;如果newOwner 为空,则表示名称name 当前没有所有者且不再可用。
注意:订阅 此信号将导致应用程序监听并接收总线上每一次服务所有权变更。根据正在运行的服务数量,这可能会导致应用程序被激活以接收超过其所需的信号。为避免此问题,请使用QDBusServiceWatcher 类,该类可监听特定的变更。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.