Diffstat (limited to 'noncore/settings/networksettings/wlan/wlanimp2.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp2.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/noncore/settings/networksettings/wlan/wlanimp2.cpp b/noncore/settings/networksettings/wlan/wlanimp2.cpp index d36a702..5cb78cf 100644 --- a/noncore/settings/networksettings/wlan/wlanimp2.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp2.cpp | |||
@@ -107,25 +107,24 @@ void WLANImp::parseOpts() { | |||
107 | if (! opt.isNull()) { | 107 | if (! opt.isNull()) { |
108 | specifyChan->setChecked(true); | 108 | specifyChan->setChecked(true); |
109 | networkChannel->setValue(opt.toInt()); | 109 | networkChannel->setValue(opt.toInt()); |
110 | } | 110 | } |
111 | 111 | ||
112 | opt = interfaces->getInterfaceOption("wireless_key", error).simplifyWhiteSpace(); | 112 | opt = interfaces->getInterfaceOption("wireless_key", error).simplifyWhiteSpace(); |
113 | if (opt.isNull()) | 113 | if (opt.isNull()) |
114 | opt = interfaces->getInterfaceOption("wireless_enc", error).simplifyWhiteSpace(); | 114 | opt = interfaces->getInterfaceOption("wireless_enc", error).simplifyWhiteSpace(); |
115 | parseKeyStr(opt); | 115 | parseKeyStr(opt); |
116 | } | 116 | } |
117 | 117 | ||
118 | void WLANImp::parseKeyStr(QString keystr) { | 118 | void WLANImp::parseKeyStr(QString keystr) { |
119 | int loc = 0; | ||
120 | int index = 1; | 119 | int index = 1; |
121 | QString key; | 120 | QString key; |
122 | QStringList keys = QStringList::split(QRegExp("\\s+"), keystr); | 121 | QStringList keys = QStringList::split(QRegExp("\\s+"), keystr); |
123 | int enc = -1; // encryption state | 122 | int enc = -1; // encryption state |
124 | 123 | ||
125 | for (QStringList::Iterator it = keys.begin(); it != keys.end(); ++it) { | 124 | for (QStringList::Iterator it = keys.begin(); it != keys.end(); ++it) { |
126 | if ((*it).left(3) == "off") { | 125 | if ((*it).left(3) == "off") { |
127 | // encryption disabled | 126 | // encryption disabled |
128 | enc = 0; | 127 | enc = 0; |
129 | } else if ((*it).left(2) == "on") { | 128 | } else if ((*it).left(2) == "on") { |
130 | // encryption enabled | 129 | // encryption enabled |
131 | enc = 1; | 130 | enc = 1; |