]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Whitespace cleanups and documentation fixes
authorPeter Penz <peter.penz19@gmail.com>
Thu, 23 Feb 2012 16:26:51 +0000 (17:26 +0100)
committerPeter Penz <peter.penz19@gmail.com>
Thu, 23 Feb 2012 16:28:03 +0000 (17:28 +0100)
30 files changed:
src/dolphinmainwindow.cpp
src/dolphinpart.desktop
src/kitemviews/kfileitemlistwidget.cpp
src/kitemviews/kfileitemlistwidget.h
src/kitemviews/kfileitemmodel.cpp
src/kitemviews/kfileitemmodel.h
src/kitemviews/kfileitemmodelrolesupdater.cpp
src/kitemviews/kitemlistcontroller.cpp
src/kitemviews/kitemlistgroupheader.cpp
src/kitemviews/kitemlistview.cpp
src/kitemviews/kitemlistview.h
src/kitemviews/kitemlistviewanimation_p.h
src/kitemviews/kitemlistviewlayouter.cpp
src/kitemviews/kitemlistviewlayouter_p.h
src/kitemviews/kitemlistwidget.cpp
src/kitemviews/kitemlistwidget.h
src/kitemviews/kitemmodelbase.h
src/panels/folders/treeviewcontextmenu.cpp
src/settings/kcm/kcmdolphingeneral.desktop
src/settings/kcm/kcmdolphinnavigation.desktop
src/settings/kcm/kcmdolphinviewmodes.desktop
src/settings/viewmodes/viewsettingstab.cpp
src/tests/kfileitemmodeltest.cpp
src/tests/kitemlistselectionmanagertest.cpp
src/views/dolphinitemlistcontainer.cpp
src/views/dolphinitemlistcontainer.h
src/views/dolphinview.cpp
src/views/dolphinview.h
src/views/draganddrophelper.cpp
src/views/tooltips/tooltipmanager.cpp

index 074185f49764f25461c6f2bd0680ac9942eeb42f..4c551b2c39c83146bfa69a08ae3b2ab696ce8bde 100644 (file)
@@ -1120,7 +1120,7 @@ void DolphinMainWindow::editSettings()
     if (!m_settingsDialog) {
         DolphinViewContainer* container = activeViewContainer();
         container->view()->writeSettings();
     if (!m_settingsDialog) {
         DolphinViewContainer* container = activeViewContainer();
         container->view()->writeSettings();
-        
+
         const KUrl url = container->url();
         DolphinSettingsDialog* settingsDialog = new DolphinSettingsDialog(url, this);
         connect(settingsDialog, SIGNAL(settingsChanged()), this, SLOT(refreshViews()));
         const KUrl url = container->url();
         DolphinSettingsDialog* settingsDialog = new DolphinSettingsDialog(url, this);
         connect(settingsDialog, SIGNAL(settingsChanged()), this, SLOT(refreshViews()));
index 08fe3344a983d7342740bcdc00af46a5ae7b77f1..c36774db18c31262b80d0860e097c5ef949e7792 100644 (file)
@@ -277,7 +277,7 @@ Name[it]=Dettagli
 Name[ja]=詳細
 Name[ka]=დეტალები
 Name[kk]=Егжей-тегжейі
 Name[ja]=詳細
 Name[ka]=დეტალები
 Name[kk]=Егжей-тегжейі
-Name[km]=សេចក្ដី​លម្អិត 
+Name[km]=សេចក្ដី​លម្អិត
 Name[kn]=ವಿವರಗಳು
 Name[ko]=자세히
 Name[ku]=Kitekit
 Name[kn]=ವಿವರಗಳು
 Name[ko]=자세히
 Name[ku]=Kitekit
index 83fb914a105d84b093aa3b4e6d6e6516fc9e7441..c477a37ae5fe61186a1c711ad667b01f7c80bd5a 100644 (file)
@@ -548,7 +548,7 @@ void KFileItemListWidget::updatePixmapCache()
     }
 
     m_iconRect = QRectF(m_pixmapPos, QSizeF(m_scaledPixmapSize));
     }
 
     m_iconRect = QRectF(m_pixmapPos, QSizeF(m_scaledPixmapSize));
-    
+
     // Prepare the pixmap that is used when the item gets hovered
     if (isHovered()) {
         m_hoverPixmap = m_pixmap;
     // Prepare the pixmap that is used when the item gets hovered
     if (isHovered()) {
         m_hoverPixmap = m_pixmap;
index afb0f0171284ea734845a7eab3bc6bf4f6b86c28..2feeca810f30b64c6e9ef58304d9283300538ddf 100644 (file)
@@ -79,7 +79,7 @@ protected:
 
     void setOverlay(const QPixmap& overlay);
     QPixmap overlay() const;
 
     void setOverlay(const QPixmap& overlay);
     QPixmap overlay() const;
-    
+
     virtual void dataChanged(const QHash<QByteArray, QVariant>& current, const QSet<QByteArray>& roles = QSet<QByteArray>());
     virtual void visibleRolesChanged(const QList<QByteArray>& current, const QList<QByteArray>& previous);
     virtual void visibleRolesSizesChanged(const QHash<QByteArray, QSizeF>& current, const QHash<QByteArray, QSizeF>& previous);
     virtual void dataChanged(const QHash<QByteArray, QVariant>& current, const QSet<QByteArray>& roles = QSet<QByteArray>());
     virtual void visibleRolesChanged(const QList<QByteArray>& current, const QList<QByteArray>& previous);
     virtual void visibleRolesSizesChanged(const QHash<QByteArray, QSizeF>& current, const QHash<QByteArray, QSizeF>& previous);
@@ -116,7 +116,7 @@ private:
     void updateIconsLayoutTextCache();
     void updateCompactLayoutTextCache();
     void updateDetailsLayoutTextCache();
     void updateIconsLayoutTextCache();
     void updateCompactLayoutTextCache();
     void updateDetailsLayoutTextCache();
-    
+
     void updateAdditionalInfoTextColor();
 
     void drawPixmap(QPainter* painter, const QPixmap& pixmap);
     void updateAdditionalInfoTextColor();
 
     void drawPixmap(QPainter* painter, const QPixmap& pixmap);
index 9078cb85a0aebd6d5558fdc2949632e097fed237..23cd7cd75f0babf0fe2a8d14e974b4afeb10793a 100644 (file)
@@ -85,7 +85,7 @@ KFileItemModel::KFileItemModel(KDirLister* dirLister, QObject* parent) :
     m_maximumUpdateIntervalTimer->setInterval(2000);
     m_maximumUpdateIntervalTimer->setSingleShot(true);
     connect(m_maximumUpdateIntervalTimer, SIGNAL(timeout()), this, SLOT(dispatchPendingItemsToInsert()));
     m_maximumUpdateIntervalTimer->setInterval(2000);
     m_maximumUpdateIntervalTimer->setSingleShot(true);
     connect(m_maximumUpdateIntervalTimer, SIGNAL(timeout()), this, SLOT(dispatchPendingItemsToInsert()));
-    
+
     // When changing the value of an item which represents the sort-role a resorting must be
     // triggered. Especially in combination with KFileItemModelRolesUpdater this might be done
     // for a lot of items within a quite small timeslot. To prevent expensive resortings the
     // When changing the value of an item which represents the sort-role a resorting must be
     // triggered. Especially in combination with KFileItemModelRolesUpdater this might be done
     // for a lot of items within a quite small timeslot. To prevent expensive resortings the
@@ -96,7 +96,7 @@ KFileItemModel::KFileItemModel(KDirLister* dirLister, QObject* parent) :
     connect(m_resortAllItemsTimer, SIGNAL(timeout()), this, SLOT(resortAllItems()));
 
     Q_ASSERT(m_minimumUpdateIntervalTimer->interval() <= m_maximumUpdateIntervalTimer->interval());
     connect(m_resortAllItemsTimer, SIGNAL(timeout()), this, SLOT(resortAllItems()));
 
     Q_ASSERT(m_minimumUpdateIntervalTimer->interval() <= m_maximumUpdateIntervalTimer->interval());
-    
+
     connect(KGlobalSettings::self(), SIGNAL(naturalSortingChanged()), this, SLOT(slotNaturalSortingChanged()));
 }
 
     connect(KGlobalSettings::self(), SIGNAL(naturalSortingChanged()), this, SLOT(slotNaturalSortingChanged()));
 }
 
@@ -151,7 +151,7 @@ bool KFileItemModel::setData(int index, const QHash<QByteArray, QVariant>& value
     if (changedRoles.contains(sortRole())) {
         m_resortAllItemsTimer->start();
     }
     if (changedRoles.contains(sortRole())) {
         m_resortAllItemsTimer->start();
     }
-        
+
     return true;
 }
 
     return true;
 }
 
