Commit 977a775d authored by Nate Graham's avatar Nate Graham
Browse files

Remove FolderModel::openSelected()

This function gets run when you select multiple items and right-click >
Open. However there is already a FolderModel::runSelected() function
that does basically the same thing, but with more sophisticated handling
of the selected files. So let's use that instead and delete
openSelected() to remove a redundant parallel code path.
parent 2ae67b71
Pipeline #210049 passed with stage
in 6 minutes and 55 seconds
......@@ -1635,7 +1635,7 @@ void FolderModel::createActions()
connect(restoreFromTrash, &QAction::triggered, this, &FolderModel::restoreSelectedFromTrash);
QAction *actOpen = new QAction(QIcon::fromTheme(QStringLiteral("window-new")), i18n("&Open"), this);
connect(actOpen, &QAction::triggered, this, &FolderModel::openSelected);
connect(actOpen, &QAction::triggered, this, &FolderModel::runSelected);
m_actionCollection.addAction(QStringLiteral("open"), actOpen);
m_actionCollection.addAction(QStringLiteral("cut"), cut);
......@@ -2078,20 +2078,6 @@ void FolderModel::deleteSelected()
void FolderModel::openSelected()
if (!m_selectionModel->hasSelection()) {
const QList<QUrl> urls = selectedUrls();
for (const QUrl &url : urls) {
auto job = new KIO::OpenUrlJob(url);
job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, nullptr));
void FolderModel::undo()
if (QAction *action = m_actionCollection.action(QStringLiteral("undo"))) {
......@@ -234,7 +234,6 @@ public:
Q_INVOKABLE void copy();
Q_INVOKABLE void cut();
Q_INVOKABLE void deleteSelected();
Q_INVOKABLE void openSelected();
Q_INVOKABLE void undo();
Q_INVOKABLE void refresh();
Q_INVOKABLE void createFolder();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment