summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/settings.cpp
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2020-12-11 14:45:12 +0200
committerKatja Marttila <katja.marttila@qt.io>2020-12-21 09:15:33 +0200
commitb7df5571e0707f53716fa51d426d5ec31d36af43 (patch)
tree273923e5d6350ea82469d537adf663af6bfeebb8 /src/libs/installer/settings.cpp
parent2e29ed1ec128e5d31c8294c77c215f4649c44140 (diff)
Add high dpi image support for Logo and ProductImages
Task-number: QTIFW-2061 Task-number: QTIFW-2060 Change-Id: Idaabb6a08f5e52aa7808de4b3ad541ae47dc4dd8 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Diffstat (limited to 'src/libs/installer/settings.cpp')
-rw-r--r--src/libs/installer/settings.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/libs/installer/settings.cpp b/src/libs/installer/settings.cpp
index aeacf7a8e..8b921213b 100644
--- a/src/libs/installer/settings.cpp
+++ b/src/libs/installer/settings.cpp
@@ -32,6 +32,7 @@
#include "repository.h"
#include "repositorycategory.h"
#include "globals.h"
+#include "fileutils.h"
#include <QtCore/QFileInfo>
#include <QtCore/QStringList>
@@ -497,10 +498,12 @@ QStringList Settings::productImages() const
const QVariant variant = d->m_data.value(scProductImages);
QStringList imagePaths;
if (variant.canConvert<QStringList>()) {
- foreach (const QString &imagePath, variant.value<QStringList>()) {
- QFileInfo(imagePath).isAbsolute()
- ? imagePaths.append(imagePath)
- : imagePaths.append(d->m_data.value(scPrefix).toString() + QLatin1Char('/') + imagePath);
+ foreach (auto image, variant.value<QStringList>()) {
+ QString imagePath = QFileInfo(image).isAbsolute()
+ ? image
+ : d->m_data.value(scPrefix).toString() + QLatin1Char('/') + image;
+ QInstaller::replaceHighDpiImage(imagePath);
+ imagePaths.append(imagePath);
}
}
return imagePaths;