Commit Graph

11 Commits

Author SHA1 Message Date
hjk
c9a7a3a2d3 Beautifier: Remove inner namespace level
And inline non-shared object id.

I regularly stumble over this speciality when doing mass refactorings
in the code base and I believe the extra benefit this namespace level
has does not outweigh it.

Change-Id: I3694a656f1095dcb5509b212b9e1d25ae5c8b5ec
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-19 11:42:10 +00:00
Nikolai Kosjar
89fa23a916 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>
2017-09-21 07:15:12 +00:00
Przemyslaw Gorszkowski
163b2c027d Beautifier: added support for fallback-style option for clang-format
Task-number: QTCREATORBUG-17813
Change-Id: I36adee4889d1b851171d34852eed29639c68b574
Reviewed-by: Lorenz Haas <lorenz.haas@histomatics.de>
Reviewed-by: hjk <hjk@qt.io>
2017-03-29 08:35:24 +00:00
Lorenz Haas
5b3f36184b Beautifier: Modernize, code style, and clean up
Use nullptr and range based for loops, unify initializer list code
style, remove superfluous includes, make private slots private methods,
get rid of QLatin1(Char|String), use initializer lists and some minor
code style issues.

Change-Id: I94ba10fc96bb628239364a8201bde98a66b2c4c1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2016-05-02 19:50:52 +00:00
Lorenz Haas
3310fbc8f2 Beautifier: Fix clang-format's custom style handling
Instead of dealing with clang-format's YAML format use proper command
line parameters.

Task-number: QTCREATORBUG-15604
Change-Id: Ie0b22aff105c8d208d30e2e945b0036b0b8606c1
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-04-14 20:07:05 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Lorenz Haas
6be112d72d Beautifier: Avoid raw loops wherever applicable
Change-Id: I8b595ce0f7b3544466c6308457bf22826d1dafeb
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-06-22 11:34:00 +00:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
Leena Miettinen
12c3b9e489 Beautifier: edit UI text
Make error message wording more consistent. Fix some
punctuation and grammar issues.

Change-Id: I21298fea201ff51635d4b6fa9f57445bc94dd0db
Reviewed-by: Lorenz Haas <lykurg@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-02-25 10:36:43 +01:00
Lorenz Haas
4988b41b3f Introduce new Beautifier plug-in
Beautifier is a plug-in for source code beautifiers.
Currently Artistic Style, Clang-format and Uncrustify are supported.

Task-number: QTCREATORBUG-7489
Change-Id: I8dde9a8ba6a6a55537bfd450ec82ef966ed283c0
Reviewed-by: David Schulz <david.schulz@digia.com>
2014-02-18 07:36:12 +01:00