|
@@ -77,7 +77,7 @@ Settings::ServerList Settings::serverList()
|
|
Server sv;
|
|
Server sv;
|
|
sv.address = svaddr.at(0);
|
|
sv.address = svaddr.at(0);
|
|
sv.port = svaddr.at(1).toUShort();
|
|
sv.port = svaddr.at(1).toUShort();
|
|
- sv.supportsSendPrivate = ourSettings->value("supportsSendPrivate", false).toBool();
|
|
|
|
|
|
+ sv.supportsSendPrivate = svaddr.at(2).toInt();
|
|
list.append(sv);
|
|
list.append(sv);
|
|
}
|
|
}
|
|
ourSettings->endArray();
|
|
ourSettings->endArray();
|
|
@@ -92,8 +92,7 @@ void Settings::setServerList(ServerList &list)
|
|
for(int i = 0; i < list.size(); ++i)
|
|
for(int i = 0; i < list.size(); ++i)
|
|
{
|
|
{
|
|
ourSettings->setArrayIndex(i);
|
|
ourSettings->setArrayIndex(i);
|
|
- ourSettings->setValue("address", list.at(i).address + ":" + QString::number(list.at(i).port));
|
|
|
|
- ourSettings->setValue("supportsSendPrivate", list.at(i).supportsSendPrivate);
|
|
|
|
|
|
+ ourSettings->setValue("address", list.at(i).address + ":" + QString::number(list.at(i).port) + ":" + QString::number(QVariant(list.at(i).supportsSendPrivate).toInt()));
|
|
}
|
|
}
|
|
ourSettings->endArray();
|
|
ourSettings->endArray();
|
|
}
|
|
}
|
|
@@ -194,6 +193,12 @@ int Settings::refreshHostNamesHour() const
|
|
return ourSettings->value("refreshHostNamesHour", 21).toInt();
|
|
return ourSettings->value("refreshHostNamesHour", 21).toInt();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
+int Settings::maxServers() const
|
|
|
|
+{
|
|
|
|
+ return ourSettings->value("maxServers", 100).toInt();
|
|
|
|
+}
|
|
|
|
+
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
void Settings::save()
|
|
void Settings::save()
|
|
{
|
|
{
|
|
@@ -213,6 +218,7 @@ void Settings::save()
|
|
ourSettings->setValue("sshHostName", sshHostName());
|
|
ourSettings->setValue("sshHostName", sshHostName());
|
|
ourSettings->setValue("sshUserName", sshUserName());
|
|
ourSettings->setValue("sshUserName", sshUserName());
|
|
ourSettings->setValue("refreshHostNamesHour", refreshHostNamesHour());
|
|
ourSettings->setValue("refreshHostNamesHour", refreshHostNamesHour());
|
|
|
|
+ ourSettings->setValue("maxServers", maxServers());
|
|
|
|
|
|
ServerList list = serverList();
|
|
ServerList list = serverList();
|
|
setServerList(list);
|
|
setServerList(list);
|