summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppoverviewmodel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge CppTools into CppEditorChristian Kandeler2021-09-011-231/+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>
* CppTools: Fix QStringRef and QSharedPointer related issues with Qt6Eike Ziller2020-09-151-1/+1
| | | | | | Task-number: QTCREATORBUG-24098 Change-Id: I97347ac3fb397fea8eee655e3cc4ee252c511885 Reviewed-by: hjk <hjk@qt.io>
* Standardize on int for line and column valueshjk2019-07-261-10/+10
| | | | | | | | | | | | | | | 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: modernizeAlessandro Portale2019-01-211-2/+2
| | | | | | Change-Id: Iaf02e4d026f1ac8b216833d83cd7a735e21ff60a Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* CppTools: Use cursor range for better outline navigationIvan Donchevskii2018-06-041-0/+6
| | | | | | | | | | | | | | Clang provides cursor range for each declaration in symbol outline. Use that information to search for more accurate correspondence between a cursor position in editor and an entry in symbol outline. For example skip indexes with not matching ranges to prevent pure declarations from automatically become parents of everything coming after them. Change-Id: I0ef95c26772050cd6655e830288c46118aba38bb Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppTools: Don't deref null pointerRobert Loehning2018-04-131-1/+1
| | | | | Change-Id: I92eade63b4fdc7039ce9b4e0a7db1091fb34d692 Reviewed-by: hjk <hjk@qt.io>
* CppTools: Fix builtin overview modelChristian Stenger2018-03-021-133/+90
| | | | | | | | | | | | 5e872c0fcd2 changed the base class to TreeModel which needs to have TreeItem inserted to fully work as intended. This patch makes the overview model work without running into countless soft asserts when using the builtin code model. Change-Id: I875529bef03ea2cd9a226b05410fd05e247eded1 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
* Clang: Use more generic methods in OverviewModelIvan Donchevskii2018-02-091-13/+28
| | | | | | | | Do not return Document or Symbol. Instead use Link or LineColumn directly as return values. Change-Id: I1863d7c3b4985ffe2ae5454622227075ebdc2de7 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CPlusPlus: CppEditor: refactor overview modelIvan Donchevskii2018-02-091-0/+253
Introduce abstract model to be able to use clang based version of it in follow up patches. Fix warnings and modernize source code a little. Move OverviewModel to CppTools. Change-Id: Idcc9bf03cad047026a456bd01063597a1eb95147 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>