... and not for every function. Just the CMake files.
Change-Id: I6e361f4913f8334942a3135adaa0480fdc0cee31
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
With this one could easily filter the "[cmake] " messages from all the
messages in the "Generate Messages" pane.
Change-Id: I690650f0ccb0372c9361b95cfec41809737720d7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Check that the function operating upon is "include" and then match the
word under cursor with a file from the project.
Change-Id: Ia0131f08515c56582a1fb02a59d6b2e41ac04288
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
For example find_package(ZLIB QUEIT) will result in the package
variables ZLIB_LIBRARY ZLIB_INCLUDE_DIR.
The variables are available for both code completion and navigation.
Change-Id: I4ea6090f44a980dc91632fcabbda16987b0f0285
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
They were available via Ctrl-K and "cmo <target_name>". But they should
be working also in the text editor.
Change-Id: Iaad72b784485364776b67d6dfdef7ba73dd2df70
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This allows e.g. Qt6::Core to be specified as argument for
target_link_libraries and navigation via F2.
Also fixes a bug introduced with
695952f84b which removed the project
specific features due to project being nullptr.
Change-Id: I5efa28c498d337e6bab564533a5445e6c364b26b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The first 1024 bytes from the CMake .rst files are displayed raw data.
A .rst to html or markdown would be needed for nicer user experience.
Change-Id: Ie6adbb404d844ae88b868b465d4125c2177e6cfe
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Will be done in the CMake editor. No need to slow the project loading
when you don't do any editing of CMake files.
Initially I wanted to have it already loaded when code completion is
done, but doing once when a CMake editor is opened is better.
Change-Id: I1eda2a64e708bfa4fab5ab749059a08769800eba
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
By using KSyntaxHighlighting's metadata from the cmake.xml file.
With this information the code completion has localized arguments for
functions.
Added support for Generator Expressions $< and function ${ completions.
The project functions/macros and options are also taken into
consideration.
The file completion is using FilePaths and should work remotely.
Change-Id: I79d1360c1249c65c9db65349f326be5d41f0f734
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
They are marked as obsolete in CMake 3.27 and will be removed in a
future version of CMake.
Fixes: QTCREATORBUG-29603
Change-Id: I6e5d36441d05b87ee4467d13781f53d4269636ad
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
If CMake version is lower then 3.27
- Shows the warning in general message
- Starts CMake without debugging
- Stops debugging correctly
Change-Id: Ibb13555c20ae2961c0a3c2ef6ec0fcc25930dddc
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Amends c4e15769ec
When using ui files in static libraries AUTOUIC reports fake header file
names.
By using the target that includes the source ui file we can find the
correct header file name.
Change-Id: I1c8e0b81ad2c670be87c3620f98bd0f5cce40cd1
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The wrong header was reported to the extraCompiler when AUTOUIC was set.
Fixes: QTCREATORBUG-28787
Change-Id: I92d37e56ee5e45229545184e4f4911764834ed67
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit introduces the capability to initiate
CMake Debug sessions directly from the debug panel
in the QtCretor.
Change-Id: I00245e0e14aded378e881c4049cdc41dd1fbd00e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Most information is available via Q(Core|Gui)Application.
Add an AppInfo structure for the things that are not.
This avoids that the information ends up duplicated and
hardcoded in the plugins, which is not needed or desired.
Change-Id: I4d565e75c42a7b8facafa90c27096ea49359215d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Introduce and make use of Utils::insert() for QSet with a return value
that indicates whether insertion actually happened.
Change-Id: I655e4bc3553b74fea5ae8956205e4d8070118d63
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
It is not uncommon for projects to use quoted file names, which would
break the new file operation support for CMakeLists.txt files.
Change-Id: I8dc5d6843f1723c5709cef28cf3bf89a5c87ec2a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This brings the lexer back to vanilla CMake version.
The comment arguments were not needed in the implementation of
source file addition / rename / removal operations.
Change-Id: If28b738b9ce93511b109fe09dcd03f42ee07a431
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Amends d8be2491a5
The change above introduced FileApiReader::takeCMakeFileInfos and uses
it to move the information about additional CMake files out of the
FileApiReader. But that now emptied variable was later used to inform
the project about these additional files. So, that broke the automatic
running of CMake when project files (except the toplevel one) changes.
Instead use the list of additional files that now lives in the
CMakeBuildSystem for that purpose.
Change-Id: I1062593029880af9d4c70e72e1bd101d40ad0c00
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
qt_add_qml_module was not consided when looking for existing project
files.
This would fail when qt_add_executable and qt_add_qml_module were used
with the same target name.
Change-Id: Ib7374a3e1213c23aaf12d100a8817a46d57a4303
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This way the functionality would work even if autorun CMake is disabled.
Change-Id: I54ab47d72664cb42486b260b895f58d37a885cce
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Lookup any variables found in the target definition function in order to
find the source files.
This works for something like this:
set(SOURCE_FILES myfile.cpp)
add_executable(myexe ${SOURCE_FILES})
Change-Id: I8a47ea64b4efa467074f03ed5e1d1d05b2b1bf00
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Removal of a project file is done as a rename with an empty filename.
Fixes: QTCREATORBUG-25922
Change-Id: I4443d4a31723eb1ac93f02bad633bcfaf99a9573
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This includes both with source files explicitly specified or
resulted from a file(GLOB|GLOB_RECOURSE) call.
Fixes: QTCREATORBUG-27538
Change-Id: I5ee113af168bdb8cd0a96e8ab2ae603c0607fb0b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>