aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangcodemodel
Commit message (Collapse)AuthorAgeFilesLines
* Remove extra setMargin(..) Some lines after we can see aLaurent Montel2019-10-171-1/+0
| | | | | | | setContentsMargins Change-Id: I376129566c7df466a3413f001b42c670ee7c7022 Reviewed-by: hjk <hjk@qt.io>
* Clang: Remove unused functionNikolai Kosjar2019-07-241-9/+0
| | | | | | | Amends 9ded17fce086339aabe942585187c4157532fa89. Change-Id: I96bc82c08d1e608cc743ee581111a4b3b71395a2 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Clang: Tests: Remove invalid testsNikolai Kosjar2019-07-242-125/+0
| | | | | | | | Also, some use cases are already covered in unittests. Change-Id: I1b1351670509f1d004738a9c0dc8e858cfa6167b Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Clang: Tests: Fix flaky testCompleteProjectDependingCodeAfterChangingProjectNikolai Kosjar2019-07-181-0/+1
| | | | | | | | | After changing the project, ensure that the project part is updated and thus the backend is notified about it, otherwise we run into a race condition. Change-Id: Iea1ff16156350d10982cfd7fac3e8e5220eb4726 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Clang: Fix adding snippets after opening braceNikolai Kosjar2019-07-101-0/+1
| | | | | | | | | | | | | The regression was introduced by commit 82d6d20acb04ec970ee609e46e4f7d9543b416f4 Clang: Do not show completions after comma in initializer list This fixes ClangCodeCompletionTest::testCompleteGlobals(). Change-Id: Ic126f1e3eaed158196268e3682ff32bc02deb7b9 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Remove more deprecation warningshjk2019-07-051-2/+3
| | | | | Change-Id: Ie50e41737a4bf7bea41f550df7cc765267e8a144 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ClangCodeModel: Avoid warnings on deprecated use of QTimehjk2019-07-051-4/+4
| | | | | Change-Id: Ia1d07367ad85b78201ed7553d9cfb02c1bd31ae0 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Clang: Fix typo in function nameNikolai Kosjar2019-07-032-3/+3
| | | | | | Change-Id: I8beb948071c0f33b664d05a5ce3a9390ebeeff11 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Clang Code Model: Fix product name capitalization in UI textLeena Miettinen2019-06-251-1/+1
| | | | | Change-Id: I81d7e411d47e64d5304f30ca295c3f4b1f0d51b5 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-287-16/+16
| | | | | | | | 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>
* Clang: Fix applying override declarationsNikolai Kosjar2019-05-281-2/+19
| | | | | | | | | | | | Since https://reviews.llvm.org/D50898 (clang-8) libclang provides override declarations when completing code in derived class scopes. Applying such a completion item appended "()" and resulted in invalid code, which is fixed with this change - the semicolon is inserted instead now. Change-Id: If2a04c5c719f62b98874f083a97445cd4e1db07d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ExtensionSystem: Move away from QListEike Ziller2019-05-272-2/+2
| | | | | | | | Qt 6 API will move away from it. Use QVector for API and some std container for internal things. Change-Id: Iff14d48a47d5ac52ade875d9c8c84ad8a4f577d8 Reviewed-by: hjk <hjk@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>
* TextEditor: make the format of completion item detail text adjustableDavid Schulz2019-05-234-0/+13
| | | | | | | | | | Instead of always assuming content in the form of rich text allow each item individually to define it's text format for the detail text that is shown as a tooltip of a completion item. Fixes: QTCREATORBUG-22429 Change-Id: I9fa71373a743c26fa06d48acc5f0509584830ca0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* 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-0/+7
| | | | | | | | ...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>
* Qt Creator CMake portCristian Adam2019-05-172-0/+61
| | | | | | | | | | | | | | 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 build with clang-8Ivan Donchevskii2019-04-171-5/+5
| | | | | | | | | | 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>
* Clang: Minimize reindexingMarco Bubke2019-04-022-3/+3
| | | | | | | | | | 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>
* Compilation database: Add information to message paneChristian Kandeler2019-03-154-10/+40
| | | | | | | | We must tell users where we generated the file, and also inform them about errors. Change-Id: I6383655e2f731f41b9121b2a6a31bba551d1c1de Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* CompilationDatabase: Show the progress bar while generatingIvan Donchevskii2019-03-151-3/+5
| | | | | | Change-Id: Ie8df9257f92a9dba110847fda2783c6090a23fdf Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge remote-tracking branch 'origin/4.9'Eike Ziller2019-03-146-28/+101
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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: Save compilation database to the build directoryIvan Donchevskii2019-03-143-11/+14
| | | | | | | | | | | | | | | | | | | | | | For example CMake puts compile_commands.json into the build directory and it makes sense because it uses some target-specific command line options. Change-Id: I92a5b391f35e3f75bbcf41b8efff448f197895bb Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Clang: Improve compilation database generationIvan Donchevskii2019-03-131-17/+68
| | | | | | | | | | | | | | | | | | | | 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: Do not show completions after comma in initializer listIvan Donchevskii2019-03-121-1/+6
| | | | | | | | | | | | | | | | | | | | Appends 0852f889d1. Do not automatically show global completion when initializer list does not have a type, e.g. auto foo = {{},<cursor>}; Change-Id: I233fef71c60bb79211000df70bf5b04fa2d9df37 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
| * Clang: Do not show global completions after commaIvan Donchevskii2019-03-112-0/+14
| | | | | | | | | | | | | | | | | | | | Handle the case when we try to show the function hint but do not find any completion. Do not fall back to the normal code completion in such case. Fixes: QTCREATORBUG-21624 Change-Id: I147d71b8970c18d49947f68786347a9db97736bb Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* | Merge remote-tracking branch 'origin/4.9'Orgad Shaneh2019-03-013-8/+19
|\| | | | | | | Change-Id: I801042a53ae4d02d1891ea582ca9ea89b00d3181
| * Merge remote-tracking branch 'origin/4.8' into 4.9Eike Ziller2019-02-282-2/+2
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/android/androidbuildapkstep.cpp Change-Id: Id6dfda480c23706089ab38aa6277cd37599b5167
| | * Clang: Do not assume that one of the overloads always has parametersIvan Donchevskii2019-02-221-1/+1
| | | | | | | | | | | | | | | | | | Fixes: QTCREATORBUG-21841 Change-Id: I5d4fc5d10cdf38d124e84952862b9aaf66888c88 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
| | * Clang: Fix stack-use-after-scope sanitizer error in diagnostic filterKirill Burtsev2019-02-191-1/+1
| | | | | | | | | | | | | | | Change-Id: I97d69caf9c7b642bef277fdfa0df80820fcdbe2f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
| * | Clang: Follow symbol with Ctrl+click on invalid cursorsIvan Donchevskii2019-02-221-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | When cursor is invalid try to follow it with built-in code model and highlight the token in case of success. Fixes: QTCREATORBUG-21637 Change-Id: I4c765882817fa150a155074c9d71beceb5905af8 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | | Replace static_casts by QOverload where possiblehjk2019-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2017-39/+105
|\| | | | | | | | | | | Change-Id: I0d3db14e583628b906d7fdeb800e004d98e52632
| * | Clang: Do not suggest to remove warning from tidyNikolai Kosjar2019-02-201-20/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | ...if the tidy configuration is read from a file. Do not show the corresponding text mark action in this case. Change-Id: I6114304f41e3946d4041233031a9bc83eee13bba Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
| * | Clang: Remove some namespace noise in clangtextmark.cppNikolai Kosjar2019-02-201-8/+3
| | | | | | | | | | | | | | | Change-Id: I870338821f106b1066e43b76451ed79b130e612b Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
| * | Clang: Move unexported classes to InternalNikolai Kosjar2019-02-1917-11/+39
| | | | | | | | | | | | | | | | | | Change-Id: I3ea197b734f146d4b11431aaf927aed9be7d8756 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | | Bump minimum Qt version (to build Qt Creator) to 5.11Alessandro Portale2019-02-151-4/+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>
* | Move function to get fallback help IDs to CppToolsEike Ziller2019-02-121-74/+3
| | | | | | | | | | | | | | To be shared between Clang and Built-in model Change-Id: Iebe132c93033c252c58da13b858a0dce61483eaf Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | TextEditor: Fix build for Qt5.9Christian Stenger2019-02-111-0/+4
| | | | | | | | | | | | | | | | | | | | Do not use functions that are not supported with the minimum supported Qt for building QC. Partially reverts 963dc84cc5d1. Change-Id: Ife03143a7cf5a8f428754040e7004efe42d70a8a Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | ClangCodeModel: ModernizeNikolai Kosjar2019-02-117-17/+15
| | | | | | | | | | Change-Id: Ie001a2d8ed9c82ac5fedf8e59bd56d7bbdddf919 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | clangdiagnostictooltipwidget.cpp: Fix compilationFriedemann Kleint2019-02-111-0/+1
| | | | | | | | | | | | | | | | | | Add missing include. Amends 963dc84cc5d1e412344e3a0fbf4a476541da2d19. Change-Id: Ida93a63dbc8ad3155834901ac2cdf7186bc7deb2 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | Fix some deprecation warnings in basic pluginsFriedemann Kleint2019-02-111-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warnings apppearing in 5.13, for example: warning: ‘QDir& QDir::operator=(const QString&)’ is deprecated: Use QDir::setPath() instead [-Wdeprecated-declarations] ... warning: ‘static QRgb QColorDialog::getRgba(QRgb, bool*, QWidget*)’ is deprecated: Use getColor() [-Wdeprecated-declarations] warning: ‘Qt::DropAction QDrag::start(Qt::DropActions)’ is deprecated: Use QDrag::exec() instead [-Wdeprecated-declarations] warning: ‘void QProcess::finished(int)’ is deprecated: Use QProcess::finished(int, QProcess::ExitStatus) instead [-Wdeprecated-declarations] ... warning: ‘const QRect QDesktopWidget::availableGeometry(int) const’ is deprecated: Use QGuiApplication::screens() [-Wdeprecated-declarations] ... warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] ... warning: ‘const QBrush& QPalette::foreground() const’ is deprecated: Use QPalette::windowText() instead [-Wdeprecated-declarations] ... warning: ‘void QTextOption::setTabStop(qreal)’ is deprecated [-Wdeprecated-declarations] warning: ‘void QList<T>::swap(int, int) [with T = ProjectExplorer::BuildStep*]’ is deprecated: Use QList<T>::swapItemsAt() [-Wdeprecated-declarations] warning: ‘void QProcess::setReadChannelMode(QProcess::ProcessChannelMode)’ is deprecated: Use QProcess::setProcessChannelMode() instead [-Wdeprecated-declarations] ... warning: ‘QString QFileInfo::readLink() const’ is deprecated: Use QFileInfo::symLinkTarget() instead [-Wdeprecated-declarations] Change-Id: I1d893d42d372245892f2de8406f52dbe7bbd552a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | ClangCodeModel: Fix some clazy level0 warningsNikolai Kosjar2019-02-082-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use QString instead of an empty QStringLiteral [-Wclazy-empty-qstringliteral] Use the static QFileInfo::exists() instead. It's documented to be faster. [-Wclazy-qfileinfo-exists] Unused CppTools::ClangDiagnosticConfigs [-Wclazy-unused-non-trivial-variable] Change-Id: Ia4098d1191d6fcfc6e0774f71c39acdea3f0f36c Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Clang: Add tooltip action to remove specific warnings/checksNikolai Kosjar2019-02-054-48/+188
| | | | | | | | | | | | | | | | | | | | | | ...from the diagnostic configuration. If no custom diagnostic configuration is set in Projects Mode > Clang, one is created and set for the current project. Otherwise the current custom diagnostic set in the project settings is modified. Change-Id: I5c48280c90f0e807e7333122d504dda302a8b0a9 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Clang: Allow to forward warnings flags from build systemNikolai Kosjar2019-02-053-7/+22
| | | | | | | | | | | | Change-Id: I47ebb1ce4f3b5544408eb1d0f891ed5090394282 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Clang: Make diagnostic tooltips consistentNikolai Kosjar2019-02-056-100/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix that triggering a diagnostic tooltip from the diagnostic location/range itself (underlined text) did not show the icon on the left and the actions/toolbuttons on the right in the tooltip. Instead of showing the tooltip content itself, request the tooltip for the corresponding text mark to get the extra decoration and actions. Change-Id: I5e94aca117a761f7a798d4f4b33db6e386e54d84 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Help: Move resolution of help from multiple candidate IDs to HelpItemEike Ziller2019-02-011-13/+5
| | | | | | | | | | | | | | | | No need for code duplication. Change-Id: I3d2c795d072b8de5818e1844b8126e526339c0da Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* | Help: Avoid double lookup for help tooltipsEike Ziller2019-02-011-5/+6
| | | | | | | | | | | | | | | | Save the HelpItem directly in the tooltip instead of the help ID which would need to be looked up again. Change-Id: I107e82e89d9ea26cad9d6532ad4c687d1ac8f1ec Reviewed-by: David Schulz <david.schulz@qt.io>
* | Clang: Make some functions available for reuseNikolai Kosjar2019-02-013-16/+19
| | | | | | | | | | Change-Id: I7b85ea104a852c1168578949247efb8387a95f30 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Clang: Sync ClangProjectSettingsWidget to changed settingsNikolai Kosjar2019-02-012-3/+17
| | | | | | | | | | Change-Id: Ic123c8a3b10a18d9f9313462a682c470eb3ffdaf Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>