X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/78a3cd3e4bc75fc299a6b05b266bdd58fe7f8dcf..89dcef3af497fb43ce612df45b1aa968a6a2ccb0:/src/views/dolphinview.cpp diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index b33353e3a..fba7e6419 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -204,7 +204,6 @@ DolphinView::DolphinView(const QUrl &url, QWidget *parent) connect(m_model, &KFileItemModel::currentDirectoryRemoved, this, &DolphinView::currentDirectoryRemoved); connect(this, &DolphinView::itemCountChanged, this, &DolphinView::updatePlaceholderLabel); - connect(this, &DolphinView::itemCountChanged, this, &DolphinView::updateSelectionState); m_view->installEventFilter(this); connect(m_view, &DolphinItemListView::sortOrderChanged, this, &DolphinView::slotSortOrderChangedByHeader); @@ -1828,6 +1827,11 @@ void DolphinView::hideToolTip(const ToolTipManager::HideBehavior behavior) } } +bool DolphinView::handleSpaceAsNormalKey() const +{ + return !m_container->hasFocus() || m_container->controller()->isSearchAsYouTypeActive(); +} + void DolphinView::slotTwoClicksRenamingTimerTimeout() { const KItemListSelectionManager *selectionManager = m_container->controller()->selectionManager(); @@ -2059,9 +2063,9 @@ void DolphinView::slotRoleEditingFinished(int index, const QByteArray &role, con KIO::FileUndoManager::self()->recordJob(KIO::FileUndoManager::Rename, {oldUrl}, newUrl, job); job->uiDelegate()->setAutoErrorHandlingEnabled(true); - forceUrlsSelection(newUrl, {newUrl}); - if (!newNameExistsAlready) { + forceUrlsSelection(newUrl, {newUrl}); + // Only connect the result signal if there is no item with the new name // in the model yet, see bug 328262. connect(job, &KJob::result, this, &DolphinView::slotRenamingResult); @@ -2339,7 +2343,7 @@ void DolphinView::slotSwipeUp() void DolphinView::showLoadingPlaceholder() { - m_placeholderLabel->setText(i18n("Loading...")); + m_placeholderLabel->setText(i18n("Loading…")); m_placeholderLabel->setVisible(true); } @@ -2414,3 +2418,5 @@ bool DolphinView::tryShowNameToolTip(QHelpEvent *event) } return false; } + +#include "moc_dolphinview.cpp"