They are reasonably standardized, and generally usable cross-plugin,
so this can help to avoid a few cross-plugin compiletime dependencies.
Change-Id: Icb2b010c3e12dee69df54ab16f6f8e90d9cffba6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
CMake has a few environment variables that are documented and this
commit adds support for them.
Change-Id: Iaa31bdc97b343581fcf519d19e66bc6ce8ace150
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Let's say you move the mouse left and right on the keyword, we shouldn't
flicker showing the same tooltip to the new position.
Change-Id: I45b69578d377384422535ce5f33f81bc916a42e2
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>
The CMake snippets do have comments with the origin of the snippet and
this patchset allows navigation to the url in question.
Change-Id: I6eb2565e8f7b9100a1cc19dbf8ccda430c698613
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
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>
Reuse it in CMakeEditor and CMakeFileCompletionAssistProvider.
Amends d04585b519
Change-Id: I8dbd59c815e017404ff215ca1ff68740d6653e91
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Drop a call to currentProject(), as currentBuildSystem()
already implies currentProject() isn't nullptr.
Amends a998269d7e
Change-Id: Ibf902dc78af5c59c6475366f52d0b3489e989789
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This will allow opening CMake files via F2 when using include statements
like: include(${CMAKE_SOURCE_DIR}/cmake/api.cmake)
CMAKE_BINARY_DIR and CMAKE_CURRENT_BINARY_DIR are also supported.
Fixes: QTCREATORBUG-29467
Change-Id: I9adb417d98e8a8fccf6cd3e5038562db02cb28c2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Removes the last usage of Utils::Text::Replacement with a more commonly used pattern.
Change-Id: I0912bf61388a58ddaba424380ec139f9aa15fc4c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
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>
To avoid additional dependencies, let the QtSupport plugin register a
function for filtering help URLs, and add information about the
originating file path to the help items created by the context help
handlers. The filter hook then finds out the corresponding project,
active target, and corresponding Qt version, and filters the help URLs
accordingly.
With the default setting in "Kits > Qt Versions > Register
documentation", only the highest versioned documentation set within a
major Qt version is registered, so context help now shows the highest
versioned help from Qt 5 or Qt 6 depending on active target. If that is
changed to "All", context help now shows documentation from exactly the
version that is currently used by the project.
Fixes: QTCREATORBUG-10331
Change-Id: I7d87793737cc5ab7d228ee4bfe568d7e8343ee7d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
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>
Fixes "Jump to File" from the context menu and the ctrl+click navigation
for files that contain special characters.
Fixes: QTCREATORBUG-25572
Change-Id: I7c26c6d517ced26f803c2224f0c09397f373b3b5
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Keep internals internal, remove some unnecessary includes, add
some that should have been there.
This reduces the number of files that get rebuild when working
on CMake internals from over 1000 to about 200.
This patch also moves some code around that ended up being
in the wrong file.
Change-Id: Icd7366ac760dc85031040720418fbb16336dce9b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Rename some constants to get a bit more consistency into the
naming scheme. I am so tiered of missing a constant due to it
not having _ in the expected places!
Change-Id: Ibb5e82ea4e25ccb559352839b96c8a64394f3085
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Like we do for the BaseTextEditor.
This allows users to get context help also for items that are not
"commands", like various variables that have a meaning for CMake.
Change-Id: Ie1af61bdffdeecb406b1dc7e6127000c17ea5a8e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>