]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Minor cleanup: Rename m_keyboardAnchorXPos to m_keyboardAnchorPos
authorPeter Penz <peter.penz19@gmail.com>
Mon, 26 Dec 2011 21:42:49 +0000 (22:42 +0100)
committerPeter Penz <peter.penz19@gmail.com>
Mon, 26 Dec 2011 21:44:26 +0000 (22:44 +0100)
src/kitemviews/kitemlistcontroller.cpp
src/kitemviews/kitemlistcontroller.h

index 0cf62f8e0972fc24890fa7107c154cb9d955942f..7798fc364df5d57cfab67271f6d07f927b4708cf 100644 (file)
@@ -52,7 +52,7 @@ KItemListController::KItemListController(QObject* parent) :
     m_autoActivationTimer(0),
     m_oldSelection(),
     m_keyboardAnchorIndex(-1),
     m_autoActivationTimer(0),
     m_oldSelection(),
     m_keyboardAnchorIndex(-1),
-    m_keyboardAnchorXPos(0)
+    m_keyboardAnchorPos(0)
 {
     connect(m_keyboardManager, SIGNAL(changeCurrentItem(QString,bool)),
             this, SLOT(slotChangeCurrentItem(QString,bool)));
 {
     connect(m_keyboardManager, SIGNAL(changeCurrentItem(QString,bool)),
             this, SLOT(slotChangeCurrentItem(QString,bool)));
@@ -213,7 +213,7 @@ bool KItemListController::keyPressEvent(QKeyEvent* event)
         if (index > 0) {
             --index;
             m_keyboardAnchorIndex = index;
         if (index > 0) {
             --index;
             m_keyboardAnchorIndex = index;
-            m_keyboardAnchorXPos = keyboardAnchorPos(index);
+            m_keyboardAnchorPos = keyboardAnchorPos(index);
         }
         break;
 
         }
         break;
 
@@ -221,7 +221,7 @@ bool KItemListController::keyPressEvent(QKeyEvent* event)
         if (index < itemCount - 1) {
             ++index;
             m_keyboardAnchorIndex = index;
         if (index < itemCount - 1) {
             ++index;
             m_keyboardAnchorIndex = index;
-            m_keyboardAnchorXPos = keyboardAnchorPos(index);
+            m_keyboardAnchorPos = keyboardAnchorPos(index);
         }
         break;
 
         }
         break;
 
@@ -951,11 +951,11 @@ void KItemListController::updateKeyboardAnchor()
 {
     const bool validAnchor = m_keyboardAnchorIndex >= 0 &&
                              m_keyboardAnchorIndex < m_model->count() &&
 {
     const bool validAnchor = m_keyboardAnchorIndex >= 0 &&
                              m_keyboardAnchorIndex < m_model->count() &&
-                             keyboardAnchorPos(m_keyboardAnchorIndex) == m_keyboardAnchorXPos;
+                             keyboardAnchorPos(m_keyboardAnchorIndex) == m_keyboardAnchorPos;
     if (!validAnchor) {
         const int index = m_selectionManager->currentItem();
         m_keyboardAnchorIndex = index;
     if (!validAnchor) {
         const int index = m_selectionManager->currentItem();
         m_keyboardAnchorIndex = index;
-        m_keyboardAnchorXPos = keyboardAnchorPos(index);
+        m_keyboardAnchorPos = keyboardAnchorPos(index);
     }
 }
 
     }
 }
 
@@ -984,10 +984,10 @@ int KItemListController::nextRowIndex() const
     // that is below the current index
     int nextRowIndex = lastColumnIndex + 1;
     int searchIndex = nextRowIndex;
     // that is below the current index
     int nextRowIndex = lastColumnIndex + 1;
     int searchIndex = nextRowIndex;
-    qreal minDiff = qAbs(m_keyboardAnchorXPos - keyboardAnchorPos(nextRowIndex));
+    qreal minDiff = qAbs(m_keyboardAnchorPos - keyboardAnchorPos(nextRowIndex));
     while (searchIndex < maxIndex && keyboardAnchorPos(searchIndex + 1) > keyboardAnchorPos(searchIndex)) {
         ++searchIndex;
     while (searchIndex < maxIndex && keyboardAnchorPos(searchIndex + 1) > keyboardAnchorPos(searchIndex)) {
         ++searchIndex;
-        const qreal searchDiff = qAbs(m_keyboardAnchorXPos - keyboardAnchorPos(searchIndex));
+        const qreal searchDiff = qAbs(m_keyboardAnchorPos - keyboardAnchorPos(searchIndex));
         if (searchDiff < minDiff) {
             minDiff = searchDiff;
             nextRowIndex = searchIndex;
         if (searchDiff < minDiff) {
             minDiff = searchDiff;
             nextRowIndex = searchIndex;
@@ -1017,10 +1017,10 @@ int KItemListController::previousRowIndex() const
     // that is above the current index
     int previousRowIndex = firstColumnIndex - 1;
     int searchIndex = previousRowIndex;
     // that is above the current index
     int previousRowIndex = firstColumnIndex - 1;
     int searchIndex = previousRowIndex;
-    qreal minDiff = qAbs(m_keyboardAnchorXPos - keyboardAnchorPos(previousRowIndex));
+    qreal minDiff = qAbs(m_keyboardAnchorPos - keyboardAnchorPos(previousRowIndex));
     while (searchIndex > 0 && keyboardAnchorPos(searchIndex - 1) < keyboardAnchorPos(searchIndex)) {
         --searchIndex;
     while (searchIndex > 0 && keyboardAnchorPos(searchIndex - 1) < keyboardAnchorPos(searchIndex)) {
         --searchIndex;
-        const qreal searchDiff = qAbs(m_keyboardAnchorXPos - keyboardAnchorPos(searchIndex));
+        const qreal searchDiff = qAbs(m_keyboardAnchorPos - keyboardAnchorPos(searchIndex));
         if (searchDiff < minDiff) {
             minDiff = searchDiff;
             previousRowIndex = searchIndex;
         if (searchDiff < minDiff) {
             minDiff = searchDiff;
             previousRowIndex = searchIndex;
index b2c7d65b2e595b7df70f3fc12df9cc94c851875e..b8de195eb62eded031c4eb5f51d21572732eb3fe 100644 (file)
@@ -283,7 +283,7 @@ private:
      * similar behavior like in a text editor:
      */
     int m_keyboardAnchorIndex;
      * similar behavior like in a text editor:
      */
     int m_keyboardAnchorIndex;
-    qreal m_keyboardAnchorXPos;
+    qreal m_keyboardAnchorPos;
 };
 
 #endif
 };
 
 #endif