Commit Graph

76686 Commits

Author SHA1 Message Date
Ihor Ivlev
6f7e7980d2 Display parent functions in the Find Usages menu
To display the parent function, first we find it in displayResults and
store the information to SearchResultItem, then
SearchResultTreeItemDelegate gets the information and renders it.

Similar approach is applied to ClangdClient, in addSearchResultsForFile.

This change also adds default style for containing function highlight in
the search.
Default foreground and background colors are same as usual text colors.

Task-number: QTCREATORBUG-27550
Change-Id: Id1251afa192f8d1232524742b7c211770bcb83fb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-25 15:05:25 +00:00
hjk
5da36104ab Utils: Make ProcessHandle comparisons hidden friends
Change-Id: I54f97f19c35596de732d57894a9146d2e517e316
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-25 13:17:17 +00:00
Christian Stenger
1ff1d132f3 QmlProjectManager: Fix build
Amends f55fc5276b.

Change-Id: I5a6119c85639e1c0c240041fa36679063db72402
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-25 13:01:08 +00:00
hjk
d663986ef1 Debugger: Remove one use of Runnable::device
Change-Id: I46a004b9536e3b32f3fd620b86e39722c7ddcb6d
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-25 12:15:17 +00:00
hjk
807251f57f ProjectExplorer: Replace too generous #include
Change-Id: Ica9cc5214275eabd789038dbb452eb5e84de35fd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-25 11:20:29 +00:00
Christian Stenger
e0efc4faf3 ScxmlEditor: Fix build with Qt5.15
Amends 8b444f88eb.

Change-Id: Ide1da6a6c26f3a72388b2f9642ae25ce3cf62171
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-05-25 11:18:18 +00:00
Christian Stenger
f97bb1de4e Utils: Fix build on Windows
Partially reverts 9508ee134.

Change-Id: I5b6f865a4b404ce8e510bc678ec1ce84ccb9e013
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-25 11:18:05 +00:00
hjk
06624422c2 Debugger: Avoid another use of Runnable::device
Change-Id: If89aafd4d81efb2e0d7ec3dfcaf6a204a4b17159
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-25 10:33:44 +00:00
hjk
3330337a03 Valgrind: Avoid a use of Runnable::device
Change-Id: If7b5a9d4be7f4f9238f00406d8145db1222cf659
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-25 10:33:35 +00:00
hjk
5a5aa167f2 ProjectExplorer: Drop explicit device setting for custom executable
Not needed anymore.

Change-Id: I8f67de7518aa90ac38c37dc64ab563ef46f53c33
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-25 10:33:19 +00:00
hjk
f79a71df7b ProjectExplorer: Reduce use of Runnable in SimpleTargetRunner
Runnable functionality is nowadays mostly accessed more directly
in QtcProcess and its setup functions.

Change-Id: I2a2b5433aef1d464dc58d5a35069376dee051d57
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-25 10:32:23 +00:00
hjk
ae42604904 Utils: Add CommandLine::prependArgs convenience functions
For clearer code on the user side.

Change-Id: I3adf2e96628f4e59293cd2f0966fb30989e0da9f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-25 10:26:46 +00:00
Christian Stenger
743dd442d7 GitLab: Introduce minimal GitLab plugin
So far only adding global settings and project settings.
Global settings allow to specify configurations used later
inside the project settings or when accessing GitLab
server instances.
Project settings already can "link" to GitLab projects,
which will allow to fetch notifications for the project
later on.
Real functionality is added in the follow ups.

Change-Id: I8a0f978001c58c6dc9e07917c183891abec9a3d0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-25 09:54:09 +00:00
Cristian Adam
28497d928b Scripts: Do not deploy libclang anymore
Since libclang is no longer needed, we don't need to deploy the
library anymore.

Change-Id: Ia7bdb7e089ec95b8252efbfa1c607d03082a99e6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-25 09:45:10 +00:00
The Qt Project
6310b84594 Merge "Merge remote-tracking branch 'origin/7.0'" 2022-05-25 09:42:43 +00:00
Eike Ziller
82ee8baad8 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I254066f8be63cb5b15650ef2a470206db56de026
2022-05-25 11:42:13 +02:00
Tapani Mattila
f55fc5276b QmlProjectManager: Add theming support to QDS landing page
Task-number: QDS-6897
Change-Id: I2e1cea556d906d59664cb72612ea1d67ef495f4f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-25 09:18:09 +00:00
Christian Kandeler
5ae128f634 ClangCodeModel: Fix test crash
Amends 509600da99.

Change-Id: Ia07a65e509414b41f279f50c02893d1733fd1022
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-25 09:06:16 +00:00
Artem Sokolovskii
8b444f88eb ScXMLEditor: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464
Change-Id: Ic439470b7c23022fee6acbf0cdaba7760309edb0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-05-25 08:52:57 +00:00
Christian Kandeler
509600da99 Core: Auto-suspend documents more aggressively by default
This is basically just needed to keep clangd's memory consumption under
control, but as we don't expect it to cause any harm elsewhere, we do it
on this general level, rather than introducing an additional document
management layer.

Task-number: QTCREATORBUG-26673
Change-Id: Ib4e8d191022db269546f0a9822702a2a1cb97419
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-25 07:51:56 +00:00
Jarek Kobus
a043b1676f Icon: Aggregate QVector instead of deriving from it
In this way we hide the public interface of QVector for Icon.

Change-Id: I7722779b3b6781ff2cbcab0e2e9894dbd0435218
Reviewed-by: hjk <hjk@qt.io>
2022-05-25 07:49:50 +00:00
Jarek Kobus
ed40753ed1 Utils: Drop unused headers [I-Z]
Round 2 - focus on sources.
For classes with initial in range [I-Z].
Try to keep the same separators between different kind of headers.

Change-Id: I8a7ab99bab8120ee72cda6433ee3dc6f260a4d76
Reviewed-by: hjk <hjk@qt.io>
2022-05-25 07:49:25 +00:00
Jarek Kobus
4b9545fe7f Utils: Drop unused headers [A-H]
Round 2 - focus on sources.
For classes with initial in range [A-H].
Try to keep the same separators between different kind of headers.

Change-Id: I838a8324ddd5b4d8d5a51b8f30605f783c663813
Reviewed-by: hjk <hjk@qt.io>
2022-05-25 07:47:09 +00:00
Jarek Kobus
f3957d383f Utils: More forward declarations / drop unused headers [T-Z]
Round 1 - focus on headers.
For classes with initial in range [T-Z].

Replace QT_FORWARD_DECLARE_CLASS with QT_BEGIN_NAMESPACE and
QT_END_NAMESPACE and forward declare inside.

Change-Id: I4ac3a8391e6167aa2db3973a9f94a45ac3c8ebd1
Reviewed-by: hjk <hjk@qt.io>
2022-05-25 07:40:47 +00:00
Cristian Adam
d76eab7d2f ProjectExplorer: Do not hardcode X86 architecture for Windows
On Windows Arm64 the aarch64 architecture would be overridden
by X86 and all the kits would be marked as invalid, removing
the ability to create / configure projects.

Change-Id: I3940479792aa5440e9b0ee4a63e868c01738cd90
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-25 07:31:43 +00:00
Jarek Kobus
a67aee30a6 Utils: More forward declarations / drop unused headers [S]
Round 1 - focus on headers.
For classes with initial in range [S].
Try to keep the same separators between different kind of headers.

SmallString[xxx] classes skipped for now.

Change-Id: Ie5c8edcb028e33eb8f9619e646afc462b91dca73
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-05-25 07:19:00 +00:00
Jarek Kobus
304ab10642 Utils: More forward declarations / drop unused headers [P-R]
Round 1 - focus on headers.
For classes with initial in range [P-R].
Try to keep the same separators between different kind of headers.

Change-Id: I01fb80b93164a7fe4c0bd2cd8f9e4f27523efefa
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-25 07:18:44 +00:00
Jarek Kobus
9508ee1347 Utils: More forward declarations / drop unused headers [L-O]
Round 1 - focus on headers.
For classes with initial in range [L-O].
Try to keep the same separators between different kind of headers.

Drop changes to NameValueDictionary for now, as apparently
environmentfwd.h is broken currently. It looks we can't
forward declare the argument T inside QList<T> - the type
must be complete.

