summaryrefslogtreecommitdiff
path: root/src/plugins/clangrefactoring
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | CppTools: add multiple refactoring engines supportIvan Donchevskii2017-10-176-17/+19
| | | | | | | | | | | | | | | | Make model manager able to select the most functional refactoring engine from the available ones. Change-Id: I74031c910706fd694a0a7def022531501f1ea005 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | Clang: Fix warningMarco Bubke2017-10-051-1/+2
| | | | | | | | | | | | | | Change struct to class. Change-Id: I47d43df24d31f3bed401ca316cf80fc899f679ed Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | Clang: Add file cacheMarco Bubke2017-10-058-141/+74
|/ | | | | | | | | | | The database is using file path integer ids to handle file paths because otherwise we would save many redundant data. This patch is improving it further with the introduction of a database based file path cache. The entries are now divided in a directory path and file name. This is quite handy for directory based file watching. Change-Id: I03f2e388e43f3d521d6bf8e39dfb95eb2309dc73 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* EditorManager: move all openEditor functions to one placeIvan Donchevskii2017-09-252-12/+4
| | | | | | | | Remove code duplication for openEditor function that gets search result as a parameter. Change-Id: I3eb1c41b8a0fda3b2e8a4929cef1d5924295f1f5 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Clang: Unify compiler options buildersIvan Donchevskii2017-09-222-30/+5
| | | | | | | | Make build command the same for all builders. Minimize differences. Change-Id: I1cfe5071b3afb4944ed178fff1e57d3aee45d8a9 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* C++: remove builtin RefactoringEngine dependency from CppEditorIvan Donchevskii2017-09-221-0/+1
| | | | | | | | Move CppRefactoringEngine to CppTools and builtin member ownership to model manager. Change-Id: I3e72308559fd2928229f9f25d4dd09beb3f56c34 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Sqlite: Improve SqliteStatementMarco Bubke2017-09-212-12/+13
| | | | | | | | | There are now only value and values methods. value returns an optional and values are returning a vector. The result value count has now be specified instead of the result value list. Change-Id: I17a0741d5e838b4bf4b9486825c870ada1722584 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* CppEditor: add startGlobalRenamingIvan Donchevskii2017-09-212-0/+6
| | | | | | | | Existing built-in functionality is moved there. Clang part is to be implemented later Change-Id: I7595898495213c087243cd534b4ba1617b4c27e9 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppEditor: add default RefactoringEngineIvan Donchevskii2017-09-152-10/+10
| | | | | | | ..and use it when we don't have refactoring plug-in Change-Id: Ibe317a9728d439b9c5e05271d92a330d22eaacb9 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Clang: Add Symbol IndexingMarco Bubke2017-09-146-3/+97
| | | | | | | | | It is a first step and now a database is generated if you start QtCreator. Some code is now shared with the PchManager which can be improved in the future. Change-Id: Ic267fe7960f6c455d91832859a673ce98f269aa2 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Merge remote-tracking branch 'origin/4.4'Eike Ziller2017-09-043-4/+33
|\ | | | | | | | | | | | | Conflicts: src/plugins/projectexplorer/projectexplorer.cpp Change-Id: I7881fc51021c49b792a384ad9f8a4f71fc457ce2
| * Clang: Add placeholder text to Clang QueryMarco Bubke2017-08-313-4/+33
| | | | | | | | | | | | Task-number: QTCREATORBUG-18815 Change-Id: Ie5d53f0b3f2464408bb09022483a3a6258e8173d Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | Merge remote-tracking branch 'origin/4.4'Orgad Shaneh2017-08-301-1/+1
|\ \ | |/ | | | | Change-Id: I9ab2c68d2bd07b0dd89051a2f5f6fa51676d8594
| * Fix copyright year in plugin info, --version, and macOS infoEike Ziller2017-08-241-1/+1
| | | | | | | | | | | | | | | | By using the new QTCREATOR_COPYRIGHT_YEAR variable Task-number: QTCREATORBUG-18612 Change-Id: I3bcf0319660d210436d3130c00f43325c460a66c Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Clang: Add SymbolQueryMarco Bubke2017-08-295-2/+257
| | | | | | | | | | Change-Id: I5cb81dffd6f1fda6bdcba0eedaf79f0bc91348b5 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | Utils: Convert to SmallStringView for comparisonMarco Bubke2017-08-292-3/+3
| | | | | | | | | | Change-Id: I38d9716225b81091e8e75b26c9c2258a2aefa987 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | Clang: Rename library clangbackendipc to clangsupportMarco Bubke2017-08-291-1/+1
|/ | | | | | | | We already share same classes there which has nothing to do with IPC and I want to more for sharing. So we should use a name which fits better. Change-Id: Idfb12b6de714206117b92634ad719c6a0e290e78 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Make C++17 default for clang queriesMarco Bubke2017-07-241-1/+1
| | | | | | | We don't want users to stop to use new features. Change-Id: I7c63f236a8c0059e6db6904b7ceef4d78da6cf42 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>