]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Renamed some signals for consistency with KItemViews classes
authorPeter Penz <peter.penz19@gmail.com>
Mon, 29 Aug 2011 18:13:39 +0000 (20:13 +0200)
committerPeter Penz <peter.penz19@gmail.com>
Mon, 29 Aug 2011 18:14:33 +0000 (20:14 +0200)
src/dolphinpart.cpp
src/dolphinpart.h
src/dolphinviewcontainer.cpp
src/dolphinviewcontainer.h
src/kitemviews/kitemlistcontroller.cpp
src/kitemviews/kitemlistcontroller.h
src/kitemviews/kitemlistkeyboardsearchmanager.cpp
src/kitemviews/kitemlistkeyboardsearchmanager_p.h
src/views/dolphinview.cpp
src/views/dolphinview.h

index df1d8b7383eff12bb1da388db92471525fb8db02..89ea457cafb585a2a2e8bf703aca0393c5900b75 100644 (file)
@@ -82,8 +82,8 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL
             this, SLOT(slotMessage(QString)));
     connect(m_view, SIGNAL(errorMessage(QString)),
             this, SLOT(slotErrorMessage(QString)));
-    connect(m_view, SIGNAL(itemTriggered(KFileItem)),
-            this, SLOT(slotItemTriggered(KFileItem)));
+    connect(m_view, SIGNAL(itemActivated(KFileItem)),
+            this, SLOT(slotItemActivated(KFileItem)));
     connect(m_view, SIGNAL(tabRequested(KUrl)),
             this, SLOT(createNewWindow(KUrl)));
     connect(m_view, SIGNAL(requestContextMenu(KFileItem,KUrl,QList<QAction*>)),
@@ -329,7 +329,7 @@ void DolphinPart::slotRequestItemInfo(const KFileItem& item)
     }
 }
 
-void DolphinPart::slotItemTriggered(const KFileItem& item)
+void DolphinPart::slotItemActivated(const KFileItem& item)
 {
     KParts::OpenUrlArguments args;
     // Forget about the known mimetype if a target URL is used.
@@ -348,7 +348,7 @@ void DolphinPart::slotItemTriggered(const KFileItem& item)
 void DolphinPart::createNewWindow(const KUrl& url)
 {
     // TODO: Check issue N176832 for the missing QAIV signal; task 177399 - maybe this code
-    // should be moved into DolphinPart::slotItemTriggered()
+    // should be moved into DolphinPart::slotItemActivated()
     emit m_extension->createNewWindow(url);
 }
 
index 17650469ded7cd0083545219cc4c1f6f06497cec..fb4ed0afc8544bf39b4ade4b0e289523647277e3 100644 (file)
@@ -128,7 +128,7 @@ private Q_SLOTS:
     /**
      * Handles clicking on an item
      */
-    void slotItemTriggered(const KFileItem& item);
+    void slotItemActivated(const KFileItem& item);
     /**
      * Creates a new window showing the content of \a url.
      */
index dcfeca0fdc1f148142de491d5eec935e89c7ed98..b670aa540b5ba31263e8d818e420f8c3c29cfd2c 100644 (file)
@@ -93,20 +93,20 @@ DolphinViewContainer::DolphinViewContainer(const KUrl& url, QWidget* parent) :
     connect(m_searchBox, SIGNAL(returnPressed(QString)), this, SLOT(requestFocus()));
 
     m_view = new DolphinView(url, this);
-    connect(m_view, SIGNAL(urlChanged(KUrl)),      m_urlNavigator, SLOT(setUrl(KUrl)));
+    connect(m_view, SIGNAL(urlChanged(KUrl)),             m_urlNavigator, SLOT(setUrl(KUrl)));
     connect(m_view, SIGNAL(writeStateChanged(bool)),      this, SIGNAL(writeStateChanged(bool)));
     connect(m_view, SIGNAL(requestItemInfo(KFileItem)),   this, SLOT(showItemInfo(KFileItem)));
-    connect(m_view, SIGNAL(errorMessage(QString)), this, SLOT(showErrorMessage(QString)));
-    connect(m_view, SIGNAL(infoMessage(QString)),  this, SLOT(showInfoMessage(QString)));
-    connect(m_view, SIGNAL(itemTriggered(KFileItem)),     this, SLOT(slotItemTriggered(KFileItem)));
-    connect(m_view, SIGNAL(redirection(KUrl,KUrl)),      this, SLOT(redirect(KUrl,KUrl)));
+    connect(m_view, SIGNAL(errorMessage(QString)),        this, SLOT(showErrorMessage(QString)));
+    connect(m_view, SIGNAL(infoMessage(QString)),         this, SLOT(showInfoMessage(QString)));
+    connect(m_view, SIGNAL(itemActivated(KFileItem)),     this, SLOT(slotItemActivated(KFileItem)));
+    connect(m_view, SIGNAL(redirection(KUrl,KUrl)),       this, SLOT(redirect(KUrl,KUrl)));
     connect(m_view, SIGNAL(startedPathLoading(KUrl)),     this, SLOT(slotStartedPathLoading()));
     connect(m_view, SIGNAL(finishedPathLoading(KUrl)),    this, SLOT(slotFinishedPathLoading()));
     connect(m_view, SIGNAL(itemCountChanged()),           this, SLOT(delayedStatusBarUpdate()));
     connect(m_view, SIGNAL(pathLoadingProgress(int)),     this, SLOT(updateProgress(int)));
-    connect(m_view, SIGNAL(infoMessage(QString)),  this, SLOT(showInfoMessage(QString)));
-    connect(m_view, SIGNAL(errorMessage(QString)), this, SLOT(showErrorMessage(QString)));
-    connect(m_view, SIGNAL(urlIsFileError(KUrl)),  this, SLOT(openFile(KUrl)));
+    connect(m_view, SIGNAL(infoMessage(QString)),         this, SLOT(showInfoMessage(QString)));
+    connect(m_view, SIGNAL(errorMessage(QString)),        this, SLOT(showErrorMessage(QString)));
+    connect(m_view, SIGNAL(urlIsFileError(KUrl)),         this, SLOT(openFile(KUrl)));
     connect(m_view, SIGNAL(selectionChanged(KFileItemList)),    this, SLOT(delayedStatusBarUpdate()));
     connect(m_view, SIGNAL(operationCompletedMessage(QString)), this, SLOT(showOperationCompletedMessage(QString)));
     connect(m_view, SIGNAL(urlAboutToBeChanged(KUrl)),          this, SLOT(slotViewUrlAboutToBeChanged(KUrl)));
@@ -373,7 +373,7 @@ void DolphinViewContainer::slotFinishedPathLoading()
     }
 }
 
