QmlDesigner: Fix materials & textures not shown when internet is down

If internet is down, or, for some reason, the URLs are inaccessible,
then we should still show the existing materials and textures.

Task-number: QDS-9582
Change-Id: Ic9516c7bc00a37d1c3cd31643749f51a217bf317
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Samuel Ghinet
2023-03-28 20:46:31 +03:00
parent 0184e38708
commit a59cf942e0
3 changed files with 3 additions and 3 deletions

View File

@@ -114,7 +114,7 @@ bool ContentLibraryMaterialsModel::fetchBundleIcons(const QDir &bundleDir)
QString iconsPath = bundleDir.filePath("icons");
QDir iconsDir(iconsPath);
if (iconsDir.exists() && iconsDir.entryList(QDir::NoDotAndDotDot).length() > 0)
if (iconsDir.exists() && iconsDir.entryList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot).length() > 0)
return true;
QString zipFileUrl = m_baseUrl + "/icons.zip";