forked from qt-creator/qt-creator
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:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user