Fix QString usage in createPixmapDataSync().
Warning introduced by 707bbe5dea
.
Change-Id: I20f0da00ea519cc2ec82a1d13f1887c099a3947c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
parent
fd4a811af8
commit
0de74e9191
|
@ -1022,10 +1022,10 @@ static QQuickPixmapData* createPixmapDataSync(QQuickPixmap *declarativePixmap, Q
|
|||
|
||||
// check for "retina" high-dpi and use @2x file if it exixts
|
||||
if (qApp->devicePixelRatio() > 1) {
|
||||
int dotIndex = localFile.lastIndexOf(QStringLiteral("."));
|
||||
const int dotIndex = localFile.lastIndexOf(QLatin1Char('.'));
|
||||
if (dotIndex != -1) {
|
||||
QString retinaFile = localFile;
|
||||
retinaFile.insert(dotIndex, "@2x");
|
||||
retinaFile.insert(dotIndex, QStringLiteral("@2x"));
|
||||
if (QFile(retinaFile).exists())
|
||||
localFile = retinaFile;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue