Commit Graph

80529 Commits

Author SHA1 Message Date
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
hjk
72093746ac Git: Use LayoutBuilder in Gerrit options page
Move towards using aspects and away from IOptionPage's QObject
base.

Change-Id: I07850a6b8e9fa7d2591efc6f76a23f249dfc164f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-05-08 15:06:02 +00:00
Cristian Adam
a8f288fc9e CMakePM: Store CMake Autorun state for all tools
Amends 2f39b51bdc

The default tool's value is taken as default global value,
then will be saved for all tools.

This fixes the case when the false Autorun value for the default
CMake tool would always be set as global autorun with no option
to actually set global Autorun value due to the "upgrade" path
mechanism.

Change-Id: I17076bc0c77b087c5d4048fdfe74ddf91d837fd4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-08 14:52:48 +00:00
hjk
5a318df0ee Perforce: Don't use Option page as guard object
There's a plan to remove the QObject base from IOptionPage

Change-Id: I142d2323f86e46d7758f8bd9a65c988988a18ed1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-08 14:01:41 +00:00
hjk
1b4aa44e89 QmlDesignerBase: Remove the dependency on IOptionPage's QObject base
The base will be cut soonish, and the only use here was tr() with
a (wrong) context. Use StudioSettingsPage for that now.

Change-Id: I41e4b737713591e002c126bbf97226de7c3f784f
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-05-08 13:39:59 +00:00
hjk
3f1a75eacc Git: Small simplification to Gerrit "plugin" setup
The indirection is not needed. It's not really stand-alone, and not
touched before GitPlugin::initialize().

Change-Id: If8552dc69ff9efa18a3f1d6d998a8f28ab65e501
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-05-08 13:25:48 +00:00
Christian Kandeler
7808195f74 CppEditor: Refactor "insert member from use" quickfixes
The interfaces make much more sense now, and the coding style is taken
into account (except for the fallback case where the user enters the
type).

Change-Id: If08dfc41ebd63287fb5b0b187944e7fdf08b0823
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-08 13:09:44 +00:00
hjk
80a425acba Core: Remove QObject inheritance of IOptionsPageProvider
This was not really used.

Change-Id: I86049697d211d88827a9633b367d2121fa8d1f1c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-08 12:40:26 +00:00
David Schulz
e3e17c4586 Editor: Fix initial enabled state of margin settings
Change-Id: I0adff884743dd8301a9c7f8b7a44f94658af4b5f
Reviewed-by: hjk <hjk@qt.io>
2023-05-08 12:31:47 +00:00
hjk
851f317199 Core: Remove parent pointer from IOptionPage constructor
Not used anymore.

Change-Id: Ic44ce021b1f952337a3193454b5b6649d5847446
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-08 12:27:32 +00:00
Eike Ziller
bd660aaf27 CMake: Fix setting additional project files for file watching
Amends d8be2491a5

The change above introduced FileApiReader::takeCMakeFileInfos and uses
it to move the information about additional CMake files out of the
FileApiReader. But that now emptied variable was later used to inform
the project about these additional files. So, that broke the automatic
running of CMake when project files (except the toplevel one) changes.
Instead use the list of additional files that now lives in the
CMakeBuildSystem for that purpose.

Change-Id: I1062593029880af9d4c70e72e1bd101d40ad0c00
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-05-08 12:23:10 +00:00
hjk
41b6ecf502 Fix environment auto test
Amends 1e1befd9eb.

Change-Id: Iecd06ee06081057208a2b3387d618142dc74d0bd
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-08 12:03:52 +00:00
hjk
6f253b0694 VcsBase: Move some private pieces off vcsplugin.h
By themselves not worth a pimpl, but since we have one already...

Change-Id: I867e68c5e82f71ebbe16a55eb190d87f981a550b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-05-08 11:58:38 +00:00
Eike Ziller
4a2a1c2978 FakeVim: Fix build with Qt 6.6
The connect doesn't work with incomplete type FakeVimHandler::Private
anymore, so move the code.

Change-Id: I686cd19a985f965cebf7d0a927cff4dc80ae746d
Reviewed-by: hjk <hjk@qt.io>
(cherry picked from commit e56e3b6f37)
2023-05-08 11:39:03 +00:00
hjk
aa8a76c357 GitLab: Use apply functor in GitLabOptionsWidget
Babystep towards removing QObject inheritance of IOptionsPage

Change-Id: Ib36b8ce4dd1f6878abdfe20c0c4e3ddb95e927dd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-08 11:29:51 +00:00
Christian Kandeler
de859dfd43 CppEditor: Do not call Snapshot::filesDependingOn()
... in document processor callback. The dependency table seems to get
rebuilt more often than expected, making this operation expensive.
Amends 6d805195f6.

Change-Id: I1eace180b2428756b648fa1c58eb0fb66cce3c0c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-08 11:28:25 +00:00
hjk
b03808031a VcsBase: Use functor for apply in CommonSettingsWidget
More compact.

Change-Id: Ib5985b9aa6fb9fcbe9ff1fffdc17c6c0888f786e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-05-08 11:20:26 +00:00
David Schulz
06b0d105dc Editor: simplify font to display options page connection
Operating on saved settings is less error prone and easier to maintain.

Change-Id: I92e3a6b52296cddc302ba2e4410edfd243b8ad32
Reviewed-by: hjk <hjk@qt.io>
2023-05-08 11:20:24 +00:00
Eike Ziller
5cb0a56296 Markdown: Delay update of preview
Delay the update: The implementation in Qt is currently very slow, and
while we don't have a fix, editing with immediate update is very
sluggish.

Also do not update the preview, if it isn't visible.

Change-Id: I35e10af232064b02a36a8be3758ea0bbc5b66f40
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-05-08 10:36:19 +00:00
hjk
ce00785efb Core: De-QObject-ify bits of mime settings
Change-Id: Ib4ffabe6392b5923cb6cce596e3e3563c9d6b7a3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-08 10:00:41 +00:00
David Schulz
0e4a7d5207 Utils: Avoid watching directories of watched files
Do not watch directories unconditionally, but only if they contain
removed files to check whether those files are readded. This should
reduce the number of needlesly watched directories to a minimum and fix
performance regressions introduced by
61598eca15.

Fixes: QTCREATORBUG-28957
Change-Id: I8fe387e7de32b0fb585074330c7f6ca7eae44730
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-05-08 09:39:21 +00:00
hjk
a7277bfb20 UpdateInfo: Remove now unused Q_OBJECT from SettingsPage
Change-Id: If5ff4d37816089114d952af934d0dd6fe4acb70a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-08 09:15:35 +00:00
hjk
0f10c6df33 TextEditor: Remove now unused Q_OBJECT from BehaviorSettingsPage
Change-Id: I0919200ddc8bb8b4547316c0af68f5aafa5d4892
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-05-08 09:15:27 +00:00
hjk
ed4c936cfc Core: Remove unused Q_OBJECT from LocatorSettings page
Change-Id: I75698496ebaa13284cb0d134aa313f608d7b7edd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-08 08:58:56 +00:00
hjk
cd06a608db Autotest: Move update connection from GTestSettingsPage
... to GTestSettings to prepare for removing the QObject base
of IOptionsPage.

Change-Id: I2d6f78e4f2a1d3690860c40b4ab55008034457a9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-08 08:51:07 +00:00
hjk
0faed9dda4 QmlDesigner: Remove unused PuppetBuildProgressDialog
Change-Id: Id2e9da8c4fea128105cefe37d3c99ca5537d3acf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-08 08:45:03 +00:00
hjk
fb5efd01b5 LanguageClient: Explicitly qualify one QObject::connect
Not needed currently but will be once an IOptionPage loses its
QObject base dependency.

Change-Id: Ide7de1a34ff62c32d63a77040e9ec59bb42e3c40
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-05-08 08:44:48 +00:00
hjk
deec92b631 Debugger: Don't put option page into the central object pool
Apparently not used anymore.

Change-Id: Ie73e09aad04574460221ffaff0c4e6cfe50873e6
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-05-08 08:14:12 +00:00
Eike Ziller
e56e3b6f37 FakeVim: Fix build with Qt 6.6
The connect doesn't work with incomplete type FakeVimHandler::Private
anymore, so move the code.

Change-Id: I686cd19a985f965cebf7d0a927cff4dc80ae746d
Reviewed-by: hjk <hjk@qt.io>
2023-05-08 07:50:29 +00:00
David Schulz
78fe0c315e Debugger: fix vanishing editor tooltip on expand
fetchMore is called multiple times before expandNode and seems to
invalidate the index that is passed to expandNode. Since we only need to
fetch more when we want to expand the item we might as well just
integrate the code of fetch more into expandNode.

Fixes: QTCREATORBUG-29083
Change-Id: I0e60e9bb03b53de2e86eea232fb5bb98046bbb80
Reviewed-by: hjk <hjk@qt.io>
2023-05-08 07:46:00 +00:00
Semih Yavuz
cd73f8c6b8 qmljsreformatter: don't default foreach type to "in"
Fixes: QTCREATORBUG-29123
Change-Id: I4d3a611c359946c4483388cbf18a0b6f16d0a8d6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-05-08 07:39:26 +00:00