]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinview.h
Fix scrolling during inline renaming causes rename of wrong file
[dolphin.git] / src / views / dolphinview.h
index 6b62b5da68c1f7474abff80510fc3d24508c7ddc..2df1cf9e4caa2c7e762bb9c179c6c23070a9f028 100644 (file)
@@ -363,9 +363,9 @@ public slots:
     void pasteIntoFolder();
 
     /**
-     * Handles a drop of @p dropEvent onto @p destUrl
+     * Handles a drop of @p dropEvent onto widget @p dropWidget and destination @p destUrl
      */
-    void dropUrls(const QUrl &destUrl, QDropEvent *dropEvent);
+    void dropUrls(const QUrl &destUrl, QDropEvent *dropEvent, QWidget *dropWidget);
 
     void stopLoading();
 
@@ -576,6 +576,8 @@ private slots:
     void slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* event);
     void slotModelChanged(KItemModelBase* current, KItemModelBase* previous);
     void slotMouseButtonPressed(int itemIndex, Qt::MouseButtons buttons);
+    void slotRenameDialogRenamingFinished(const QList<QUrl>& urls);
+    void slotSelectedItemTextPressed(int index);
 
     /*
      * Is called when new items get pasted or dropped.
@@ -706,6 +708,8 @@ private slots:
      */
     void calculateItemCount(int& fileCount, int& folderCount, KIO::filesize_t& totalFileSize) const;
 
+    void slotTwoClicksRenamingTimerTimeout();
+
 private:
     void loadDirectory(const QUrl& url, bool reload = false);
 
@@ -760,6 +764,16 @@ private:
      */
     QUrl viewPropertiesUrl() const;
 
+    /**
+     * Clears the selection and updates current item and selection according to the parameters
+     *
+     * @param current URL to be set as current
+     * @param selected list of selected items
+     */
+    void forceUrlsSelection(const QUrl& current, const QList<QUrl>& selected);
+
+    void abortTwoClicksRenaming();
+
 private:
     void updatePalette();
 
@@ -795,6 +809,9 @@ private:
 
     VersionControlObserver* m_versionControlObserver;
 
+    QTimer* m_twoClicksRenamingTimer;
+    QUrl m_twoClicksRenamingItemUrl;
+
     // For unit tests
     friend class TestBase;
     friend class DolphinDetailsViewTest;