Compile and run
Interesting Dolphin uses the KStandardAction::Find enum (https://api.kde.org/frameworks/kconfigwidgets/html/namespaceKStandardAction.html#aa71041e1fa0a0c740e00b423ae684334a70ba4f3d9ae876b26883ea355627d236) . Should I create a non-standard action instead?
Now Dolphin doesn't compile:
/home/nate/kde/src/dolphin/src/dolphinmainwindow.cpp: In member function ‘void DolphinMainWindow::setupActions()’: /home/nate/kde/src/dolphin/src/dolphinmainwindow.cpp:1145:5: error: invalid use of member function ‘void DolphinMainWindow::find()’ (did you forget the ‘()’ ?) find->setText(i18n("Search...")); ^~~~ /home/nate/kde/src/dolphin/src/dolphinmainwindow.cpp:1145:9: error: base operand of ‘->’ is not a pointer find->setText(i18n("Search...")); ^~ /home/nate/kde/src/dolphin/src/dolphinmainwindow.cpp:1144:14: warning: unused variable ‘search’ [-Wunused-variable] QAction *search = KStandardAction::find(this, &DolphinMainWindow::find, actionCollection()); ^~~~~~
Looks like that should be search->setText(blablabla)
Make sure you're testing your changes! :)
I still think that the rename from "Search" to "Find" should be done either upstream/globally or not at all.
Anyway, it's unrelated from this commit, which is just about moving to placeholders everywhere (which I agree with).
We shouldn't rename a standard action. From System Settings -> Global Shortcuts it will still be named "Find..."
Search and Find have different meanings because they do different things: locating files or items that match the given text in a data set of indeterminate or unclear size is "Search"; locating instances of text within the open document or page is "Find". But they should both have the same common ctrl+F keyboard shortcut. So it cannot be done globally.
Any idea how we move forward with this?
Fair enough. Another thing I didn't consider is that the menubar is hidden by default, so most dolphin users probably never even see the text of the search action.
@ognarb Please rename the variables as mentioned inline and then we can ship it.
Please call this variable searchAction.
And this one too.