|
@@ -75,9 +75,20 @@ Settings::ServerList Settings::serverList()
|
|
|
ourSettings->setArrayIndex(i);
|
|
|
QStringList svaddr = ourSettings->value("address").toString().split(":");
|
|
|
Server sv;
|
|
|
- sv.address = svaddr.at(0);
|
|
|
- sv.port = svaddr.at(1).toUShort();
|
|
|
- sv.supportsSendPrivate = svaddr.at(2).toInt();
|
|
|
+ if(svaddr.size() == 3)
|
|
|
+ {
|
|
|
+ sv.address = svaddr.at(0);
|
|
|
+ sv.port = svaddr.at(1).toUShort();
|
|
|
+ sv.supportsSendPrivate = svaddr.at(2).toInt();
|
|
|
+ }
|
|
|
+ else if(svaddr.size() == 2)
|
|
|
+ {
|
|
|
+ sv.address = svaddr.at(0);
|
|
|
+ sv.port = svaddr.at(1).toUShort();
|
|
|
+ sv.supportsSendPrivate = false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ continue;
|
|
|
list.append(sv);
|
|
|
}
|
|
|
ourSettings->endArray();
|