Changeset View
Changeset View
Standalone View
Standalone View
libs/models/networkmodel.cpp
Show First 20 Lines • Show All 638 Lines • ▼ Show 20 Line(s) | 627 | for (NetworkModelItem *item : m_list.returnItems(NetworkItemsList::ActiveConnection, activePtr->path())) { | |||
---|---|---|---|---|---|
639 | updateItem(item); | 639 | updateItem(item); | ||
640 | qCDebug(PLASMA_NM) << "Item " << item->name() << ": active connection changed to " << item->connectionState(); | 640 | qCDebug(PLASMA_NM) << "Item " << item->name() << ": active connection changed to " << item->connectionState(); | ||
641 | } | 641 | } | ||
642 | } | 642 | } | ||
643 | 643 | | |||
644 | void NetworkModel::availableConnectionAppeared(const QString &connection) | 644 | void NetworkModel::availableConnectionAppeared(const QString &connection) | ||
645 | { | 645 | { | ||
646 | NetworkManager::Device::Ptr device = NetworkManager::findNetworkInterface(qobject_cast<NetworkManager::Device*>(sender())->uni()); | 646 | NetworkManager::Device::Ptr device = NetworkManager::findNetworkInterface(qobject_cast<NetworkManager::Device*>(sender())->uni()); | ||
647 | if (device) { | 647 | if (!device) | ||
648 | beginResetModel(); | 648 | return; | ||
649 | | ||||
649 | addAvailableConnection(connection, device); | 650 | addAvailableConnection(connection, device); | ||
650 | endResetModel(); | | |||
651 | } | | |||
652 | } | 651 | } | ||
653 | 652 | | |||
654 | void NetworkModel::availableConnectionDisappeared(const QString &connection) | 653 | void NetworkModel::availableConnectionDisappeared(const QString &connection) | ||
655 | { | 654 | { | ||
656 | for (NetworkModelItem *item : m_list.returnItems(NetworkItemsList::Connection, connection)) { | 655 | for (NetworkModelItem *item : m_list.returnItems(NetworkItemsList::Connection, connection)) { | ||
657 | bool available = false; | 656 | bool available = false; | ||
658 | const QString devicePath = item->devicePath(); | 657 | const QString devicePath = item->devicePath(); | ||
659 | const QString specificPath = item->specificPath(); | 658 | const QString specificPath = item->specificPath(); | ||
▲ Show 20 Lines • Show All 424 Lines • Show Last 20 Lines |