[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kfile
From: Albert Astals Cid <tsdgeos () terra ! es>
Date: 2010-09-04 20:22:28
Message-ID: 20100904202228.51C22AC884 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1171673 by aacid:
creating a KIconEffect is not specially cheap so use the global one we have at hand
M +4 -4 kfilepreviewgenerator.cpp
--- trunk/KDE/kdelibs/kfile/kfilepreviewgenerator.cpp #1171672:1171673
@@ -616,8 +616,8 @@
if (m_hasCutSelection && isCutItem(item)) {
// apply the disabled effect to the icon for marking it as "cut item"
// and apply the icon to the item
- KIconEffect iconEffect;
- icon = iconEffect.apply(icon, KIconLoader::Desktop, \
KIconLoader::DisabledState); + KIconEffect *iconEffect = \
KIconLoader::global()->iconEffect(); + icon = iconEffect->apply(icon, \
KIconLoader::Desktop, KIconLoader::DisabledState); }
// remember the preview and URL, so that it can be applied to the model
@@ -844,7 +844,7 @@
const QSet<KUrl> cutUrls = KUrl::List::fromMimeData(mimeData).toSet();
DataChangeObtainer obt(this);
- KIconEffect iconEffect;
+ KIconEffect *iconEffect = KIconLoader::global()->iconEffect();
foreach (const KFileItem& item, items) {
if (cutUrls.contains(item.url())) {
const QModelIndex index = m_dirModel->indexForItem(item);
@@ -856,7 +856,7 @@
const QHash<KUrl, QPixmap>::const_iterator cacheIt = \
m_cutItemsCache.constFind(item.url());
if ((cacheIt == m_cutItemsCache.constEnd()) || (cacheIt->cacheKey() \
!= pixmap.cacheKey())) {
- pixmap = iconEffect.apply(pixmap, KIconLoader::Desktop, \
KIconLoader::DisabledState); + pixmap = iconEffect->apply(pixmap, \
KIconLoader::Desktop, KIconLoader::DisabledState);
m_dirModel->setData(index, QIcon(pixmap), Qt::DecorationRole);
m_cutItemsCache.insert(item.url(), pixmap);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic