aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangcodemodel/clangcurrentdocumentfilter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* ClangCodeModel: Replace nested ClangCodeModel::Utils namespacehjk2020-07-061-3/+5
| | | | | | | | | | | | | | | | | ... by the customary ::Internal. It adds only noise on the user side and conflicts regularly with the top-level ::Utils namespace. Remove a (now) duplicated definition of setLastSentDocumentRevision(). Plus minor namespace related fixes. There are still minor conflicts between Utils::Text and ClangCodeModel::Text Change-Id: I2e8df6b3c6c3599192774032822ee7e778355bba Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Standardize on int for line and column valueshjk2019-07-261-1/+1
| | | | | | | | | | | | | | | 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>
* Replace uses of qVariantFromValue with QVariant::fromValuehjk2019-05-271-1/+1
| | | | | | | | Deprecated in Qt 5.14, alternative has been around since Qt 4 at least. Change-Id: I4e3a53c289088368609e0d0ce2405a832d311308 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Clang: Move unexported classes to InternalNikolai Kosjar2019-02-191-1/+2
| | | | | | Change-Id: I3ea197b734f146d4b11431aaf927aed9be7d8756 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Use the same format for the current document filter and the symbol ↵Ivan Donchevskii2018-08-081-11/+4
| | | | | | | | | | outline Global variables and fields had different style of the return value. Make it look the same. Change-Id: Ie031a994b65991289103028234227950861e05d0 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Utils: move code model icons to utilsDavid Schulz2018-08-061-1/+1
| | | | | | | In preperation for the language server protocol support. Change-Id: Iee4ccd53a86d9afdb357972ea62b75ace2edcb1d Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Clang: Do not duplicate operator entriesIvan Donchevskii2018-06-061-3/+1
| | | | | | | | | | Do not show the same operator twice in symbol outline and current document filter. Extract common checks to TokenInfoContainer class. Change-Id: I3b48aa949d678564c952a71f650b7ba601570fa2 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Clang: Fix heap-use-after-free in ClangCurrentDocumentFilterNikolai Kosjar2018-05-031-4/+2
| | | | | | | | | | | | ...when closing editors fast (e.g. holding Ctrl+W). Due to the queued connection the slot was invoked after the deletion of the editor. There is no point in having a queued connection here, so remove it. Task-number: QTCREATORBUG-20191 Change-Id: I3872f8046b56f93c9aac832feccfd911d39e5995 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Simplify name and type in FullTokenInfo for functionsIvan Donchevskii2018-04-231-5/+3
| | | | | | | | | | Take Cursor displayName instead of token name. From now on type spelling can serve the return type role for functions because together with 'token' member they form the full type. Change-Id: Ic8eec533f4a11458f99f070b6a6aa80714097b4d Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* ClangSupport: Use simpler structures in some caseshjk2018-04-061-7/+6
| | | | | | | | | The patch is mostly mechanical, but contains also a few spurious changes from values references for some local variables, foreach -> ranged for etc that I coulnd't resist. Change-Id: I58f0bd972546895eb318607cbfbd7ac35caf3f23 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangCodeModel: Fix crash on git diff/showDavid Schulz2018-03-011-4/+5
| | | | | | | | currentEditorChanged is emitted also for none TextEditors, so check the qobject casted TextDocument before accessing it. Change-Id: I57080221bec34b879f21e022029524818ea92569 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Clang: implement current document filterIvan Donchevskii2018-02-201-4/+133
| | | | | | | | | | | | | | Filter is based on full token infos which come from clang code model after token infos with pure highlighting information. Inprovements: - functions also provide the return type after the signature - now supports Q_PROPERTY - all c++ features that clang 5.0 supports Change-Id: If3e30d238984f39df8d2c3b9ba3ee085c4117f3d Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Clang: new empty locator filter classesIvan Donchevskii2018-01-241-0/+57
Introduce classes to replace builtin locator filters. Change-Id: I5cc6f15fb0f59ea8a51b14a86301cf219cc0d6d6 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>