┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews
diff options
context:
space:
mode:
authorFelix Ernst <[email protected]>2026-04-23 18:22:49 +0200
committerFelix Ernst <[email protected]>2026-04-27 13:26:59 +0200
commit1e13c6abb6fc179fa8da32fe62df89560a801b3d (patch)
treea154114e7144f5b6678e7b394bf7c7423b56051b /src/kitemviews
parent2d7dac81ad66672aa2332cc37e3439755fe1f930 (diff)
Show type-ahead typing feedback in the status bar
The typed keys are displayed in the status bar while also displaying which file name they were auto-completed to (i.e. which file was selected because of the typing). This commit contains some refactoring to keep the original status bar functionality working as expected. This commit also separates DolphinMainWindow from DolphinStatusBar which is great news architecture-wise. The status bar is encapsulated within the DolphinViewContainer.
Diffstat (limited to 'src/kitemviews')
-rw-r--r--src/kitemviews/kitemlistcontroller.cpp1
-rw-r--r--src/kitemviews/kitemlistcontroller.h7
2 files changed, 8 insertions, 0 deletions
diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp
index ef0f9dc14..e87ed3c18 100644
--- a/src/kitemviews/kitemlistcontroller.cpp
+++ b/src/kitemviews/kitemlistcontroller.cpp
@@ -547,6 +547,7 @@ void KItemListController::slotChangeCurrentItem(const QString &text, bool search
m_view->scrollToItem(index, KItemListView::ViewItemPosition::Beginning);
*found = true;
}
+ Q_EMIT typeAheadUsed(text, index >= 0 ? std::make_optional<int>(index) : std::nullopt);
}
void KItemListController::slotAutoActivationTimeout()
diff --git a/src/kitemviews/kitemlistcontroller.h b/src/kitemviews/kitemlistcontroller.h
index 48a518610..6379acbd8 100644
--- a/src/kitemviews/kitemlistcontroller.h
+++ b/src/kitemviews/kitemlistcontroller.h
@@ -190,6 +190,13 @@ Q_SIGNALS:
void aboveItemDropEvent(int index, QGraphicsSceneDragDropEvent *event);
/**
+ * Emits the keys the user typed for searching so they can be displayed back to the user.
+ * @param typedString A string of basic interpretation of key presses e.g. "qwert".
+ * @param foundIndex The index of the item that was marked as current in response to this search.
+ */
+ void typeAheadUsed(const QString &typedString, std::optional<int> foundIndex);
+
+ /**
* Is emitted if the Escape key is pressed.
*/
void escapePressed();