Change-Id: If26e88357a2ffbb91a79c4d003046443d98d5673
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-05-25 07:14:40 +00:00
Jarek Kobus
4ad8fb80c6 Utils: More forward declarations / drop unused headers [H-K]
Round 1 - focus on headers.
For classes with initial in range [H-K].
Try to keep the same separators between different kind of headers.

Change-Id: Iefb032953743be41a847ee011c30527edfa425d8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-25 07:14:04 +00:00
Jarek Kobus
2853660a59 Utils: More forward declarations / drop unused headers [D-G]
Round 1 - focus on headers.
For classes with initial in range [D-G].
Try to keep the same separators between different kind of headers.

Change-Id: Id42cd7b3743a816f75cecb6b576c0e37cb057473
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-05-25 07:13:52 +00:00
Jarek Kobus
7dd51acdfa Utils: Get rid of UTILS_DELETE_MOVE_AND_COPY
Use Q_DISABLE_COPY_MOVE, it exactly the same.

Change-Id: I574d52a0abdf9101f86054f881f6ce0cd498bb36
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-05-25 07:13:43 +00:00
Tasuku Suzuki
8a6c033ede Imageviewer: add button to copy image as data url
Change-Id: Ia30751ebb9b567b22de9d1256bb59aa2116366ba
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-05-24 16:57:41 +00:00
David Schulz
f35cd3c13f Editor: skip unnecessary text mark priority reevaluation
Only remove and add the text mark to the text block user data if the
priority changed. In all other cases a layout update is sufficient.

Amends a8cad01887

Change-Id: I9f8552e766838917c0e296cc7f7c7730669c45cd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-24 16:39:22 +00:00
Jarek Kobus
123a6e61de TerminalImpl: Set a parent to all the children
ProcessInterface subclasses may be moved between threads,
that's why we need to make them children of ProcessInterface.

Change-Id: Ia58f1ea05f85e22315dc22dbafce06ee6bcf0be6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-05-24 16:05:02 +00:00
Thomas Hartmann
07d9075d47 QmlDesigner: Add QtQuick 6.3 as supported version
Change-Id: Icbb1d2a3c7584cc24f0d8dde467d07678925711c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-05-24 15:00:39 +00:00
Cristian Adam
ee98c98676 CMake: Remove libclang references
Now that libclang is no longer used, make sure that all references
to libclang are gone.

Change-Id: I4b66eff992b22adb6a9c25d34053f2b36079583c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-24 14:57:22 +00:00
Marcus Tillmanns
f117c2a37b ImageContainer: Fix potential use after free
Found during clang-analyzer run.

Change-Id: I6549403ac949650058348ccc22b2020d09ef53e0
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-05-24 14:44:41 +00:00
Alessandro Portale
f54097fefb QtSupport: Remove screenshot cropper
Reduce maintenance by removing a feature that broke in 7.0, caused
assertions. The absence of the cropper won't most likely be noticed,
because the examples thumbnail size was increased quite a bit in the
last Welcome Screen redesign.

Instead of cropping, we now always scale the thumbnail to
ListModel::defaultImageSize. As a benefit of this simplification, the
thumbnail is now also High-DPI enabled.

Fixes: QTCREATORBUG-27141
Change-Id: I57cafb000c3095dd387cd96814b6e946980b2aed
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-24 13:54:46 +00:00
Eike Ziller
5e27a96446 Bump version to 7.0.3
Change-Id: I861b3b9c5616297af12e04b39bd157107a27055b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-24 13:37:55 +00:00
Eike Ziller
2577ce8ba1 CMake: Add 'Profile' configuration
Get rid of the hardcoded QML Debugging for Debug & RelWithDebInfo from
the project template, because RelWithDebInfo is actually a good
configuration for doing releases (we use it for Qt Creator), and
enabling QML debugging for releases is a bad idea.

Instead enable QML Debugging in Qt Creator for the Debug configuration,
and add a 'Profile' configuration that is 'RelWithDebInfo + QML
Debugging'.

When importing a build, we only set the "QML debugging" option of the
build configuration, if it is enabled in the imported build, even if it
uses CMAKE_BUILD_TYPE=Debug .

One drawback: When not importing a build, but just setting the build
directory of a "Profile" or "Debug" configuration to an existing build,
Qt Creator asks if it should apply "-DCMAKE_CXX_FLAGS=-DQT_QML_DEBUG".
The user can choose not to, but then is asked the next time again, and
it is not obvious that the "QML debugging" option is responsible for
this.

