Commit Graph

80529 Commits

Author SHA1 Message Date
David Schulz
0b8a0f8f59 Copilot: remove unused function and member
Change-Id: I77bc6533f658dbd6c3b58f603f384e6c516974df
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-11 05:50:19 +00:00
Alessandro Portale
17ca266b5f Vcpkg: Use new PagedSettings
Change-Id: I75d1b61a05efa630db080a2750d214636c02b5d9
Reviewed-by: hjk <hjk@qt.io>
2023-05-11 05:26:50 +00:00
hjk
98d9ad8b3c Docker: Use PagedSettings
More compact.

Change-Id: Ic21c6ea9e7faf67e5f507f336f18e1134b371a97
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-10 16:23:21 +00:00
hjk
20f237baf2 Nim: Use PagedSettings for Tools settings page
Change-Id: Iee5f4a89380499d781a42c3e0b6bc82b7386c28e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-10 15:34:14 +00:00
hjk
47e0e9be29 Core: PagedSettings, next attempt
We cannnot pass the LayoutItem directly but need the lambda
to postpone creation of aspect subwidgets until the settings
page gets into view.

Change-Id: I420e82f66fd5c4781451d6851cc38368e7501abc
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-10 15:22:49 +00:00
hjk
72e30b69c5 CMake: Use new PagedSettings
More compact.

Change-Id: Ie800e52b98d23e1acd1deba9d6b6e5f778c016bb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-10 15:22:39 +00:00
hjk
3f5d33fe5c CppEditor: Fix an error raised by Clang 16
error: integer value -1 is outside the valid range of values [0, 255]
 for this enumeration type [-Wenum-constexpr-conversion]

Change-Id: I1b029099634dcc8f11071aad6a974ec0c41077ce
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-05-10 15:21:07 +00:00
hjk
699b804181 ProjectExplorer: Rename 'Device' into 'Run device' in Kit settings
Similar for 'Run device type'. Less ambiguity.

Change-Id: Iab88009b92ae760f14140ac8bbdadea51d6dfad4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-05-10 14:55:48 +00:00
Jarek Kobus
fb3b9d2268 CommandLocator: Remove the old matchesFor() implementation
Change-Id: Ide5f9141bc756059aadc561800b34e7c4fffa5cf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-10 14:32:08 +00:00
hjk
529ade9f08 Android: Use functor to apply changed settings
Change-Id: I12a62dd4aa34ba3c23b0569e3b2724c2d7415ded
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-10 13:53:58 +00:00
hjk
6891f0f157 AutoTest: Remove layout hack from CatchTestSettings page
Does not look needed anymore.

Change-Id: Ie00b60521b7e41039161978b195d00d2162ce95b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-10 13:40:24 +00:00
hjk
c2265077f6 TestSettings: Use functor to apply changed settings
Baby-steps towards use of aspects.

Change-Id: I08a0db083c29e754cf58a631dc3a5c36f400ee96
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-10 13:37:46 +00:00
Alessandro Portale
e44d0c57dc Utils: Fix the applying of new base color at run-time
If the base color was changed via the color picker that opens with
shift-click on the upper left toolbar area, some widgets were not
instantly updated with the new color.

This change ensures that all (visible) widgets instead of just all top
level windows get updated after changing the color. While this method is
potentially more expensive, it does not effect the start-up negatively,
because on start-up StyleHelper::setBaseColor() gets called before the
mainwindow is shown.

Fixes: QTCREATORBUG-29135
Change-Id: I227c2f243ffcd9f8210b9d2d1a47ad0494663d50
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-10 13:25:19 +00:00
Alessandro Portale
5975657e77 Utils: Centralize style-related property names as constants
This introduces string constants in Utils::StyleHelper. They are used by
code all over in Qt Creator to tell ManhattanStyle how to paint certain
widgets.

Change-Id: Iecca36103f80084cd5fe93fcb6b18b8fbb3a32bb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-10 13:25:10 +00:00
Eike Ziller
6865635442 Markdown: Save and restore state
This restores the state of the markdown editor, including text editor
state, preview scroll position and button states, when closing and re-
opening a file.

Change-Id: Ibf1cadd5e0e80149123c6c5f599157e931330343
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-05-10 13:02:25 +00:00
Eike Ziller
349a3a5872 Markdown: Save visible views as default
Remember if editor and/or preview are visible and use it as default for
when a markdown editor is opened.

Change-Id: I19414adfd118003628783fadeae472b7bb7915f5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-05-10 13:02:15 +00:00
Jarek Kobus
062db6b3a5 LocatorFiltersFilter: Remove the old matchesFor() implementation
Change-Id: I28bef914103b3650badf1ec44fdcd4a1081384dc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-10 12:55:25 +00:00
Jarek Kobus
475e859462 LineNumberFilter: Remove the old matchesFor() implementation
Change-Id: Ia45de8cd265300776c9cb0660b491f9584620a14
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-10 12:55:14 +00:00
Jarek Kobus
2950762cb1 JavaScriptFilter: Remove the old matchesFor() implementation
Change-Id: I5a799238d3aae3ae342580e58af4d6993618f101
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-10 12:55:03 +00:00
Jarek Kobus
19834f5986 HelpIndexFilter: Remove the old matchesFor() implementation
Change-Id: I867520fc790832c93381f390bcd74e4908086461
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-10 12:47:30 +00:00
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