我正在尝试以这种方式连接到 D-Bus 信号:
bool result = QDBusConnection::systemBus().connect(
"foo.bar", // service
"/foo/bar", // path
"foo.bar", // interface
"SignalSomething",
this,
SLOT(SignalSomethingSlot()));
if( !result )
{
// Why!?
}
QDBusConnection::connect()
返回一个布尔值,我如何获得扩展的错误信息?如果检查QDBusConnection::lastError()
它不返回有用的信息(原样QDBusError::isValid()
)false
。