That is somewhat orthogonal to this change though: Even without this
change, if the user changes the QML debugging option from "Leave at
Default" to "Enable", the same happens, and it is also not clear to the
user how to get rid of it. The user might not even have realized that
they changed the option (e.g. on platforms where the mouse wheel cycles
combo box values).

I think the correct solution is to 1. make clearer where the CMake flags
came from in that dialog, 2. allow the user to cancel a build from that
dialog, 3. allow the user to discard these changes (by changing the
setting) from that dialog. But that is for another patch.

Amends 3300182d40
Amends 77fed0b0fd

Change-Id: I95de59473b67c5afd6a53ea7f49838dbaef770d4
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-05-24 13:34:29 +00:00
Mahmoud Badri
917ae81ce6 QmlDesigner: focus material browser upon open
When clicking the open material browser button in the material editor,
focus the material browser window if it is already open. Also do the
same when opening the material editor by double clicking a material
in the material browser.

Fixes: QDS-7006
Change-Id: If64d1ff6595dea5e33771485622322df708405d9
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-05-24 13:10:42 +00:00
Mahmoud Badri
4c1e4ed907 QmlDesigner: Unify empty text between material editor and browser
Make the text indicating that there are no materials, same size and
content between the material editor and browser.

Change-Id: I6e9e46c30d89aed090b504b256b113e2601b4659
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-05-24 13:03:24 +00:00
Mahmoud Badri
71e553f497 QmlDesigner: Disable apply material to selected when no selection exist
When there is no valid model selected, disable the "apply to selected"
actions in the material editor and browser.

Change-Id: Id8e771c64e69c0ba2f42dff01d19ffbf4afafb77
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-05-24 13:01:20 +00:00
Jarek Kobus
f9433c79b7 QtcProcess: Use Utils::Guard instead of self made substitute
Change-Id: I36b6db25998b5c34c2c96cfb5dc8c60537dbb7b6
Reviewed-by: hjk <hjk@qt.io>
2022-05-24 11:46:38 +00:00
Christian Stenger
6fc98722e2 Valgrind: Fix callgrind function call calculation
Broke with 7450bcb2b9.

Change-Id: Ib5e2506bc69fa9bdbda7a95c064727069b430a06
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-05-24 11:28:22 +00:00
Dmitry Shachnev
4d9215e44d Correctly include KSyntaxHighlighting headers
In external KSyntaxHighlighting, these headers now have paths like
/usr/include/KF5/KSyntaxHighlighting/KSyntaxHighlighting/AbstractHighlighter,
where /usr/include/KF5/KSyntaxHighlighting is passed to compiler as include
path.

Old headers which had only one KSyntaxHighlighting fragment in path were
removed in v5.94.0:
https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/305

Adjust our vendored version to make the code work with both external and
vendored versions.

Change-Id: Iadcc668c3c705c563ae359301d227ee19eadca0f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-24 11:28:08 +00:00
Eike Ziller
c5818fc844 Update change log for 7.0.2
Add some things that were fixes outside of the Qt Creator main repository.

Change-Id: Ic468fcf9f3daaba6b8a1efc760b4f757aec1fc1f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-05-24 11:25:20 +00:00
Jarek Kobus
ef2ddeb00b Utils: More forward declarations / drop unused headers [A-C]
Round 1 - focus on headers.
For classes with initial in range [A-C].
Try to keep the same separators between different kind of headers.

Change-Id: Ieab893d644af035c42590401c90728719394221f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-24 10:32:53 +00:00
Artem Sokolovskii
7954c4cc69 ProjectExplorer: Add a common template for project settings
- Added base widget class for common options among project settings tabs
- Added usage new template class to all pages used in project settings

ToDo
- Make CodeStyle tab standardized

Change-Id: I8f70413b6ee764c5e43fbeae104b9389237c582f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-24 10:02:45 +00:00
Mahmoud Badri
cb93846367 QmlDesigner: Clear components view search box upon load
i.e. upon changing from edit mode to QDS mode. This also removed a
warning.

Change-Id: Ibd3ee3bd30febfcee9a05cb87047e79b8ed1bf61
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-05-24 09:38:59 +00:00