Commit Graph

80509 Commits

Author SHA1 Message Date
Jarek Kobus
86995160ba QmlJSFunctionsFilter: Remove the old matchesFor() implementation
Rename the filter to QmlJSFunctionsFilter, to conform to the
other naming (CppFunctionsFilter, LanguageFunctionsFilter,
ClangdFunctionsFilter).

Change-Id: I6859c5c8f6d133d1f4dd49d4ee2742b5744c1463
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-10 12:34:52 +00:00
Jarek Kobus
c8ae479a23 ExternalToolsFilter: Remove the old matchesFor() implementation
Change-Id: I79e81103b0200ea9da56ecb84980e1814a01f2f1
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-10 12:34:47 +00:00
Jarek Kobus
7ce40a7691 CMakeLocatorFilter: Remove the old matchesFor() implementation
Since the base class vanished, rename the filters so that they have
the common prefix now.

Change-Id: I164c7c17229f5c5b05649afe9e7aa79069a82f82
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-10 12:34:42 +00:00
Jarek Kobus
dab004b3c2 ActionsFilter: Remove the old matchesFor() implementation
Change-Id: I9f2d4c3d070869a720b63089b689c22c06dd4f4e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-10 12:24:02 +00:00
Christian Stenger
2d58d1b280 Utils: Fix groupChecker functionality for aspects
Change-Id: I1a44384cfebe8e23d8778ccb97f5846bfcbf0b9f
Reviewed-by: hjk <hjk@qt.io>
2023-05-10 12:20:20 +00:00
Jarek Kobus
24664515f1 LocatorWidget: Dismantle the old matchesFor implementation
Stop using it internally.
Make ILocatorFilter::matchesFor() temporarily implemented
by default so that the reimplementations in subclasses may be
removed without leaving them abstract.

Change-Id: I0c5d4ff70145a37d29385ee58a051c9c5ddfab8e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-10 12:19:43 +00:00
Jarek Kobus
2628e0f82f SilverSearcher: Refactor the Silver Searcher parser
This speeds up the parsing by ~20%.

Change-Id: Ibddfa4e1162e1fcbeeda9e441bdb7e92db903f88
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-05-10 11:42:25 +00:00
Marcus Tillmanns
5fa073543a Utils: Fix hasSuppressedQuestions
QSettings::childKeys() only returns direct child values,
not child groups. Therefore we also need to check
QSettings::childGroups() here.

We don't need to iterate all the keys. Keys are only created with
"true" value.

Change-Id: Ie4653dca1dfbad85ab895440a756c8e03aa78118
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-10 11:39:33 +00:00
Jarek Kobus
e9c3fcf342 Locator tests: Remove tests for old matchesFor implementation
Change-Id: I0d0293cc248dc4208cf5d50de468ccf94b4bb960
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-10 11:24:14 +00:00
Alessandro Portale
9c31267e58 Remove ineffective resize() calls
This removes apparently unnecessary resize() calls on QWidgets based
forms which get anyways added to layouts and resized. Most of these size
values looked "accidental", i.e. neither divisible by 2 nor by 5, in
most cases a remnant from the ui inlining.

Change-Id: I95da3b93f2915ef955b5235e5c2ecc94b51f813a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-10 11:14:10 +00:00
Alessandro Portale
2196e08295 LayoutBuilder: Avoid leak warnings in Application::exec()
Change-Id: I9c05f3015b120220408076d58d29983d2194d9e1
Reviewed-by: hjk <hjk@qt.io>
2023-05-10 10:15:35 +00:00
David Schulz
3f2832289d Utils: move TextPosition/Range to textutils
Change-Id: Id94a7a96f3b0f978e94850d67eb4b8fba6c18fe2
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-10 09:32:39 +00:00
Marcus Tillmanns
fc95d7a737 Utils: Improve FilePath::sort
Remove the conversion to/from QString for sorting.

Change-Id: I89921328b6d9e952c802d41998495bd2ffbb9f99
Reviewed-by: hjk <hjk@qt.io>
2023-05-10 08:56:32 +00:00
hjk
2c433f7fe1 Core: Remove QObject base of IOptionsPage
Change-Id: I714fd0cdd542da947deb2a8395dec87bb40fca75
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-10 08:06:14 +00:00
hjk
d7781c16f7 Layouting: Remove some now unused functions
Change-Id: I9e91bdbf68c38da22bd2378cb7d9596306bbb413
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-10 07:36:33 +00:00
hjk
b6acb9743a Help: Remove dependency of IOptionPage's QObject base
Change-Id: Ide7b16406947cc4865653661d0020d657671bc16
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-10 06:51:06 +00:00
Marcus Tillmanns
905d76961d CPlusPlus: Don't double uniquify
CppDocument::includedFiles removes duplicates.
Snapshot::allIncludesForDocument also removes duplicates.
Once is enough.

This doubles test scan performance on my machine.

Change-Id: I892908cf0820cfa11854ac3d82e9175d1fc38043
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-05-10 06:16:21 +00:00
Jarek Kobus
c68a013a3e Tasking::Tree: Rename Tree into TaskTreeTask
Task-number: QTCREATORBUG-29102
Change-Id: I70073bcb44a712c427c8c5aea42c48dbc30eebe0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-05-10 06:07:45 +00:00
Jarek Kobus
b05666d5c5 TaskTree: Adapt docs naming to the recent renaming
Task-number: QTCREATORBUG-29102
Change-Id: I1edf4d4e38c8853560bca3d3a6da55322a6764d6
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-10 06:07:36 +00:00
Jarek Kobus
2bec94ea58 Tasking::Transfer: Rename Transfer into FileTransferTask
Rename TransferTest into FileTransferTestTask.
Rename adapters accordingly.

Task-number: QTCREATORBUG-29102
Change-Id: I50c8b8d64abd7d3063044eaf2e0daceb01e8d388
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-10 06:07:30 +00:00
Jarek Kobus
c75b59f9b4 Process: Rename QtcProcessPrivate -> ProcessPrivate
Rename the logging category for Process.
Fix inline comments accordingly.
Adapt warning/debug messages accordingly.

Change-Id: I2b1f0f558701def3afa3c1b04adf629833dba9e7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-05-10 06:07:22 +00:00
hjk
e206ed5236 Core: Introduce a IOptionsPage::setLayout(const LayoutItem)
Helps to move the lambda setup off the user code.

Change-Id: I0de43f53fc9018913340e81b5c1e8e69df067bd6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-10 05:01:09 +00:00
hjk
f9fd83df9a Core: Introduce PagedSettings
An AspectContainer with an IOptionsPage.

Change-Id: I03d460f788cfcb2c631b2789bc8f7c74a0b62a37
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-10 05:00:40 +00:00
hjk
2e7930b56e LayoutBuilder: Rename Id to ID
The Id was only used in the demo. "ID" is Not exactly canonical naming,
but this clashes often with Utils::Id, so mis-spell until we settle on a
proper name.

Change-Id: I6fdf806c41abf224f7422ec6c9263db3eb357190
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-10 04:59:13 +00:00
hjk
c2f9f42653 BareMetal: Use a functor to apply settings
Change-Id: I5e770e6c51a3c709b38879b75c172d4c25e27085
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-10 04:58:58 +00:00
hjk
e7397ec576 LayoutBuilder: Fix Splitter construction
QSplitter is different insofar as that it doesn't have a Layout,
but a list of child widgets.

Change-Id: I4e1076e39d20df409c4bab93d79770b6d0e5aa8d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-10 04:58:42 +00:00
David Schulz
266202b6b4 CppEditor: reduce complexity of getting previous line
for a given text cursor.

Change-Id: I43591b529e9d04b3ef013db3b9b30cf37773c115
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-05-10 04:34:36 +00:00
Alessandro Portale
03e14c264c Terminal: Remove clazy warning
Don't call QList::constEnd() on temporary [clazy-temporary-iterator]

Change-Id: I92108a5c7706173097ae643774af1dd7d7acb5dd
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-09 14:09:00 +00:00
David Schulz
3dc775a6df MultiTextCursor: iterate over map entries
This will ensure that the cursors are iterated over in the order they
appear in the document. This fixes an issue on copy and paste a
multitext cursors, since the text was copied in the order inside the
document, but inserted in the order how the different cursors were added
to the multi text cursor.

Fixes: QTCREATORBUG-29117
Change-Id: I8475cde7129c378ec7862482226db25e40f61e1b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-09 14:02:47 +00:00
Jarek Kobus
7d35a11fd4 QtVersionManager: Fix a warning about missing initializer
It fixes the following warning:
warning: missing initializer for member
‘QtSupport::Internal::ExampleSetModel::ExtraExampleSet::qtVersion’

Amends bdfa412b14

Change-Id: Ieb984664953f53d458297970e09678c499a26197
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
(cherry picked from commit a5ad722184)
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2023-05-09 13:13:42 +00:00
Eike Ziller
c68b01c478 Markdown: Support bookmarks and jumping to search results
Redirect the currentLine/Column and gotoLine functions to the text
editor and ensure that it is visible for gotoLine.

Change-Id: I546e2cb1761363e3a75f9adeebcba195e312f00b
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-05-09 11:31:19 +00:00
Marcus Tillmanns
b509e5aef9 Terminal: Fix endless loop
An error in the QPoint constructor version of CellIterator meant
that m_pos could be bigger than m_maxpos.

CellIterator(,State) was also simplified to be more correct.

Change-Id: Ib67b26695fae1e1857d106319037ca8f63bcb250
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-05-09 11:21:29 +00:00
Marcus Tillmanns
c0f0ccdc78 Terminal: Ensure terminal is visible
When restarting an app, make sure the terminal is visible and focused.

Change-Id: I305eb59ddf2f5e0f2844d47e51500953c3145c38
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-05-09 11:20:49 +00:00
Marcus Tillmanns
734f559b76 Terminal: Fix cursor/viewport updates
Under some font sizes the cursor size and cell size were not correctly
aligned on the pixel grid, leaving behind artifacts of prior draws.

Change-Id: I25e6efdc44102f24672912e1e56c31be0c686b89
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-05-09 11:20:42 +00:00
Marcus Tillmanns
5ea6c34a23 Terminal: Fix shell integration for login shells
Change-Id: I78cc4b60b4e2164752b7b65e2e61659e5d5bbe22
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-05-09 11:20:36 +00:00
Marcus Tillmanns
12504b6802 Terminal: Combine settings
Change-Id: Ic9e3ac9bdba73eb99e8177083e08c8b4b1765972
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-05-09 11:20:30 +00:00
Jarek Kobus
936086745a FileSearch: Get rid of FileSearchResult
Use SearchResultItem instead.
This change should reduce the remaining freeze described in
a9eb732ce6 even more.

Change-Id: I102b82ed5677360ccd9e425dd0bdd941d87116f0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-09 11:03:48 +00:00
Alessandro Portale
1d4228dfda ProjectExplorer: Prevent context menu on ProjectSelector
The context menu on the ProjectSelector (outside the "SelectorTree")
does not make much sense and pops up with an offset.

Change-Id: I79aa3157e04b9d343077fdbc87b8f7cd891426b4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-09 09:22:07 +00:00
hjk
d3ef8aa9ad Copilot: Use functor to apply settings
Change-Id: Ie17273a4fd55c2144b2751166fb69bd523033321
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-09 09:08:45 +00:00
hjk
3003b6cb2b GitLab: Shift responsibility to signal changes
... from the option pasge (factory) to the settings (storage).

This will help with removing the QObject base from IOptionPage

Change-Id: I04a6b499bdca6065bf8f742b4624beabe7d8f8cc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-09 08:34:14 +00:00
Robert Löhning
8764bab627 SquishTests: Improve version detection for imports
Change-Id: If38aa92c22c3390859f738ad5bfa5bacf47302ec
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-09 08:29:14 +00:00
Robert Löhning
13e0011dba SquishTests: Fix formatting of exception message
Amends 8d03220017

Change-Id: I05266fe6152a8ac2601890e8dcf32fc68d0989d3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-09 08:28:51 +00:00
Robert Löhning
a32e720692 SquishTests: Some more Python3 adaption
Change-Id: Iee0fd4107c3423d72a1dc51b0087837e4de46537
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-09 08:28:29 +00:00
Christian Kandeler
372ce469fa CppEditor: Remove SendDocumentTracker
This was forgotten in the clangbackend removal.

Change-Id: I73a3016504ee4af5d921e387f1502d8906161c1a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-09 07:56:23 +00:00
hjk
c8608e5d9f Help: Use functors and layouting in FilterSettingsPageWidget
Change-Id: Ib163a41feeafebf4a80b587b6cebbf83cc8e97cb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-09 06:56:44 +00:00
Christian Stenger
be25db429e Debugger: Fix compatibility for debugger engine states
..when switching back to an older version of QC.
Amends e0219fad4d.

Change-Id: I3662eb95cf1ae72f92688f12cc15b7a42fb1452c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-09 06:50:16 +00:00
hjk
dfaebde520 ProjectExplorer: Simplify a complex translatable string
Change-Id: I51a3f18b2c05eb7371d77c18f3f390f5809e2920
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-09 06:46:29 +00:00
David Schulz
b2226c99d4 VCS: fix compile of CommonVcsSettings
Remove undeclared operator definition

Amends 65281429d4

Change-Id: I30ffd5d7b4a50acd9db7acef1668a26c942cc50c
Reviewed-by: hjk <hjk@qt.io>
2023-05-09 06:20:20 +00:00
Jarek Kobus
3f7e92e052 Utils: Introduce QTC_STATIC_SCOPED_TIMER()
This macro, similar to QTC_SCOPED_TIMER(), measures
the time spent in a block of code. In addition, the
time spent in a block is saved in a static variable.

This macro enables measuring a cumulative time
spent inside a certain block of code for all invocations.
When a long freeze is being tracked, and QTC_SCOPED_TIMER()
indicates that the most of the freeze is spent inside a loop
with a big amount of iterations, placing
QTC_STATIC_SCOPED_TIMER() inside the loop may detect
the part of the loop that composes in total for the
longest freeze.

In contrary to the QTC_SCOPED_TIMER(), this macro
it doesn't print the message when it's entered.
It prints the output at first hit, and later,
as not to clog the debug output, only at 10ms resolution.

Change-Id: I3360a3ab9147d544f90ce914fb78359f7179c767
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-09 05:18:41 +00:00
hjk
65281429d4 VcsPlugin: shift signalling of settings changes
To allow removing the QObject ineritance of IOptionPage

Change-Id: Id230ee9230dd1bee094b19b5a22d61d37e650d27
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-05-09 04:58:19 +00:00