mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Ref T195, DBus server utility function
This commit is contained in:
@@ -130,6 +130,14 @@ namespace BlackMisc
|
||||
}
|
||||
}
|
||||
|
||||
bool CDBusServer::dBusAddressToHostAndPort(QString dbusAddress, QString &o_host, QString &o_port)
|
||||
{
|
||||
int port;
|
||||
const bool s = dBusAddressToHostAndPort(dbusAddress, o_host, port);
|
||||
o_port = QString::number(port);
|
||||
return s;
|
||||
}
|
||||
|
||||
bool CDBusServer::isQtDefaultConnection(const QDBusConnection &connection)
|
||||
{
|
||||
return connection.name() == QDBusConnection::sessionBus().name() ||
|
||||
|
||||
@@ -119,6 +119,9 @@ namespace BlackMisc
|
||||
//! Extract host and port from a DBus address
|
||||
static bool dBusAddressToHostAndPort(QString dbusAddress, QString &o_host, int &o_port);
|
||||
|
||||
//! Extract host and port from a DBus address
|
||||
static bool dBusAddressToHostAndPort(QString dbusAddress, QString &o_host, QString &o_port);
|
||||
|
||||
//! Is the given connection one of the default connections?
|
||||
static bool isQtDefaultConnection(const QDBusConnection &connection);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user