[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kde-workspace/KDE/4.10] plasma/generic/wallpapers/image: Plasma Wallpaper BackgroundListModel: Reme
From: Vishesh Handa <me () vhanda ! in>
Date: 2013-05-17 18:05:02
Message-ID: 20130517180502.D4799A605B () git ! kde ! org
[Download RAW message or body]
Git commit e57a7dd679521d384fceff734f8dc4eaf2e2e928 by Vishesh Handa.
Committed on 10/05/2013 at 19:10.
Pushed by vhanda into branch 'KDE/4.10'.
Plasma Wallpaper BackgroundListModel: Remember to clear the caches
Don't just clear m_packages, clear the m_sizeCache and m_previews as well
REVIEW: 110465
M +4 -0 plasma/generic/wallpapers/image/backgroundlistmodel.cpp
http://commits.kde.org/kde-workspace/e57a7dd679521d384fceff734f8dc4eaf2e2e928
diff --git a/plasma/generic/wallpapers/image/backgroundlistmodel.cpp \
b/plasma/generic/wallpapers/image/backgroundlistmodel.cpp index acbbb58..89c15e2 \
100644
--- a/plasma/generic/wallpapers/image/backgroundlistmodel.cpp
+++ b/plasma/generic/wallpapers/image/backgroundlistmodel.cpp
@@ -64,6 +64,8 @@ void BackgroundListModel::removeBackground(const QString &path)
beginRemoveRows(QModelIndex(), index.row(), index.row());
Plasma::Package *package = m_packages.at(index.row());
m_packages.removeAt(index.row());
+ m_sizeCache.remove(package);
+ m_previews.remove(package);
delete package;
endRemoveRows();
}
@@ -80,6 +82,8 @@ void BackgroundListModel::reload(const QStringList &selected)
beginRemoveRows(QModelIndex(), 0, m_packages.count() - 1);
qDeleteAll(m_packages);
m_packages.clear();
+ m_sizeCache.clear();
+ m_previews.clear();
endRemoveRows();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic