Commit 686b009e authored by Jan Grulich's avatar Jan Grulich
Browse files

Get initial signal for modem connections

parent b1b0083e
......@@ -37,7 +37,12 @@
#include <KGlobal>
#include <KLocale>
#if WITH_MODEMMANAGER_SUPPORT
#ifdef MODEMMANAGERQT_ONE
#include <ModemManagerQt/manager.h>
#include <ModemManagerQt/modem.h>
#endif
#endif
#include "model.h"
#include "uiutils.h"
#include "applet/globalconfig.h"
......@@ -366,6 +371,20 @@ void ModelItem::setDevice(const QString& device)
m_device = dev->ipInterfaceName();
}
m_devicePath = dev->uni();
#if WITH_MODEMMANAGER_SUPPORT
#ifdef MODEMMANAGERQT_ONE
if (dev->type() == NetworkManager::Device::Modem) {
ModemManager::ModemDevice::Ptr modemDevice = ModemManager::findModemDevice(dev->udi());
if (modemDevice) {
ModemManager::Modem::Ptr modemInterface = modemDevice->interface(ModemManager::ModemDevice::ModemInterface).objectCast<ModemManager::Modem>();
if (modemInterface) {
updateSignalStrenght(modemInterface->signalQuality().signal);
}
}
}
#endif
#endif
updateDetails();
} else {
m_devicePath.clear();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment