Register DBus type properly
This commit is contained in:
parent
fe9a4c6048
commit
309f0b6c93
@ -30,6 +30,7 @@ NetworkConnection::NetworkConnection(const QDBusObjectPath &objectPath, QObject
|
||||
QObject(parent),
|
||||
m_objectPath(objectPath)
|
||||
{
|
||||
qRegisterMetaType<ConnectionSettings>("ConnectionSettings");
|
||||
qDBusRegisterMetaType<ConnectionSettings>();
|
||||
|
||||
m_connectionInterface = new QDBusInterface(NetworkManagerUtils::networkManagerServiceString(), m_objectPath.path(), NetworkManagerUtils::connectionsInterfaceString(), QDBusConnection::systemBus(), this);
|
||||
|
||||
@ -60,6 +60,7 @@ private:
|
||||
ConnectionSettings m_connectionSettings;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(ConnectionSettings)
|
||||
QDebug operator<<(QDebug debug, NetworkConnection *networkConnection);
|
||||
|
||||
#endif // NETWORKCONNECTION_H
|
||||
|
||||
@ -174,6 +174,12 @@ void Core::evaluateNetworkManagerState(const NetworkManager::NetworkManagerState
|
||||
if (m_mode != ModeOffline)
|
||||
return;
|
||||
|
||||
// Note: if the wireless device is in the access point mode, the bluetooth server should stop
|
||||
if (m_wirelessDevice->mode() == WirelessNetworkDevice::ModeAccessPoint) {
|
||||
stopService();
|
||||
return;
|
||||
}
|
||||
|
||||
switch (state) {
|
||||
case NetworkManager::NetworkManagerStateConnectedGlobal:
|
||||
// We are online
|
||||
|
||||
Reference in New Issue
Block a user