mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 16:58:24 +02:00
[common] CoreModel: raise an error in getter if the parameter does not exist
This commit is contained in:
parent
d74affba35
commit
540fe3d47f
2 changed files with 13 additions and 2 deletions
|
@ -84,7 +84,12 @@ class QObjectListModel(QtCore.QAbstractListModel):
|
|||
|
||||
@QtCore.Slot(str, result=QtCore.QObject)
|
||||
def get(self, key):
|
||||
return self._objectByKey.get(key, None)
|
||||
"""
|
||||
Raises a KeyError if key is not in the map.
|
||||
:param key:
|
||||
:return:
|
||||
"""
|
||||
return self._objectByKey[key]
|
||||
|
||||
def add(self, obj):
|
||||
self.append(obj)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue