summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/builtincursorinfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge CppTools into CppEditorChristian Kandeler2021-09-011-361/+0
| | | | | | | | | | | | | | | | There was no proper separation of responsibilities between these plugins. In particular, CppTools had lots of editor-related functionality, so it's not clear why it was separated out in the first place. In fact, for a lot of code, it seemed quite arbitrary where it was put (just one example: switchHeaderSource() was in CppTools, wheras switchDeclarationDefinition() was in CppEditor). Merging the plugins will enable us to get rid of various convoluted pseudo-abstractions that were only introduced to keep up the artificial separation. Change-Id: Iafc3bce625b4794f6d4aa03df6cddc7f2d26716a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Compile fix with recent Qt devhjk2019-07-291-3/+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>
* Standardize on int for line and column valueshjk2019-07-261-21/+16
| | | | | | | | | | | | | | | Recently tons of warnings show up for presumably "problematic" singned <-> unsigned and size conversions. The Qt side uses 'int', and that's the biggest 'integration surface' for us, so instead of establishing some internal boundary between signed and unsigned areas, push that boundary out of creator core code, and use 'int' everywhere. Because it reduces friction further, also do it in libcplusplus. Change-Id: I84f3b79852c8029713e7ea6f133ffb9ef7030a70 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppTools: ModernizeNikolai Kosjar2019-02-081-11/+9
| | | | | Change-Id: I78af9cd4ccddfa4ed744dce96b772ae5644c89d2 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* CppTools: modernizeAlessandro Portale2019-01-211-2/+2
| | | | | | Change-Id: Iaf02e4d026f1ac8b216833d83cd7a735e21ff60a Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Utils: Adjust column numbers affected by convertPosition changeIvan Donchevskii2018-11-091-3/+3
| | | | | | | | | | | | | | convertPosition change was introduced in 931ec39f64a. It changed 0-based column to 1-based which is how it naturally is in Qt Creator. This fixed some usages but broke many more. This is an attempt to fix the remaining use cases. Fixes CppEditor auto-tests. Change-Id: Ia8d14da0ebb035cd2fdd6da4ff6ec89c1c5121a8 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Prefer using 'override' instead of 'virtual'Alessandro Portale2018-07-111-1/+1
| | | | | | | | warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override] Change-Id: I6dac7a62b627fa1353b4455e1af92f869c2571cc Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* TextEditor: move convenience from texteditor to utilsIvan Donchevskii2017-09-221-4/+2
| | | | | | | Allows to use this header without texteditor dependency. Change-Id: I706f42799c3ea42473a716fa9ef9f3cfbef6fdd4 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppTools: Guard against invalid documentNikolai Kosjar2017-08-241-0/+3
| | | | | Change-Id: Ib6fcdc312fcfa558cd7e1e55c46cb84c002258ad Reviewed-by: hjk <hjk@qt.io>
* Clang: Fix built-in's ExtractFunction actionNikolai Kosjar2017-08-221-13/+13
| | | | | | | | | | | | | | | | | | Since Clang: Provide highlighting for identifier under cursor commit ca72c29462d9caae5e6095f8361f843758c5972c the LocalUseMap, used for some refactoring actions, was not updated anymore. Fall back to the built-in implementation for the LocalUseMap because it contains pointers to built-in AST that clang obviously can't provide. Task-number: QTCREATORBUG-18607 Change-Id: I08762fe457835d4d83aca719febcb3497ee9696b Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* CppTools: Avoid concurrent access to QTextDocumentNikolai Kosjar2017-06-201-11/+20
| | | | | | | | | Do not pass QTextCursor to another thread, but determine what we need from it in the main thread. Change-Id: I86900cfc5a28849efc1bd1dacb9b1452a5db252e Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: hjk <hjk@qt.io>
* CppTools: Use class member prefix "m_" in builtincursorinfo.cppNikolai Kosjar2017-06-141-34/+34
| | | | | Change-Id: I8e4079734f9167dcc9da2ceff027f8559bab367f Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* CppEditor: Generalize CppUseSelectionsUpdaterNikolai Kosjar2017-06-141-0/+360
Let CppUseSelectionsUpdater delegate the work to *EditorDocumentProcessor so that the clang code model can also provide results. Change-Id: I6872afbfeea1a5c4a64fdf19fcb1992f134dde08 Reviewed-by: Marco Bubke <marco.bubke@qt.io>