Based on the idea of Martin Tobias Holmedahl Sandsmark
// 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();