QtSupport: Fix handling of tutorials

Amends ac17e0e2ad.

Change-Id: I9c0ffdb01ef446a76bfcbbdb8b5c560dd9f26e8d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Christian Stenger
2023-04-18 08:03:17 +02:00
parent 178c0abbd3
commit 610c0fee87

View File

@@ -211,9 +211,9 @@ static QList<ExampleItem *> parseTutorials(QXmlStreamReader *reader, const FileP
item->type = Tutorial;
QXmlStreamAttributes attributes = reader->attributes();
item->name = attributes.value(QLatin1String("name")).toString();
item->projectPath = projectsOffset
/ attributes.value(QLatin1String("projectPath")).toString();
item->hasSourceCode = !item->projectPath.isEmpty();
const QString projectPath = attributes.value(QLatin1String("projectPath")).toString();
item->projectPath = projectsOffset / projectPath;
item->hasSourceCode = !projectPath.isEmpty();
item->imageUrl = Utils::StyleHelper::dpiSpecificImageFile(
attributes.value(QLatin1String("imageUrl")).toString());
QPixmapCache::remove(item->imageUrl);