mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user