[Backport release-10.x] IconList: Make sure we always set new path (#4765)

This commit is contained in:
Alexandru Ionut Tripon 2026-01-14 13:52:30 +02:00 committed by GitHub
commit 70f274ca9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -147,8 +147,7 @@ void IconList::directoryChanged(const QString& path)
{
QDir newDir(path);
if (m_dir.absolutePath() != newDir.absolutePath()) {
if (!path.startsWith(m_dir.absolutePath()))
m_dir.setPath(path);
m_dir.setPath(path);
m_dir.refresh();
if (m_isWatching)
stopWatching();
@ -488,4 +487,4 @@ QString IconList::iconDirectory(const QString& key) const
}
}
return getDirectory();
}
}