[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/apps/plasma/applets/folderview
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2008-06-10 20:14:17
Message-ID: 1213128857.954169.32549.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 819237 by aseigo:

use KonqOperations::doDrop. unfortunately the popup menu goes away immediately, and \
modifier shortcuts such as ctrl/shift are also innexplicably ignored. so .. the drop \
code is there, just need to figure out what even maddness is going on.


 M  +10 -1     folderview.cpp  


--- trunk/KDE/kdebase/apps/plasma/applets/folderview/folderview.cpp #819236:819237
@@ -866,7 +866,16 @@
     // in the drag and drop operation, but since two QGraphicsItems can be part of \
the  // same widget, we can't use that method here.
     if (!m_dragInProgress) {
-        m_model->dropMimeData(event->mimeData(), event->dropAction(), -1, -1, \
QModelIndex()); +        KFileItem item;
+        const QModelIndex index = indexAt(event->pos());
+        if (index.isValid()) {
+            item == m_model->itemForIndex(index);
+        }
+
+        QDropEvent ev(event->screenPos(), event->dropAction(), event->mimeData(),
+                      event->buttons(), event->modifiers());
+        kDebug() << "dropping to" << m_url << "with" << view();
+        KonqOperations::doDrop(item, m_url, &ev, view()->nativeParentWidget());
         return;
     }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic