When using images in QRC and giving the 1x and 2x image files
respective aliases but without any file extension
(for example 'myimage' and 'myimage@2x'),
then Image would fail to find the 2x variant.
Task-number: QTBUG-44049
Change-Id: I20d0cb2eb48b909775b0ba737b850bc1b6697b35
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
{
const int dotIndex = path.lastIndexOf(QLatin1Char('.'));
if (dotIndex == -1)
- return path;
+ return path + QLatin1String("@2x");
if (path.contains(QLatin1String("@2x.")))
return path;