Changeset View
Changeset View
Standalone View
Standalone View
src/manager.cpp
Show First 20 Lines • Show All 174 Lines • ▼ Show 20 Line(s) | 157 | m_supportedInterfaceTypes = static_cast<NetworkManager::Device::Types>( | |||
---|---|---|---|---|---|
175 | ); | 175 | ); | ||
176 | 176 | | |||
177 | // Get all Manager's properties async | 177 | // Get all Manager's properties async | ||
178 | QVariantMap initialProperties = retrieveInitialProperties(iface.staticInterfaceName(), DBUS_DAEMON_PATH); | 178 | QVariantMap initialProperties = retrieveInitialProperties(iface.staticInterfaceName(), DBUS_DAEMON_PATH); | ||
179 | if (!initialProperties.isEmpty()) { | 179 | if (!initialProperties.isEmpty()) { | ||
180 | propertiesChanged(initialProperties); | 180 | propertiesChanged(initialProperties); | ||
181 | } | 181 | } | ||
182 | 182 | | |||
183 | QTimer::singleShot(0, [this] { qobject_cast<SettingsPrivate *>(settingsNotifier())->init(); }); | 183 | QTimer::singleShot(0, [] { qobject_cast<SettingsPrivate *>(settingsNotifier())->init(); }); | ||
184 | 184 | | |||
185 | if (iface.isValid()) { | 185 | if (iface.isValid()) { | ||
186 | QList <QDBusObjectPath> devices = iface.devices(); | 186 | QList <QDBusObjectPath> devices = iface.devices(); | ||
187 | qCDebug(NMQT) << "Device list"; | 187 | qCDebug(NMQT) << "Device list"; | ||
188 | Q_FOREACH (const QDBusObjectPath & op, devices) { | 188 | Q_FOREACH (const QDBusObjectPath & op, devices) { | ||
189 | networkInterfaceMap.insert(op.path(), Device::Ptr()); | 189 | networkInterfaceMap.insert(op.path(), Device::Ptr()); | ||
190 | Q_EMIT deviceAdded(op.path()); | 190 | Q_EMIT deviceAdded(op.path()); | ||
191 | qCDebug(NMQT) << " " << op.path(); | 191 | qCDebug(NMQT) << " " << op.path(); | ||
Show All 10 Lines | |||||
202 | { | 202 | { | ||
203 | return m_version; | 203 | return m_version; | ||
204 | } | 204 | } | ||
205 | 205 | | |||
206 | int NetworkManager::NetworkManagerPrivate::compareVersion(const QString &version) | 206 | int NetworkManager::NetworkManagerPrivate::compareVersion(const QString &version) | ||
207 | { | 207 | { | ||
208 | int x, y, z; | 208 | int x, y, z; | ||
209 | 209 | | |||
210 | QStringList sl = version.split('.'); | 210 | const auto sl = version.splitRef('.'); | ||
211 | 211 | | |||
212 | if (sl.size() > 2) { | 212 | if (sl.size() > 2) { | ||
213 | x = sl[0].toInt(); | 213 | x = sl[0].toInt(); | ||
214 | y = sl[1].toInt(); | 214 | y = sl[1].toInt(); | ||
215 | z = sl[2].toInt(); | 215 | z = sl[2].toInt(); | ||
216 | } else { | 216 | } else { | ||
217 | x = -1; | 217 | x = -1; | ||
218 | y = -1; | 218 | y = -1; | ||
▲ Show 20 Lines • Show All 899 Lines • Show Last 20 Lines |