summaryrefslogtreecommitdiffstats
path: root/utils/regtools/qeditor/backend.cpp
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2014-09-27 21:23:38 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2014-12-15 22:52:54 +0100
commit99ed6d2bea6b8bc76b9775aea4735b68c19f175f (patch)
tree06bb113b620181cba1dba7009201981a0fcf2ad3 /utils/regtools/qeditor/backend.cpp
parentb08620dd304f54943c057405da49d44102ebcc77 (diff)
downloadrockbox-99ed6d2bea6b8bc76b9775aea4735b68c19f175f.tar.gz
rockbox-99ed6d2bea6b8bc76b9775aea4735b68c19f175f.tar.bz2
rockbox-99ed6d2bea6b8bc76b9775aea4735b68c19f175f.zip
qeditor: backends can now report validity status
Change-Id: Iefedc9cee10a8c7457d972e5a60d151a6cb38aa8 Reviewed-on: http://gerrit.rockbox.org/995 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
Diffstat (limited to 'utils/regtools/qeditor/backend.cpp')
-rw-r--r--utils/regtools/qeditor/backend.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/regtools/qeditor/backend.cpp b/utils/regtools/qeditor/backend.cpp
index 9c94ac5642..e47df8e3a4 100644
--- a/utils/regtools/qeditor/backend.cpp
+++ b/utils/regtools/qeditor/backend.cpp
@@ -114,6 +114,7 @@ FileIoBackend::FileIoBackend(const QString& filename, const QString& soc_name)
{
m_filename = filename;
m_soc = soc_name;
+ m_valid = false;
Reload();
}
@@ -132,6 +133,7 @@ bool FileIoBackend::ReadRegister(const QString& name, soc_word_t& value)
bool FileIoBackend::Reload()
{
+ m_valid = false;
QFile file(m_filename);
if(!file.open(QIODevice::ReadOnly | QIODevice::Text))
return false;
@@ -155,6 +157,7 @@ bool FileIoBackend::Reload()
m_readonly = !QFileInfo(file).isWritable();
m_dirty = false;
+ m_valid = true;
return true;
}