mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
Ref T280, QHash for aircraft and models and some minor improvements
* CValueObject::comparePropertyByIndex * bool "true" if value has been changed
This commit is contained in:
@@ -43,10 +43,19 @@ namespace BlackMisc
|
||||
//! Construct from initializer list.
|
||||
CAircraftSituationChangeList(std::initializer_list<CAircraftSituationChange> il);
|
||||
};
|
||||
|
||||
//! Change per callsign
|
||||
using CAircraftSituationChangePerCallsign = QHash<CCallsign, CAircraftSituationChange>;
|
||||
|
||||
//! Changes per callsign
|
||||
using CAircraftSituationChangeListPerCallsign = QHash<CCallsign, CAircraftSituationChangeList>;
|
||||
|
||||
} //namespace
|
||||
} // namespace
|
||||
|
||||
Q_DECLARE_METATYPE(BlackMisc::Aviation::CAircraftSituationChangeList)
|
||||
Q_DECLARE_METATYPE(BlackMisc::Aviation::CAircraftSituationChangePerCallsign)
|
||||
Q_DECLARE_METATYPE(BlackMisc::Aviation::CAircraftSituationChangeListPerCallsign)
|
||||
Q_DECLARE_METATYPE(BlackMisc::CCollection<BlackMisc::Aviation::CAircraftSituationChange>)
|
||||
Q_DECLARE_METATYPE(BlackMisc::CSequence<BlackMisc::Aviation::CAircraftSituationChange>)
|
||||
|
||||
|
||||
@@ -191,7 +191,8 @@ namespace BlackMisc
|
||||
case IndexCallsignStringAsSet: return m_callsignAsSet.compare(compareValue.m_callsignAsSet, Qt::CaseInsensitive);
|
||||
case IndexTelephonyDesignator: return m_telephonyDesignator.compare(compareValue.m_telephonyDesignator, Qt::CaseInsensitive);
|
||||
case IndexSuffix: return this->getSuffix().compare(compareValue.getSuffix(), Qt::CaseInsensitive);
|
||||
default: break;
|
||||
default:
|
||||
return CValueObject::comparePropertyByIndex(index, compareValue);
|
||||
}
|
||||
Q_ASSERT_X(false, Q_FUNC_INFO, "Compare failed");
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user