-void DolphinViewContainer::slotItemTriggered(const KFileItem& item)
+void DolphinViewContainer::slotItemActivated(const KFileItem& item)
 {
     KUrl url = item.targetUrl();
 
@@ -414,7 +414,7 @@ void DolphinViewContainer::slotItemTriggered(const KFileItem& item)
 void DolphinViewContainer::openFile(const KUrl& url)
 {
     const KFileItem item(KFileItem::Unknown, KFileItem::Unknown, url);
-    slotItemTriggered(item);
+    slotItemActivated(item);
 }
 
 void DolphinViewContainer::showItemInfo(const KFileItem& item)
index 7aea304b8d6f38e39b6d9d20e08cc9e839e6ca2a..ee9f83dea17cc973bf53857956df4f102b347ba3 100644 (file)
@@ -173,7 +173,7 @@ private slots:
      * directory is opened in the view. If the item is a file, the file
      * gets started by the corresponding application.
      */
-    void slotItemTriggered(const KFileItem& item);
+    void slotItemActivated(const KFileItem& item);
 
     /**
      * Opens a the file \a url by opening the corresponding application.
index 615cc9c6d04a0b6db9c46a2500d160b9942785b7..e1277bdd42501d6e2470dac325400bcb97aaf3be 100644 (file)
@@ -48,7 +48,8 @@ KItemListController::KItemListController(QObject* parent) :
     m_pressedMousePos(),
     m_oldSelection()
 {
-    connect(m_keyboardManager, SIGNAL(requestItemActivation(QString,bool)), this, SLOT(slotKeyboardActivationRequested(QString,bool)));
+    connect(m_keyboardManager, SIGNAL(changeCurrentItem(QString,bool)),
+            this, SLOT(slotChangeCurrentItem(QString,bool)));
 }
 
 KItemListController::~KItemListController()
@@ -237,7 +238,7 @@ bool KItemListController::keyPressEvent(QKeyEvent* event)
     return true;
 }
 
-void KItemListController::slotKeyboardActivationRequested(const QString& text, bool searchFromNextItem)
+void KItemListController::slotChangeCurrentItem(const QString& text, bool searchFromNextItem)
 {
     if (!m_model) {
         return;
index 2e33948aa7fa5ab1bfdd1e45428e93f7745d6ded..4ce5b804bd80db70c185617c0c86b76e0d410ee1 100644 (file)
@@ -134,7 +134,7 @@ private slots:
      */
     void slotRubberBandChanged();
 
-    void slotKeyboardActivationRequested(const QString& text, bool searchFromNextItem);
+    void slotChangeCurrentItem(const QString& text, bool searchFromNextItem);
 
 private:
     /**
index 34633d65caf53e71b47fc96345d968c1ca81c2a6..9552a75820ac9292446aa8bcfe885f526170b399 100644 (file)
@@ -48,7 +48,7 @@ void KItemListKeyboardSearchManager::addKeys(const QString& keys)
     const bool searchFromNextItem = m_searchedString.isEmpty();
     if (!keys.isEmpty()) {
         m_searchedString.append(keys);
-        emit requestItemActivation(m_searchedString, searchFromNextItem);
+        emit changeCurrentItem(m_searchedString, searchFromNextItem);
     }
     m_keyboardInputTime.start();
 }
index cf41f3bedbb3a756ce587abb80c0d94cef98b0c5..3441dd7bce9d20de47c036c25aab243388668380 100644 (file)
@@ -54,14 +54,16 @@ public:
     void addKeys(const QString& keys);
 
 signals:
-
     /**
-     * Is emitted when a text is to be searched.
-     * @param searchFromNextItem if true, start searching
-     * from item next to current item. Otherwise, search from
-     * current item.
+     * Is emitted if the current item should be changed corresponding
+     * to \a text.
+     * @param searchFromNextItem If true start searching from item next to the
+     *                           current item. Otherwise, search from the
+     *                           current item.
      */
-    void requestItemActivation(const QString& string, bool searchFromNextItem);
+    // TODO: Think about getting rid of the bool parameter
+    // (see http://doc.qt.nokia.com/qq/qq13-apis.html#thebooleanparametertrap)
+    void changeCurrentItem(const QString& string, bool searchFromNextItem);
 
 private:
     QString m_searchedString;
index 629b7590e16f8bd3363732e46f62630aaa6d95e7..01ac9cc94c3534c44be8d4738b2583aba31c9cdb 100644 (file)
@@ -114,7 +114,7 @@ DolphinView::DolphinView(const KUrl& url, QWidget* parent) :
             this, SLOT(updateSortFoldersFirst(bool)));
     connect(m_dolphinViewController, SIGNAL(additionalInfoChanged(QList<DolphinView::AdditionalInfo>)),
             this, SLOT(updateAdditionalInfo(QList<DolphinView::AdditionalInfo>)));*/
