mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-22 05:05:38 +08:00
Ref T472, allow to pass already existing values for model parsing
* list to map: toDbKeyValueMap * categories can also be passed, hence the categories can be seen in model views
This commit is contained in:
committed by
Mat Sutcliffe
parent
7a2ed1433d
commit
9cee34f4cc
@@ -119,6 +119,18 @@ namespace BlackMisc
|
||||
return keys;
|
||||
}
|
||||
|
||||
template <class OBJ, class CONTAINER, typename KEYTYPE>
|
||||
QMap<KEYTYPE, OBJ> IDatastoreObjectList<OBJ, CONTAINER, KEYTYPE>::toDbKeyValueMap() const
|
||||
{
|
||||
QMap<KEYTYPE, OBJ> map;
|
||||
for (const OBJ &obj : ITimestampObjectList<OBJ, CONTAINER>::container())
|
||||
{
|
||||
if (!obj.hasValidDbKey()) { continue; }
|
||||
map.insert(obj.getDbKey(), obj);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
template<class OBJ, class CONTAINER, typename KEYTYPE>
|
||||
QSet<QString> IDatastoreObjectList<OBJ, CONTAINER, KEYTYPE>::toDbKeyStringSet() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user