summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/installer/binaryformat.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libs/installer/binaryformat.cpp b/src/libs/installer/binaryformat.cpp
index 081555a59..df2366946 100644
--- a/src/libs/installer/binaryformat.cpp
+++ b/src/libs/installer/binaryformat.cpp
@@ -1146,8 +1146,10 @@ void BinaryContent::registerAsDefaultQResource(const QString &path)
QFile resource(path);
bool success = resource.open(QIODevice::ReadOnly);
if (success && (d->m_resourceMappings.count() > 0)) {
- success = QResource::unregisterResource((const uchar*)d->m_resourceMappings.takeFirst().constData(),
+ success = QResource::unregisterResource((const uchar*)d->m_resourceMappings.first().constData(),
QLatin1String(":/metadata"));
+ if (success)
+ d->m_resourceMappings.remove(0);
}
if (success) {