mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 07:35:41 +08:00
Ref T171, callsign strings can be (alphabetically) sorted
This commit is contained in:
@@ -26,13 +26,14 @@ namespace BlackMisc
|
||||
CCollection<CCallsign>(other)
|
||||
{ }
|
||||
|
||||
QStringList CCallsignSet::getCallsignStrings() const
|
||||
QStringList CCallsignSet::getCallsignStrings(bool sorted) const
|
||||
{
|
||||
QStringList callsigns;
|
||||
for (const CCallsign &cs : *this)
|
||||
{
|
||||
callsigns.push_back(cs.asString());
|
||||
}
|
||||
if (sorted) { callsigns.sort(); }
|
||||
return callsigns;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace BlackMisc
|
||||
CCallsignSet(const CCollection<CCallsign> &other);
|
||||
|
||||
//! The callsign strings
|
||||
QStringList getCallsignStrings() const;
|
||||
QStringList getCallsignStrings(bool sorted = false) const;
|
||||
|
||||
//! Register metadata
|
||||
static void registerMetadata();
|
||||
|
||||
Reference in New Issue
Block a user