diff options
author | Mahmoud Badri <mahmoud.badri@qt.io> | 2025-05-09 16:19:29 +0300 |
---|---|---|
committer | Mahmoud Badri <mahmoud.badri@qt.io> | 2025-05-09 15:36:59 +0000 |
commit | 3337c266e92968da02aa48a9c2f75dd9b180b50a (patch) | |
tree | 53d80fa5260968d0cdb8fbbc3c577f5f2534f533 | |
parent | f3cd0191b22dda36c2f0b471683ce81b687b629e (diff) |
QmlDesigner: Remove the watched dir after removing a bundle user dirqds/dev
Fixes: QDS-15322
Change-Id: If8fbb6d5d4396242c434c3683de763087ed5723c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r-- | src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp b/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp index 042d25cf709..1f1b85993e2 100644 --- a/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp +++ b/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp @@ -197,6 +197,8 @@ void ContentLibraryUserModel::addTextures(const Utils::FilePaths &paths, const U void ContentLibraryUserModel::reloadTextureCategory(const Utils::FilePath &dirPath) { int catIdx = bundlePathToIndex(dirPath); + QTC_ASSERT(catIdx > -1, return); + UserTextureCategory *texCat = qobject_cast<UserTextureCategory *>(m_userCategories.at(catIdx)); QTC_ASSERT(texCat, return); @@ -268,6 +270,8 @@ void ContentLibraryUserModel::removeBundleDir(int catIdx) auto texCat = qobject_cast<UserTextureCategory *>(m_userCategories.at(catIdx)); QTC_ASSERT(texCat, return); + m_fileWatcher->removeDirectory(texCat->bundlePath()); + QString dirPath = texCat->bundlePath().toFSPathString(); // remove from json |