KItemListController* controller = m_container->controller();
controller->setSelectionBehavior(KItemListController::MultiSelection);
- if (GeneralSettings::autoExpandFolders()) {
- controller->setAutoActivationDelay(750);
- }
connect(controller, SIGNAL(itemActivated(int)), this, SLOT(slotItemActivated(int)));
connect(controller, SIGNAL(itemsActivated(QSet<int>)), this, SLOT(slotItemsActivated(QSet<int>)));
connect(controller, SIGNAL(itemMiddleClicked(int)), this, SLOT(slotItemMiddleClicked(int)));
emit selectionChanged(selectedItems());
}
-void DolphinView::dropUrls(const KFileItem& destItem,
- const KUrl& destPath,
- QDropEvent* event)
-{
- Q_UNUSED(destItem);
- Q_UNUSED(destPath);
- markPastedUrlsAsSelected(event->mimeData());
- //DragAndDropHelper::instance().dropUrls(destItem, destPath, event, this);
-}
-
void DolphinView::updateSorting(DolphinView::Sorting sorting)
{
ViewProperties props(url());
KFileItem DolphinView::rootItem() const
{
- return m_dirLister->rootItem();
+ KFileItem item = m_dirLister->rootItem();
+ if (item.isNull()) {
+ // The directory has not been loaded yet
+ item = KFileItem(KFileItem::Unknown, KFileItem::Unknown, url());
+ }
+ return item;
}
void DolphinView::observeCreatedItem(const KUrl& url)