diff options
author | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2017-09-05 09:59:25 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2017-09-21 07:15:12 +0000 |
commit | 89fa23a916b55bd06b0b0756d6d874b4b03e5ba1 (patch) | |
tree | dd0507586e081df9849c90c545b868f2bd15d9f9 /src/plugins/beautifier/beautifierplugin.cpp | |
parent | edab564cf0c051ad0774dc5a59751d3c5781b263 (diff) | |
download | qt-creator-89fa23a916b55bd06b0b0756d6d874b4b03e5ba1.tar.gz |
Beautifier: ClangFormat: Format current syntactic entity for no selection
In case there was no selection, the action "Format Selected Text" could
format the whole file (option) as a fallback.
However, there is also the use case of formatting the syntactic entity
under the cursor. Introducing another separate action for this feels
wrong, so remove the fallback instead since there is already an action
handling this.
Change-Id: Ia73f6074433e706bb4c2d375ad5b84dd59bc93a3
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Lorenz Haas <lorenz.haas@histomatics.de>
Diffstat (limited to 'src/plugins/beautifier/beautifierplugin.cpp')
-rw-r--r-- | src/plugins/beautifier/beautifierplugin.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/beautifier/beautifierplugin.cpp b/src/plugins/beautifier/beautifierplugin.cpp index 947233606c..e2715af146 100644 --- a/src/plugins/beautifier/beautifierplugin.cpp +++ b/src/plugins/beautifier/beautifierplugin.cpp @@ -496,6 +496,12 @@ QString BeautifierPlugin::msgFormatSelectedText() return tr("Format &Selected Text"); } +QString BeautifierPlugin::msgFormatAtCursor() +{ + //: Menu entry + return tr("&Format at Cursor"); +} + QString BeautifierPlugin::msgDisableFormattingSelectedText() { //: Menu entry |