diff options
| author | Frank Reininghaus <[email protected]> | 2013-07-02 19:27:06 +0200 |
|---|---|---|
| committer | Frank Reininghaus <[email protected]> | 2013-07-02 19:27:06 +0200 |
| commit | 508661100fdd41579c7d38a970ab7f495010fb18 (patch) | |
| tree | 6c6a8aa92494c526975a0fc938b8f92e5094616e /src/dolphinviewcontainer.h | |
| parent | 4ff5ae361dc398079609d75c8d78be77bd65584d (diff) | |
Fix crash when dropping URLs on the URL navigator's drop down menus
The problem was that the files were copied/moved inside the nested event
loop of the drag, which caused problems if the "File exists" dialog was
shown.
The solution is to make the copy/move operation delayed, such that it is
executed in the main event loop.
Note that dropping files on these menus does apparently not work at the
moment when using the Oxygen style (see bug 310016).
BUG: 192139
BUG: 256338
BUG: 293220
BUG: 309076
FIXED-IN: 4.11.0
REVIEW: 111273
Diffstat (limited to 'src/dolphinviewcontainer.h')
| -rw-r--r-- | src/dolphinviewcontainer.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/dolphinviewcontainer.h b/src/dolphinviewcontainer.h index bc58531a2..e5597ccc6 100644 --- a/src/dolphinviewcontainer.h +++ b/src/dolphinviewcontainer.h @@ -261,10 +261,22 @@ private slots: /** * Is connected with the URL navigator and drops the URLs * above the destination \a destination. + * + * Creates a copy of \a event and invokes \a dropUrlsDelayed with a + * queued connection. */ void dropUrls(const KUrl& destination, QDropEvent* event); /** + * Is invoked with a queued connection by \a dropUrls to prevent that the + * drop actions are executed in the URL navigator menu's nested event loop, + * which might cause a crash. Simply using a queued connection from the URL + * navigator to \a dropUrls would not work because the \a event pointer + * would be dangling then. + */ + void dropUrlsDelayed(); + + /** * Is invoked when a redirection is done and changes the * URL of the URL navigator to \a newUrl without triggering * a reloading of the directory. @@ -330,6 +342,9 @@ private: QElapsedTimer m_statusBarTimestamp; // Time in ms since last update bool m_autoGrabFocus; + KUrl m_dropDestination; + QScopedPointer<QDropEvent> m_dropEvent; + #ifdef KActivities_FOUND private: KActivities::ResourceInstance * m_activityResourceInstance; |