-    //connect(m_dolphinViewController, SIGNAL(itemTriggered(KFileItem)),
+    //connect(m_dolphinViewController, SIGNAL(itemActivated(KFileItem)),
     //        this, SLOT(triggerItem(KFileItem)));
     //connect(m_dolphinViewController, SIGNAL(tabRequested(KUrl)),
     //        this, SIGNAL(tabRequested(KUrl)));
@@ -695,7 +695,7 @@ void DolphinView::slotItemActivated(int index)
     if (selectedItems.isEmpty())
         return;
     if (selectedItems.count() == 1) {
-        emit itemTriggered(fileItemModel()->fileItem(index)); // caught by DolphinViewContainer or DolphinPart
+        emit itemActivated(fileItemModel()->fileItem(index)); // caught by DolphinViewContainer or DolphinPart
     }
     else {
         foreach (int i, selectedItems) {
@@ -703,7 +703,7 @@ void DolphinView::slotItemActivated(int index)
             if (fileItem.isDir()) {
                 emit tabRequested(fileItem.url());
             } else {
-                emit itemTriggered(fileItem);
+                emit itemActivated(fileItem);
             }
         }
     }
@@ -719,6 +719,7 @@ void DolphinView::slotItemMiddleClicked(int index)
 
 void DolphinView::slotContextMenuRequested(int index, const QPointF& pos)
 {
+    Q_UNUSED(pos);
     if (GeneralSettings::showToolTips()) {
         m_toolTipManager->hideToolTip();
     }
index 7a2db688952b420729b33c4564b2105cfbc6df9e..7c81ea8fcfc4d13100dbb5c2a2a2e9ac314044f5 100644 (file)
@@ -420,7 +420,7 @@ signals:
     /**
      * Is emitted when clicking on an item with the left mouse button.
      */
-    void itemTriggered(const KFileItem& item);
+    void itemActivated(const KFileItem& item);
 
     /**
      * Is emitted if items have been added or deleted.