From 28563c52bfc4e8a2ce7b05071c2191091b218cf3 Mon Sep 17 00:00:00 2001 From: Shrief Gabr Date: Thu, 22 May 2025 16:44:45 +0300 Subject: [PATCH] QmlDesigner: Fix undeletable custom folder in Content Lib Fixes: QDS-15323 Change-Id: Ia4131d0144458ad54077624f2bd3df43e409a16d Reviewed-by: Mahmoud Badri --- .../contentlibrary/contentlibraryusermodel.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp b/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp index 21770dafd73..4607a95e9f9 100644 --- a/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp +++ b/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp @@ -245,18 +245,6 @@ void ContentLibraryUserModel::removeTexture(ContentLibraryTexture *tex, bool ref emit dataChanged(index(catIdx), index(catIdx)); updateIsEmpty(); } - - const QString bundlePathStr = itemCat->bundlePath().toFSPathString(); - if (m_customCatsObj.contains(bundlePathStr)) { - m_customCatsObj.remove(bundlePathStr); - - m_customCatsRootObj["items"] = m_customCatsObj; - - auto userBundlePath = Utils::FilePath::fromString(Paths::bundlesPathSetting() + "/User"); - auto jsonFilePath = userBundlePath.pathAppended(Constants::CUSTOM_BUNDLES_JSON_FILENAME); - auto result = jsonFilePath.writeFileContents(QJsonDocument(m_customCatsRootObj).toJson()); - QTC_ASSERT_EXPECTED(result,); - } } void ContentLibraryUserModel::removeFromContentLib(QObject *item)