summaryrefslogtreecommitdiff
path: root/src/plugins/clangrefactoring
Commit message (Collapse)AuthorAgeFilesLines
* Remove ClangRefactoring and ClangPchManagerEike Ziller2021-06-1565-4888/+0
| | | | | | | | | | | | This removes the plugins and tools, and removes all the tests that would fail to build because of that. Fixes: QTCREATORBUG-25659 Change-Id: I8adb5d503fc8eea313bcaada421f309dbbfa8c26 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Sqlite: Add unoptional value fetcherMarco Bubke2021-05-311-1/+1
| | | | | | | | | | | There is now value, valueWithTransaction, optionalValue and optionalValueWithTransaction. Sometimes you want to return the default constructed value as default. So this is now possible. This simplifies some code but can be even more optimal. Change-Id: Ibbb6b5ca47803344ed646bfa257602b6db52e0fe Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Utils: filepathify LinkDavid Schulz2021-05-251-1/+1
| | | | | Change-Id: Ie62500bde139158e776f9698ee0ea00c2a113f93 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Core: Add a default parameter to various ICore::*path functionshjk2021-04-271-2/+2
| | | | | | | | Saves some code on the user side. Change-Id: I32cd220b6e533f5497a1865f9c34ab9db4cfda79 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Sqlite: Move result count to class declarationMarco Bubke2021-03-262-45/+50
| | | | | | | | It move the magic number of column results to the sql statement and improves the mock a little bit. Change-Id: I101067444cf27ec5dea0c72de7fd484a7e8710f0 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Refactor Locator filter settings savingEike Ziller2021-02-041-2/+2
| | | | | | | | | | | | | | | | Unify setting saving. Do not write settings that stay at the default, so defaults could change and take effect. For this we explicitly differentiate between default and user settings. Make QJsonDocument the basis for saving settings, because QDataStream cannot really handle structured data where parts could be missing. Write locator settings to a different settings group, so we do not destroy reading older settings from older Qt Creator versions. Task-number: QTCREATORBUG-24762 Change-Id: I5909e2d79313f6fc26159bb644fdfb43781b6c38 Reviewed-by: David Schulz <david.schulz@qt.io>
* cmake: Fix building debug with release libclangChristian Stenger2020-11-231-1/+1
| | | | | | | | | | | | Parts of QC cannot be linked against a release build of clangTooling libs and vice versa when building on Windows. Check whether the provided libs match the current build mode and disable respective parts if necessary. Re-use this information to decide whether unittest should be build or not. Change-Id: Ibc2aab0d7886e78ebbf8f15a43152efad49f1eff Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Remove unneeded includesJarek Kobus2020-11-121-3/+2
| | | | | Change-Id: I67fee9303509b7080e123a2a5826e200ce498ce2 Reviewed-by: hjk <hjk@qt.io>
* Revert "cmake build: Disable clangpchmanagerbackend and refactoringbackend"Eike Ziller2020-10-271-1/+2
| | | | | | | | | | | | | | The change breaks the dev package: The imported target "QtCreator::clangrefactoringbackend_lib" references the file "/home/qt/work/build/qtc_build/lib/qtcreator/libclangrefactoringbackend_lib.a" but this file does not exist. This reverts commit 20a620745982368f71ac890dedfde6429d9e4e84. Change-Id: I68f3b6948bde611b9e5b841d1fde2b136877cbfc Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* cmake build: Disable clangpchmanagerbackend and refactoringbackendEike Ziller2020-10-261-2/+1
| | | | | | | | | By default. Previously only the corresponding plugins were disabled, but not even building the backends makes more sense. Change-Id: I36d61869a3050f37da1f480dea89e7539dda599a Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Merge remote-tracking branch 'origin/4.13' into masterOrgad Shaneh2020-09-041-1/+1
|\ | | | | | | Change-Id: I8a2dca29595a0770f4162786b15a145f3f4133af
| * Fix build of Clang refactoring pluginEike Ziller2020-09-031-1/+1
| | | | | | | | | | Change-Id: Idfdde4b517aa24ea7becbbd67c34bb818a2a0f52 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
| * Core/Utils: Migrate further to Utils::Idhjk2020-07-061-1/+1
| | | | | | | | | | | | | | | | The coreplugin/id.h header is kept for downstream for now. Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66 (cherry picked from commit 430a33dcd9ac80ddb848e41f8f059102857c88aa) Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Core/Utils: Migrate further to Utils::Idhjk2020-07-061-1/+1
| | | | | | | | | | | | | | The coreplugin/id.h header is kept for downstream for now. Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | ClangRefactoring: fix compileDavid Schulz2020-07-061-4/+2
|/ | | | | | | | Amends: 2915ee0832f33616a5582e9f6484c3d05c14a453 Change-Id: I06aa40fedcdca8c9cdf1e731ba068c9c6cf94ca6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge remote-tracking branch 'origin/qds-1.59'Tim Jenssen2020-06-117-8/+8
|\ | | | | | | Change-Id: I8891e7490a7fd51997a3b57561961f6134be3252
| * clangrefactoring: fix cmake and qbs after file renameTim Jenssen2020-06-102-3/+3
| | | | | | | | | | Change-Id: Ic78df938ad4edced664ef968d834c59110f4ab37 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
| * Sqlite: Use a more efficient update hookMarco Bubke2020-06-095-5/+5
| | | | | | | | | | Change-Id: Ic6df1f4ba6b914c7751faf7cf89083fa50a92793 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | Disable ClangRefactoring by defaultEike Ziller2020-06-021-0/+1
| | | | | | | | | | | | | | | | | | | | It is too unstable even for experimental status. Change-Id: I38e483eaece00aec0211a81414c6c5a000bf283f Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Fix warnings about unused members in some clang-related classesChristian Kandeler2020-04-231-0/+1
|/ | | | | Change-Id: I564ac810ed8ae950e9ced54358929358379bfffb Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Provide an empty default IPlugin::extensionsInitialized()hjk2020-02-072-5/+0
| | | | | | | And remove all empy re-implementations. Change-Id: I19f0b4e55c042c96693ecb89766f97f0a97b54ae Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Qmake: Handle QFlags deprecationhjk2020-01-291-1/+1
| | | | | Change-Id: I2565ce0b1b10d4cb663dc6ad2721b717ce48c17d Reviewed-by: David Schulz <david.schulz@qt.io>
* Use less nullptr for empty flagshjk2020-01-211-1/+1
| | | | | Change-Id: Ic4eafdc8f204a432a752a97593380609a408a7de Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Use even less nullptr for default flagshjk2020-01-202-2/+2
| | | | | Change-Id: I5ec30de3e41dfc1c7bf6d5f5e36991eadcbbfb72 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Core/Utils: Use {} instead of nullptr for flagshjk2020-01-171-1/+1
| | | | | | | Deprecated in current 5.15 Change-Id: I4222c67f2da3919e3476178f52dae909327431d4 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ClangRefactoring: Improve follow symbol and usageMarco Bubke2019-08-275-11/+80
| | | | | Change-Id: Idb42010443e4560489ef067e54d05b4e567598e9 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Reduce database accessesMarco Bubke2019-08-273-19/+27
| | | | | | | | If we prefetch data from the database to the caches we reduce the database transaction calls which are quite expensive. Change-Id: I617a0d886807402e0a94291a913a77f989970b55 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Some clang-tidy -use-modernize-nullptrhjk2019-08-014-4/+4
| | | | | Change-Id: I1bed5e85a5b7948d08502a72a10f80baa075c204 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Standardize on int for line and column valueshjk2019-07-261-2/+2
| | | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/4.10'Tim Jenssen2019-07-121-5/+0
|\ | | | | | | Change-Id: Iaf27911e4e9fb762c1a24c84c458462bafe95728
| * Unify disabling build of llvm related plugins or test on WindowsChristian Stenger2019-07-051-5/+0
| | | | | | | | | | | | | | | | | | If libclang's build mode mismatches the current build mode of Qt Creator some plugins are automatically disabled. Do the same for the unittest and unify the way to do this. Change-Id: Ib4cd6494ed63cb89ed8d99b3c0ba23a19572fc9b Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* | Merge remote-tracking branch 'origin/4.10'Tim Jenssen2019-07-045-64/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri src/libs/utils/synchronousprocess.cpp src/plugins/baremetal/iarewtoolchain.cpp src/plugins/cmakeprojectmanager/cmakeproject.cpp tests/unit/unittest/CMakeLists.txt Change-Id: I124ad492df403286751e175d27fe36487ddf6d07
| * More Utils::toSet/toListhjk2019-07-041-1/+2
| | | | | | | | | | | | | | ... and unrelated cosmetic changes. Change-Id: I591b17fd5289831e701b683f8fb47816efd1fa67 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Clang: Remove old codeMarco Bubke2019-07-044-63/+3
| | | | | | | | | | | | | | | | We maybe bring back the clang query interface but the local rename is better served by other plugins. Change-Id: I97bedcb20870632b7dd50977794a65b2b09ededb Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | Merge remote-tracking branch 'origin/4.10'Eike Ziller2019-06-182-6/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/utils/consoleprocess.h src/libs/utils/consoleprocess_unix.cpp src/libs/utils/consoleprocess_win.cpp src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp src/tools/clangrefactoringbackend/source/symbolscollector.cpp tests/unit/mockup/projectexplorer/project.h Change-Id: I8d10f26b9bcb54829ba31cdc2272885691df1e16
| * Clang: Improve updatingMarco Bubke2019-06-172-6/+2
| | | | | | | | | | | | | | | | If project parts are up to date we send them directly to the indexer, so the indexer can decide we something needs an update. Change-Id: I7d4f32794c6b3a861cdefb3653a6dfd4e711f619 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | Enable macro editing for the Clang indexerMarco Bubke2019-06-134-19/+19
|/ | | | | | | | Refactor much of the code from Environment* classes to NameValue* classes to share it with the preprocessor macro settings. Change-Id: Ica4ee817aa338230c422b30d91240d266248d226 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Remove excess blank lines after namespaceOrgad Shaneh2019-05-271-2/+0
| | | | | Change-Id: I4e4f83017f2bfc2cf842c4c971ed4b05e0447e6a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Qt Creator CMake portCristian Adam2019-05-171-0/+40
| | | | | | | | | | | | | | Based on Tobias Hunger's work from a few months ago. The CMake configuration needs libclang and Qt paths specified as CMAKE_PREFIX_PATH. Auto tests are run with "ctest". At the moment the pass rate is 87%. Change-Id: Iba98e39bf22077d52706dce6c85986be67a6eab0 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Clang: Fix system pre include search pathMarco Bubke2019-04-291-2/+3
| | | | | | | | We now get the resource path from creator. The -fPIC case is working now too. Change-Id: Id191e89e6d46706748d50440038a06a349972cc9 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang*: remove wrong cpp define from qbs filesDavid Schulz2019-04-231-1/+0
| | | | | | Change-Id: I1c7a5386b7ed0c117f0ed9c39c93af802e958a27 Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ClangRefactoring: fix missing comma in qbs fileDavid Schulz2019-04-231-1/+1
| | | | | Change-Id: Ibfd8bd7f8ab0a75d346590b6ab72d3b5ca452b09 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ClangRefactoring: fix compile with qbsDavid Schulz2019-04-231-2/+4
| | | | | Change-Id: If2d4fbc32c2b042dc3fdd4169cfb5122930966aa Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Clang: Improve project part updatingMarco Bubke2019-04-015-19/+35
| | | | | | | | | | | | The project part ids are now already created very early in the database. This removes some checks because we can assume that an id already exists. The project part are now completely persistent, so we can read them from the database and compare them with new generated from a new creator session. This should help to not recreate the same PCH again and again. Task-number: QTCREATORBUG-21151 Change-Id: Iced818ff9f7431eaed3e37978087cc0a43b9afda Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Add ICore::cacheResourcePath()Marco Bubke2019-03-042-3/+5
| | | | | | | | | | We need some directory where we save the index database and the precompiled headers. This files should be persistent but the user can delete them if he wants because we will rebuild them. Task-number: QTCREATORBUG-22012 Change-Id: I9f25eb48a9992d6385a96427ef9c10bc739a3567 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Clang: Fix progress barMarco Bubke2019-02-222-6/+5
| | | | | | | | Sometimes the messages are not send immediately, so we force it. Task-number: QTCREATORBUG-21957 Change-Id: I9526cb4b4e3dd8b7a02e15f77bffdc51917d47c8 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* CppTools: Add sourceFilePath to AbstractEditorSupportMarco Bubke2019-01-241-1/+1
| | | | | | | | | | Provide the source path to track a generated file source. You can for example get the modified time stamp for the source file and use it for the generated file content. Task-number: QTCREATORBUG-21876 Change-Id: Ia422e128c5cb7a3dce88960f126152c2f65afb41 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* PchManager: Split pch tasks in project and system pch tasksMarco Bubke2019-01-211-1/+1
| | | | | | | | | | | | | | | | | | | Like you can see in the task numbers this patch is touching many different areas. So I will only touch the main parts. It is using a clang action instead of an extra process which will be enabling the handling of generated files in PCHs. The flags from the project part are now not anymore transformed in a command line but they are saved in the container semantically aware so that they can later be merged. Most of this patch is simply polishing of other patches. Task-number: QTCREATORBUG-21346 Task-number: QTCREATORBUG-21380 Task-number: QTCREATORBUG-21382 Task-number: QTCREATORBUG-21383 Task-number: QTCREATORBUG-21693 Task-number: QTCREATORBUG-21778 Change-Id: I9b0c02d8149b554254e819448fbc61eeaa5b7494 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Clean up CompilerOptionsBuilderNikolai Kosjar2018-12-031-2/+1
| | | | | | | | | | | | | | | No behavior change. * Remove virtual from methods that are not overridden * Move constant member functions that do no access any members into source file as static functions * Remove QLatin1String where possible * Make variable names a bit more consistent * Other minor stuff Change-Id: I34a582d5a468489e11365507b283e9aee157664f Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Merge remote-tracking branch 'origin/4.8'Eike Ziller2018-11-093-6/+6
|\ | | | | | | | | | | | | Conflicts: tests/unit/unittest/unittest.pro Change-Id: I4f0ab05f96ee60900a3a35fad4c7331238367593