@@ -595,13 +595,13 @@ void KFileItemModel::onSortOrderChanged(Qt::SortOrder current, Qt::SortOrder pre
 {
     Q_UNUSED(current);
     Q_UNUSED(previous);
 {
     Q_UNUSED(current);
     Q_UNUSED(previous);
-    resortAllItems();    
+    resortAllItems();
 }
 
 void KFileItemModel::resortAllItems()
 {
     m_resortAllItemsTimer->stop();
 }
 
 void KFileItemModel::resortAllItems()
 {
     m_resortAllItemsTimer->stop();
-    
+
     const int itemCount = count();
     if (itemCount <= 0) {
         return;
     const int itemCount = count();
     if (itemCount <= 0) {
         return;
@@ -622,23 +622,23 @@ void KFileItemModel::resortAllItems()
     foreach (const ItemData* itemData, m_itemData) {
         oldUrls.append(itemData->item.url());
     }
     foreach (const ItemData* itemData, m_itemData) {
         oldUrls.append(itemData->item.url());
     }
-   
+
     m_groups.clear();
     m_items.clear();
     m_groups.clear();
     m_items.clear();
-    
+
     // Resort the items
     // Resort the items
-    sort(m_itemData.begin(), m_itemData.end());    
+    sort(m_itemData.begin(), m_itemData.end());
     for (int i = 0; i < itemCount; ++i) {
         m_items.insert(m_itemData.at(i)->item.url(), i);
     }
     for (int i = 0; i < itemCount; ++i) {
         m_items.insert(m_itemData.at(i)->item.url(), i);
     }
-    
+
     // Determine the indexes that have been moved
     QList<int> movedToIndexes;
     movedToIndexes.reserve(itemCount);
     for (int i = 0; i < itemCount; i++) {
         const int newIndex = m_items.value(oldUrls.at(i).url());
         movedToIndexes.append(newIndex);
     // Determine the indexes that have been moved
     QList<int> movedToIndexes;
     movedToIndexes.reserve(itemCount);
     for (int i = 0; i < itemCount; i++) {
         const int newIndex = m_items.value(oldUrls.at(i).url());
         movedToIndexes.append(newIndex);
-    }   
+    }
 
     // Don't check whether items have really been moved and always emit a
     // itemsMoved() signal after resorting: In case of grouped items
 
     // Don't check whether items have really been moved and always emit a
     // itemsMoved() signal after resorting: In case of grouped items
@@ -646,10 +646,10 @@ void KFileItemModel::resortAllItems()
     // position. Let the receiver of the signal decide whether a check for moved
     // items makes sense.
     emit itemsMoved(KItemRange(0, itemCount), movedToIndexes);
     // position. Let the receiver of the signal decide whether a check for moved
     // items makes sense.
     emit itemsMoved(KItemRange(0, itemCount), movedToIndexes);
-    
+
 #ifdef KFILEITEMMODEL_DEBUG
     kDebug() << "[TIME] Resorting of" << itemCount << "items:" << timer.elapsed();
 #ifdef KFILEITEMMODEL_DEBUG
     kDebug() << "[TIME] Resorting of" << itemCount << "items:" << timer.elapsed();
-#endif    
+#endif
 }
 
 void KFileItemModel::slotCompleted()
 }
 
 void KFileItemModel::slotCompleted()
@@ -941,7 +941,7 @@ void KFileItemModel::insertItems(const KFileItemList& items)
         // Insert item at the position targetIndex by transfering
         // the ownership of the item-data from sortedItems to m_itemData.
         // m_items will be inserted after the loop (see comment below)
         // Insert item at the position targetIndex by transfering
         // the ownership of the item-data from sortedItems to m_itemData.
         // m_items will be inserted after the loop (see comment below)
-        m_itemData.insert(targetIndex, sortedItems.at(sourceIndex));        
+        m_itemData.insert(targetIndex, sortedItems.at(sourceIndex));
         ++insertedCount;
 
         if (insertedAtIndex < 0) {
         ++insertedCount;
 
         if (insertedAtIndex < 0) {
@@ -999,7 +999,7 @@ void KFileItemModel::removeItems(const KFileItemList& items)
     int targetIndex = 0;
     foreach (const ItemData* itemData, sortedItems) {
         const KFileItem& itemToRemove = itemData->item;
     int targetIndex = 0;
     foreach (const ItemData* itemData, sortedItems) {
         const KFileItem& itemToRemove = itemData->item;
-        
+
         const int previousTargetIndex = targetIndex;
         while (targetIndex < m_itemData.count()) {
             if (m_itemData.at(targetIndex)->item.url() == itemToRemove.url()) {
         const int previousTargetIndex = targetIndex;
         while (targetIndex < m_itemData.count()) {
             if (m_itemData.at(targetIndex)->item.url() == itemToRemove.url()) {
@@ -1078,7 +1078,7 @@ QList<KFileItemModel::ItemData*> KFileItemModel::createItemDataList(const KFileI
 
         itemDataList.append(itemData);
     }
 
         itemDataList.append(itemData);
     }
+
     return itemDataList;
 }
 
     return itemDataList;
 }
 
@@ -1159,7 +1159,7 @@ QByteArray KFileItemModel::roleByteArray(Role role) const
 }
 
 QHash<QByteArray, QVariant> KFileItemModel::retrieveData(const KFileItem& item) const
 }
 
 QHash<QByteArray, QVariant> KFileItemModel::retrieveData(const KFileItem& item) const
-{    
+{
     // It is important to insert only roles that are fast to retrieve. E.g.
     // KFileItem::iconName() can be very expensive if the MIME-type is unknown
     // and hence will be retrieved asynchronously by KFileItemModelRolesUpdater.
     // It is important to insert only roles that are fast to retrieve. E.g.
     // KFileItem::iconName() can be very expensive if the MIME-type is unknown
     // and hence will be retrieved asynchronously by KFileItemModelRolesUpdater.
@@ -1307,7 +1307,7 @@ int KFileItemModel::sortRoleCompare(const ItemData* a, const ItemData* b) const
     case NameRole:
         // The name role is handled as default fallback after the switch
         break;
     case NameRole:
         // The name role is handled as default fallback after the switch
         break;
-        
+
     case SizeRole: {
         if (itemA.isDir()) {
             // See "if (m_sortFoldersFirst || m_sortRole == SizeRole)" in KFileItemModel::lessThan():
     case SizeRole: {
         if (itemA.isDir()) {
             // See "if (m_sortFoldersFirst || m_sortRole == SizeRole)" in KFileItemModel::lessThan():
@@ -1350,12 +1350,12 @@ int KFileItemModel::sortRoleCompare(const ItemData* a, const ItemData* b) const
         }
         break;
     }
         }
         break;
     }
-    
+
     case RatingRole: {
         result = a->values.value("rating").toInt() - b->values.value("rating").toInt();
         break;
     }
     case RatingRole: {
         result = a->values.value("rating").toInt() - b->values.value("rating").toInt();
         break;
     }
-    
+
     case PermissionsRole:
     case OwnerRole:
     case GroupRole:
     case PermissionsRole:
     case OwnerRole:
     case GroupRole:
@@ -1369,7 +1369,7 @@ int KFileItemModel::sortRoleCompare(const ItemData* a, const ItemData* b) const
                                   b->values.value(role).toString());
         break;
     }
                                   b->values.value(role).toString());
         break;
     }
-        
+
     default:
         break;
     }
     default:
         break;
     }
@@ -1400,16 +1400,16 @@ int KFileItemModel::sortRoleCompare(const ItemData* a, const ItemData* b) const
 
 void KFileItemModel::sort(QList<ItemData*>::iterator begin,
                           QList<ItemData*>::iterator end)
 
 void KFileItemModel::sort(QList<ItemData*>::iterator begin,
                           QList<ItemData*>::iterator end)
-{   
+{
     // The implementation is based on qStableSortHelper() from qalgorithms.h
     // Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
     // In opposite to qStableSort() it allows to use a member-function for the comparison of elements.
     // The implementation is based on qStableSortHelper() from qalgorithms.h
     // Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
     // In opposite to qStableSort() it allows to use a member-function for the comparison of elements.
-    
+
     const int span = end - begin;
     if (span < 2) {
         return;
     }
     const int span = end - begin;
     if (span < 2) {
         return;
     }
-    
+
     const QList<ItemData*>::iterator middle = begin + span / 2;
     sort(begin, middle);
     sort(middle, end);
     const QList<ItemData*>::iterator middle = begin + span / 2;
     sort(begin, middle);
     sort(middle, end);
@@ -1422,21 +1422,21 @@ void KFileItemModel::merge(QList<ItemData*>::iterator begin,
 {
     // The implementation is based on qMerge() from qalgorithms.h
     // Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 {
     // The implementation is based on qMerge() from qalgorithms.h
     // Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-    
+
     const int len1 = pivot - begin;
     const int len2 = end - pivot;
     const int len1 = pivot - begin;
     const int len2 = end - pivot;
-    
+
     if (len1 == 0 || len2 == 0) {
         return;
     }
     if (len1 == 0 || len2 == 0) {
         return;
     }
-    
+
     if (len1 + len2 == 2) {
         if (lessThan(*(begin + 1), *(begin))) {
             qSwap(*begin, *(begin + 1));
         }
         return;
     }
     if (len1 + len2 == 2) {
         if (lessThan(*(begin + 1), *(begin))) {
             qSwap(*begin, *(begin + 1));
         }
         return;
     }
-    
+
     QList<ItemData*>::iterator firstCut;
     QList<ItemData*>::iterator secondCut;
     int len2Half;
     QList<ItemData*>::iterator firstCut;
     QList<ItemData*>::iterator secondCut;
     int len2Half;
@@ -1450,11 +1450,11 @@ void KFileItemModel::merge(QList<ItemData*>::iterator begin,
         secondCut = pivot + len2Half;
         firstCut = upperBound(begin, pivot, *secondCut);
     }
         secondCut = pivot + len2Half;
         firstCut = upperBound(begin, pivot, *secondCut);
     }
-    
+
     reverse(firstCut, pivot);
     reverse(pivot, secondCut);
     reverse(firstCut, secondCut);
     reverse(firstCut, pivot);
     reverse(pivot, secondCut);
     reverse(firstCut, secondCut);
-    
+
     const QList<ItemData*>::iterator newPivot = firstCut + len2Half;
     merge(begin, firstCut, newPivot);
     merge(newPivot, secondCut, end);
     const QList<ItemData*>::iterator newPivot = firstCut + len2Half;
     merge(begin, firstCut, newPivot);
     merge(newPivot, secondCut, end);
@@ -1466,7 +1466,7 @@ QList<KFileItemModel::ItemData*>::iterator KFileItemModel::lowerBound(QList<Item
 {
     // The implementation is based on qLowerBound() from qalgorithms.h
     // Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 {
     // The implementation is based on qLowerBound() from qalgorithms.h
     // Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-    
+
     QList<ItemData*>::iterator middle;
     int n = int(end - begin);
     int half;
     QList<ItemData*>::iterator middle;
     int n = int(end - begin);
     int half;
@@ -1490,7 +1490,7 @@ QList<KFileItemModel::ItemData*>::iterator KFileItemModel::upperBound(QList<Item
 {
     // The implementation is based on qUpperBound() from qalgorithms.h
     // Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 {
     // The implementation is based on qUpperBound() from qalgorithms.h
     // Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-    
+
     QList<ItemData*>::iterator middle;
     int n = end - begin;
     int half;
     QList<ItemData*>::iterator middle;
     int n = end - begin;
     int half;
@@ -1513,11 +1513,11 @@ void KFileItemModel::reverse(QList<ItemData*>::iterator begin,
 {
     // The implementation is based on qReverse() from qalgorithms.h
     // Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 {
     // The implementation is based on qReverse() from qalgorithms.h
     // Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-    
+
     --end;
     while (begin < end) {
         qSwap(*begin++, *end--);
     --end;
     while (begin < end) {
         qSwap(*begin++, *end--);
-    }    
+    }
 }
 
 int KFileItemModel::stringCompare(const QString& a, const QString& b) const
 }
 
 int KFileItemModel::stringCompare(const QString& a, const QString& b) const
index 6cc53f12a11dd2f560af7632258af4f567124caf..bb77003c3a8fdc3a2ac4faaaaa69547ac95138ba 100644 (file)
@@ -179,7 +179,7 @@ private slots:
      * and foldersFirst() settings.
      */
     void resortAllItems();
      * and foldersFirst() settings.
      */
     void resortAllItems();
-    
+
     void slotCompleted();
     void slotCanceled();
     void slotNewItems(const KFileItemList& items);
     void slotCompleted();
     void slotCanceled();
     void slotNewItems(const KFileItemList& items);
@@ -219,10 +219,10 @@ private:
         QHash<QByteArray, QVariant> values;
         ItemData* parent;
     };
         QHash<QByteArray, QVariant> values;
         ItemData* parent;
     };
-    
+
     void insertItems(const KFileItemList& items);
     void removeItems(const KFileItemList& items);
     void insertItems(const KFileItemList& items);
     void removeItems(const KFileItemList& items);
-    
+
     /**
      * Helper method for insertItems() and removeItems(): Creates
      * a list of ItemData elements based on the given items.
     /**
      * Helper method for insertItems() and removeItems(): Creates
      * a list of ItemData elements based on the given items.
@@ -243,7 +243,7 @@ private:
      *         Runtime complexity is O(1).
      */
     Role roleIndex(const QByteArray& role) const;
      *         Runtime complexity is O(1).
      */
     Role roleIndex(const QByteArray& role) const;
-    
+
     /**
      * @return Role-byte-array for the given role-index.
      *         Runtime complexity is O(1).
     /**
      * @return Role-byte-array for the given role-index.
      *         Runtime complexity is O(1).
@@ -251,7 +251,7 @@ private:
     QByteArray roleByteArray(Role role) const;
 
     QHash<QByteArray, QVariant> retrieveData(const KFileItem& item) const;
     QByteArray roleByteArray(Role role) const;
 
     QHash<QByteArray, QVariant> retrieveData(const KFileItem& item) const;
-    
+
     /**
      * @return True if the item-data \a a should be ordered before the item-data
      *         \b. The item-data may have different parent-items.
     /**
      * @return True if the item-data \a a should be ordered before the item-data
      *         \b. The item-data may have different parent-items.
@@ -264,14 +264,14 @@ private:
      * have the same parent item, otherwise the comparison will be wrong.
      */
     int sortRoleCompare(const ItemData* a, const ItemData* b) const;
      * have the same parent item, otherwise the comparison will be wrong.
      */
     int sortRoleCompare(const ItemData* a, const ItemData* b) const;
-    
+
     /**
      * Sorts the items by using lessThan() as comparison criteria.
      * The merge sort algorithm is used to assure a worst-case
      * of O(n * log(n)) and to keep the number of comparisons low.
      */
     void sort(QList<ItemData*>::iterator begin, QList<ItemData*>::iterator end);
     /**
      * Sorts the items by using lessThan() as comparison criteria.
      * The merge sort algorithm is used to assure a worst-case
      * of O(n * log(n)) and to keep the number of comparisons low.
      */
     void sort(QList<ItemData*>::iterator begin, QList<ItemData*>::iterator end);
-    
+
     /** Helper method for sort(). */
     void merge(QList<ItemData*>::iterator begin,
                QList<ItemData*>::iterator pivot,
     /** Helper method for sort(). */
     void merge(QList<ItemData*>::iterator begin,
                QList<ItemData*>::iterator pivot,
@@ -281,14 +281,14 @@ private:
     QList<ItemData*>::iterator lowerBound(QList<ItemData*>::iterator begin,
                                           QList<ItemData*>::iterator end,
                                           const ItemData* value);
     QList<ItemData*>::iterator lowerBound(QList<ItemData*>::iterator begin,
                                           QList<ItemData*>::iterator end,
                                           const ItemData* value);
-    
+
     /** Helper method for sort(). */
     QList<ItemData*>::iterator upperBound(QList<ItemData*>::iterator begin,
                                           QList<ItemData*>::iterator end,
                                           const ItemData* value);
     /** Helper method for sort(). */
     void reverse(QList<ItemData*>::iterator begin, QList<ItemData*>::iterator end);
     /** Helper method for sort(). */
     QList<ItemData*>::iterator upperBound(QList<ItemData*>::iterator begin,
                                           QList<ItemData*>::iterator end,
                                           const ItemData* value);
     /** Helper method for sort(). */
     void reverse(QList<ItemData*>::iterator begin, QList<ItemData*>::iterator end);
-    
+
     int stringCompare(const QString& a, const QString& b) const;
 
     /**
     int stringCompare(const QString& a, const QString& b) const;
 
     /**
@@ -340,7 +340,7 @@ private:
     Role m_sortRole;
     QSet<QByteArray> m_roles;
     Qt::CaseSensitivity m_caseSensitivity;
     Role m_sortRole;
     QSet<QByteArray> m_roles;
     Qt::CaseSensitivity m_caseSensitivity;
-        
+
     QList<ItemData*> m_itemData;
     QHash<KUrl, int> m_items; // Allows O(1) access for KFileItemModel::index(const KFileItem& item)
 
     QList<ItemData*> m_itemData;
     QHash<KUrl, int> m_items; // Allows O(1) access for KFileItemModel::index(const KFileItem& item)
 
index 01f07f1db7ec5ac8c3f12bbe66013fc934e00ec8..06749f993f605ad7cc39a2a6bf6a60a95a95d245 100644 (file)
@@ -251,7 +251,7 @@ void KFileItemModelRolesUpdater::slotItemsRemoved(const KItemRangeList& itemRang
 {
     Q_UNUSED(itemRanges);
     m_firstVisibleIndex = 0;
 {
     Q_UNUSED(itemRanges);
     m_firstVisibleIndex = 0;
-    m_lastVisibleIndex = -1;    
+    m_lastVisibleIndex = -1;
     if (!hasPendingRoles()) {
         return;
     }
     if (!hasPendingRoles()) {
         return;
     }
index 69320247a8e0198c31061b2d5ea6c6c348bf98cb..239cf2e6c4b3c2d33bb46921e487e8b95d7155ac 100644 (file)
@@ -202,7 +202,7 @@ bool KItemListController::keyPressEvent(QKeyEvent* event)
         default:            break;
         }
     }
         default:            break;
         }
     }
-    
+
     const bool selectSingleItem = m_selectionBehavior != NoSelection &&
                                   itemCount == 1 &&
                                   (key == Qt::Key_Home || key == Qt::Key_End  ||
     const bool selectSingleItem = m_selectionBehavior != NoSelection &&
                                   itemCount == 1 &&
                                   (key == Qt::Key_Home || key == Qt::Key_End  ||
index e197acc6a48793d6418af51f824f91519a50a0a5..bc68cd562c2f8f2836bcb64f27ca66a756637075 100644 (file)
@@ -135,9 +135,9 @@ void KItemListGroupHeader::paint(QPainter* painter, const QStyleOptionGraphicsIt
         // No top- or left-line should be drawn for the first group-header
         return;
     }
         // No top- or left-line should be drawn for the first group-header
         return;
     }
-    
+
     painter->setPen(m_lineColor);
     painter->setPen(m_lineColor);
-    
+
     if (m_scrollOrientation == Qt::Horizontal) {
         painter->drawLine(0, 0, 0, size().height() - 1);
     } else {
     if (m_scrollOrientation == Qt::Horizontal) {
         painter->drawLine(0, 0, 0, size().height() - 1);
     } else {
@@ -209,7 +209,7 @@ void KItemListGroupHeader::updateCache()
 
     const QFontMetrics fontMetrics(m_styleOption.font);
     const qreal roleHeight = fontMetrics.height();
 
     const QFontMetrics fontMetrics(m_styleOption.font);
     const qreal roleHeight = fontMetrics.height();
-    
+
     const int y = (m_scrollOrientation == Qt::Vertical) ? padding : horizontalMargin;
 
     m_roleBounds = QRectF(horizontalMargin + padding,
     const int y = (m_scrollOrientation == Qt::Vertical) ? padding : horizontalMargin;
 
     m_roleBounds = QRectF(horizontalMargin + padding,
index 527436725c665ed75b54919f856487c4eeac9f0f..246c8badd33dde6bb6db10c6d1096589f3aeca2e 100644 (file)
@@ -360,7 +360,7 @@ void KItemListView::setStyleOption(const KItemListStyleOption& option)
     const KItemListStyleOption previousOption = m_styleOption;
     m_styleOption = option;
 
     const KItemListStyleOption previousOption = m_styleOption;
     m_styleOption = option;
 
-    bool animate = true;    
+    bool animate = true;
     const QSizeF margin(option.horizontalMargin, option.verticalMargin);
     if (margin != m_layouter->itemMargin()) {
         // Skip animations when the number of rows or columns
     const QSizeF margin(option.horizontalMargin, option.verticalMargin);
     if (margin != m_layouter->itemMargin()) {
         // Skip animations when the number of rows or columns
@@ -382,7 +382,7 @@ void KItemListView::setStyleOption(const KItemListStyleOption& option)
         it.value()->setStyleOption(option);
     }
 
         it.value()->setStyleOption(option);
     }
 
-    m_sizeHintResolver->clearCache();   
+    m_sizeHintResolver->clearCache();
     doLayout(animate ? Animation : NoAnimation);
 
     onStyleOptionChanged(option, previousOption);
     doLayout(animate ? Animation : NoAnimation);
 
     onStyleOptionChanged(option, previousOption);
@@ -408,10 +408,10 @@ void KItemListView::setGeometry(const QRectF& rect)
         // update of the visible-roles sizes, only the stretched sizes
         // need to be adjusted to the new size.
         updateStretchedVisibleRolesSizes();
         // update of the visible-roles sizes, only the stretched sizes
         // need to be adjusted to the new size.
         updateStretchedVisibleRolesSizes();
-        
+
         if (m_useHeaderWidths) {
             QSizeF dynamicItemSize = m_layouter->itemSize();
         if (m_useHeaderWidths) {
             QSizeF dynamicItemSize = m_layouter->itemSize();
-    
+
             if (m_itemSize.width() < 0) {
                 const qreal requiredWidth = visibleRolesSizesWidthSum();
                 if (newSize.width() > requiredWidth) {
             if (m_itemSize.width() < 0) {
                 const qreal requiredWidth = visibleRolesSizesWidthSum();
                 if (newSize.width() > requiredWidth) {
@@ -420,7 +420,7 @@ void KItemListView::setGeometry(const QRectF& rect)
                 const qreal headerWidth = qMax(newSize.width(), requiredWidth);
                 m_header->resize(headerWidth, m_header->size().height());
             }
                 const qreal headerWidth = qMax(newSize.width(), requiredWidth);
                 m_header->resize(headerWidth, m_header->size().height());
             }
-    
+
             if (m_itemSize.height() < 0) {
                 const qreal requiredHeight = visibleRolesSizesHeightSum();
                 if (newSize.height() > requiredHeight) {
             if (m_itemSize.height() < 0) {
                 const qreal requiredHeight = visibleRolesSizesHeightSum();
                 if (newSize.height() > requiredHeight) {
@@ -428,10 +428,10 @@ void KItemListView::setGeometry(const QRectF& rect)
                 }
                 // TODO: KItemListHeader is not prepared for vertical alignment
             }
                 }
                 // TODO: KItemListHeader is not prepared for vertical alignment
             }
-    
+
             m_layouter->setItemSize(dynamicItemSize);
         }
             m_layouter->setItemSize(dynamicItemSize);
         }
-        
+
         // Triggering a synchronous layout is fine from a performance point of view,
         // as with dynamic item sizes no moving animation must be done.
         m_layouter->setSize(newSize);
         // Triggering a synchronous layout is fine from a performance point of view,
         // as with dynamic item sizes no moving animation must be done.
         m_layouter->setSize(newSize);
@@ -439,9 +439,9 @@ void KItemListView::setGeometry(const QRectF& rect)
     } else {
         const bool animate = !changesItemGridLayout(newSize,
                                                     m_layouter->itemSize(),
     } else {
         const bool animate = !changesItemGridLayout(newSize,
                                                     m_layouter->itemSize(),
-                                                    m_layouter->itemMargin());        
+                                                    m_layouter->itemMargin());
         m_layouter->setSize(newSize);
         m_layouter->setSize(newSize);
-        
+
         if (animate) {
             // Trigger an asynchronous relayout with m_layoutTimer to prevent
             // performance bottlenecks. If the timer is exceeded, an animated layout
         if (animate) {
             // Trigger an asynchronous relayout with m_layoutTimer to prevent
             // performance bottlenecks. If the timer is exceeded, an animated layout
@@ -1352,7 +1352,7 @@ void KItemListView::setModel(KItemModelBase* model)
     }
 
     m_model = model;
     }
 
     m_model = model;
-    m_layouter->setModel(model);   
+    m_layouter->setModel(model);
     m_grouped = model->groupedSorting();
 
     if (m_model) {
     m_grouped = model->groupedSorting();
 
     if (m_model) {
@@ -1584,7 +1584,7 @@ QList<int> KItemListView::recycleInvisibleItems(int firstVisibleIndex,
             } else {
                 widget->setVisible(false);
                 items.append(index);
             } else {
                 widget->setVisible(false);
                 items.append(index);
-    
+
                 if (m_grouped) {
                     recycleGroupHeaderForWidget(widget);
                 }
                 if (m_grouped) {
                     recycleGroupHeaderForWidget(widget);
                 }
@@ -1600,7 +1600,7 @@ bool KItemListView::moveWidget(KItemListWidget* widget,const QPointF& newPos)
     if (widget->pos() == newPos) {
         return false;
     }
     if (widget->pos() == newPos) {
         return false;
     }
-    
+
     bool startMovingAnim = false;
 
     // When having a grid the moving-animation should only be started, if it is done within
     bool startMovingAnim = false;
 
     // When having a grid the moving-animation should only be started, if it is done within
@@ -2040,11 +2040,11 @@ QRectF KItemListView::headerBoundaries() const
 bool KItemListView::changesItemGridLayout(const QSizeF& newGridSize,
                                           const QSizeF& newItemSize,
                                           const QSizeF& newItemMargin) const
 bool KItemListView::changesItemGridLayout(const QSizeF& newGridSize,
                                           const QSizeF& newItemSize,
                                           const QSizeF& newItemMargin) const
-{  
+{
     if (newItemSize.isEmpty() || newGridSize.isEmpty()) {
         return false;
     }
     if (newItemSize.isEmpty() || newGridSize.isEmpty()) {
         return false;
     }
-    
+
     if (m_layouter->scrollOrientation() == Qt::Vertical) {
         const qreal itemWidth = m_layouter->itemSize().width();
         if (itemWidth > 0) {
     if (m_layouter->scrollOrientation() == Qt::Vertical) {
         const qreal itemWidth = m_layouter->itemSize().width();
         if (itemWidth > 0) {
@@ -2057,7 +2057,7 @@ bool KItemListView::changesItemGridLayout(const QSizeF& newGridSize,
                                                         m_layouter->itemMargin().width());
                 return oldColumnCount != newColumnCount;
             }
                                                         m_layouter->itemMargin().width());
                 return oldColumnCount != newColumnCount;
             }
-        }       
+        }
     } else {
         const qreal itemHeight = m_layouter->itemSize().height();
         if (itemHeight > 0) {
     } else {
         const qreal itemHeight = m_layouter->itemSize().height();
         if (itemHeight > 0) {
@@ -2070,9 +2070,9 @@ bool KItemListView::changesItemGridLayout(const QSizeF& newGridSize,
                                                      m_layouter->itemMargin().height());
                 return oldRowCount != newRowCount;
             }
                                                      m_layouter->itemMargin().height());
                 return oldRowCount != newRowCount;
             }
-        }               
+        }
     }
     }
-    
+
     return false;
 }
 
     return false;
 }
 
@@ -2081,7 +2081,7 @@ bool KItemListView::animateChangedItemCount(int changedItemCount) const
     if (m_layouter->size().isEmpty() || m_layouter->itemSize().isEmpty()) {
         return false;
     }
     if (m_layouter->size().isEmpty() || m_layouter->itemSize().isEmpty()) {
         return false;
     }
-    
+
     const int maximum = (scrollOrientation() == Qt::Vertical)
                         ? m_layouter->size().width()  / m_layouter->itemSize().width()
                         : m_layouter->size().height() / m_layouter->itemSize().height();
     const int maximum = (scrollOrientation() == Qt::Vertical)
                         ? m_layouter->size().width()  / m_layouter->itemSize().width()
                         : m_layouter->size().height() / m_layouter->itemSize().height();
@@ -2106,7 +2106,7 @@ void KItemListView::updateGroupHeaderHeight()
 {
     qreal groupHeaderHeight = m_styleOption.fontMetrics.height();
     qreal groupHeaderMargin = 0;
 {
     qreal groupHeaderHeight = m_styleOption.fontMetrics.height();
     qreal groupHeaderMargin = 0;
-    
+
     if (scrollOrientation() == Qt::Horizontal) {
         // The vertical margin above and below the header should be
         // equal to the horizontal margin, not the vertical margin
     if (scrollOrientation() == Qt::Horizontal) {
         // The vertical margin above and below the header should be
         // equal to the horizontal margin, not the vertical margin
index 17b7b8880bd77e448710ab05e5c4dd53957a18d8..57f86ef64d118ce94a7411923aefce73c2082fad 100644 (file)
@@ -72,18 +72,33 @@ public:
     KItemListView(QGraphicsWidget* parent = 0);
     virtual ~KItemListView();
 
     KItemListView(QGraphicsWidget* parent = 0);
     virtual ~KItemListView();
 
+    /**
+     * If the scroll-orientation is vertical, the items are ordered
+     * from top to bottom (= default setting). If the scroll-orientation
+     * is horizontal, the items are ordered from left to right.
+     */
     void setScrollOrientation(Qt::Orientation orientation);
     Qt::Orientation scrollOrientation() const;
 
     void setItemSize(const QSizeF& size);
     QSizeF itemSize() const;
 
     void setScrollOrientation(Qt::Orientation orientation);
     Qt::Orientation scrollOrientation() const;
 
     void setItemSize(const QSizeF& size);
     QSizeF itemSize() const;
 
-    // TODO: add note that offset is not checked against maximumOffset, only against 0.
+    /**
+     * Offset of the scrollbar that represents the scroll-orientation
+     * (see setScrollOrientation()).
+     */
     void setScrollOffset(qreal offset);
     qreal scrollOffset() const;
 
     qreal maximumScrollOffset() const;
 
     void setScrollOffset(qreal offset);
     qreal scrollOffset() const;
 
     qreal maximumScrollOffset() const;
 
+    /**
+     * Offset related to an item, that does not fit into the available
+     * size of the listview. If the scroll-orientation is vertical
+     * the item-offset describes the offset of the horizontal axe, if
+     * the scroll-orientation is horizontal the item-offset describes
+     * the offset of the vertical axe.
+     */
     void setItemOffset(qreal scrollOffset);
     qreal itemOffset() const;
 
     void setItemOffset(qreal scrollOffset);
     qreal itemOffset() const;
 
@@ -116,7 +131,7 @@ public:
 
     /**
      * @return Model of the item-list. The model gets
 
     /**
      * @return Model of the item-list. The model gets
-     *         initialized by KItemListController::setView() and will
+     *         initialized by KItemListController::setModel() and will
      *         result in calling KItemListController::onModelChanged().
      */
     KItemModelBase* model() const;
      *         result in calling KItemListController::onModelChanged().
      */
     KItemModelBase* model() const;
@@ -145,11 +160,27 @@ public:
     /** @reimp */
     virtual void setGeometry(const QRectF& rect);
 
     /** @reimp */
     virtual void setGeometry(const QRectF& rect);
 
+    /**
+     * @return Index of the item that is below the point \a pos.
+     *         The position is relative to the upper right of
+     *         the visible area. Only (at least partly) visible
+     *         items are considered. -1 is returned if no item is
+     *         below the position.
+     */
     int itemAt(const QPointF& pos) const;
     bool isAboveSelectionToggle(int index, const QPointF& pos) const;
     bool isAboveExpansionToggle(int index, const QPointF& pos) const;
 
     int itemAt(const QPointF& pos) const;
     bool isAboveSelectionToggle(int index, const QPointF& pos) const;
     bool isAboveExpansionToggle(int index, const QPointF& pos) const;
 
+    /**
+     * @return Index of the first item that is at least partly visible.
+     *         -1 is returned if the model contains no items.
+     */
     int firstVisibleIndex() const;
     int firstVisibleIndex() const;
+
+    /**
+     * @return Index of the last item that is at least partly visible.
+     *         -1 is returned if the model contains no items.
+     */
     int lastVisibleIndex() const;
 
     /**
     int lastVisibleIndex() const;
 
     /**
@@ -162,17 +193,20 @@ public:
 
     /**
      * @param itemRanges Items that must be checked for getting the visible roles sizes.
 
     /**
      * @param itemRanges Items that must be checked for getting the visible roles sizes.
-     * @return The size of each visible role in case if KItemListView::itemSize()
-     *         is empty. This allows to have dynamic but equal role sizes between
-     *         all items. Per default an empty hash is returned.
+     * @return           The size of each visible role in case if KItemListView::itemSize()
+     *                   is empty. This allows to have dynamic but equal role sizes between
+     *                   all items, like used in the classic "table-views". Per default an
+     *                   empty hash is returned.
      */
     virtual QHash<QByteArray, QSizeF> visibleRolesSizes(const KItemRangeList& itemRanges) const;
 
     /**
      */
     virtual QHash<QByteArray, QSizeF> visibleRolesSizes(const KItemRangeList& itemRanges) const;
 
     /**
-     * @return True if the view supports the expanding of items. Per default false
-     *         is returned. If expanding of items is supported, the methods
-     *         KItemModelBase::setExpanded(), KItemModelBase::isExpanded() and
-     *         KItemModelBase::isExpandable() must be reimplemented. The view-implementation
+     * @return True if the view supports the expanding of items. Per default
+     *         false is returned. If expanding of items is supported
+     *         (see setSupportsItemExpanding()),the methods
+     *         KItemModelBase::setExpanded(), KItemModelBase::isExpanded(),
+     *         KItemModelBase::isExpandable() and KItemModelBase::expandedParentsCount()
+     *         must be reimplemented. The view-implementation
      *         has to take care itself how to visually represent the expanded items provided
      *         by the model.
      */
      *         has to take care itself how to visually represent the expanded items provided
      *         by the model.
      */
@@ -220,7 +254,8 @@ public:
 
     /**
      * Turns on the header if \p show is true. Per default the
 
     /**
      * Turns on the header if \p show is true. Per default the
-     * header is not shown.
+     * header is not shown. Usually the header is turned on when
+     * showing a classic "table-view" to describe the shown columns.
      */
     void setHeaderShown(bool show);
     bool isHeaderShown() const;
      */
     void setHeaderShown(bool show);
     bool isHeaderShown() const;
@@ -506,7 +541,7 @@ private:
      *         if no header is shown.
      */
     QRectF headerBoundaries() const;
      *         if no header is shown.
      */
     QRectF headerBoundaries() const;
-    
+
     /**
      * @return True if the number of columns or rows will be changed when applying
      *         the new grid- and item-size. Used to determine whether an animation
     /**
      * @return True if the number of columns or rows will be changed when applying
      *         the new grid- and item-size. Used to determine whether an animation
@@ -515,7 +550,7 @@ private:
     bool changesItemGridLayout(const QSizeF& newGridSize,
                                const QSizeF& newItemSize,
                                const QSizeF& newItemMargin) const;
     bool changesItemGridLayout(const QSizeF& newGridSize,
                                const QSizeF& newItemSize,
                                const QSizeF& newItemMargin) const;
-    
+
     /**
      * @param changedItemCount Number of inserted  or removed items.
      * @return                 True if the inserting or removing of items should be animated.
     /**
      * @param changedItemCount Number of inserted  or removed items.
      * @return                 True if the inserting or removing of items should be animated.
@@ -564,7 +599,7 @@ private:
      *         value != 0 will be returned.
      */
     static int calculateAutoScrollingIncrement(int pos, int range, int oldInc);
      *         value != 0 will be returned.
      */
     static int calculateAutoScrollingIncrement(int pos, int range, int oldInc);
-    
+
     /**
      * Helper functions for changesItemCount().
      * @return The number of items that fit into the available size by
     /**
      * Helper functions for changesItemCount().
      * @return The number of items that fit into the available size by
index ecaa5ff8be38d68195d7e3f45291fca1b52f7e0b..a3aceb0f55cc57ccadcafa3c28d26f95363273a2 100644 (file)
@@ -31,6 +31,12 @@ class QGraphicsWidget;
 class QPointF;
 class QPropertyAnimation;
 
 class QPointF;
 class QPropertyAnimation;
 
+/**
+ * @brief Internal helper class for KItemListView to animate the items.
+ *
+ * Supports item animations for moving, creating, deleting and resizing
+ * an item. Several applications can be applied to one item in parallel.
+ */
 class LIBDOLPHINPRIVATE_EXPORT KItemListViewAnimation : public QObject
 {
     Q_OBJECT
 class LIBDOLPHINPRIVATE_EXPORT KItemListViewAnimation : public QObject
 {
     Q_OBJECT
@@ -52,12 +58,32 @@ public:
     void setScrollOffset(qreal scrollOffset);
     qreal scrollOffset() const;
 
     void setScrollOffset(qreal scrollOffset);
     qreal scrollOffset() const;
 
+    /**
+     * Starts the animation of the type \a type for the widget \a widget. If an animation
+     * of the type is already running, this animation will be stopped before starting
+     * the new animation.
+     */
     void start(QGraphicsWidget* widget, AnimationType type, const QVariant& endValue = QVariant());
 
     void start(QGraphicsWidget* widget, AnimationType type, const QVariant& endValue = QVariant());
 
+    /**
+     * Stops the animation of the type \a type for the widget \a widget.
+     */
     void stop(QGraphicsWidget* widget, AnimationType type);
     void stop(QGraphicsWidget* widget, AnimationType type);
+
+    /**
+     * Stops all animations that have been applied to the widget \a widget.
+     */
     void stop(QGraphicsWidget* widget);
 
     void stop(QGraphicsWidget* widget);
 
+    /**
+     * @return True if the animation of the type \a type has been started
+     *         for the widget \a widget..
+     */
     bool isStarted(QGraphicsWidget *widget, AnimationType type) const;
     bool isStarted(QGraphicsWidget *widget, AnimationType type) const;
+
+    /**
+     * @return True if any animation has been started for the widget.
+     */
     bool isStarted(QGraphicsWidget* widget) const;
 
 signals:
     bool isStarted(QGraphicsWidget* widget) const;
 
 signals:
index d8b5796eca8a9822bd39472f3e6a5f42c8cfa7b4..405837d23882f0e7fd5fd95fb81dbd80f035eba4 100644 (file)
@@ -265,7 +265,7 @@ QRectF KItemListViewLayouter::groupHeaderRect(int index) const
     } else {
         pos.rx() -= m_itemMargin.width();
         pos.ry() = 0;
     } else {
         pos.rx() -= m_itemMargin.width();
         pos.ry() = 0;
-        
+
         // Determine the maximum width used in the
         // current column. As the scroll-direction is
         // Qt::Horizontal and m_itemRects is accessed directly,
         // Determine the maximum width used in the
         // current column. As the scroll-direction is
         // Qt::Horizontal and m_itemRects is accessed directly,
@@ -278,14 +278,14 @@ QRectF KItemListViewLayouter::groupHeaderRect(int index) const
             if (bounds.y() != y) {
                 break;
             }
             if (bounds.y() != y) {
                 break;
             }
-            
+
             if (bounds.height() > width) {
                 width = bounds.height();
             }
             if (bounds.height() > width) {
                 width = bounds.height();
             }
-            
-            ++index;           
+
+            ++index;
         }
         }
-        
+
         size = QSizeF(width, m_size.height());
     }
     return QRectF(pos, size);
         size = QSizeF(width, m_size.height());
     }
     return QRectF(pos, size);
@@ -300,7 +300,7 @@ int KItemListViewLayouter::itemColumn(int index) const
 
     return (m_scrollOrientation == Qt::Vertical)
             ? m_itemInfos[index].column
 
     return (m_scrollOrientation == Qt::Vertical)
             ? m_itemInfos[index].column
-            : m_itemInfos[index].row; 
+            : m_itemInfos[index].row;
 }
 
 int KItemListViewLayouter::itemRow(int index) const
 }
 
 int KItemListViewLayouter::itemRow(int index) const
@@ -312,7 +312,7 @@ int KItemListViewLayouter::itemRow(int index) const
 
     return (m_scrollOrientation == Qt::Vertical)
             ? m_itemInfos[index].row
 
     return (m_scrollOrientation == Qt::Vertical)
             ? m_itemInfos[index].row
-            : m_itemInfos[index].column; 
+            : m_itemInfos[index].column;
 }
 
 int KItemListViewLayouter::maximumVisibleItems() const
 }
 
 int KItemListViewLayouter::maximumVisibleItems() const
@@ -360,7 +360,7 @@ void KItemListViewLayouter::doLayout()
         QSizeF itemSize = m_itemSize;
         QSizeF itemMargin = m_itemMargin;
         QSizeF size = m_size;
         QSizeF itemSize = m_itemSize;
         QSizeF itemMargin = m_itemMargin;
         QSizeF size = m_size;
-        
+
         const bool grouped = createGroupHeaders();
 
         const bool horizontalScrolling = (m_scrollOrientation == Qt::Horizontal);
         const bool grouped = createGroupHeaders();
 
         const bool horizontalScrolling = (m_scrollOrientation == Qt::Horizontal);
@@ -373,7 +373,7 @@ void KItemListViewLayouter::doLayout()
             itemMargin.setHeight(m_itemMargin.width());
             size.setWidth(m_size.height());
             size.setHeight(m_size.width());
             itemMargin.setHeight(m_itemMargin.width());
             size.setWidth(m_size.height());
             size.setHeight(m_size.width());
-            
+
             if (grouped) {
                 // In the horizontal scrolling case all groups are aligned
                 // at the top, which decreases the available height. For the
             if (grouped) {
                 // In the horizontal scrolling case all groups are aligned
                 // at the top, which decreases the available height. For the
@@ -501,7 +501,7 @@ void KItemListViewLayouter::doLayout()
             m_itemInfos.erase(m_itemInfos.begin() + itemCount,
                               m_itemInfos.end());
         }
             m_itemInfos.erase(m_itemInfos.begin() + itemCount,
                               m_itemInfos.end());
         }
-        
+
         if (itemCount > 0) {
             // Calculate the maximum y-range of the last row for m_maximumScrollOffset
             m_maximumScrollOffset = m_itemInfos.last().rect.bottom();
         if (itemCount > 0) {
             // Calculate the maximum y-range of the last row for m_maximumScrollOffset
             m_maximumScrollOffset = m_itemInfos.last().rect.bottom();
index 0d7c0d0408c711ece0b78674310cbb0cda86872d..da5bd1d7d9205ea20bb6112bf3e8ccb01919dae2 100644 (file)
 class KItemModelBase;
 class KItemListSizeHintResolver;
 
 class KItemModelBase;
 class KItemListSizeHintResolver;
 
+/**
+ * @brief Internal helper class for KItemListView to layout the items.
+ *
+ * The layouter is capable to align the items within a grid. If the
+ * scroll-direction is horizontal the column-width of the grid can be
+ * variable. If the scroll-direction is vertical the row-height of
+ * the grid can be variable.
+ *
+ * The layouter is implemented in a way that it postpones the expensive
+ * layout operation until a property is read the first time after
+ * marking the layouter as dirty (see markAsDirty()). This means that
+ * changing properties of the layouter is not expensive, only the
+ * first read of a property can get expensive.
+ */
 class LIBDOLPHINPRIVATE_EXPORT KItemListViewLayouter : public QObject
 {
     Q_OBJECT
 class LIBDOLPHINPRIVATE_EXPORT KItemListViewLayouter : public QObject
 {
     Q_OBJECT
@@ -52,7 +66,7 @@ public:
      */
     void setItemMargin(const QSizeF& margin);
     QSizeF itemMargin() const;
      */
     void setItemMargin(const QSizeF& margin);
     QSizeF itemMargin() const;
-    
+
     /**
      * Sets the height of the header that is always aligned
      * at the top. A height of <= 0.0 means that no header is
     /**
      * Sets the height of the header that is always aligned
      * at the top. A height of <= 0.0 means that no header is
@@ -74,7 +88,7 @@ public:
      */
     void setGroupHeaderMargin(qreal margin);
     qreal groupHeaderMargin() const;
      */
     void setGroupHeaderMargin(qreal margin);
     qreal groupHeaderMargin() const;
-    
+
     void setScrollOffset(qreal scrollOffset);
     qreal scrollOffset() const;
 
     void setScrollOffset(qreal scrollOffset);
     qreal scrollOffset() const;
 
@@ -111,14 +125,21 @@ public:
      */
     QRectF itemRect(int index) const;
 
      */
     QRectF itemRect(int index) const;
 
+    /**
+     * @return Rectangle of the group header for the item with the
+     *         index \a index. Note that the layouter does not check
+     *         whether the item really has a header: Usually only
+     *         the first item of a group gets a header (see
+     *         isFirstGroupItem()).
+     */
     QRectF groupHeaderRect(int index) const;
     QRectF groupHeaderRect(int index) const;
-    
+
     /**
      * @return Column of the item with the index \a index.
      *         -1 is returned if an invalid index is given.
      */
     int itemColumn(int index) const;
     /**
      * @return Column of the item with the index \a index.
      *         -1 is returned if an invalid index is given.
      */
     int itemColumn(int index) const;
-    
+
     /**
      * @return Row of the item with the index \a index.
      *         -1 is returned if an invalid index is given.
     /**
      * @return Row of the item with the index \a index.
      *         -1 is returned if an invalid index is given.
@@ -137,6 +158,10 @@ public:
      */
     bool isFirstGroupItem(int itemIndex) const;
 
      */
     bool isFirstGroupItem(int itemIndex) const;
 
+    /**
+     * Marks the layouter as dirty. This means as soon as a property of
+     * the layouter gets read, an expensive relayout will be done.
+     */
     void markAsDirty();
 
 #ifndef QT_NO_DEBUG
     void markAsDirty();
 
 #ifndef QT_NO_DEBUG
@@ -172,7 +197,7 @@ private:
 
     QSizeF m_itemSize;
     QSizeF m_itemMargin;
 
     QSizeF m_itemSize;
     QSizeF m_itemMargin;
-    qreal m_headerHeight;    
+    qreal m_headerHeight;
     const KItemModelBase* m_model;
     const KItemListSizeHintResolver* m_sizeHintResolver;
 
     const KItemModelBase* m_model;
     const KItemListSizeHintResolver* m_sizeHintResolver;
 
index 9d58a283ef8dd0cd2f1240d2b88af61199f19db5..951fb396c54faa540771d32bc1fc10fd981f16f6 100644 (file)
@@ -247,7 +247,7 @@ void KItemListWidget::setHovered(bool hovered)
 
     if (!m_hoverAnimation) {
         m_hoverAnimation = new QPropertyAnimation(this, "hoverOpacity", this);
 
     if (!m_hoverAnimation) {
         m_hoverAnimation = new QPropertyAnimation(this, "hoverOpacity", this);
-        const int duration = (KGlobalSettings::graphicEffectsLevel() == KGlobalSettings::NoEffects) ? 1 : 200;       
+        const int duration = (KGlobalSettings::graphicEffectsLevel() == KGlobalSettings::NoEffects) ? 1 : 200;
         m_hoverAnimation->setDuration(duration);
         connect(m_hoverAnimation, SIGNAL(finished()), this, SLOT(slotHoverAnimationFinished()));
     }
         m_hoverAnimation->setDuration(duration);
         connect(m_hoverAnimation, SIGNAL(finished()), this, SLOT(slotHoverAnimationFinished()));
     }
index 84bd15fa5559e85274d303d82b099241f8cd1250..80f944748b114c967ba217d844466d75e680bbc4 100644 (file)
@@ -140,7 +140,7 @@ protected:
     virtual void hoveredChanged(bool hovered);
     virtual void alternateBackgroundChanged(bool enabled);
     virtual void siblingsInformationChanged(const QBitArray& current, const QBitArray& previous);
     virtual void hoveredChanged(bool hovered);
     virtual void alternateBackgroundChanged(bool enabled);
     virtual void siblingsInformationChanged(const QBitArray& current, const QBitArray& previous);
-    virtual void resizeEvent(QGraphicsSceneResizeEvent* event);    
+    virtual void resizeEvent(QGraphicsSceneResizeEvent* event);
 
     /**
      * @return The current opacity of the hover-animation. When implementing a custom painting-code for a hover-state
 
     /**
      * @return The current opacity of the hover-animation. When implementing a custom painting-code for a hover-state
index de847a9a45bccf0e6cccdf26dbaaae5eb15e8a55..52fcaee36dcb08cb811d713c4909bf6ad577d897 100644 (file)
@@ -45,7 +45,7 @@ typedef QList<KItemRange> KItemRangeList;
 /**
  * @brief Base class for model implementations used by KItemListView and KItemListController.
  *
 /**
  * @brief Base class for model implementations used by KItemListView and KItemListController.
  *
- * A item-model consists of a variable number of items. The number of items
+ * An item-model consists of a variable number of items. The number of items
  * is given by KItemModelBase::count(). The data of an item is accessed by a unique index
  * with KItemModelBase::data(). The indexes are integer-values counting from 0 to the
  * KItemModelBase::count() - 1.
  * is given by KItemModelBase::count(). The data of an item is accessed by a unique index
  * with KItemModelBase::data(). The indexes are integer-values counting from 0 to the
  * KItemModelBase::count() - 1.
@@ -55,7 +55,7 @@ typedef QList<KItemRange> KItemRangeList;
  * A model can optionally provide sorting- and grouping-capabilities.
  *
  * Also optionally it is possible to provide a tree of items by implementing the methods
  * A model can optionally provide sorting- and grouping-capabilities.
  *
  * Also optionally it is possible to provide a tree of items by implementing the methods
- * setExpanded(), isExpanded() and isExpandable().
+ * setExpanded(), isExpanded(), isExpandable() and expandedParentsCount().
  */
 class LIBDOLPHINPRIVATE_EXPORT KItemModelBase : public QObject
 {
  */
 class LIBDOLPHINPRIVATE_EXPORT KItemModelBase : public QObject
 {
index b91fccbc07c6098cdad0e55fcfda494b57387c3c..fa8844dfa75e29ca86395dba7a4ba71377ec34a5 100644 (file)
@@ -122,7 +122,7 @@ void TreeViewContextMenu::open()
     // in KItemViews or manually as part of the FoldersPanel
     //popup->addAction(autoScrollingAction);
     connect(autoScrollingAction, SIGNAL(toggled(bool)), this, SLOT(setAutoScrolling(bool)));
     // in KItemViews or manually as part of the FoldersPanel
     //popup->addAction(autoScrollingAction);
     connect(autoScrollingAction, SIGNAL(toggled(bool)), this, SLOT(setAutoScrolling(bool)));
-    
+
     if (!m_fileItem.isNull()) {
         // insert 'Properties' entry
         QAction* propertiesAction = new QAction(i18nc("@action:inmenu", "Properties"), this);
     if (!m_fileItem.isNull()) {
         // insert 'Properties' entry
         QAction* propertiesAction = new QAction(i18nc("@action:inmenu", "Properties"), this);
@@ -132,7 +132,7 @@ void TreeViewContextMenu::open()
     }
 
     QList<QAction*> customActions = m_parent->customContextMenuActions();
     }
 
     QList<QAction*> customActions = m_parent->customContextMenuActions();
-    if (!customActions.isEmpty()) {       
+    if (!customActions.isEmpty()) {
         popup->addSeparator();
         foreach (QAction* action, customActions) {
             popup->addAction(action);
         popup->addSeparator();
         foreach (QAction* action, customActions) {
             popup->addAction(action);
index 60e80279c4e2659d4cb3bdf65d8045ebddf9f5f3..2e1678c834dd1f04c5c10837af3180765957e2ba 100644 (file)
@@ -183,7 +183,7 @@ Name[id]=Umum
 Name[is]=Almennt
 Name[it]=Generale
 Name[ja]=全般
 Name[is]=Almennt
 Name[it]=Generale
 Name[ja]=全般
-Name[ka]=ძირითადი 
+Name[ka]=ძირითადი
 Name[kk]=Жалпы
 Name[km]=ទូទៅ
 Name[kn]=ಸಾಮಾನ್ಯ
 Name[kk]=Жалпы
 Name[km]=ទូទៅ
 Name[kn]=ಸಾಮಾನ್ಯ
index a0d0979a937a15c2a9d350308506891aa0f7d662..1bd353669218e5b8e605f3c79aa69ca828f8a9e9 100644 (file)
@@ -121,7 +121,7 @@ Comment[pt]=Este serviço permite-lhe configurar a navegação do Dolphin.
 Comment[pt_BR]=Este serviço permite configurar a navegação do Dolphin.
 Comment[ro]=Acest serviciu permite configurarea navigării Dolphin.
 Comment[ru]=Эта служба позволяет настраивать навигацию в Dolphin
 Comment[pt_BR]=Este serviço permite configurar a navegação do Dolphin.
 Comment[ro]=Acest serviciu permite configurarea navigării Dolphin.
 Comment[ru]=Эта служба позволяет настраивать навигацию в Dolphin
-Comment[si]=මෙම සේවාව Dolphin සැරිසැරුම සැකසීමට ඉඩ දේ. 
+Comment[si]=මෙම සේවාව Dolphin සැරිසැරුම සැකසීමට ඉඩ දේ.
 Comment[sk]=Táto služba umožňuje nastavenie navigácie v Dolphine.
 Comment[sl]=Ta storitev omogoča spreminjanje nastavitev krmarjenja programa Dolphin.
 Comment[sr]=Овај сервис омогућава подешавање навигације у Делфину.
 Comment[sk]=Táto služba umožňuje nastavenie navigácie v Dolphine.
 Comment[sl]=Ta storitev omogoča spreminjanje nastavitev krmarjenja programa Dolphin.
 Comment[sr]=Овај сервис омогућава подешавање навигације у Делфину.
index 77a7eb7a6b7abdf7d9733922ea1951e46d67fbd9..98b167f169bd017a3cac6d5e5db4b6a732e046e4 100644 (file)
@@ -119,7 +119,7 @@ Comment[pt]=Este serviço permite-lhe configurar os modos de visualização do D
 Comment[pt_BR]=Este serviço permite configurar os modos de exibição do Dolphin.
 Comment[ro]=Acest serviciu permite configurarea regimurilor de vizualizare Dolphin.
 Comment[ru]=Эта служба позволяет настраивать режимы просмотра папок в Dolphin
 Comment[pt_BR]=Este serviço permite configurar os modos de exibição do Dolphin.
 Comment[ro]=Acest serviciu permite configurarea regimurilor de vizualizare Dolphin.
 Comment[ru]=Эта служба позволяет настраивать режимы просмотра папок в Dolphin
-Comment[si]=මෙම සේවාව Dolphin දසුන් ආකාර සැකසීමට ඉඩ දේ. 
+Comment[si]=මෙම සේවාව Dolphin දසුන් ආකාර සැකසීමට ඉඩ දේ.
 Comment[sk]=Táto služba umožňuje nastavenie režimov zobrazenia Dolphinu.
 Comment[sl]=Ta storitev omogoča spreminjanje nastavitev načinov pogleda programa Dolphin.
 Comment[sr]=Овај сервис омогућава подешавање Делфинових режима приказа.
 Comment[sk]=Táto služba umožňuje nastavenie režimov zobrazenia Dolphinu.
 Comment[sl]=Ta storitev omogoča spreminjanje nastavitev načinov pogleda programa Dolphin.
 Comment[sr]=Овај сервис омогућава подешавање Делфинових режима приказа.
index 47aad7dd2a3efa2749ceb82147477d3c278b1d6f..5dd70000e7371cd3af5cbbf7db724c4846082d32 100644 (file)
@@ -157,7 +157,7 @@ void ViewSettingsTab::loadSettings()
 
     ViewModeSettings settings(viewMode());
     settings.readConfig();
 
     ViewModeSettings settings(viewMode());
     settings.readConfig();
-    
+
     const QSize iconSize(settings.iconSize(), settings.iconSize());
     m_defaultSizeSlider->setValue(ZoomLevelInfo::zoomLevelForIconSize(iconSize));
 
     const QSize iconSize(settings.iconSize(), settings.iconSize());
     m_defaultSizeSlider->setValue(ZoomLevelInfo::zoomLevelForIconSize(iconSize));
 
index ea67b85f41dc9d6a4e6eb660c90984c9a16898d4..04be625d870b161d491abd6c7e2e246b44c6f14c 100644 (file)
@@ -271,7 +271,7 @@ void KFileItemModelTest::testSetDataWithModifiedSortRole()
     if (expectMoveSignal) {
         QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsMoved(KItemRange,QList<int>)), DefaultTimeout));
     }
     if (expectMoveSignal) {
         QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsMoved(KItemRange,QList<int>)), DefaultTimeout));
     }
-    
+
     QCOMPARE(m_model->data(0).value("rating").toInt(), ratingIndex0);
     QCOMPARE(m_model->data(1).value("rating").toInt(), ratingIndex1);
     QCOMPARE(m_model->data(2).value("rating").toInt(), ratingIndex2);
     QCOMPARE(m_model->data(0).value("rating").toInt(), ratingIndex0);
     QCOMPARE(m_model->data(1).value("rating").toInt(), ratingIndex1);
     QCOMPARE(m_model->data(2).value("rating").toInt(), ratingIndex2);
index 7f79197a90229d71fe5f59eb361899f95b198628..3a84009309fc8adfd84dcca2dff98c80a434ecfe 100644 (file)
@@ -331,7 +331,7 @@ Q_DECLARE_METATYPE(QList<int>);
  * The following function provides a generic way to test the selection functionality.
  *
  * The test is data-driven and takes the following arguments:
  * The following function provides a generic way to test the selection functionality.
  *
  * The test is data-driven and takes the following arguments:
- * 
+ *
  * \param initialSelection  The selection at the beginning.
  * \param anchor            This item will be the anchor item.
  * \param current           This item will be the current item.
  * \param initialSelection  The selection at the beginning.
  * \param anchor            This item will be the anchor item.
  * \param current           This item will be the current item.
index ec1af9549a68b901df7e46801a08cf1975076697..3b0a9c6b511a4b5f37cf98fc4867dca670b9e16d 100644 (file)
@@ -48,7 +48,7 @@ DolphinItemListContainer::DolphinItemListContainer(KDirLister* dirLister,
     controller()->setModel(new KFileItemModel(dirLister, this));
 
     m_fileItemListView = new KFileItemListView();
     controller()->setModel(new KFileItemModel(dirLister, this));
 
     m_fileItemListView = new KFileItemListView();
-    m_fileItemListView->setWidgetCreator(new KItemListWidgetCreator<DolphinFileItemListWidget>());    
+    m_fileItemListView->setWidgetCreator(new KItemListWidgetCreator<DolphinFileItemListWidget>());
     m_fileItemListView->setEnabledSelectionToggles(GeneralSettings::showSelectionToggle());
     controller()->setView(m_fileItemListView);
 
     m_fileItemListView->setEnabledSelectionToggles(GeneralSettings::showSelectionToggle());
     controller()->setView(m_fileItemListView);
 
@@ -60,7 +60,7 @@ DolphinItemListContainer::DolphinItemListContainer(KDirLister* dirLister,
 DolphinItemListContainer::~DolphinItemListContainer()
 {
     writeSettings();
 DolphinItemListContainer::~DolphinItemListContainer()
 {
     writeSettings();
-    
+
     controller()->setView(0);
     delete m_fileItemListView;
     m_fileItemListView = 0;
     controller()->setView(0);
     delete m_fileItemListView;
     m_fileItemListView = 0;
@@ -191,7 +191,7 @@ void DolphinItemListContainer::readSettings()
 }
 
 void DolphinItemListContainer::writeSettings()
 }
 
 void DolphinItemListContainer::writeSettings()
-{  
+{
     IconsModeSettings::self()->writeConfig();
     CompactModeSettings::self()->writeConfig();
     DetailsModeSettings::self()->writeConfig();
     IconsModeSettings::self()->writeConfig();
     CompactModeSettings::self()->writeConfig();
     DetailsModeSettings::self()->writeConfig();
@@ -217,7 +217,7 @@ void DolphinItemListContainer::updateGridSize()
     case KFileItemListView::IconsLayout: {
         const int minItemWidth = 48;
         itemWidth = minItemWidth + IconsModeSettings::textWidthIndex() * 64;
     case KFileItemListView::IconsLayout: {
         const int minItemWidth = 48;
         itemWidth = minItemWidth + IconsModeSettings::textWidthIndex() * 64;
-        
+
         if (previewsShown()) {
             // Optimize the width for previews with a 3:2 aspect ratio instead
             // of a 1:1 ratio to avoid wasting too much vertical space when
         if (previewsShown()) {
             // Optimize the width for previews with a 3:2 aspect ratio instead
             // of a 1:1 ratio to avoid wasting too much vertical space when
@@ -225,12 +225,12 @@ void DolphinItemListContainer::updateGridSize()
             const int minWidth = iconSize * 3 / 2;
             itemWidth = qMax(itemWidth, minWidth);
         }
             const int minWidth = iconSize * 3 / 2;
             itemWidth = qMax(itemWidth, minWidth);
         }
-        
+
         if (itemWidth < iconSize + padding * 2) {
             itemWidth = iconSize + padding * 2;
         }
         itemHeight = padding * 3 + iconSize + styleOption.fontMetrics.height();
         if (itemWidth < iconSize + padding * 2) {
             itemWidth = iconSize + padding * 2;
         }
         itemHeight = padding * 3 + iconSize + styleOption.fontMetrics.height();
-        
+
         horizontalMargin = 4;
         verticalMargin = 8;
         break;
         horizontalMargin = 4;
         verticalMargin = 8;
         break;
@@ -239,7 +239,7 @@ void DolphinItemListContainer::updateGridSize()
         itemWidth = padding * 4 + iconSize + styleOption.fontMetrics.height() * 5;
         const int textLinesCount = m_fileItemListView->visibleRoles().count();
         itemHeight = padding * 2 + qMax(iconSize, textLinesCount * styleOption.fontMetrics.height());
         itemWidth = padding * 4 + iconSize + styleOption.fontMetrics.height() * 5;
         const int textLinesCount = m_fileItemListView->visibleRoles().count();
         itemHeight = padding * 2 + qMax(iconSize, textLinesCount * styleOption.fontMetrics.height());
-        
+
         horizontalMargin = 8;
         break;
     }
         horizontalMargin = 8;
         break;
     }
index fa816b48c34b53593610a24c22d7b3d4a0a0df29..c5a30ad74e76663af4e1f84f437ff105d286d305 100644 (file)
@@ -64,7 +64,7 @@ public:
     void beginTransaction();
     void endTransaction();
 
     void beginTransaction();
     void endTransaction();
 
-    void readSettings();   
+    void readSettings();
     void writeSettings();
 
 private:
     void writeSettings();
 
 private:
index 700427ed715a769f337381b17931fc8684d9350e..ea74416009177123aa54f99f899eff9f249ccc22 100644 (file)
@@ -451,11 +451,11 @@ void DolphinView::stopLoading()
 void DolphinView::readSettings()
 {
     const int oldZoomLevel = m_container->zoomLevel();
 void DolphinView::readSettings()
 {
     const int oldZoomLevel = m_container->zoomLevel();
-    
+
     GeneralSettings::self()->readConfig();
     m_container->readSettings();
     applyViewProperties();
     GeneralSettings::self()->readConfig();
     m_container->readSettings();
     applyViewProperties();
-    
+
     const int newZoomLevel = m_container->zoomLevel();
     if (newZoomLevel != oldZoomLevel) {
         emit zoomLevelChanged(newZoomLevel, oldZoomLevel);
     const int newZoomLevel = m_container->zoomLevel();
     if (newZoomLevel != oldZoomLevel) {
         emit zoomLevelChanged(newZoomLevel, oldZoomLevel);
index 42ad26098d5bc51d29b004361f17443df829b3cc..7b7db3f9f9f822fe27b9d6d0bb22981324b25707 100644 (file)
@@ -269,7 +269,7 @@ public:
      * font, ...).
      */
     void readSettings();
      * font, ...).
      */
     void readSettings();
-    
+
     /**
      * Saves the current settings (e.g. icons size, font, ..).
      */
     /**
      * Saves the current settings (e.g. icons size, font, ..).
      */
@@ -551,7 +551,7 @@ protected:
 
     /** @reimp */
     virtual void hideEvent(QHideEvent* event);
 
     /** @reimp */
     virtual void hideEvent(QHideEvent* event);
-    
+
 private slots:
     /**
      * Marks the view as active (DolphinView:isActive() will return true)
 private slots:
     /**
      * Marks the view as active (DolphinView:isActive() will return true)
@@ -766,7 +766,7 @@ private:
     KUrl m_createdItemUrl; // URL for a new item that got created by the "Create New..." menu
 
     QList<KUrl> m_selectedUrls; // Used for making the view to remember selections after F5
     KUrl m_createdItemUrl; // URL for a new item that got created by the "Create New..." menu
 
     QList<KUrl> m_selectedUrls; // Used for making the view to remember selections after F5
-    
+
     VersionControlObserver* m_versionControlObserver;
 
     // For unit tests
     VersionControlObserver* m_versionControlObserver;
 
     // For unit tests
index 2cd1e86e04d409566623181075f749d97658a4cd..45e5076f67d622f03fe7091530631496197311d5 100644 (file)
@@ -49,7 +49,7 @@ QString DragAndDropHelper::dropUrls(const KFileItem& destItem, const KUrl& destU
                 return i18nc("@info:status", "A folder cannot be dropped into itself");
             }
         }
                 return i18nc("@info:status", "A folder cannot be dropped into itself");
             }
         }
-        
+
         KonqOperations::doDrop(destItem, destUrl, event, QApplication::activeWindow());
     } else {
         KonqOperations::doDrop(KFileItem(), destUrl, event, QApplication::activeWindow());
         KonqOperations::doDrop(destItem, destUrl, event, QApplication::activeWindow());
     } else {
         KonqOperations::doDrop(KFileItem(), destUrl, event, QApplication::activeWindow());
index 3c262b7496f760856246f1575996bc899dfd2b49..ed0a9c512529b3cf59413c3c321fb292fca289b4 100644 (file)
@@ -44,9 +44,9 @@ ToolTipManager::ToolTipManager(QWidget* parent) :
     m_itemRect()
 {
     if (parent) {
     m_itemRect()
 {
     if (parent) {
-        m_margin = qMax(m_margin, parent->style()->pixelMetric(QStyle::PM_ToolTipLabelFrameWidth));        
+        m_margin = qMax(m_margin, parent->style()->pixelMetric(QStyle::PM_ToolTipLabelFrameWidth));
     }
     }
-    
+
     m_showToolTipTimer = new QTimer(this);
     m_showToolTipTimer->setSingleShot(true);
     m_showToolTipTimer->setInterval(500);
     m_showToolTipTimer = new QTimer(this);
     m_showToolTipTimer->setSingleShot(true);
     m_showToolTipTimer->setInterval(500);