aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/resourceeditor/qrceditor/resourcefile.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2021-05-14 13:21:18 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2021-05-14 12:10:36 +0000
commit5139c04c210199836b35d305933e3953c327c5ed (patch)
tree138e33f7f0177cb3d33fc5b9609702a470d3fd63 /src/plugins/resourceeditor/qrceditor/resourcefile.cpp
parent0cef9a8554437a7ed7033198dffc5baa647d67e4 (diff)
ResourceEditor: Do not lose the compress-algo attribute
...when editing via the UI. Fixes: QTCREATORBUG-25706 Change-Id: I6ffef2d79188e42182dcb680a22f8b3b933a61e2 Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/resourceeditor/qrceditor/resourcefile.cpp')
-rw-r--r--src/plugins/resourceeditor/qrceditor/resourcefile.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/resourceeditor/qrceditor/resourcefile.cpp b/src/plugins/resourceeditor/qrceditor/resourcefile.cpp
index 98306e45ec..88b86ff9b4 100644
--- a/src/plugins/resourceeditor/qrceditor/resourcefile.cpp
+++ b/src/plugins/resourceeditor/qrceditor/resourcefile.cpp
@@ -190,6 +190,7 @@ Core::IDocument::OpenResult ResourceFile::load()
const QString alias = felt.attribute(QLatin1String("alias"));
File * const file = new File(p, fileName, alias);
file->compress = felt.attribute(QLatin1String("compress"));
+ file->compressAlgo = felt.attribute(QLatin1String("compress-algo"));
file->threshold = felt.attribute(QLatin1String("threshold"));
p->file_list.append(file);
}
@@ -226,6 +227,8 @@ QString ResourceFile::contents() const
felt.setAttribute(QLatin1String("alias"), file.alias);
if (!file.compress.isEmpty())
felt.setAttribute(QLatin1String("compress"), file.compress);
+ if (!file.compressAlgo.isEmpty())
+ felt.setAttribute(QLatin1String("compress-algo"), file.compressAlgo);
if (!file.threshold.isEmpty())
felt.setAttribute(QLatin1String("threshold"), file.threshold);
}