mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-06 17:53:23 +08:00
refs #325, testing new applyIf method
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
#include "blackmisc/avionavsystem.h"
|
||||
#include "blackmisc/aviotransponder.h"
|
||||
#include "blackmisc/avatcstationlist.h"
|
||||
#include "blackmisc/indexvariantmap.h"
|
||||
#include "blackmisc/propertyindexallclasses.h"
|
||||
#include "blackmisc/predicates.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
#include <QDebug>
|
||||
@@ -59,7 +59,7 @@ namespace BlackMiscTest
|
||||
qDebug() << atcList.toQString();
|
||||
|
||||
// put Jane in the tower
|
||||
CIndexVariantMap newController;
|
||||
CPropertyIndexVariantMap newController;
|
||||
newController.addValue(CAtcStation::IndexController, QVariant::fromValue(CUser("112233", "Jane Doe")));
|
||||
atcList.applyIf(
|
||||
BlackMisc::Predicates::MemberEqual(&CAtcStation::getCallsign, CCallsign("eddm_twr")),
|
||||
@@ -68,7 +68,7 @@ namespace BlackMiscTest
|
||||
qDebug() << atcList.toQString();
|
||||
|
||||
// now Jane's time is over
|
||||
CIndexVariantMap anotherController;
|
||||
CPropertyIndexVariantMap anotherController;
|
||||
anotherController.addValue(CAtcStation::IndexController, QVariant::fromValue(CUser("445566", "Fuzzy")));
|
||||
atcList.applyIf(newController, anotherController);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user