summaryrefslogtreecommitdiff
path: root/src/plugins/clangrefactoring
Commit message (Collapse)AuthorAgeFilesLines
...
| * Clang: Refactor FilePathIdMarco Bubke2018-11-083-6/+6
| | | | | | | | | | | | | | | | We don't need the directory id any more. It's not used widely any way. Task-number: QTCREATORBUG-21443 Change-Id: Ia95ea4c72fe9530ac56262f61f17faca04d313ba Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Merge remote-tracking branch 'origin/4.8' into masterOrgad Shaneh2018-10-121-1/+1
|\ \ | |/ | | | | Change-Id: I6ecd3732a147960681c6135e8752cbd046bad65b
| * ClangPchManager: Introduce UsedMacroAndSourcesCollectorMarco Bubke2018-10-121-1/+1
| | | | | | | | | | | | | | | | It's a subset to thesymbols collecter so we try to share some code. Change-Id: I058eee39289453e205f039b3850c1816f1d8ec1a Task-number: QTCREATORBUG-21257 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Clang: Add progress bars for creating PCHs and indexingMarco Bubke2018-10-083-3/+21
|/ | | | | | Task-number: QTCREATORBUG-21112 Change-Id: Ie0c00a58f479a2fe7cbc7322490808509733ff0f Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Fix build with LibToolingIvan Donchevskii2018-09-131-0/+5
| | | | | | | Do not build plugins when the tools part is not built. Change-Id: I3325707fe6446364f07a9ad5e5e039fc9fb6437d Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Clang: Add refactoring project updaterMarco Bubke2018-09-126-14/+186
| | | | | | | | The project parts are now first used by the pch manager and then notified by the pch manager to the refactoring plugin. Change-Id: I88074d8891cd0de9721497bbafee0deffc0b6339 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Use faster ctor for QColorRobert Loehning2018-09-061-5/+5
| | | | | | | Change-Id: Id4e44222e6e0dd61b1a73d774906e8804ba75a73 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ClangRefactoring: Rename struct to class for SymbolIvan Donchevskii2018-08-201-1/+2
| | | | | | | Deal with the forward declarations. Change-Id: I428863a78e667f6458b0470531efc0e19793d01b Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Add optional system include to compiler option builderMarco Bubke2018-08-142-2/+2
| | | | | | | | | | | | System includes suppress warnings and prevent indexing of unwanted symbols. Using system includes for all includes outside of the project can be quite advantageous. The rootProjectDirectory() can be extended to be set in the project settings. An automatic generation could be possible but could create an unwanted path which includes files outside of the perceived project. Change-Id: Ib9d3158f14f41efe1f6657f962d5c4437bb324b2 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Fix qbs build when no llvm is presentChristian Kandeler2018-08-101-13/+2
| | | | | | | | | | | Some defines were set conditionally, but accessed unconditionally, which of course breaks the build. Make sure the defines are always set. Also gather them in a module, instead of copying the code all over the place. Change-Id: Iac628da64fb3934872d912510936aeccd0e20247 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Clang: Provide include directory only for libclangIvan Donchevskii2018-08-082-2/+2
| | | | | | | | | Only libclang has issues with the include directory search therefore undefining include folders makes sense only for libclang options builder. Change-Id: Ie3f62f5f3a89503e6e0ab59e18889e92425c3abc Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Clang: Fix qbs build of clangrefactoringAlexandru Croitor2018-06-151-0/+2
| | | | | | | | The qtcreatoreditormanager.cpp file and its header had to be referenced in the project file. Change-Id: Ie337d9e6b4041da97f2db984b438b7178fcedc78 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ClangTools: Remove clang executable settingsIvan Donchevskii2018-05-041-0/+1
| | | | | | | | We use custom clang executable and it does not make sense anymore to give a choice of changing it. Change-Id: Icf86042ac3fcd08c320ef2bbdaabef1102b023b5 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Clang: Fix qbs build for libtooling componentsNikolai Kosjar2018-04-172-55/+0
| | | | | Change-Id: I320e23ffd8a244a7582b9d4115f6c8616ba44022 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Clang: Locator filter for the symbol databaseMarco Bubke2018-04-1230-819/+215
| | | | | | | | There are no symbol queries for the locator filters. The signature generation is still not implemented but for simple cases it should work. Change-Id: Ic6b04fbe1e7e057892f194ac139615c47d6ec33f Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Store the symbol kind in the databaseMarco Bubke2018-04-122-32/+1
| | | | | | | It is cleaning up some other stuff too. Change-Id: I75274356fd35f2ee8c84aedf8839c67506ab2355 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangSupport: Use simpler structures in some caseshjk2018-04-066-57/+57
| | | | | | | | | 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>
* Clang: Add busy timeout handler to databaseMarco Bubke2018-04-041-1/+5
| | | | | | | | You use now a busy timeout of one second. This is preventing the throwing of a exception for a busy time under one second. Change-Id: Iae800a525ad009b594c29883ffb243c1be8b3874 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Improve interfacesMarco Bubke2018-03-266-39/+23
| | | | | | | | | | The interfaces should never used to handle ownership. So it is now using protected destructors. Copy operations are forbidden too. https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#c35-a-base-class-destructor-should-be-either-public-and-virtual-or-protected-and-nonvirtual Change-Id: Ib0b60a73a7ec130973b5cb0095cc5b2f10fa0758 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Use PCHs for indexingMarco Bubke2018-03-223-2/+90
| | | | | | | | | | | | As generating the AST is quite expensive it would be very useful to cache the not changed include. So we generate PCHs for include outside of a project part. With this change this PCHs are used by the indexer. For that they are save to the symbol database by the PCH manager and when fetched by the symbol indexer. Change-Id: I7a5b07cfb32d72d50dc52d2b108cd41727a7bfc7 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* CppTools: Remove processEvents call from follow symbolIvan Donchevskii2018-03-192-7/+9
| | | | | | | | processEvents is a bad way of dealing with asynchronous requests. Use QFutureWatcher for that purpose. Change-Id: I3839cb9db80a6d391f6af1178e96986a325b7b99 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Don't translate default windowTitle again and againRobert Loehning2018-03-061-1/+1
| | | | | Change-Id: I4b4ff16e02c517bcd5a7c5ae73f62dd2a5bcc7cc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* ClangRefactoring: Remove some noise from QtCreatorSearch usehjk2018-03-053-18/+6
| | | | | Change-Id: I54a6b0e0943b1352e6c0f85b63a5c0e358d0df51 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Prevent segmentation fault in WriteMessageBlockMarco Bubke2018-02-222-3/+3
| | | | | | | | | There could be already messages send before the backend is available. In that case we now record that messages and send them if the socket is set. Task-number: QTCREATORBUG-19761 Change-Id: I7c8d6fdb4fcc043bcdbb9e9aeb5752f89c24fdab Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: On the road to update and preprocessor supportMarco Bubke2018-01-293-4/+6
| | | | | | | | | | | | | | | | | This patch has grown in a quite big change set and it is really hard to divide it in different parts. V2::ProjectPartContainer is now using FileIds instead of file paths. This cleans code up because it is a big step in the direction that internally only file ids are used. But it is depending on the file cache, so the file cache has to be provided as an argument. There is now an interface for transactions too which are ease the testing of them and enables the support of preprocessor. It adds macros as symbols and is saving used macros. The used macro support is enabling update improvements because only if a changed macro is used it needs to be recompiled. This is still in flux and can be changed in later patches. Change-Id: I492a2c9af1201d40fdd9f46a0045f7878bbbaa3d Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Fix file names for qbs buildNikolai Kosjar2018-01-261-4/+4
| | | | | Change-Id: I8caf7ed2cda83a7ac6f2c6226ea80424d3bafc60 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangRefactoring: Fix compile with Qt5.6/gcc4.9Christian Stenger2018-01-252-2/+2
| | | | | Change-Id: Ibea187c2216cc9f0a3c6ce53d5139b0a2c7c9065 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Locator: Add filters for classes, includes, functionsIvan Donchevskii2018-01-2417-26/+121
| | | | | | | | Filters are based on symbol query where they are not implemented yet. Change-Id: Id826beaf6bb47a81363c36780d7254a85a9a3cc9 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Clang: Add locator specific methods to SymbolQueryIvan Donchevskii2018-01-2420-24/+574
| | | | | | | ... and implement LocatorFilter using these methods. Change-Id: Ie3e3ebb3a547e2b2bda49e76a199a3ccd8fe6403 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Clang: new empty locator filter classesIvan Donchevskii2018-01-2421-35/+785
| | | | | | | | 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>
* Merge remote-tracking branch 'origin/4.6'Eike Ziller2018-01-232-2/+9
|\ | | | | | | Change-Id: I49e8b8442e2b5edffbea19cb2bba97443ebc3d2a
| * TextEditor: Return hover handler priority by callbackNikolai Kosjar2018-01-192-2/+9
| | | | | | | | | | | | | | ...to get rid of the asynchronous code path. Change-Id: I56377510440631b0be712333b2a4018717c86389 Reviewed-by: David Schulz <david.schulz@qt.io>
* | Clang: Make it more clear that the FilePathId.filePathId is not sharedMarco Bubke2018-01-221-2/+2
| | | | | | | | | | | | | | | | The name fileNameId could imply that the id shared for the same file name which is not the case. Change-Id: I27310a8994c2d9e9bb0f0aed2094bd988309c710 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Clang: Use LineColumn instead of explicit integers for line and columnMarco Bubke2018-01-171-5/+12
|/ | | | | | | | With OptionalLineColumn we don't need any bool return parameter any more. Change-Id: I6f57f221c1bfdf08a92a87a7d71ea0eecf83dbcf Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Clang: add globalFollowSymbol to RefactoringEngineIvan Donchevskii2017-12-142-0/+26
| | | | | | | Allows to follow outside of current TU. Change-Id: Ieea2fd72bfdf6d60a988b40efcf2f41c5a71d045 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* UnitTests: Cleanup SymbolQuery testMarco Bubke2017-12-052-4/+4
| | | | | Change-Id: Ieb4fe43c7b5cd27cc270f3c5d269c2d4812a0131 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Clang: Store the database in user resourcesMarco Bubke2017-11-292-1/+5
| | | | | | | | | We used temporary directories but this can be different paths. Task-number: QTCREATORBUG-19372 Change-Id: Id6ac18e6eecdc5bb354bda3741e16cb87c552ba6 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Move QLocalServer in ConnectionClientMarco Bubke2017-11-283-12/+19
| | | | | | | | | | | Before the QLocalServer was in the ConnectionServer so more than one client could connect to the server. But we never used that possibility which made the hand shaking much more difficult. It is now moved in the client, so that there is always a QLocalServer. Change-Id: Ifa357074b0c0809434c49d23b1cee38496f72f43 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* ClangRefactoring: Fix warning about missing overrideTobias Hunger2017-11-271-1/+1
| | | | | Change-Id: I85d2e789e9e078dafc76c7da46849d8e87fbd2a7 Reviewed-by: hjk <hjk@qt.io>
* Clang: Handle native file in the file cacheMarco Bubke2017-11-231-2/+3
| | | | | | | | | Different types are introduced for normalized and native file path. So the compiler is warning you if you try the wrong format. Change-Id: I1da0686b142cbf9bb7578468c2b50f90a94cebf9 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* ClangRefactoring: use sourceUsagesAt instead of locationsAtIvan Donchevskii2017-11-232-9/+4
| | | | | Change-Id: I085b243b6e0ea4b786ce5c5f5a6894345f9d87eb Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* ClangRefactoring: return ProjectUpdaterIvan Donchevskii2017-10-261-0/+2
| | | | | Change-Id: Ie90a8acf8ec9641ae9349679da278a3055b79d9e Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Merge remote-tracking branch 'origin/4.5'Eike Ziller2017-10-252-0/+82
|\ | | | | | | Change-Id: Iceaa4ca40b5318744bde8a76c6d3ccca08df71bb
| * ClangQuery: Fix translation issueEike Ziller2017-10-241-0/+2
| | | | | | | | | | Change-Id: Ide0f4dc7239227ba0c20a0ed7b759b15283ccd92 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
| * Add qbs project files for some clang-related tools and pluginsChristian Kandeler2017-10-231-0/+80
| | | | | | | | | | | | | | | | Change-Id: I4882be50c6b007715f7b281f95d111abc5cda62a Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | Clang: implement globalRename based on clang IndexIvan Donchevskii2017-10-252-10/+10
| | | | | | | | | | | | | | Has the same limitations as findUsages. Change-Id: I8de4df2ecbfd8a4f3073666994398dc43af0d73c Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* | ClangRefactoring: fix names collisionIvan Donchevskii2017-10-241-4/+4
| | | | | | | | | | | | | | Type in 'using' had the same name as it's templated base Change-Id: I0c36e1da26930ebd5ed04b2892ec551294bc7111 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Clang: implement findUsages with existing indexIvan Donchevskii2017-10-246-17/+109
| | | | | | | | | | | | | | | | | | | | | | Functionality is limited to the abilities of current index which is not updated and is generated only at project open. Search box temporarily doesn't allow to "Search again". Change-Id: Id1047f27ad0aafc901f06aa51ad38ceab95eaebb Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | Clang: Add usage functions to symbol queryMarco Bubke2017-10-233-0/+27
| | | | | | | | | | | | Change-Id: If68a5119c863e616fea40275136d028abcf441f3 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | CppTools: merge CompilerOptionsBuilder with Clang oneIvan Donchevskii2017-10-232-9/+9
| | | | | | | | | | | | | | Since it's never used for other compilers. Change-Id: I9512692d1dc9f9a701ea2453b7d50005478bed5d Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>