#include "placespanel.h"
-#include "dolphin_generalsettings.h"
#include <kfileitem.h>
#include <konq_operations.h>
-#include "settings/dolphinsettings.h"
#include "views/draganddrophelper.h"
PlacesPanel::PlacesPanel(QWidget* parent) :
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);