summaryrefslogtreecommitdiff
path: root/src/plugins/bookmarks
diff options
context:
space:
mode:
authorJochen Becher <jochen_becher@gmx.de>2015-06-04 12:35:59 +0200
committerJochen Becher <jochen_becher@gmx.de>2015-06-15 08:12:56 +0000
commit431b25ad27e1905060b85ed01dda8dc194e06a21 (patch)
treeaaf231cbdfd5c3ed382d65d4459b37773e7a305f /src/plugins/bookmarks
parentd3118771422c71821908ac2ab88d1dcfba1a4d98 (diff)
downloadqt-creator-431b25ad27e1905060b85ed01dda8dc194e06a21.tar.gz
Introduce dragging for all explorer nodes.
Extend drop support with variant values. A drop may be a file drop or a value drop or both. Rename Utils::FileDropSupport to Utils::DropSupport and add methods to add not only files but any QVariant value to the mime data. Project explorer adds dragged nodes (which will be needed for future ModelEditor plugin). Change-Id: I799542c60fdecb3e64af0d3ba47b6caa9adbcfd7 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/plugins/bookmarks')
-rw-r--r--src/plugins/bookmarks/bookmarkmanager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/bookmarks/bookmarkmanager.cpp b/src/plugins/bookmarks/bookmarkmanager.cpp
index 1d7b08905a..8ab54dbc4d 100644
--- a/src/plugins/bookmarks/bookmarkmanager.cpp
+++ b/src/plugins/bookmarks/bookmarkmanager.cpp
@@ -46,6 +46,7 @@
#include <utils/qtcassert.h>
#include <utils/checkablemessagebox.h>
#include <utils/theme/theme.h>
+#include <utils/dropsupport.h>
#include <QAction>
#include <QContextMenuEvent>
@@ -420,12 +421,12 @@ Qt::DropActions BookmarkManager::supportedDragActions() const
QStringList BookmarkManager::mimeTypes() const
{
- return FileDropSupport::mimeTypesForFilePaths();
+ return DropSupport::mimeTypesForFilePaths();
}
QMimeData *BookmarkManager::mimeData(const QModelIndexList &indexes) const
{
- auto data = new FileDropMimeData;
+ auto data = new DropMimeData;
foreach (const QModelIndex &index, indexes) {
if (!index.isValid() || index.column() != 0 || index.row() < 0 || index.row() >= m_bookmarksList.count())
continue;