Allow to save list of "other servers"

* load / save setting called
* fixed handling in server form

Follow up of refs #533, related to #545
This commit is contained in:
Klaus Basan
2015-12-08 06:47:59 +01:00
parent 8058a19288
commit 6ac1808d25
8 changed files with 96 additions and 32 deletions

View File

@@ -28,6 +28,20 @@ namespace BlackMisc
return false;
}
bool CServerList::removeByName(const QString &name)
{
if (name.isEmpty()) { return false; }
const CServerList copy(*this);
bool removed = false;
for (const CServer &server : copy)
{
if (!server.matchesName(name)) { continue; }
this->remove(server);
removed = true;
}
return removed;
}
bool CServerList::containsAddressPort(const CServer &server)
{
for (const CServer &s : *this)