aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cppcodemodelinspectordialog.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use LayoutBuilder V2hjk6 days1-2/+2
| | | | | | | | | | | | This puts the implementation introduced in acf1ecb47fdf into use, after significant simplifications in the class hierarchy. CRTP is not used anymore, and the new tag based dispatch is also used for Layout::addItem, effectively reducing the number of different code paths. The Lua based settings access is disabled for now. Change-Id: Idb6d1a25675378757c5267bdb630bcd4c1f52d34 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* All: More ToolChain->Toolchain renamingshjk2024-01-191-5/+5
| | | | | | | | And removal of one unused function declaration. Change-Id: I594e23401d8f247d3be081ce850005574951899d Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CppEditor: Make a few CppModelManager functions statichjk2023-07-121-8/+6
| | | | | | | ... to simplify code using it. Change-Id: Ib2bfbb5a17a1d48088a9cf4973d4c3f006cd34e4 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Layouting: Handle attach types via setterhjk2023-05-031-1/+2
| | | | | | Change-Id: I862f5cd109db3582b4f029787ec0cded2da39ce6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Layouting: Introduce a 'bindTo' LayoutItemhjk2023-05-021-8/+10
| | | | | | | | | | | | ... to 'export' the widget being operated on. The 'Tab' related changes are related, as they affect the order of execution. Change-Id: I7aa079f12e49a1dab7c6a49acfae9dc684cfb479 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Utils: Make Layouting a top level namespacehjk2023-04-251-1/+1
| | | | | | | | | | The whole machinery is now almost only layoutbuilder.{h,cpp}, mostly independent of the rest of Utils. Idea is to finish the separation to make it stand-alone usable also outside creator. Change-Id: I958aa667d17ae26b21209f22412309c5307a579c Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* CppEditor: Convert to Tr::trAlessandro Portale2023-01-121-2/+3
| | | | | | Change-Id: Ic4025e06e17c45eb6dc2162fb7f21f5b8aebe84d Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* CppEditor: Inline cppcodemodelinspectordialog.uihjk2023-01-111-79/+225
| | | | | | | The last one in the plugin. Change-Id: I86d5ff6e0a3a6bb55342f780e85f6544ad50f90b Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* CppEditor: Use FilePath for ProjectPath::m_sourceFileshjk2023-01-111-4/+3
| | | | | | | ... and update using code. Change-Id: I682727a4b2982dba388e7cc7b9488225748d591f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove GPL-3.0+ from license identifiersKai Köhne2023-01-061-1/+1
| | | | | | | | | | | | | | | Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0, this applies only to a hypothetical newer version of GPL, that doesn't exist yet. If such a version emerges, we can still decide to relicense... While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only Change was done by running find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \; Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CppEditor: More migration to FilePathhjk2022-12-141-1/+1
| | | | | Change-Id: I261b713671e00bb567f61b4ee5ecf6fa83473bff Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CPlusPlus: Use FilePath for resolved include pathshjk2022-11-301-2/+2
| | | | | | | | ... and fix fallout. Change-Id: I66886e91ff476eff15db51cc024a8021e952d44d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CppEditor: Convert parts of ModelManagerInterface to FilePathhjk2022-11-291-1/+1
| | | | | Change-Id: If7503b6d6732e1735eb8d48ece6e80886d10c647 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CPlusPlus: Proliferate FilePath usehjk2022-11-221-19/+20
| | | | | | | | | | | | | | | | | | | The starts with CppDocument::filePath(), plus a bit of the fallout This is one patch of potentially many. It is hard to draw the line where to stop this kind of chunk, this here converts a few additional functions for which including it in the patch looked like less churn than without. Converting is mostly fromString/toString, with a few exceptions for "already seem" like caches, that use cheaper "path()" to avoid likely performance regressions (on Windows FilePath comparison is currently case-insenstive, and more expensive). There should be no difference for local operation with this patch. Change-Id: I7b35f98a0a6f0bfed4ea0f8f987faf586f7a8f2b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* C++ support: Consider project-specific target tripleChristian Kandeler2022-10-141-1/+1
| | | | | | | | | | | | | | ... before creating project parts. Otherwise we can get wrong includes and defines from the compiler. Amends 9c86e6746fb82d6244cc2fc565d5f730c67f8106. Also do not add -m32 or -m64 for non-x86 targets. Task-number: QTCREATORBUG-25615 Change-Id: I02da9251c77d45fc8827990a2d59c3ae2c262591 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-2/+2
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I88edd91395849574436299b8badda21bb93bea39 Reviewed-by: hjk <hjk@qt.io>
* Use SPDX license identifiersLucie Gérard2022-08-261-24/+2
| | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Drop Qt5: Cpp/TextEditor: Get rid of QOverloadJarek Kobus2022-07-261-2/+1
| | | | | | Change-Id: I010f211b40f876c0f033fd717aaa094f775ea214 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* CPlusPlus: Inline some simple central functionshjk2022-06-241-1/+1
| | | | | | | | | | | | | Depending on context, callgrind sees contributions of >8% to the total cost of project parsing for these functions. The functional are actualy executed executed out-of-line, often for a function body of one "payload" instruction only. Inlining removes the call/endbr64/ret overhead. Change-Id: I6886f08e322fcaa4e0f54d424279e0a8c24e4718 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CppEditor: Remove foreach / Q_FOREACH usageArtem Sokolovskii2022-05-061-3/+4
| | | | | | Task-number: QTCREATORBUG-27464 Change-Id: I9915cf2c07bdcc570efc20601752d60f2ec82f34 Reviewed-by: David Schulz <david.schulz@qt.io>
* CppEditor: Remove CppToolsBridge & friendsChristian Kandeler2021-09-061-2/+1
| | | | | | | | | | This redirection did nothing except to horribly obfuscate the code. Note that most callers already accessed the model manager directly, and some bridge functions were not called at all. Change-Id: Ic1c728afe79bf98544da23a1955ee82d0dbde94f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge CppTools into CppEditorChristian Kandeler2021-09-011-9/+9
| | | | | | | | | | | | | | | | There was no proper separation of responsibilities between these plugins. In particular, CppTools had lots of editor-related functionality, so it's not clear why it was separated out in the first place. In fact, for a lot of code, it seemed quite arbitrary where it was put (just one example: switchHeaderSource() was in CppTools, wheras switchDeclarationDefinition() was in CppEditor). Merging the plugins will enable us to get rid of various convoluted pseudo-abstractions that were only introduced to keep up the artificial separation. Change-Id: Iafc3bce625b4794f6d4aa03df6cddc7f2d26716a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppTools: Use only const pointers for ProjectInfo and ProjectPartChristian Kandeler2021-08-271-15/+15
| | | | | | | | All members were already const, but this makes it clear at all points of use that these data structures are immutable. Change-Id: Iea615c090bde462c445d15223caccc561b0c713d Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* CppTools: Turn some classes into pure value typesChristian Kandeler2021-08-131-8/+10
| | | | | | | | | | | | | ProjectInfo, ProjectPart and ProjectUpdateInfo used to carry pointers to Project and/or Toolchain, even though they were used in contexts where these pointers were either unsafe to access or not guaranteed to be valid anymore, which made their use difficult and error-prone. We turn these classes into pure value types by copying in all relevant information before the first async operation takes place. Fixes: QTCREATORBUG-25678 Change-Id: I1914b0dbda6c7dfba6c95e5e92f2d69977755590 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Qt6: Various include, QPrinter, and QFlags adaptationsEike Ziller2020-09-281-2/+2
| | | | | | Task-number: QTCREATORBUG-24098 Change-Id: I7aca7d25a063c84d6eec14c2c5789357ce56a7b3 Reviewed-by: hjk <hjk@qt.io>
* CppEditor: Use FancyLineEdit in CppCodeModelInspectorDialogAlessandro Portale2020-01-241-6/+4
| | | | | Change-Id: Ib4688ec1406dafb39059fe3b4ea3277ea8e6fffa Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Clang: Avoid consuming gcc internal include pathsNikolai Kosjar2019-10-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given the (default) include paths of GCC, e.g. /usr/include/c++/7 /usr/include/x86_64-linux-gnu/c++/7 /usr/include/c++/7/backward /usr/lib/gcc/x86_64-linux-gnu/7/include /usr/local/include /usr/lib/gcc/x86_64-linux-gnu/7/include-fixed /usr/include/x86_64-linux-gnu /usr/include discard gcc-internal paths like /usr/lib/gcc/x86_64-linux-gnu/7/include as they are not relevant for clang and even confuse it with regard to #include_next. Paths below the gcc install dir are considered as gcc-internal. The install dir is queried with $ gcc -print-search-dirs Some GCC distributions, like MinGW, ship the standard library headers in the install dir. Ensure to not discard these. Fixes: QTCREATORBUG-22898 Change-Id: Ia85258fb01b72ad073e71390e003fe8268e3b01f Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Compile fix with recent Qt devhjk2019-07-291-3/+2
| | | | | | | | | The reasoning in 1b4766e26c6b did not take into account that the scope of QT_NO_JAVA_STYLE_ITERATORS may change over time, as done with f70905448f6 in Qt base. Change-Id: Ib1966ff26c4d36d5f62e149d6b45baa4aecf825d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Standardize on int for line and column valueshjk2019-07-261-3/+3
| | | | | | | | | | | | | | | 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>
* Utils: Rename FileName to FilePathhjk2019-05-281-1/+1
| | | | | | | | 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>
* CppTools: Show more project part details in inspector dialogNikolai Kosjar2019-05-211-1/+4
| | | | | | Change-Id: Ic7c94c9cd83f73cad0603ceb75836fa21768a649 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Marco Bubke <marco.bubke@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>
* CppEditor: ModernizeNikolai Kosjar2019-02-081-74/+69
| | | | | | | | | | | | | | modernize-orgad modernize-return-braced-init-list modernize-use-auto modernize-use-default-member-init modernize-use-equals-default modernize-use-nullptr modernize-use-override modernize-use-using Change-Id: Ifa862782fb7b56ed3f93d9f98685c3af616797c2 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Clang: Forward compiler options for gcc/clangNikolai Kosjar2019-01-161-0/+13
| | | | | | | Rely on clang to do the "right thing" with them. Change-Id: I44adf2cd5c61549896da3fc9b7c35c2fb0142060 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangTools/QMake: Stop analyzing files not part of build configurationNikolai Kosjar2019-01-081-0/+5
| | | | | | | | | | | | | | | ...for the qmake project manager. When parsing the project files, remember whether a file was discovered by the exact or cumulative parse. Only files that were discovered by the exact parse are considered "active" and thus part of the build configuration. The others are not offered for selection. Fixes: QTCREATORBUG-16016 Started-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Change-Id: I7a28b4de15e048975d7f0cd737dd8c11f744315b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add system include path to HeaderPath and merge ProjectPartHeaderPathMarco Bubke2018-09-101-3/+3
| | | | | | | | | | | | | System include paths are appended after other includes by the compiler. So we should set them as system includes and not as normal includes. Otherwise we change the include order. Headers in system include paths are not cluttering the screen with unwanted warning and by the way improve performance too. ProjectPartHeaderPath was a dopperganger of HeaderPath, so we merged them. Change-Id: I7c394b4098b697de79761499ffcd5913cc02d652 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CppTools: Add target type information to project partChristian Stenger2017-09-181-0/+1
| | | | | | | | | | | Let project managers store information whether a project part belongs to an executable or a library and use this information inside the AutoTest plugin. This information will help to determine which targets are relevant for the execution of tests. Change-Id: I93b42797bf55225425398dc83aecea3c99eea290 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Convert macros from plain QByteArray to a vector of structsMarco Bubke2017-09-141-15/+21
| | | | | | | | | | | The old code model expected the macros as C++ formatted text ("#define Foo 42) but newer targets like the Clang codemodel expect key value arguments like "-DFoo=42". So instead of parsing the text again and again we use an abstract data description. Task-number: QTCREATORBUG-17915 Change-Id: I0179fd13c48a581e91ee79bba9d42d501c26f19f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CppEditor: split CppEditor and CppEditorWidgetIvan Donchevskii2017-09-121-1/+1
| | | | | Change-Id: Id3c815184f7f3bace0276e947f6b6f76e61ec6de Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppEditor: Show precompiled headers in code model inspectorNikolai Kosjar2017-08-221-0/+5
| | | | | | | | | | | They are displayed in: 1. Invoke the inspector dialog: Menu: Tools > C++ > Inspect C++ Code Model... 2. Select "Project Parts" in the top level tab row 3. Select "General" in the lower tab row Change-Id: I9042fb7706bde713af808ca687cae8a5d06736ae Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* CppDocument: use initializer_list for keysTim Jenssen2017-04-261-36/+23
| | | | | | Change-Id: Ib2c407b642599cbe9da416647188e2457ec16906 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppTools: Add target information to ProjectPartTobias Hunger2017-03-151-0/+4
| | | | | | | | | This is important to be able to map sources to actual things that are going to be built. Change-Id: I1aef940767d60192642ed79a1703cff8dfdad9e1 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppTools: De-duplicate and rename function in ProjectPartNikolai Kosjar2017-03-091-6/+1
| | | | | Change-Id: I675ce4c9059d8ae4046f6a13aa7c04b88141d443 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectPart: Add callGroupIdTobias Hunger2017-03-091-0/+3
| | | | | | | | Do not rely on the projectfile being unique anymore. Change-Id: I52e63b3ac8aeca43ef70af1d59d1d8612bd3540e Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* ProjectPart: Allow for line/column information in project fileTobias Hunger2017-03-091-2/+7
| | | | | | | | | | Keep this information separate so that plugins using the information do not need to start parsing the project file. Change-Id: Ibecf431de1b12bbe820c6f8f9c986cffeb4972d2 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppTools: Provide hints about chosen project part for editor documentNikolai Kosjar2017-01-241-1/+1
| | | | | | | | | | | | Parse issues can have multiple reasons (invalid kit, not a project file, actual parse issue) and we should be able to tell them apart. With this change, we can distinguish between the fallback project part and a ambiguous project part. Follow up changes will use this to display more accurate diagnostics. Change-Id: Icc8767607cc17dc14d6227b07f34e81ba5525a96 Reviewed-by: David Schulz <david.schulz@qt.io>
* CppTools: Show ProjectPart::selectedForBuilding in inspectorNikolai Kosjar2016-12-191-0/+7
| | | | | Change-Id: I8a662565eb5e12fd3dbabf00427f34c98030a55e Reviewed-by: David Schulz <david.schulz@qt.io>
* CppTools: Clean up ProjectFileNikolai Kosjar2016-12-081-3/+3
| | | | | Change-Id: I01212115566c6bf26268b66fef96d50b7e93b96c Reviewed-by: David Schulz <david.schulz@qt.io>
* CppTools: Display header paths as view in code model inspectorNikolai Kosjar2016-12-071-2/+82
| | | | | Change-Id: I418cbc7200d9aee0862a484bb11cd23a632828b3 Reviewed-by: David Schulz <david.schulz@qt.io>
* CppTools: Show file kind in code model inspectorNikolai Kosjar2016-12-071-2/+82
| | | | | Change-Id: I5cdc6ec672a970a6fcfa52dfa14c2f515cf27f6d Reviewed-by: David Schulz <david.schulz@qt.io>