summaryrefslogtreecommitdiff
path: root/utils/regtools/qeditor/utils.h
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2014-10-22 17:56:13 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2014-12-15 22:54:13 +0100
commit88053b88325318a2769086438ce4740c5bb7a7aa (patch)
treef5a3754e23eb32211fd1bc01911aeda811e0d162 /utils/regtools/qeditor/utils.h
parent04e798eddf43c81685324e83a655e62434f6fcce (diff)
downloadrockbox-88053b88325318a2769086438ce4740c5bb7a7aa.tar.gz
rockbox-88053b88325318a2769086438ce4740c5bb7a7aa.zip
regtools/qeditor: fix field editor not updating the validator on change
Change-Id: Ib8df47c8b7cfe0beb486e45542e3fcc9187bcc54 Reviewed-on: http://gerrit.rockbox.org/1020 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
Diffstat (limited to 'utils/regtools/qeditor/utils.h')
-rw-r--r--utils/regtools/qeditor/utils.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/utils/regtools/qeditor/utils.h b/utils/regtools/qeditor/utils.h
index 529e40bde1..13b9e896e9 100644
--- a/utils/regtools/qeditor/utils.h
+++ b/utils/regtools/qeditor/utils.h
@@ -129,7 +129,7 @@ public:
129 129
130 uint field() const; 130 uint field() const;
131 void setField(uint field); 131 void setField(uint field);
132 void SetRegField(const soc_reg_field_t& field) { m_reg_field = field; } 132 void SetRegField(const soc_reg_field_t& field);
133 133
134protected: 134protected:
135 SocFieldValidator *m_validator; 135 SocFieldValidator *m_validator;
@@ -154,14 +154,16 @@ class SocFieldCachedValue
154{ 154{
155public: 155public:
156 SocFieldCachedValue():m_value(0) {} 156 SocFieldCachedValue():m_value(0) {}
157 SocFieldCachedValue(const soc_reg_field_t& field, uint value) 157 SocFieldCachedValue(const soc_reg_field_t& field, uint value);
158 :m_field(field), m_value(value) {}
159 virtual ~SocFieldCachedValue() {} 158 virtual ~SocFieldCachedValue() {}
160 const soc_reg_field_t& field() const { return m_field; } 159 const soc_reg_field_t& field() const { return m_field; }
161 uint value() const { return m_value; } 160 uint value() const { return m_value; }
161 /* return empty string if there no match */
162 QString value_name() const { return m_name; }
162protected: 163protected:
163 soc_reg_field_t m_field; 164 soc_reg_field_t m_field;
164 uint m_value; 165 uint m_value;
166 QString m_name;
165}; 167};
166 168
167Q_DECLARE_METATYPE(SocFieldCachedValue) 169Q_DECLARE_METATYPE(SocFieldCachedValue)