Diffstat (limited to 'noncore/settings/networksettings/wlan') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/wlan/keyedit.cpp | 4 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp2.cpp | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/noncore/settings/networksettings/wlan/keyedit.cpp b/noncore/settings/networksettings/wlan/keyedit.cpp index 13a1c3b..62f8960 100644 --- a/noncore/settings/networksettings/wlan/keyedit.cpp +++ b/noncore/settings/networksettings/wlan/keyedit.cpp | |||
@@ -2,21 +2,21 @@ | |||
2 | #include <qlineedit.h> | 2 | #include <qlineedit.h> |
3 | 3 | ||
4 | KeyEdit::KeyEdit(QWidget* parent, const char* name) : | 4 | KeyEdit::KeyEdit(QWidget* parent, const char* name) : |
5 | QLineEdit(parent, name) | 5 | QLineEdit(parent, name) |
6 | { | 6 | { |
7 | setEchoMode(Password); | 7 | setEchoMode(Password); |
8 | } | 8 | } |
9 | 9 | ||
10 | KeyEdit::~KeyEdit() | 10 | KeyEdit::~KeyEdit() |
11 | { | 11 | { |
12 | } | 12 | } |
13 | 13 | ||
14 | void KeyEdit::focusInEvent(QFocusEvent *event) | 14 | void KeyEdit::focusInEvent(QFocusEvent *) |
15 | { | 15 | { |
16 | setEchoMode(Normal); | 16 | setEchoMode(Normal); |
17 | } | 17 | } |
18 | 18 | ||
19 | void KeyEdit::focusOutEvent(QFocusEvent *event) | 19 | void KeyEdit::focusOutEvent(QFocusEvent *) |
20 | { | 20 | { |
21 | setEchoMode(Password); | 21 | setEchoMode(Password); |
22 | } | 22 | } |
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; |