summaryrefslogtreecommitdiffstats
path: root/src/network/bearer/qnetworksession.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/bearer/qnetworksession.cpp')
-rw-r--r--src/network/bearer/qnetworksession.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp
index 8ebe1c2..dbea087 100644
--- a/src/network/bearer/qnetworksession.cpp
+++ b/src/network/bearer/qnetworksession.cpp
@@ -509,14 +509,14 @@ QVariant QNetworkSession::sessionProperty(const QString& key) const
if (!d->publicConfig.isValid())
return QVariant();
- if (key == "ActiveConfigurationIdentifier") {
+ if (key == QLatin1String("ActiveConfigurationIdentifier")) {
if (!d->isActive)
return QString();
else
return d->activeConfig.identifier();
}
- if (key == "UserChoiceConfigurationIdentifier") {
+ if (key == QLatin1String("UserChoiceConfigurationIdentifier")) {
if (!d->isActive || d->publicConfig.type() != QNetworkConfiguration::UserChoice)
return QString();
@@ -539,9 +539,10 @@ QVariant QNetworkSession::sessionProperty(const QString& key) const
*/
void QNetworkSession::setSessionProperty(const QString& key, const QVariant& value)
{
- if (key == "ActiveConfigurationIdentifier"
- || key == "UserChoiceConfigurationIdentifier")
+ if (key == QLatin1String("ActiveConfigurationIdentifier") ||
+ key == QLatin1String("UserChoiceConfigurationIdentifier")) {
return;
+ }
d->setSessionProperty(key, value);
}