aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangformat/clangformatutils.h
Commit message (Collapse)AuthorAgeFilesLines
* Utils: Rename FileName to FilePathhjk2019-05-281-2/+2
| | | | | | | | More in line with QFileInfo terminonlogy which appears to be best-of-breed within Qt. Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ClangFormat: Fix UI issuesIvan Donchevskii2019-04-261-0/+3
| | | | | | | | | | | - 'Default' values remain so after save/load - the language is fixed to C++ - the project settings are shown correctly - fix parsing configuration file - do not trigger slots when we fill the table Change-Id: I91b477721b5084803324cd38d0cfeb9d5650dd9f Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* ClangFormat: Add context menu item to open current config fileIvan Donchevskii2019-03-071-0/+1
| | | | | | | | | Add the context menu item to C++ editor which allow you to open the currently used .clang-format configuration file. Change-Id: If9d6bec4f4085c18b13df15d78417aee82ddb4e4 Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* ClangFormat: Change the logic how configuration is pickedIvan Donchevskii2019-03-051-0/+3
| | | | | | | | | | | | | | Let's use by default the configuration that clang-format picks itself for the source file. The Qt Creator configuration will now only override the default one with global or project settings and can be turned off with the checkbox. This behavior is clearer than always picking some configuration which Qt Creator prefers best. Change-Id: If5ed3d67eb6b4b47a6d0fd5259f7efbb608914d1 Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* ClangFormat: Use relevant settings for each fileIvan Donchevskii2018-11-141-3/+4
| | | | | | | | | | | | | Existing Clang Format settings may not follow the project/global pattern but can be expected to be used for the indentation/formatting. So let's proceed with UI for global/project settings but use global settings only if there's no configuration found for the current file. Change-Id: I87c25ab3feb7e2e3deb0290848088657783cf972 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* ClangFormat: Synchronize with C++ code style settingsIvan Donchevskii2018-11-081-13/+7
| | | | | | | | | And remove UI for default code style settings because it does not affect anything when ClangFormat plugin is enabled. Change-Id: Ie348b7d2691b09ea2b4868da987f2a27347ea0f3 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Clang: Significantly improve ClangFormat plugin usabilityIvan Donchevskii2018-10-171-0/+51
What's new: 1. New LibFormat option is used to prevent lines shrink, which allows to drop most of tricks used before for that purpose. 2. Cached UTF-8 source code is used to improve performance 3. Improved error handling. 4. Slightly improved UI. Change-Id: I4605200fa103167369a40650b2e1ad2c61e8133b Reviewed-by: Marco Bubke <marco.bubke@qt.io>