mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 10:52:56 +00:00
remove unused QBearerEngine members
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
304775706d
commit
ad51f0e024
3 changed files with 4 additions and 84 deletions
|
@ -49,25 +49,12 @@ QBearerEngine::~QBearerEngine()
|
|||
QHash<QString, QNetworkConfigurationPrivatePointer>::Iterator it;
|
||||
QHash<QString, QNetworkConfigurationPrivatePointer>::Iterator end;
|
||||
|
||||
for (it = snapConfigurations.begin(), end = snapConfigurations.end(); it != end; ++it) {
|
||||
it.value()->isValid = false;
|
||||
it.value()->id.clear();
|
||||
}
|
||||
snapConfigurations.clear();
|
||||
|
||||
for (it = accessPointConfigurations.begin(), end = accessPointConfigurations.end();
|
||||
it != end; ++it) {
|
||||
it.value()->isValid = false;
|
||||
it.value()->id.clear();
|
||||
}
|
||||
accessPointConfigurations.clear();
|
||||
|
||||
for (it = userChoiceConfigurations.begin(), end = userChoiceConfigurations.end();
|
||||
it != end; ++it) {
|
||||
it.value()->isValid = false;
|
||||
it.value()->id.clear();
|
||||
}
|
||||
userChoiceConfigurations.clear();
|
||||
}
|
||||
|
||||
bool QBearerEngine::requiresPolling() const
|
||||
|
@ -92,18 +79,6 @@ bool QBearerEngine::configurationsInUse() const
|
|||
return true;
|
||||
}
|
||||
|
||||
for (it = snapConfigurations.constBegin(),
|
||||
end = snapConfigurations.constEnd(); it != end; ++it) {
|
||||
if (it.value()->ref > 1)
|
||||
return true;
|
||||
}
|
||||
|
||||
for (it = userChoiceConfigurations.constBegin(),
|
||||
end = userChoiceConfigurations.constEnd(); it != end; ++it) {
|
||||
if (it.value()->ref > 1)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -95,8 +95,6 @@ protected:
|
|||
//it must be updated if configurations change, are added/removed or
|
||||
//the members of ServiceNetworks change
|
||||
QHash<QString, QNetworkConfigurationPrivatePointer> accessPointConfigurations;
|
||||
QHash<QString, QNetworkConfigurationPrivatePointer> snapConfigurations;
|
||||
QHash<QString, QNetworkConfigurationPrivatePointer> userChoiceConfigurations;
|
||||
|
||||
QMutex mutex;
|
||||
};
|
||||
|
|
|
@ -85,43 +85,10 @@ QNetworkConfiguration QNetworkConfigurationManagerPrivate::defaultConfiguration(
|
|||
}
|
||||
|
||||
// Engines don't have a default configuration.
|
||||
|
||||
// Return first active snap
|
||||
QNetworkConfigurationPrivatePointer defaultConfiguration;
|
||||
|
||||
foreach (QBearerEngine *engine, sessionEngines) {
|
||||
QHash<QString, QNetworkConfigurationPrivatePointer>::Iterator it;
|
||||
QHash<QString, QNetworkConfigurationPrivatePointer>::Iterator end;
|
||||
|
||||
QMutexLocker locker(&engine->mutex);
|
||||
|
||||
for (it = engine->snapConfigurations.begin(),
|
||||
end = engine->snapConfigurations.end(); it != end; ++it) {
|
||||
QNetworkConfigurationPrivatePointer ptr = it.value();
|
||||
|
||||
QMutexLocker configLocker(&ptr->mutex);
|
||||
|
||||
if ((ptr->state & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
|
||||
QNetworkConfiguration config;
|
||||
config.d = ptr;
|
||||
return config;
|
||||
} else if (!defaultConfiguration) {
|
||||
if ((ptr->state & QNetworkConfiguration::Discovered) == QNetworkConfiguration::Discovered)
|
||||
defaultConfiguration = ptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// No Active SNAPs return first Discovered SNAP.
|
||||
if (defaultConfiguration) {
|
||||
QNetworkConfiguration config;
|
||||
config.d = defaultConfiguration;
|
||||
return config;
|
||||
}
|
||||
|
||||
/*
|
||||
No Active or Discovered SNAPs, find the perferred access point.
|
||||
The following priority order is used:
|
||||
Find the perferred access point. The following priority order is used:
|
||||
|
||||
1. Active Ethernet
|
||||
2. Active WLAN
|
||||
|
@ -213,20 +180,6 @@ QList<QNetworkConfiguration> QNetworkConfigurationManagerPrivate::allConfigurati
|
|||
result << pt;
|
||||
}
|
||||
}
|
||||
|
||||
//find all service networks
|
||||
for (it = engine->snapConfigurations.begin(),
|
||||
end = engine->snapConfigurations.end(); it != end; ++it) {
|
||||
QNetworkConfigurationPrivatePointer ptr = it.value();
|
||||
|
||||
QMutexLocker configLocker(&ptr->mutex);
|
||||
|
||||
if ((ptr->state & filter) == filter) {
|
||||
QNetworkConfiguration pt;
|
||||
pt.d = ptr;
|
||||
result << pt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -241,16 +194,10 @@ QNetworkConfiguration QNetworkConfigurationManagerPrivate::configurationFromIden
|
|||
foreach (QBearerEngine *engine, sessionEngines) {
|
||||
QMutexLocker locker(&engine->mutex);
|
||||
|
||||
if (engine->accessPointConfigurations.contains(identifier))
|
||||
if (engine->accessPointConfigurations.contains(identifier)) {
|
||||
item.d = engine->accessPointConfigurations[identifier];
|
||||
else if (engine->snapConfigurations.contains(identifier))
|
||||
item.d = engine->snapConfigurations[identifier];
|
||||
else if (engine->userChoiceConfigurations.contains(identifier))
|
||||
item.d = engine->userChoiceConfigurations[identifier];
|
||||
else
|
||||
continue;
|
||||
|
||||
return item;
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
return item;
|
||||
|
|
Loading…
Add table
Reference in a new issue