aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpptools
Commit message (Collapse)AuthorAgeFilesLines
* CppLocatorFilter: Fix highlighting in extra info columnAndre Hartmann2019-09-101-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given the following example: typedef int value; void value_test(void) {} void test(value v) {} searching for "value" findes both candidates; and for the locator filters "m" and "." highlighting already worked fine. For the locator filter ":", however, the arguments are displayed in the extraInfo column. To get proper highlighting here, we have to repeat the regexp match in this column. While fixing that, make sure that full-qualified searches (separated by "::") are still highlighted properly. For the Clang Code Model, there is still a bug not addressed by this patch: Ctrl+K with ". value" -> "value" isn't highlighted yellow. Change-Id: Idd5eeeedb893151cd5c7f70f6b11397db788b706 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppTools: Allow enabling debugging of locator filter tests by environmentNikolai Kosjar2019-07-111-1/+1
| | | | | Change-Id: I9786b7c6959b77eebb1bc774d2e7bd4c8ed3edeb Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Clang: Fix tidy checksNikolai Kosjar2019-07-091-11/+26
| | | | | | | | | generateClangTidyChecks.py generated funny output as it was not considering new major categories. Fixes: QTCREATORBUG-22450 Change-Id: Ibd6d0cc7539c9fb846caacbe936770d0c960f04f Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppTools: Avoid some deprecation warningshjk2019-07-051-4/+4
| | | | | Change-Id: I0726bbcf9fd3992312e5980bd176ce85903f27a9 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* More Utils::toSet/toListhjk2019-07-048-19/+19
| | | | | | | ... and unrelated cosmetic changes. Change-Id: I591b17fd5289831e701b683f8fb47816efd1fa67 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CppTools: Ignore -f[no-]keep-inline-dllexportNikolai Kosjar2019-06-261-1/+8
| | | | | | | Fixes: QTCREATORBUG-22452 Change-Id: Ic17e6331e92f23c31f4f7319257f2d09c66af8a4 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* CppTools: Handle not only "-std=X" but also "--std=X"Nikolai Kosjar2019-06-251-1/+1
| | | | | | | Fixes: QTCREATORBUG-22444 Change-Id: Iedb0b17a26724d0cc8233a3bad273f3e6bd7462d Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* qtcreator: Set thread pool stack size to 2MiBCristian Adam2019-06-191-0/+5
| | | | | | | | | | | | | Visual C++ sets 1MiB as stack size, macOSX has 512KiB. Both crash with a specified project. MinGW sets 2MiB as stack size, the specified project loads just fine. Fixes: QTCREATORBUG-22496 Change-Id: I6f19e74a681977e4fe1dceee292ea9c838999a1a Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CppTools: Stop printing "Skipping file X"Nikolai Kosjar2019-06-191-1/+0
| | | | | | | We already put it into "General Messages". Change-Id: I9756fbe5c5f641cd83ab39c8ef0fff83ad63a85d Reviewed-by: David Schulz <david.schulz@qt.io>
* Merge remote-tracking branch 'origin/4.9' into 4.10Eike Ziller2019-06-181-4/+1
|\ | | | | | | Change-Id: I6f1bc9381dc8c0ce8abc5a6c006087076d8fc1bc
| * Fix expansion of %DATE% in license templateEike Ziller2019-06-181-4/+1
| | | | | | | | | | | | | | | | | | If the format contains '/', that must be escaped to avoid the expander to interpret that as regexp style replacement. Task-number: QTCREATORBUG-22440 Change-Id: Iaa6c0ae0aa74a055a30b3c0413e325c497f9310f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | CppTools: Add logging to built-in indexerNikolai Kosjar2019-06-111-0/+5
| | | | | | | | | | | | | | | | This might help to identify problematic files. Change-Id: I76848e6ca12a654c8426cf0d73b50612273d48c3 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | CMake build: Add unittest CMake build filesCristian Adam2019-05-291-1/+1
| | | | | | | | | | | | | | | | | | On MinGW 8.1 I get the following after running ctest -j 40 99% tests passed, 35 tests failed out of 2631 Change-Id: I2c3ce7940b036e52ef393feab5837886355e7b5a Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | connect() to ambiguous signals/slots: Replace static_cast with QOverloadAlessandro Portale2019-05-281-4/+2
| | | | | | | | | | Change-Id: I473d7a2a16509cee944a2a21b022a3f6f02cfd8d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Utils: Rename FileName to FilePathhjk2019-05-2830-89/+89
| | | | | | | | | | | | | | | | More in line with QFileInfo terminonlogy which appears to be best-of-breed within Qt. Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Replace uses of qVariantFromValue with QVariant::fromValuehjk2019-05-277-8/+8
| | | | | | | | | | | | | | | | 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>
* | CMake build: Add ability to disable building of individual pluginsEike Ziller2019-05-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a cache entry "BUILD_PLUGIN_${NAME}", defaulting to ON which can be set to OFF to disable building of a plugin. Adds a extend_qtc_plugin function that should be used to add properties to a plugin after add_qtc_plugin, instead of the standard CMake functions target_... . The new function results in a no-op if the plugin was disabled. Change-Id: I57f6799620aea0aaa8b56acead4815ccced95911 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | CodeAssist: Ensure perfect match for keywordsNikolai Kosjar2019-05-232-5/+20
| | | | | | | | | | | | | | | | ...as otherwise the completion windows stays open and gets in the way. Fixes: QTCREATORBUG-21767 Change-Id: Ib0a841b9d9de52109439f067c466478744361814 Reviewed-by: David Schulz <david.schulz@qt.io>
* | CppTools: Fix build for old compilerChristian Stenger2019-05-221-2/+2
| | | | | | | | | | Change-Id: Ia245e9867c4fffe256b0da5708542c88d73ae069 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | CppTools: Show more project part details in inspector dialogNikolai Kosjar2019-05-212-9/+25
| | | | | | | | | | | | Change-Id: Ic7c94c9cd83f73cad0603ceb75836fa21768a649 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* | Utils: Make FileName::shortNativePath a memberhjk2019-05-202-3/+3
| | | | | | | | | | Change-Id: If1ab02ae9dc7efb97792cdf3bbdce3bba18b3e3d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Qt Creator CMake portCristian Adam2019-05-171-0/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | More FileName::appendPath() -> .pathAppended()hjk2019-05-171-3/+2
| | | | | | | | | | Change-Id: I403d34e4f52f758339c158efc7a11fd329e3e043 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | CppTools: Ensure that parse contexts are backed up by a toolchainNikolai Kosjar2019-05-091-4/+9
| | | | | | | | | | | | | | | | | | | | | | Otherwise empty parse contexts (e.g. not having any include paths...) will be created that are not useful. Fixes: QTCREATORBUG-22421 Change-Id: I5c9172aee38503d8b48762416e17e7047679bf2e Reviewed-by: Cristian Adam <cristian.adam@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Export Wizard values to JavaScript macroEike Ziller2019-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Registers a new function "value('name')", available to the wizard json files, which returns the value of the variable "name" as a JavaScript object. So, variables with a string value are actual JavaScript strings, booleans are booleans, lists are lists, and dictionaries are dictionaries. The patch also makes it actually possible to assign JSON lists and dictionaries to values. This removes some hacks involving creating complex JavaScript objects through string substitution. Change-Id: I4ac6da22bc5bccc9fadee97694c2fa14d44c9307 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | CompilationDatabase: Asjust the sysroot and target handlingIvan Donchevskii2019-04-301-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If the sysroot option is found - set it as a kit sysroot (only in CompilationDatabase project where we have a cloned kit which does not affect the other existing kits). In other cases use the backup for the sysroot from the toolchain (can exist for clang toolchains based on mingw). Provide target when searching builtin include paths for clang. Fixes: QTCREATORBUG-22339 Change-Id: Ibe07c2e490ba4f7e0d259e6df698d641dbfd0298 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Make QtWidgets wizard work with namespaced QtChristian Kandeler2019-04-302-0/+6
| | | | | | | | | | | | Fixes: QTCREATORBUG-19590 Change-Id: Ic003b2b1f580d9a6708e144b690c4cee8d94ff69 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | C++: Do not apply "Lower-case file names" setting to file wizardsChristian Kandeler2019-04-252-25/+22
| | | | | | | | | | | | | | | | | | This setting is intended to derive file names from class names. It is not relevant if the user explicitly provides a file name. Fixes: QTCREATORBUG-14711 Change-Id: Ic31f8727220d99692286adf9ad0434ce06aa7c62 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | CppTools: Add pre system include search path per projectMarco Bubke2019-04-232-0/+18
| | | | | | | | | | | | | | | | | | Sometimes you want add a pre system include search path per project to overload some system header for indexing. This can then even be checked in the repository. Change-Id: Ib103e5935d0553aa94522ed736f8c4eb2405a093 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Clang: Fix build with clang-8Ivan Donchevskii2019-04-173-8/+80
| | | | | | | | | | | | | | | | | | | | Clang-Tidy checks and Clazy flags updated. CLANG-UPGRADE-CHECK done. Change-Id: I1ca585c5c3c77a7f183719df9c262603150914e8 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* | Fix Utils::LanguageVersion::None handlingMarco Bubke2019-04-041-11/+12
| | | | | | | | | | Change-Id: Id0d8bd59c1a317103ea309ee2f9b982ecfd6d6c7 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Clang: Minimize reindexingMarco Bubke2019-04-021-0/+2
| | | | | | | | | | | | | | | | | | | | We optimal indexer is only reindexing if the index would be changed. This patch is a step in that direction. We only reindex now if the file or project has changed. It fixes some typos too. Task-number: QTCREATORBUG-21150 Change-Id: I6ea1c13282fbcd70253b9b2939aed37580dbd160 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Utils: Rename one of the FileName::fromString overloadshjk2019-03-191-1/+1
| | | | | | | | | | | | | | Overloaded functions are ugly to use in algorithms like transform(). Change-Id: Ia4f191e1cd9a21ceb99dec23a8f4fd1ce5f24182 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge remote-tracking branch 'origin/4.9'Eike Ziller2019-03-145-9/+19
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/plugins/debugger/debuggerkitinformation.cpp src/plugins/languageclient/languageclientmanager.cpp src/plugins/plugins.pro src/plugins/projectexplorer/kit.cpp src/plugins/projectexplorer/kitmanager.cpp Change-Id: I66fb941202991f35f7d7761430b21e42dfc678a8
| * Clang: Improve compilation database generationIvan Donchevskii2019-03-132-1/+2
| | | | | | | | | | | | | | | | | | | | Do not use CompilerOptionsBuilder anymore because we don't need much tweaking for projectPart data and can do it better specifically for the generator. Fixes: QTCREATORBUG-21936 Change-Id: I00ad872c703598a9a88af29399b428520dd5cb3b Reviewed-by: Marco Bubke <marco.bubke@qt.io>
| * Clang: Fix language version detection with PCH-s in CMake enabledIvan Donchevskii2019-03-111-0/+9
| | | | | | | | | | | | | | | | | | Filter out the PCH flags when detecting macros and language version. Fixes: QTCREATORBUG-21860 Change-Id: I25c63f1409c16db3623d1c8f43ffd5d2bd0f6748 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
| * Fix quotation marksRobert Loehning2019-03-052-3/+3
| | | | | | | | | | | | | | Change-Id: I26bd4b9e965a5313569b6e0ef6f606da57b31bff Reviewed-by: Filip Bucek <fbucek@atlas.cz> Reviewed-by: Rainer Keller <Rainer.Keller@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
| * Clang: Fix pluralsRobert Loehning2019-03-051-5/+5
| | | | | | | | | | | | Change-Id: I150b9ccdec73ade8826b90036b59332687b84448 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Merge remote-tracking branch 'origin/4.9'Eike Ziller2019-03-053-10/+3
|\| | | | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/tools/clangpchmanagerbackend/source/taskscheduler.h Change-Id: I518adaf647df412887c2a372416634359f09ad2a
| * CppTools: Fit ClangDiagnosticConfigsWidget on manager's laptop screenAlessandro Portale2019-03-041-8/+1
| | | | | | | | | | | | | | | | | | | | | | Managers have laptops with small screens. ClangDiagnosticConfigsWidget had a widget with too big height as minimum size. The Clang Diagnostics dialog did therefore not fit of Portale's screen. This patch removes the minimumSize and makes the dialog fit. Change-Id: I056c10c8a4e51ba4652c30616035a7c649287f58 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
| * Clang: Fix UI textLeena Miettinen2019-03-042-2/+2
| | | | | | | | | | Change-Id: I395aa4311aca8f880a9181e639dddebb306566fb Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Merge remote-tracking branch 'origin/4.9'Orgad Shaneh2019-03-015-166/+197
|\| | | | | | | Change-Id: I801042a53ae4d02d1891ea582ca9ea89b00d3181
| * CppTools: Move code style snippets to a separate headerOrgad Shaneh2019-02-265-158/+193
| | | | | | | | | | | | | | | | | | Include it only where used. Resolves many "unused static variable" warnings. Change-Id: Ie1e578d9b9511f963e359d87f7740b4981975dbd Reviewed-by: Christian Stenger <christian.stenger@qt.io>
| * ClangFormat: Add the preview text editor to the settingsIvan Donchevskii2019-02-222-165/+159
| | | | | | | | | | | | | | | | | | Allows the user to see how the current style applies to the code snippet. The action is triggered by the 'Apply' button. Change-Id: I820d989519cfdfb6e617ed6e8e9e5751be6619ea Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * LicenseTemplate: Fix %USER% on WindowsNikolai Kosjar2019-02-211-1/+3
| | | | | | | | | | | | | | Fixes: QTCREATORBUG-21871 Change-Id: Ibec147b32cc3bd1053e5df07b27838094dc02e88 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | Replace static_casts by QOverload where possiblehjk2019-02-262-4/+4
| | | | | | | | | | | | | | | | | | Mainly to get rid of the QProcess::finished deprecation warning. Also adjust coding style in the surrounding connects when needed. Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Merge remote-tracking branch 'origin/4.9'Eike Ziller2019-02-192-3/+30
|\| | | | | | | Change-Id: I7bdb6a4658c5fca1a7e1dda5adbb5613dabc6d18
| * CppTools: Add project directory filter to HeaderPathFilterMarco Bubke2019-02-182-3/+30
| | | | | | | | | | | | | | | | | | For the indexer we want to filter every not builtin include search path to as system include search path which is not inside of the project or build directory. Change-Id: I33663a1f3eb53ec39d5b16a8ca64b57d1b57bd9c Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Bump minimum Qt version (to build Qt Creator) to 5.11Alessandro Portale2019-02-151-9/+0
| | | | | | | | | | | | | | | | | | Recent adaptations to Qt 5.13's API deprecations require using APIs which were introduces in Qt 5.11. Change-Id: I6c077d824c9ce716e019543b290c355a5d512fad Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Merge remote-tracking branch 'origin/4.9'Orgad Shaneh2019-02-154-15/+90
|\| | | | | | | Change-Id: If4e8f52fc94c4e5fd9ec69c9000436d4ded913ff