forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
@@ -84,6 +84,7 @@ public:
|
||||
|
||||
// not used, only loaded and saved
|
||||
QString compress;
|
||||
QString compressAlgo;
|
||||
QString threshold;
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user