X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/d64bbc333c5014fad116efc98b77cf3268fc07e0..2f0ceedae088158b8af24a5e94500a7d1c0edecb:/src/panels/places/placespanel.cpp diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp index 0da932154..2581ca478 100644 --- a/src/panels/places/placespanel.cpp +++ b/src/panels/places/placespanel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008 by Peter Penz * + * Copyright (C) 2008 by Peter Penz * * Copyright (C) 2010 by Christian Muehlhaeuser * * * * This program is free software; you can redistribute it and/or modify * @@ -20,21 +20,18 @@ #include "placespanel.h" -#include "dolphin_generalsettings.h" -#include "draganddrophelper.h" -#include +#include #include -#include "settings/dolphinsettings.h" PlacesPanel::PlacesPanel(QWidget* parent) : KFilePlacesView(parent), m_mouseButtons(Qt::NoButton) { setDropOnPlaceEnabled(true); - connect(this, SIGNAL(urlsDropped(const KUrl&, QDropEvent*, QWidget*)), - this, SLOT(slotUrlsDropped(const KUrl&, QDropEvent*, QWidget*))); - connect(this, SIGNAL(urlChanged(const KUrl&)), - this, SLOT(emitExtendedUrlChangedSignal(const KUrl&))); + connect(this, SIGNAL(urlsDropped(KUrl,QDropEvent*,QWidget*)), + this, SLOT(slotUrlsDropped(KUrl,QDropEvent*,QWidget*))); + connect(this, SIGNAL(urlChanged(KUrl)), + this, SLOT(emitExtendedUrlChangedSignal(KUrl))); } PlacesPanel::~PlacesPanel() @@ -47,25 +44,12 @@ void PlacesPanel::mousePressEvent(QMouseEvent* event) KFilePlacesView::mousePressEvent(event); } -void PlacesPanel::rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) -{ - Q_UNUSED(parent); - - const QModelIndexList indexes = selectedIndexes(); - if (!indexes.isEmpty()) { - const int selectedRow = indexes.first().row(); - if ((start >= selectedRow) && (end <= selectedRow)) { - // The currently selected item is about to be removed, reset view to home URL - const KUrl homeUrl = DolphinSettings::instance().generalSettings()->homeUrl(); - setUrl(homeUrl); - emit urlChanged(homeUrl, Qt::NoButton); - } - } -} - void PlacesPanel::slotUrlsDropped(const KUrl& dest, QDropEvent* event, QWidget* parent) { - DragAndDropHelper::instance().dropUrls(KFileItem(), dest, event, parent); + Q_UNUSED(dest); + Q_UNUSED(event); + Q_UNUSED(parent); + //DragAndDropHelper::instance().dropUrls(KFileItem(), dest, event, parent); } void PlacesPanel::emitExtendedUrlChangedSignal(const KUrl& url)