X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/55a9aa18d2ddd2688eeb59d962ed60067bbd9f6c..2f0ceedae088158b8af24a5e94500a7d1c0edecb:/src/views/draganddrophelper.cpp diff --git a/src/views/draganddrophelper.cpp b/src/views/draganddrophelper.cpp index 9708415f0..bc1361b9a 100644 --- a/src/views/draganddrophelper.cpp +++ b/src/views/draganddrophelper.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007 by Peter Penz * + * Copyright (C) 2007 by Peter Penz * * Copyright (C) 2007 by David Faure * * * * This program is free software; you can redistribute it and/or modify * @@ -20,10 +20,10 @@ #include "draganddrophelper.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include "views/dolphiniconsview.h" @@ -62,11 +62,11 @@ void DragAndDropHelper::startDrag(QAbstractItemView* itemView, const QModelIndexList indexes = itemView->selectionModel()->selectedIndexes(); if (!indexes.isEmpty()) { QMimeData *data = itemView->model()->mimeData(indexes); - if (data == 0) { + if (!data) { return; } - if (dolphinViewController != 0) { + if (dolphinViewController) { dolphinViewController->requestToolTipHiding(); } @@ -83,7 +83,7 @@ void DragAndDropHelper::startDrag(QAbstractItemView* itemView, bool DragAndDropHelper::isDragSource(QAbstractItemView* itemView) const { - return (m_dragSource != 0) && (m_dragSource == itemView); + return m_dragSource && (m_dragSource == itemView); } void DragAndDropHelper::dropUrls(const KFileItem& destItem, @@ -99,7 +99,7 @@ void DragAndDropHelper::dropUrls(const KFileItem& destItem, QString remoteDBusClient = mimeData->data("application/x-kde-dndextract"); QDBusMessage message = QDBusMessage::createMethodCall(remoteDBusClient, "/DndExtract", "org.kde.DndExtract", "extractSelectedFilesTo"); - message.setArguments(QVariantList() << destination.path()); + message.setArguments(QVariantList() << destination.pathOrUrl()); QDBusConnection::sessionBus().call(message); } else { const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData());