aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/texteditorsettings.cpp
Commit message (Collapse)AuthorAgeFilesLines
* TextEditor: Add highlighting category for namespacesChristian Kandeler2021-10-291-0/+2
| | | | | | | | ... and make use of it in the built-in code model and with clangd. Task-number: QTCREATORBUG-16580 Change-Id: I8c331f56aa1bbf91c9f768be82a779a72f40c4c7 Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: Allow special highlighting for static membersChristian Kandeler2021-10-281-0/+4
| | | | | | Task-number: QTCREATORBUG-9659 Change-Id: Idae529fd876ba5f555c76e4d282efc9263263d6c Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: remove Function from the declaration format UI textDavid Schulz2021-09-021-2/+2
| | | | | | Task-number: QTCREATORBUG-26156 Change-Id: I2ca0f8c6d6445a78b9bd5f366c51237073991fd6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge remote-tracking branch 'origin/4.15'Eike Ziller2021-03-221-2/+2
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp src/plugins/debugger/gdb/gdboptionspage.cpp Change-Id: I4149e860b6842ea63bff3a7eb9632b7a6c2919d8
| * Text Editor: Fix UI text capitalizationLeena Miettinen2021-03-181-2/+2
| | | | | | | | | | Change-Id: I888cfb4eb8c3b5934b45dcf80d751fb97d8f7624 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | ClangCodeModel/TextEditor: Add support for highlighting parametersTom Praschan2021-03-151-0/+2
|/ | | | | | | | | This is already built into clang, so we just need to expose it to the highlighter and the UI. Fixes: QTCREATORBUG-24880 Change-Id: I6d0595af2589a9b69eb954aafad46457ab2c5752 Reviewed-by: David Schulz <david.schulz@qt.io>
* Construct QColor instances from int instead of QStringJarek Kobus2020-11-171-4/+4
| | | | | Change-Id: I75c72d71fef024a2229f8f78a96d3f02a1fbf72b Reviewed-by: hjk <hjk@qt.io>
* Core: Allow different highlight colors in search result windowChristian Kandeler2020-09-181-0/+8
| | | | | | | | | ... and make use of that in CppTool's "Find Usages" by assigning different colors to read and write accesses. Fixes: QTCREATORBUG-12734 Change-Id: I067db2c8d693bb2c5be44249931ee4f0269f7e52 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Editor: set default text foreground color explicitDavid Schulz2020-07-201-1/+1
| | | | | | | | Amends 9182d4eda75033bbbebf50e87e518adc33d499f6. Fixes: QTCREATORBUG-24352 Change-Id: I16171874cf2f2e9fde95b404f7510a502a39f26e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Core/Utils: Migrate further to Utils::Idhjk2020-07-061-16/+16
| | | | | | | | The coreplugin/id.h header is kept for downstream for now. Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66 (cherry picked from commit 430a33dcd9ac80ddb848e41f8f059102857c88aa) Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Git: Port colorful log to text colorsAndre Hartmann2020-07-061-1/+15
| | | | | | | | Fixes: QTCREATORBUG-24198 Change-Id: Icde06da5ac848fb0f7faf02a8e55fb26136f318c Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Editor: Fix crash on exitDavid Schulz2020-03-021-6/+11
| | | | | | | | | | | | Make sure no FontSettingsPageWidget is created when changing the font zoom level in the editor. Otherwise it will crash in the font combo box when closing Qt Creator. Since we can't use the save and emit mechanism from the widget anymore move it to TextEditorSettings Change-Id: I1eb87bbae3cf2b802fb15981e7fc2203106d5565 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* TextEditor: Drop some indirection of texteditor signallinghjk2020-02-041-14/+2
| | | | | | | | | | This is one of the few remaining users of the QObject inheritance of IOptionPage. While ok from an architectural point of view, this setup is not and has not been used elsewhere, and eats a few bytes and cycles. Change-Id: Id067f501d284d0726e8952345a2acd058dabbcd5 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: Move FontSettingsPage more towards new schemehjk2020-01-301-13/+10
| | | | | | | | | | | Mainly re-using the existing pimpl as new widget implementation, and using the primary storage out of the page (into texteditorsettings). This one is structutally bit different as there is that second path (Ctrl+Wheel) to modify font zoom. Change-Id: I7b85c781c7c53a733b234754beb5bb54664be3fd Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* TextEditor: Make FontSettingsPage more like the other oneshjk2020-01-271-27/+33
| | | | | Change-Id: I00d758bcdafd39b14498bdf182332ece53215d64 Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: Simplify BehaviorSettingsPage creationhjk2020-01-221-21/+14
| | | | | Change-Id: I0e1d44e9cccbf83e11ef04f055e1e6bd0317c40e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* TextEditor: Simplify DisplaySettingsPage creationhjk2020-01-221-11/+5
| | | | | Change-Id: I082db19c8b88d1fa21690339d2cb7dc2728e0d44 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* TextEditor: Partially apply new settings page patternhjk2020-01-211-8/+3
| | | | | | | | Internal handling is quite fragile in some cases, so take baby steps here. Change-Id: Ia25666b8c8d26b6e580d2189b191767b9681dc21 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* TextEditor: Partially apply SettingsPage pattern to completion settingshjk2020-01-201-8/+3
| | | | | Change-Id: Ieb8547bab74c6a2d6489a6bf53b7f224003e0401 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* FancyLineEdit: Add camel case navigationAndre Hartmann2019-08-021-0/+8
| | | | | | | | | | | | Use it for search and replace functions as well as for Locator. The camel case navigation can be switched on / off with the existing menu Options > Text Editor > Behavior > Enable Build-in camel case navigation. Fixes: QTCREATORBUG-21140 Change-Id: I3f2dcafff231366b3c8f08c14514dd8940cca2a0 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Compile fix with recent Qt devhjk2019-07-291-1/+1
| | | | | | | | | The reasoning in 1b4766e26c6b did not take into account that the scope of QT_NO_JAVA_STYLE_ITERATORS may change over time, as done with f70905448f6 in Qt base. Change-Id: Ib1966ff26c4d36d5f62e149d6b45baa4aecf825d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* General Messages Pane: Add font settings and zoomAndre Hartmann2019-03-201-0/+14
| | | | | | | | | | As the settings are managed by TextEditor, but Core does not depend on TextEditor, no signal connection can be used. Instead, call the needed functions in MessageManager directly. Fixes: QTCREATORBUG-18908 Change-Id: Idc81f1071d5228cd6582e3a00189a5db24288fc6 Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: replace generic highlighter with ksyntaxhighlightingDavid Schulz2019-01-281-9/+10
| | | | | | Fixes: QTCREATORBUG-21029 Change-Id: I9894c4384e0e47da6bf030b7b8e07c3ad4737ff3 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* TextEditor: Remove defaults from FormatMarco Bubke2018-10-111-6/+6
| | | | | | | | | The default caused strange bugs because it was expected that no color was set. Task-number: QTCREATORBUG-21282 Change-Id: I3b520b944ffcb87838ba3e7b02e1d28b0f757679 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* TextEditor: Handle overloaded operators as functionsMarco Bubke2018-09-261-3/+4
| | | | | | | | | | Overloaded operators are semantically very similar to functions. So it make sense to highlight them the same. It provides the user also with feedback that he can jump to the declaration of the operator etc.. Change-Id: I110084e3e53882c9d5cbfa88442a93914792db17 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* TextEditor: Cleanup text stylesMarco Bubke2018-09-251-20/+23
| | | | | | | | | | | | | So far there were different settings for different mix-ins. There was no technical reason why we limit the user. So you can set now the color, the relative saturation and value, the font, underline, italic and bold. The relative saturation and value are disabled if the color is set. The settings are reordered too so the order reflects the semantic meaning much better. Change-Id: I440967d6729f720816d2bc028ff9fe8e8868074e Task-number: QTCREATORBUG-21105 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* TextEditor: ModernizeOrgad Shaneh2018-09-201-5/+5
| | | | | | | override, auto, nullptr, member initializers. Change-Id: I04c6ebb683849568973bd7782fb5a3279267141e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Highlighting: Add highlighting style for punctuationIvan Donchevskii2018-09-131-5/+8
| | | | | | | | | Currently only operators have their own style but not punctuation tokens. Make possible to highlight both. Task-number: QTCREATORBUG-20666 Change-Id: I9533e0f1bef65b86c4e4f5c9756571103584124b Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* TextEditor: Highlight punctuators as TextHugo Holgersson2018-05-031-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change limits the set of tokens that fall under Token::isOperator(). That allows cpphighlighter.cpp to distinguish operator tokens from punctuator tokens (without changing any logic in cpphighlighter.cpp). This change moves punctuators from "Operator" to the "Text" style category where they belong. Punctuators are not operators. Punctuators are dumb text tokens. Why don't we let the clang backend alone separate these tokens for us? 1. Clang is slow on big files. Sometimes the highlighting dictated by clang is painted _seconds_ after cpphighlighter.cpp runs. CppHighlighter is way faster so we use it to "prepaint" code while clang is busy in the background. 2. Secondly, clang cannot yet handle all operator types. In particular, none if its "operator cursors" CXCursor_UnaryOperator: CXCursor_BinaryOperator: CXCursor_CompoundAssignOperator: CXCursor_ConditionalOperator: includes the -> and . operators. We still need CppHighlighter to paint those tokens. However, once clang has finished processing the file some operator tokens will be repainted. We need clang to get all operators' semantics. In particular, we need clang to tell us if < is a "smaller than"-operator or part of a template parameter like set<int>. Task-number: QTCREATORBUG-19659 Change-Id: I952cb58f7c79134b3281e2a8221425cc1d0ad263 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Add semantic C++ operator-token stylingHugo Holgersson2018-04-301-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | We used to style overloaded operators in the same way as C++'s built-in operators. There was no way to tell if a + token would call a operator+() function or not. Now, if an operator is overloaded (redefined), we give it the "Overloaded Operator"-mixin so users can style it differently. Note: Calls to overloaded 'new' and 'delete' are not highlighted by "Overloaded Operator". This is because clang today always maps these to CXCursor_CXXNewExpr and CXCursor_CXXDeleteExpr with cursor.spelling == "" (empty string). So there is no (?) quick way for us to tell if a new/delete-token was overloaded or not. After follow-ups, follow symbol will work for operator overload usages in current translation unit. Commit is appended by Ivan Donchevskii. Task-number: QTCREATORBUG-19659 Change-Id: I157855d482a61ad2059642a1ee982089fcb7d312 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* TextEditor: Do not try to remove settings pages from global object poolhjk2018-03-051-7/+0
| | | | | | | | | They are not present there anymore. This amends 928dd20101f7a6ee4d40b320b25a60a52fbba228. Change-Id: I383511dfc7c8da9a6c594e44a4ec697a2057ef9c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* TextEditor: Do not put settings pages into global object poolhjk2018-03-021-8/+0
| | | | | | | No need for it. Change-Id: I401f8c2894c74f331311f0025df29972142739c9 Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditorPlugin: Pimpl and remove uses of global object poolhjk2018-02-071-2/+1
| | | | | Change-Id: I17eb0e928788f02f6089fd2a2ed2393d7f577d11 Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: Allow direct color styling for function definitionsHugo Holgersson2017-12-191-2/+1
| | | | | | | | | | | | | | | | We can now give FunctionDefintion *any* fore/background color. FunctionDefinition is now a "color overriding mixin" to Function and Virtual Function. Previously, FunctionDefinition could only get a color that was an offset to the color already given to Function and Virtual Function. TEST=The FunctionDefinition-option can now set fore/background colors. Requires Clang. Task-number: QTCREATORBUG-16625 Change-Id: I0ef5fd30a3762aa2cb4a7684fea2620041f7cf7e Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: Implement highlighting of function definitionsHugo Holgersson2017-11-281-3/+10
| | | | | | | | | | | | | | | | | | This allows users to style function names at their definitions. Once set, the XML-style token "FunctionDefinition" will highlight all function definitions: the style option is a mixin to Function and Virtual Function. TEST=Default themes and locally hacked themes that lack Function, FunctionDefinition, Declaration-styling look as they did before this patch. Requires Clang. Task-number: QTCREATORBUG-16625 Change-Id: I49d8e401211bdf28ff74699feac16fe98f6d64ce Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* TextEditor: Clarify the UI hint of the "Declaration" style optionHugo Holgersson2017-11-021-2/+2
| | | | | | | | | | | | This setting currently only styles function declarations so let's make that clear to users by updating the visible description and renaming it to "Function Declaration". If we ever implement variable declaration styling, we need to again update the name + UI hint to reflect that capability. Change-Id: I1d9579d2915d5e69f92fb045ecdb641a79351112 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Extend default text styleMarco Bubke2017-06-191-2/+11
| | | | | | | | | | | | | | | We introduced some new text styles but never used them in the default style so far. To make them more user visible we have done following changes Output Argument to italic Declaration to bold Local variable to dark blue which is different to Macros Global variable to orange Functions to water blue Task-number: QTCREATORBUG-18151 Change-Id: If3f62f74795b5ae35a92db2ef6d5c48219c8ad18 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Clang: Add output argument highlightingMarco Bubke2016-10-121-0/+4
| | | | | | | This adds a mix-in for writable functions arguments. Change-Id: I758f7fef77d992ea25395db550571ccb081fd5fd Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* TextEditor: Relative colorsMarco Bubke2016-09-281-1/+1
| | | | | | | | We introduce relative colors to make it possible to change for example the color of a declaration slightly. Change-Id: I8c1991a8907207d3616be954504c68ea18c6deb1 Reviewed-by: David Schulz <david.schulz@qt.io>
* Editor: Animate automatic completed text.David Schulz2016-05-311-0/+3
| | | | | | | | | This gives a clear hint that something has changed. And gets the attention of the author in the case he didn't expect some kind of automatic brace or quote completion. Change-Id: I33e383db9a1e797ecb285a407e46671f41be7051 Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
* Move completion settings page to TextEditor plugin.David Schulz2016-05-301-14/+13
| | | | | | Change-Id: I12b7828d23d599e5903237d0cc2a3c0440e1b07d Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* TextEditor: Add global variable text stylesMarco Bubke2016-03-071-0/+1
| | | | | Change-Id: I088dc484b6a4ace79609ca7fcc4145344ccea5a9 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* TextEditor: Add declaration format descriptionMarco Bubke2016-03-071-1/+4
| | | | | Change-Id: Ibea12f324308a07d7e549d60a1b1c5767659efb3 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-17/+12
| | | | | | | * Update files in src/plugins Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* TextEditor: Make TextEditorSettings all staticOrgad Shaneh2015-12-181-12/+7
| | | | | | | | Move the fading indicator to the widget Change-Id: I762c46845153c93c75ea0198c993b655559fad3b Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* TextEditor: Use Qt5-style connectsOrgad Shaneh2015-12-181-14/+14
| | | | | | | The heavy lifting was done by clazy. Change-Id: I380120e3419d2a3c0e272f51cc3e0d5f6aaa5e9b Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* TextEditor: Add fine control over the color scheme settingsMarco Bubke2015-10-191-173/+185
| | | | | | | | | | | You have seen always all setting but some settings had no meaning because only the foreground color is used. Now you can disable this settings so it is more clear what you can change. Change-Id: I0fdd2ac6f40e27b5160a2c54a512289457674dae Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* TextEdit: Add underline support to text settingsMarco Bubke2015-09-101-6/+13
| | | | | | | | | Underlines colors was hard coded to the foreground color of some settings. With this patch you can set the underline color and the underline style to your taste. Change-Id: Ibc64c2d2c89bf1827a2cadaf6aee9d50d08cd1ee Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* TextEditor/Clang: Add font settings for clang diagnosticsMarco Bubke2015-09-101-0/+18
| | | | | Change-Id: Iea2b4fabf0f4620b12f88b108eb59c160945c8d8 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* TextEditor: Show fading indicator on zoom changeOrgad Shaneh2015-08-251-1/+11
| | | | | Change-Id: I3bf772ec09f08a3a9cb9652ca9718585beed9a2e Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>