diff options
author | Juergen Bocklage-Ryannel <juergen.bocklage-ryannel@pelagicore.com> | 2017-01-13 20:13:59 +0100 |
---|---|---|
committer | Juergen Bocklage-Ryannel <juergen.bocklage-ryannel@pelagicore.com> | 2017-01-13 20:13:59 +0100 |
commit | 544e3a9837a995a37c26c1b2463703e4196db826 (patch) | |
tree | 9d1e19d0d71c49a2cf25a80c073aae44ca62b8c3 | |
parent | 2de59e8f2c653a6507d37fa1209bf957107b0eab (diff) | |
download | qtivi-qface-544e3a9837a995a37c26c1b2463703e4196db826.tar.gz |
used correct is_<type> function for helper
-rw-r--r-- | qface/helper/qtcpp.py | 10 | ||||
-rw-r--r-- | qface/idl/domain.py | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/qface/helper/qtcpp.py b/qface/helper/qtcpp.py index c72c3ee..ae288c3 100644 --- a/qface/helper/qtcpp.py +++ b/qface/helper/qtcpp.py @@ -14,15 +14,15 @@ class Filters(object): @staticmethod def defaultValue(symbol): - t = symbol.type + t = symbol.type # type: qface.domain.TypeSymbol if t.is_primitive: - if t.name == 'int': + if t.is_int: return '0' - if t.name == 'bool': + if t.is_bool: return 'false' - if t.name == 'string': + if t.is_string: return 'QString()' - if t.name == 'real': + if t.is_real: return '0.0' elif t.is_void: return '' diff --git a/qface/idl/domain.py b/qface/idl/domain.py index d1cd31f..3b944a9 100644 --- a/qface/idl/domain.py +++ b/qface/idl/domain.py @@ -78,6 +78,8 @@ class Symbol(object): """comment which appeared in QDL right before symbol""" self._tags = OrderedDict() + + @property def system(self): '''returns reference to system''' |