1
0
Fork 0
forked from len0rd/rockbox

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>
This commit is contained in:
Amaury Pouly 2014-10-22 17:56:13 +02:00
parent 04e798eddf
commit 88053b8832
3 changed files with 26 additions and 4 deletions

View file

@ -129,7 +129,7 @@ public:
uint field() const;
void setField(uint field);
void SetRegField(const soc_reg_field_t& field) { m_reg_field = field; }
void SetRegField(const soc_reg_field_t& field);
protected:
SocFieldValidator *m_validator;
@ -154,14 +154,16 @@ class SocFieldCachedValue
{
public:
SocFieldCachedValue():m_value(0) {}
SocFieldCachedValue(const soc_reg_field_t& field, uint value)
:m_field(field), m_value(value) {}
SocFieldCachedValue(const soc_reg_field_t& field, uint value);
virtual ~SocFieldCachedValue() {}
const soc_reg_field_t& field() const { return m_field; }
uint value() const { return m_value; }
/* return empty string if there no match */
QString value_name() const { return m_name; }
protected:
soc_reg_field_t m_field;
uint m_value;
QString m_name;
};
Q_DECLARE_METATYPE(SocFieldCachedValue)