]> cloud.milkyroute.net Git - dolphin.git/commitdiff
* replace item.name().startsWith('.') by item.isHidden()
authorPeter Penz <peter.penz19@gmail.com>
Mon, 28 Jan 2008 17:01:41 +0000 (17:01 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Mon, 28 Jan 2008 17:01:41 +0000 (17:01 +0000)
* removed redundant applying of a hidden item effect before starting the preview

svn path=/trunk/KDE/kdebase/apps/; revision=767730

src/iconmanager.cpp

index a1ab96307d590aefe07de3a24b700aa211640ead..5f9bd51344f34f5602a77a137b32528444e2590f 100644 (file)
@@ -77,7 +77,7 @@ void IconManager::updateIcons(const KFileItemList& items)
 {
     // make the icons of all hidden files semitransparent
     foreach (KFileItem item, items) {
 {
     // make the icons of all hidden files semitransparent
     foreach (KFileItem item, items) {
-        if (item.name().startsWith('.')) {
+        if (item.isHidden()) {
             applyHiddenItemEffect(item);
         }
     }
             applyHiddenItemEffect(item);
         }
     }
@@ -93,10 +93,6 @@ void IconManager::updateIcons(const KFileItemList& items)
     // is generated first, as this improves the feeled performance a lot.
     KFileItemList orderedItems;
     foreach (KFileItem item, items) {
     // is generated first, as this improves the feeled performance a lot.
     KFileItemList orderedItems;
     foreach (KFileItem item, items) {
-        if (item.name().startsWith('.')) {
-            applyHiddenItemEffect(item);
-        }
-
         const QModelIndex dirIndex = m_dolphinModel->indexForItem(item);
         const QModelIndex proxyIndex = m_proxyModel->mapFromSource(dirIndex);
         const QRect itemRect = m_view->visualRect(proxyIndex);
         const QModelIndex dirIndex = m_dolphinModel->indexForItem(item);
         const QModelIndex proxyIndex = m_proxyModel->mapFromSource(dirIndex);
         const QRect itemRect = m_view->visualRect(proxyIndex);
@@ -131,7 +127,7 @@ void IconManager::replaceIcon(const KFileItem& item, const QPixmap& pixmap)
     const QModelIndex idx = m_dolphinModel->indexForItem(item);
     if (idx.isValid() && (idx.column() == 0)) {
         QPixmap newPixmap = pixmap;
     const QModelIndex idx = m_dolphinModel->indexForItem(item);
     if (idx.isValid() && (idx.column() == 0)) {
         QPixmap newPixmap = pixmap;
-        if (item.name().startsWith('.')) {
+        if (item.isHidden()) {
             KIconEffect::semiTransparent(newPixmap);
         }
 
             KIconEffect::semiTransparent(newPixmap);
         }