diff options
author | Daniel Teske <daniel.teske@digia.com> | 2014-02-12 16:19:27 +0100 |
---|---|---|
committer | Daniel Teske <daniel.teske@digia.com> | 2014-02-17 11:14:04 +0100 |
commit | 34d7ccfaa35901f3bdf071904b91046045e3451b (patch) | |
tree | 8c2feb6950945df0fb0af85e8c4da6fa376e0742 /src/plugins/resourceeditor | |
parent | 354559aa71df7525d7d8d941ceb72730a594c70d (diff) |
ResourceEditor: Keep compress and threshold attributes
These aren't editable but at least keep them the same.
Change-Id: I75a907c9523766de2ee671f150b1180ab60cfae9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/plugins/resourceeditor')
-rw-r--r-- | src/plugins/resourceeditor/qrceditor/resourcefile.cpp | 6 | ||||
-rw-r--r-- | src/plugins/resourceeditor/qrceditor/resourcefile_p.h | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/resourceeditor/qrceditor/resourcefile.cpp b/src/plugins/resourceeditor/qrceditor/resourcefile.cpp index 149cee1968b..7924543006f 100644 --- a/src/plugins/resourceeditor/qrceditor/resourcefile.cpp +++ b/src/plugins/resourceeditor/qrceditor/resourcefile.cpp @@ -166,6 +166,8 @@ bool ResourceFile::load() const QString fileName = absolutePath(felt.text()); const QString alias = felt.attribute(QLatin1String("alias")); File * const file = new File(p, fileName, alias); + file->compress = felt.attribute(QLatin1String("compress")); + file->threshold = felt.attribute(QLatin1String("threshold")); p->file_list.append(file); } } @@ -219,6 +221,10 @@ bool ResourceFile::save() felt.appendChild(text); if (!file.alias.isEmpty()) felt.setAttribute(QLatin1String("alias"), file.alias); + if (!file.compress.isEmpty()) + felt.setAttribute(QLatin1String("compress"), file.compress); + if (!file.threshold.isEmpty()) + felt.setAttribute(QLatin1String("threshold"), file.threshold); } } diff --git a/src/plugins/resourceeditor/qrceditor/resourcefile_p.h b/src/plugins/resourceeditor/qrceditor/resourcefile_p.h index 8a3ed578129..e90f35cb040 100644 --- a/src/plugins/resourceeditor/qrceditor/resourcefile_p.h +++ b/src/plugins/resourceeditor/qrceditor/resourcefile_p.h @@ -84,6 +84,10 @@ public: QString alias; QIcon icon; + // not used, only loaded and saved + QString compress; + QString threshold; + private: bool m_checked; bool m_exists; |