Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions net-view/operation/netmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ NetItem *NetManager::root() const

NetManager::ConnectionType NetManager::primaryConnectionType() const
{
return Unknown;
Q_D(const NetManager);
return d->m_primaryConnectionType;
}

/**
Expand Down Expand Up @@ -208,7 +209,7 @@ NetManagerPrivate::NetManagerPrivate(NetManager *manager)
, m_deleteItem(NetItemNew(Item, "trash"))
, m_isDeleting(false)
, m_airplaneMode(false)
// , m_primaryConnectionType(NetManager::ConnectionType::Wired)
, m_primaryConnectionType(NetManager::ConnectionType::Wired)
, m_monitorNetworkNotify(false)
, m_secretAgent(false)
, m_autoAddConnection(false)
Expand Down Expand Up @@ -1045,11 +1046,11 @@ void NetManagerPrivate::updateAirplaneMode(bool enabled)

void NetManagerPrivate::updatePrimaryConnectionType(NetManager::ConnectionType type)
{
// if (m_primaryConnectionType != type) {
// m_primaryConnectionType = type;
// Q_Q(NetManager);
// Q_EMIT q->primaryConnectionTypeChanged(m_primaryConnectionType);
// }
if (m_primaryConnectionType != type) {
m_primaryConnectionType = type;
Q_Q(NetManager);
Q_EMIT q->primaryConnectionTypeChanged(m_primaryConnectionType);
}
}

void NetManagerPrivate::updatePortalUrl(const QString &id, const QString &url)
Expand Down
2 changes: 1 addition & 1 deletion net-view/operation/private/netmanager_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected Q_SLOTS:
NetItemPrivate *m_deleteItem; // 关联无父对象item,用于删除
bool m_isDeleting;
bool m_airplaneMode;
// NetManager::ConnectionType m_primaryConnectionType;
NetManager::ConnectionType m_primaryConnectionType;
bool m_monitorNetworkNotify;
bool m_secretAgent;
bool m_autoAddConnection;
Expand Down
Loading