diff options
| author | Felix Ernst <[email protected]> | 2022-04-25 12:52:05 +0200 |
|---|---|---|
| committer | Felix Ernst <[email protected]> | 2022-08-14 14:42:40 +0000 |
| commit | 78cffd2979a6ed87e044fcb024cf4fdfc5c7cb3d (patch) | |
| tree | 7e5b66a5b4fc8c3328949d80898be2d1d57da5b7 /src/selectionmode/actiontexthelper.h | |
| parent | 8e55f2c2409fd6ca9ebc66a6568f4d3bcbef7576 (diff) | |
Improve code quality
Diffstat (limited to 'src/selectionmode/actiontexthelper.h')
| -rw-r--r-- | src/selectionmode/actiontexthelper.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/selectionmode/actiontexthelper.h b/src/selectionmode/actiontexthelper.h index 8f7501fa4..1b8840375 100644 --- a/src/selectionmode/actiontexthelper.h +++ b/src/selectionmode/actiontexthelper.h @@ -17,6 +17,11 @@ namespace SelectionMode /** * @brief Helps changing the texts of actions depending on the current selection. + * + * This is useful for actions that directly trigger a change when there is a selection and do something + * different when nothing is selected. For example should the copy action read "Copy" when items are + * selected but when no items are selected it can read "Copy…" since triggering it will enter selection + * mode and ask users to select the files they want to copy first. */ class ActionTextHelper : QObject { @@ -25,7 +30,7 @@ public: /** * Changes the text of \a action to \a text whenever textsWhenNothingIsSelectedEnabled(true) is called. - * The texts can be changed back by calling textsWhenNothingIsSelectedEnabled(false) is called. + * The texts can be changed back by calling textsWhenNothingIsSelectedEnabled(false). * @see textsWhenNothingIsSelectedEnabled() */ void registerTextWhenNothingIsSelected(QAction *action, QString registeredText); |
