#include <QGraphicsSceneDragDropEvent>
#include <QTimer>
#include <QScrollBar>
+#include <QPixmapCache>
#include <QPointer>
#include <QMenu>
#include <QVBoxLayout>
this, &DolphinView::slotSelectionChanged);
m_toolTipManager = new ToolTipManager(this);
+ connect(m_toolTipManager, &ToolTipManager::urlActivated, this, &DolphinView::urlActivated);
m_versionControlObserver = new VersionControlObserver(this);
m_versionControlObserver->setModel(m_model);
QDataStream saveStream(&viewState, QIODevice::WriteOnly);
saveState(saveStream);
- const KFileItemList itemList = selectedItems();
- m_selectedUrls.clear();
- m_selectedUrls = itemList.urlList();
-
setUrl(url());
loadDirectory(url(), true);
clearSelection();
- emit urlAboutToBeChanged(url);
m_url = url;
hideToolTip();
switch (event->type()) {
case QEvent::PaletteChange:
updatePalette();
+ QPixmapCache::clear();
break;
case QEvent::KeyPress:
if (GeneralSettings::useTabForSwitchingSplitView()) {
QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);
if (keyEvent->key() == Qt::Key_Tab && keyEvent->modifiers() == Qt::NoModifier) {
- toggleActiveViewRequested();
+ emit toggleActiveViewRequested();
return true;
}
}
const QPoint pos = m_container->mapToGlobal(itemRect.topLeft().toPoint());
itemRect.moveTo(pos);
- m_toolTipManager->showToolTip(item, itemRect);
+ m_toolTipManager->showToolTip(item, itemRect, nativeParentWidget()->windowHandle());
}
emit requestItemInfo(item);
event->mimeData(),
event->buttons(),
event->modifiers());
- dropUrls(destUrl, &dropEvent);
+ dropUrls(destUrl, &dropEvent, this);
setActive(true);
}
-void DolphinView::dropUrls(const QUrl &destUrl, QDropEvent *dropEvent)
+void DolphinView::dropUrls(const QUrl &destUrl, QDropEvent *dropEvent, QWidget *dropWidget)
{
- KIO::DropJob* job = DragAndDropHelper::dropUrls(destUrl, dropEvent, this);
+ KIO::DropJob* job = DragAndDropHelper::dropUrls(destUrl, dropEvent, dropWidget);
if (job) {
connect(job, &KIO::DropJob::result, this, &DolphinView::slotPasteJobResult);
// Restore the current item that had the keyboard focus
stream >> m_currentItemUrl;
+ // Restore the previously selected items
+ stream >> m_selectedUrls;
+
// Restore the view position
stream >> m_restoredContentsPosition;
stream << QUrl();
}
+ // Save the selected urls
+ stream << selectedItems().urlList();
+
// Save view position
const qreal x = m_container->horizontalScrollBar()->value();
const qreal y = m_container->verticalScrollBar()->value();
}
}
+ selectionManager->beginAnchoredSelection(selectionManager->currentItem());
selectionManager->setSelectedItems(selectedItems);
}
}