Commit Graph

80111 Commits

Author SHA1 Message Date
hjk
61aef4aba5 Core: Use IOptionPage::setWidgetCreator() for mime settings
Less boilerplate for the implementation add user code access to
IOptionPage::{apply,finish} is planned to be removed.

Change-Id: I75c9ca893f49d66b72f6108f2451f3b0cb46722a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-21 08:15:08 +00:00
hjk
214742e943 Haskell: Use IOptionPage::setWidgetCreator() for settings
Change-Id: I4565cfca2bc58fd78e4c35fa1abda43532c113b6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-21 08:14:58 +00:00
hjk
69d53245f2 Python: Avoid IOptionPageWidget::widget() in settings
This is planned to become inaccessible for user code.

Change-Id: I2530a6ccf9f46cedff68ae62e8ac3d42d6792e0a
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-21 08:14:49 +00:00
hjk
8d1307552b Copilot: Take advantage of IOptionPage::setWidgetCreator()
Less boilerplate for the implementation add user code access to
IOptionPage::{apply,finish} is planned to be removed.

Change-Id: I03bbde071fdf673bee0568baa9ae9fab8d816590
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-21 07:21:48 +00:00
David Schulz
8745813721 Editor: add option to switch markdown viewer panes
Task-number: QTCREATORBUG-27883
Change-Id: I18daa688ff7751f984a95132737cfcc219b92108
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-21 06:54:24 +00:00
Jarek Kobus
38d4f3fef3 LocatorFilter: Introduce LocatorMatcherTasks
Change-Id: I775c88b8ac7d7bb0719a6b20d1e5171dbd62a94d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-21 06:45:28 +00:00
Jarek Kobus
422d422deb LocatorMatcherTask: Get rid of Input/OutputData typedefs
Introduce LocatorFilterEntries instead.

Change-Id: I082e0405441aa4b70a5e8fb796aa5c4fa3879265
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-21 06:45:04 +00:00
Eike Ziller
44aaad4c2f COIN/GitHub: Bump to Qt 6.5.0
Change-Id: I8c2122b7f35d049f0249631fc6e045b79dff9fbc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-21 06:37:23 +00:00
Orgad Shaneh
28c20b24aa VCS: Fix jumping to last line on some editors
I'm still not sure what causes this.

Fixes: QTCREATORBUG-29063
Change-Id: I861d91f1aa9a2fb36054d9f0a8e5e8e2f8fae872
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-21 06:30:52 +00:00
hjk
ce7b99bc88 RemoteLinux: Honor working directory setting again
Fixes: QTCREATORBUG-28900
Change-Id: I163877a749f378b2aa7579c1985e58f8a9d87e2c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-04-21 06:10:07 +00:00
Leena Miettinen
c6a98002fd Doc: Remove info about manually adding files to CMakeLists.txt
It is now done automatically.

Task-number: QTCREATORBUG-28996
Change-Id: I25844b087575eba11cdce1c8a2f5040c92dae80e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-04-21 05:47:35 +00:00
Christian Stenger
128d40e179 CMakePM: Fix qbs build
Change-Id: I96ea5f4130c9a5449ad7c0f97f63494ecf5b0e01
Reviewed-by: hjk <hjk@qt.io>
2023-04-21 05:29:08 +00:00
Cristian Adam
039baab6e7 CMakePM: Add new / existing files for QtQuick projects
Fixes: QTCREATORBUG-28904
Fixes: QTCREATORBUG-28985
Change-Id: Id05f13cc69b8afffafba1b956ee1c90dc88c6d57
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-04-20 17:28:14 +00:00
Jarek Kobus
97ee619876 ProjectExplorer: Drop known namespaces
Change-Id: I969a7f6c8e54c89b047611890a7ba80f4829d73b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-20 16:02:46 +00:00
hjk
4e847cfb49 QbsProjectManager: Fix warning
"this statement may fall through [-Wimplicit-fallthrough=]"

Change-Id: I3497a25834b77a2266e9b46d1f7365b5fdf72239
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-20 15:29:07 +00:00
Thiago Macieira
d1d893f098 Fix dangling references, found by GCC 13
Lifetime extension via const-ref only applies to functions that return
by value. For those that already return by reference (such as
QList::constLast()), no extension happens and we end up with a dangling
reference.

cmakebuildconfiguration.cpp:1473:25: warning: possibly dangling reference to a temporary [-Wdangling-reference]
cmakebuildconfiguration.cpp:1473:61: note: the temporary was destroyed at the end of the full expression ‘ProjectExplorer::BuildStepList::steps() const().QList<ProjectExplorer::BuildStep*>::constLast()’

Change-Id: I3b169860d8bd41e9be6bfffd1757167b7348be9b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2023-04-20 14:29:31 +00:00
Cristian Adam
ea94891f6b CMakePM: Only parse CMake files with the CMake parser
Change-Id: Ifc962a54ec9bf6ba0db4ec7813cb81d7c81a7d2c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-04-20 14:03:08 +00:00
Jarek Kobus
c09951d1b7 LocatorFilterEntry: Get rid of filter field
Remove also c'tor taking a pointer to filter.

Change-Id: Ic0fe62daeb6e79a729bee24d07d7eb77559e19c4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-20 13:46:03 +00:00
Jarek Kobus
f13c39c912 ILocatorFilter: Get rid of accept() method
Change-Id: I3ad3c2cd5cb7a08b7539918b7713bfcd27fde297
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-20 13:26:06 +00:00
hjk
fc8181672c Gitlab: Use IOptionPage::setWidgetCreator() for settings
Change-Id: If5e0cead9092836f23bc8551bb0f1495fe41a400
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-20 13:10:20 +00:00
hjk
7e919a07b6 CMake: Remove odd but unused assignment
Change-Id: I052baddc82b7bef24e656c35be1a4edd97a85007
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-04-20 13:09:53 +00:00
Jarek Kobus
900dc154be RunConfigurationLocatorFilter: Use Acceptor for LocatorFilterEntry
Change-Id: Ia48aa149ee2c4cd3653ba7a4313f1578034ad9d8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-20 13:01:56 +00:00
Semih Yavuz
21ca06fc7c Codeformatter: Support indenting of type annotated function
Fixes: QTCREATORBUG-29046
Change-Id: Ie4a4d85b7aa00ddf4dd3ea4bade6ffa57af7b4e0
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-20 12:55:40 +00:00
hjk
c0bbd29933 Git: Use IOptionPage::setWidgetCreator() for gerrit settings
Change-Id: I7402f3342bb11726ec7383c807fa98052cb38bd8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-04-20 12:54:38 +00:00
David Schulz
28d1d3ffe1 Debugger: support piping the python dumper to cdb
Fixes: QTCREATORBUG-29000
Change-Id: I7454ded07829d06a33dc1b2ec95a838ca977ca95
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-04-20 12:51:22 +00:00
Cristian Adam
d8be2491a5 CMakePM: Add new / existing source files to project
This will add the new added source files (.cpp, .h, .qrc, .ui) to the
corresponding CMake source file as last arguments for known CMake
functions like add_executable, add_library as well for the Qt
counterprarts qt_add_executable or qt_add_library.

For custom functions the code will insert a target_sources() call.
Subsequent calls will add the files to the last target_sources.

The previous copy to clipboard mechanism and settings have been removed.

Fixes: QTCREATORBUG-26006
Fixes: QTCREATORBUG-27213
Fixes: QTCREATORBUG-28493
Fixes: QTCREATORBUG-29006
Change-Id: Ia6e075e4e5718e4106c1236673d469139611a677
Reviewed-by: hjk <hjk@qt.io>
2023-04-20 12:43:33 +00:00
hjk
d74c2369ee AutoTest: Take advantage of IOptionPage::setWidgetCreator()
Less boilerplate for the implementation and user code access to
IOptionPage::{apply,finish} is planned to be removed.

Change-Id: I1d914d21c62a983a212d9696d14890cfd0e643c7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-20 12:25:20 +00:00
Jarek Kobus
74322dfedf LocatorFilterEntry: Get rid of internalData
Change-Id: I2bcd64c39bdaf0fe8504b68ba4aaaef7cdcab475
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-20 12:14:02 +00:00
Jarek Kobus
107d16fe34 ExternalToolsFilter: Use Acceptor for LocatorFilterEntry
Change-Id: I1d9073f9849be7ada05a9f12237db2a32a5c802b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-20 12:09:53 +00:00
Jarek Kobus
64f946445c CppLocatorFilter: Add cppCurrentDocumentMatcher()
Add also a test for it.

Change-Id: I324b1a2cbe89c0a1258dde93524689cb85e06737
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-20 11:59:01 +00:00
Jarek Kobus
0b5db8e558 ExecuteFilter: Use Acceptor for LocatorFilterEntry
Change-Id: I44bac91b192f8f9eb15b3151cd3d0d21caed0312
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-20 11:56:43 +00:00
Jarek Kobus
7f49d93fc1 FileSystemFilter: Use Acceptor for LocatorFilterEntry
Change-Id: I64059f0b02f8b893ba092b8ccea6c85453463078
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-20 11:56:35 +00:00
Christian Stenger
e0219fad4d Debugger: Make debugger aspect more explicit
There are basically 3 states for the decision whether to start
a debugger or not. But these had been under-represented by just
displaying 2 states.
Enabled (checked) and disabled (unchecked) are obvious, but the
default of Auto (represented as checked) is there for convenience
of the user, but it has some drawbacks of failing its guess
whether to enable the debugger or not.
Turn the former check boxes into a tri-state combo boxes and
explicitly display the consequences inside the summary.

Task-number: QTCREATORBUG-28627
Change-Id: Ieffed5b227ae978555258097385d6e80dfad3ac6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-04-20 11:35:54 +00:00
Christian Stenger
35df3812f7 Debugger: Improve detection for the need of Qml Debugger
By default QC performs an educated guess whether to enable
QML debugging or not.
Improve this as the detection may fail and leave the user without
a special hint depending on the project structure.

Fixes: QTCREATORBUG-28627
Change-Id: Ibd461aff2bf9be7058bdf33c8740ef07a457c365
Reviewed-by: hjk <hjk@qt.io>
2023-04-20 11:35:36 +00:00
Cristian Adam
d41365610f CMakePM: Integrate CMake's lexer
Kept only the needed bits to parse the CMake files.

Change-Id: I7c4aa0779846fcee91469a38f84d801513e3aa63
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-20 11:34:38 +00:00
Cristian Adam
71eb0ab9f8 CMakePM: Add CMake source file parser
Files taken from the CMake repository https://gitlab.kitware.com/cmake/cmake.git

624461526f4707a2406ebbd40245a605b6bd41fa (tag: v3.26.3)

Change-Id: I9ef388908cd22eb2748b5c17d039848ee23585b9
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-20 11:34:29 +00:00
Jarek Kobus
c118f8cae4 UrlLocatorFilter: Use Acceptor for LocatorFilterEntry
Change-Id: Id4b97a10bc01ab4392d7e7fc6e5890dcd3d42be9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-20 10:28:44 +00:00
Jarek Kobus
3726bfc779 MacroLocatorFilter: Use Acceptor for LocatorFilterEntry
Change-Id: Ie7aa7d81e1b81190b2966de09dc04b3ffb2691ea
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-20 10:27:49 +00:00
Eike Ziller
7879d84033 deployqt: Support elfutils from Linux distribution
Which can be in a more complicated directory than just /usr/lib, like
/usr/lib/aarch64-linux-gnu .
So, recursively look for the elf library to determine the right
directory.

Change-Id: I58ed8a045fbde50dea8851f63409a5a0863c3b16
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-20 09:55:23 +00:00
Jussi Witick
b57971a9cd Fix namespace usage in QSR project wizard template
Consistently use namespaces with different feature if/def's in main.cpp

Task-number: QSR-2079
Change-Id: I0609f7eb8cb18d270e59c11025850e6369e5db87
Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
(cherry picked from commit f98a03a28d)
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-20 09:21:13 +00:00
Jarek Kobus
99b5d93cfb LocatorMatcher: Introduce MatcherType enum
Use it for registering/getting different kinds of matchers.

Change-Id: I6f944e0332bf8c512892a00b8ba88f9939f34682
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-20 09:18:11 +00:00
Orgad Shaneh
f5cccab95b MacroExpander: Fix Path and FilePath on Windows
They should have / separator.

Amends commit 4fbc56d453.

Change-Id: I7218c345b271360f24c03aea5ee62be05342afe0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-20 08:31:29 +00:00
Eike Ziller
71f9e536c5 Markdown: Fix that text editing actions were not available
Add the TextEditorActionHandler and point it to the text editor.

Change-Id: I2c84d6b0160c7402ea32d56ed4dbc72d512072a1
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-20 08:31:06 +00:00
Ulf Hermann
1c60f57340 C++ editor: Make generated Q_PROPERTYs FINAL by default
It's bad style to omit the FINAL because such properties can be
shadowed, causing problems in QML.

Change-Id: I9083c69128f6335f584f0a1d28f1fe1e54a02eaf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-04-20 07:44:42 +00:00
Leena Miettinen
e73aaa044e Doc: Remove details about locator filters and refer to tooltips
- Reorganize the topic contents, so that all examples are in one place
- Add subtitles
- Update screenshots

Task-number: QTCREATORBUG-28996
Change-Id: Id139b19c5ff18c08b7a27494d6ac5051b298c014
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-20 07:38:15 +00:00
Jarek Kobus
b6d1cbc5f6 StringUtils: Fix missing include
Amends a353e9fde1

Change-Id: Iee878da1f907ec0131dd3fd16fe4f84752355b38
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-04-19 19:39:33 +00:00
Jarek Kobus
129fc0583f ILocatorFilter: Move allLocatorFilters() into private section
This shouldn't be used outside of locator scope.
For other usages that could reuse some filter's
implementation use LocatorMatcher with shared
list of LocatorMatcherTask.

Change-Id: I63a62c79b38985e24835fecd38d016dfb164a16e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-19 13:47:33 +00:00
Alessandro Portale
dd5eed0b35 Utils: Fix painting artifacts of FancyLineEdit on StyledBar
Don't enforce a premature polishing by the style.

Fixes: QTCREATORBUG-27510
Change-Id: I1598a75741c5990567a33ad8376144432894597a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-04-19 12:59:53 +00:00
Jarek Kobus
6e8988c926 CppModelManager: Use locator matcher for unused functions
With this patch, when both cpp and lsp function filters
are available, they now run in parallel. The execution time
for getting the filter results (~110 K hits) for the
Creator codebase went goes from ~1100 ms into ~650 ms.

This patch also solves the potential issue with interference
between parallel runs of functions filter in locator and
in find unused functions.

Change-Id: I8f7f0b85d325848c04760ab76a7b9f02bcb5991e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-19 12:54:25 +00:00
Jarek Kobus
8f44964059 CppCurrentDocumentFilter: Get rid of the arg from c'tor
It's always CppModelManager::instance().

Change-Id: Ia049ad3bd452f8773d679549c33981460c2705d4
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>
2023-04-19 12:14:41 +00:00