sslUpdated();
#endif
+ // Reset network capability status in case no valid networks get selected (a rare situation)
+ resetNetworkCapStates();
+
foreach(NetworkId netid, Client::networkIds()) {
clientNetworkAdded(netid);
}
}
+void NetworksSettingsPage::resetNetworkCapStates()
+{
+ // Set the status to a blank (invalid) network ID, reseting all UI
+ setNetworkCapStates(NetworkId());
+}
+
+
void NetworksSettingsPage::setNetworkCapStates(NetworkId id)
{
const Network *net = Client::network(id);
- if (Client::isCoreFeatureEnabled(Quassel::Feature::CapNegotiation) && net) {
+ if (net && Client::isCoreFeatureEnabled(Quassel::Feature::CapNegotiation)) {
// Capability negotiation is supported, network exists.
// Check if the network is connected. Don't use net->isConnected() as that won't be true
// during capability negotiation when capabilities are added and removed.
void displayNetwork(NetworkId);
void setItemState(NetworkId, QListWidgetItem *item = 0);
+ /**
+ * Reset the capability-dependent settings to the default unknown states
+ *
+ * For example, this updates the SASL text to indicate the status is unknown. Any actual
+ * information should be set by setNetworkCapStates()
+ *
+ * @see NetworksSettingsPage::setNetworkCapStates()
+ */
+ void resetNetworkCapStates();
+
/**
* Update the capability-dependent settings according to what the server supports
*