/***************************************************************************
- * Copyright (C) 2007 by Peter Penz <peter.penz@gmx.at> *
+ * Copyright (C) 2007 by Peter Penz <peter.penz19@gmail.com> *
* Copyright (C) 2007 by David Faure <faure@kde.org> *
* *
* This program is free software; you can redistribute it and/or modify *
#include "draganddrophelper.h"
-#include <kdirmodel.h>
-#include <kfileitem.h>
-#include <kicon.h>
-#include <klocale.h>
+#include <KDirModel>
+#include <KFileItem>
+#include <KIcon>
+#include <KLocale>
#include <konq_operations.h>
#include "views/dolphiniconsview.h"
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();
}
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,
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());