Commit Graph

82976 Commits

Author SHA1 Message Date
Tasuku Suzuki
673bcb644c Markdown: Add some tool button to help writing markdown
This allows users to add operator wrapping selected text easily.

Change-Id: If3c21fa41e0dc338a3ec760076406fe046e5adbe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-14 09:27:51 +00:00
Xavier BESSON
5cfe69ea1e Add possibility to comment selection after the white spaces
Fixes: QTCREATORBUG-29410
Change-Id: I736378e0b5fb542a6c1032a47adfb251b50ce2ef
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-14 06:59:00 +00:00
Leena Miettinen
6cf4b1a3cd Doc: Use hyphenated form of "command-line" where appropriate
That is where it precedes another noun, such as "options",
"arguments", or "tools".

Change-Id: Ic4c339084e7350fe737e499293a8f96c91c57fd7
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
2023-09-13 10:12:26 +00:00
Alessandro Portale
9c036fe393 ScreenRecorder: Offer saving of the current cropped frame
The "crop and trim" dialog gets two new buttons. The first offers to
save the current, cropped frame as png image. The second one copies the
image into the clipboard. Copyuing into clipboard is also triggered by
the QKeySequence::Copy shortcut.

The location where the last image was saved gets remembered in the
settings.

Change-Id: Id4ac93838d59f6a6fa801456fe8d9c17d1e74154
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-13 09:05:11 +00:00
David Schulz
f491d93d2a CppEditor: remove superfluous locker in model manager
This locker potentially results in a freeze since the called projectPart
might require to lock for writing, which is not possible if the read
locker is still there. Additionally there is nothing we would need the
lock for in projectPartFromDependencies.

Change-Id: If957edfb4ebc45e18141cb14a63bf9567242cc48
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-13 08:48:22 +00:00
Eike Ziller
1870501443 Delay modifications to MIME database until first use
Initialization of the MIME database takes time, and it is good to avoid
this during startup.
We nevertheless want to apply some modifications to the MIME database, so
we need to delay these modifications until first use. Allow registration
of additional initialization functions. Since the initialization
functions access the MIME database, which does locking for thread-
safety, we need to separate the initialization to outside these locking
functions.

Change-Id: I2b1706347768bcf081644e078ccfa45302d61641
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-09-13 08:05:21 +00:00
Marcus Tillmanns
7200644f75 Utils: Syntax cleaning
Change-Id: If296e0240840f66c371106508f3f0046bc7a9a71
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-09-13 07:11:52 +00:00
Leena Miettinen
b7800d9351 Doc: Turn "Activating Kits for a Project" into a how-to topic
Task-number: QTCREATORBUG-29361
Change-Id: I3545d29192176ba0a4377d77f51bc13155b46588
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-13 06:57:18 +00:00
Leena Miettinen
2d9aa27b61 Doc: Chop up the "Using Version Control Systems" topic
Turn the topic into Reference and How-to topics.

Task-number: QTCREATORBUG-29361
Change-Id: I2fd4050f712b61b3e4140a5bf93e968c02b36d36
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-09-13 06:57:07 +00:00
Leena Miettinen
097cb17af4 Doc: Replace "Getting Help" with "How To"
Move the topics to either "How To: Read Qt documentation" or
"Reference", depending on their type.

Task-number: QTCREATORBUG-29361
Change-Id: Ifa46192f7a15a71e8d3454010f6b96764776f82b
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
2023-09-13 06:56:53 +00:00
Leena Miettinen
66fabd0c0d Doc: Turn some "Advanced Use" topics into how-to topics
Task-number: QTCREATORBUG-29361
Change-Id: Ie675e4d72ad524e0a7a4ba4adca8a477ff579d55
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-13 06:56:40 +00:00
Alessandro Portale
9a81e1270a ScreenRecorder: Make extra sure that "last opened directory" is written
Change-Id: Iae45c91d6934e50cec48849a455cd79e493c28e4
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-12 16:11:57 +00:00
Andreas Loth
b8564b48c0 Axivion: Propagate cancellation form future to network reply (abort it)
Change-Id: Ibcad2410276dbf752f73fbc8c9091156892670ff
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 15:59:12 +00:00
Eike Ziller
fcfe73d8f1 Nanotrace: Shutdown should do nothing if not initialized
Change-Id: I717296da4c9aea1e9dd28db3421a927f6bb8d332
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
2023-09-12 14:52:58 +00:00
Eike Ziller
5d02b4df71 Tracing: Fix assert when wheel zooming
The wheel handling code was triggering an assert in qBound when
calculating the newStart, when using a touch pad.

Rewrite the wheel handling to get rid of the assert and make it more
similar to the text editor wheel handling.

Change-Id: I0c1306d00be6b3054fb8dba9628b7758880675b0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-09-12 14:28:26 +00:00
Eike Ziller
305a1a6ed1 CtfVisualizer: Fix computation of nesting level
The computed nesting level (which row an event to show in) was solely
based on begin+end events and "complete" events were ignored.

Compute the rows afterwards, similar to the "parent" computation that
the timeline model already does. Find the first row that is free,
and use that for the row of the item.

Change-Id: I890138c10f5038508da9b286b35d7bcfdf0ab64d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-09-12 14:28:15 +00:00
hjk
bd6348fc20 ExtensionSystem: Reformat -profile messages
We have ReallyLongPluginNames nowadays.

Change-Id: I722095fea0e9214e1d4e0774399c5d16123e867d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-12 14:25:55 +00:00
Eike Ziller
3b6ad4517f CtfVisualizer: Do not crash/assert
Use QTC_ASSERT.

Change-Id: I621c607915f71246be1bdb02f2588ed08e37a1cd
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-09-12 14:21:52 +00:00
Eike Ziller
c83047abb9 CtfVisualizer: Allow strings for process and thread id
While the format document only uses numbers for these in its examples,
the data type is not really specified there and chrome://tracing itself
handles strings for them without complaint. On trace-generating side
std::thread::id can't easily be serialized as a number, and strings can
easily be supported in the viewer.

Change-Id: I36c8497049d4933058b9f72a28f24e1d1cf0d5bb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-09-12 14:21:27 +00:00
Marcus Tillmanns
67aab38873 Utils: Add undo/redo to BoolAspect
Change-Id: Ie80e81c2ceef232278e2815ffa56bcbaef903eb2
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 13:30:40 +00:00
Christian Stenger
797e6d55a6 Minor fixes to compile for building with Qt6.2
Change-Id: I15ab9b92d19491bb0aca3d2389a589411e1fec8d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 13:09:01 +00:00
hjk
ba20b249c9 Utils: Some microoptimization in the persistentsettings writing
In some cases the exact type of a tag is not needed.

Change-Id: I0e46d12c5dde34734e7e711dd940b9aa570d23f7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-12 13:00:59 +00:00
Artem Sokolovskii
19672406b4 DAP: Add terminal output for installing debugpy
Change-Id: I2136b966b37f2a652053d6c30b16f05defaed756
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-12 12:59:05 +00:00
Jarek Kobus
c5555035f1 ProcessHelper: Fix setChildProcessModifier()
The original change that introduced the usage of
QProcess::UnixProcessFlag introduced also a regression.
Since ProcessHelper::setLowPriority() and setUnixTerminalDisabled()
are part of public API, we can't use m_lowPriority and
m_unixTerminalDisabled inside c'tor for early return before setting the
setChildProcessModifier(), because these values may be changed later,
before starting the process.

Amends e8ca1877de

Fixes: QTCREATORBUG-29457
Change-Id: Ief360c123f6284c7df105ef530c4602555b5b069
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-12 12:32:17 +00:00
hjk
6916358497 ProjectExplorer: Add missing 'override'
Amends 50c9c9aa86.

Change-Id: I48dc3767f8ec750b463b8dfe5d9735eaaa481c8e
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
2023-09-12 11:39:03 +00:00
Artem Sokolovskii
7605f5c934 DAP: Add different log category for different dap engines
Change-Id: Ia21926b860f8fee7399c40ad382ff31f360f73ce
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 10:52:32 +00:00
Artem Sokolovskii
578e4c13fd DAP: Add attach function to gdb dap engine
Change-Id: Id1c886cf3bbdbf85d4eed39f288107fc71317496
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 10:52:21 +00:00
Cristian Adam
3a3bf41eef CMakePM: Add support for cmake-format config files
Fixes: QTCREATORBUG-28969
Change-Id: I0bb31993e4d2ffd8affcc67dee5fd70654e2c1d3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-12 10:49:22 +00:00
The Qt Project
9a31491934 Merge "Merge remote-tracking branch 'origin/11.0'" 2023-09-12 10:36:20 +00:00
Christian Kandeler
2906c7bedf Debugger: Enable sorting in the settings page
As for the other tabs in the Kits category.

Change-Id: Ibaed64336ed2ef57c463fe43ed5ca3e78aa673b2
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 09:49:36 +00:00
Marcus Tillmanns
77cc79b7b0 CMake: Cache CMakeTool capabilities
Change-Id: Ie81347a7864abeeb64aa2af6dee3f9def241fed8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-09-12 09:29:50 +00:00
Marcus Tillmanns
0c157b4ba6 Docker: Use FileListAspect for mounts
Change-Id: I6392c8bb8ebdfb0984f56ebda23567ef8b42bb6a
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 08:51:39 +00:00
Marcus Tillmanns
f6205d6cc7 Docker: Switch to aspect settings
Change-Id: Id04c48caf2ddd33e176ee424273690b80c77232b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 08:51:31 +00:00
Marcus Tillmanns
ed0935733e Utils: Add FilePathListAspect
Change-Id: Iec89581e5818139bcc48ed807935c10421b7b664
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 08:51:20 +00:00
David Schulz
7bb8f59587 Merge remote-tracking branch 'origin/11.0' into HEAD
Change-Id: I3b6a4bd860c11324d989818d9010f07faaac677a
2023-09-12 09:47:01 +02:00
Eike Ziller
b0fb71b4d7 Merge remote-tracking branch 'origin/11.0'
Change-Id: I1f8d8b2b399590afb1cbbd575a31701a0d2abbc7
2023-09-12 09:34:41 +02:00
Eike Ziller
dab19c4a8c Use Nanotrace to generate startup performance report
Add various trace points to the code, including the plugin
initialization methods (centrally in plugin manager), code that is
scheduled on the event loop with QTimer::singleShot or
QMetaObject::invokeMethod during initialization, and code that is
triggered from ICore::coreOpened

Can be turned on by configuring with `BUILD_LIBRARY_NANOTRACE=ON`
Run with `-trace <file>` to write trace file. If Nanotrace is not built,
the added code expands to nothing.

Changes in Nanotrace:
- turned generated data to microseconds instead of nanoseconds, because
  that is what Chrome tracing expects
- fixed serialization of duration (needs to be an item of the event, not
  in a "arg" subitem)
- fixed shutdown() to reset the initEvent

Change-Id: I994de82023b820d771e1be0a859ebd8da0b73d4d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-09-12 07:32:07 +00:00
Marcus Tillmanns
66c8eda943 Utils: Add Undo facilities for aspects
Change-Id: I2a8acfa23b3a4303414be21af224b08c13561666
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 07:12:45 +00:00
Marcus Tillmanns
8bcec807d9 Utils: Fix AspectContainer::setAutoApply
Removes duplicate m_autoApply from AspectContainerPrivate.
Fixes issue when calling BaseAspect::setAutoApply()
on an AspectContainer.

Change-Id: I5f56d8d3c6d52d32c9365faf3d0e22facb757f03
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 07:11:26 +00:00
hjk
2494ba4bf8 TextEditor: Access some settings more directly
Change-Id: Idc65001efde36de011db3ca528af761d2b8344e8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-12 06:54:16 +00:00
hjk
d6dba7dc9f Utils: Merge settingsutils.h into Store setup
Change-Id: I4f87400d3ff50869798a363f0d15aa77af0edf5c
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-09-12 06:53:46 +00:00
Christian Stenger
7268f036de Valgrind: Add missing error type
Fixes: QTCREATORBUG-29600
Change-Id: Ia6b6549865f9940f2e93fbe998788d201a3550fa
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 06:36:23 +00:00
Alessandro Portale
38690bc7d0 ScreenRecorder: Make dialog less cluttered and non-resizable
The "Trim and Crop..." button now jas a static text and shows crop and
trim details via tooltip.

The confusing resizability of the dialog is prevented.

Change-Id: If967d8014a0751f7d2360bf7b239bf22f070024c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-09-11 16:59:25 +00:00
Alessandro Portale
0701145c55 ScreenRecorder: Block dialog UI and show spinner while exporting
...instead of just disabling the "Export..." button.

Change-Id: I3d2b414233492b400e02a39c89677dedce475100
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-09-11 16:59:07 +00:00
Eike Ziller
6de236351b EditorManager: Do not instantiate MimeTypes during startup
Which would trigger reading the MIME database, which is not needed at
that point in time. We persist the map of MIME type to custom default
factories via the MIME type names anyway, so just stay with that.

Change-Id: I7570432573b16700e00811fe409d43a2db6c5347
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-11 14:26:46 +00:00
Christian Kandeler
61b6ab8468 ProjectExplorer: Fix KitModel
We must not call layoutChanged() without having called
layoutAboutToBeChanged().

Change-Id: Ic64dc2a9b46fa1ec64f01fb416e78d3821df0e73
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-11 12:04:53 +00:00
Marcus Tillmanns
116ad3ed4f ProjectExplorer: Remove IDevice::setDisplayName
also removes IDevice::setDefaultDisplayName

Change-Id: Ie8ac3d95ba1991a20720342de3bf6e97c6414ffa
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-11 11:25:34 +00:00
David Schulz
96c21b0e36 CppEditor: optimize CppModelManager projectPartForFile
Calling FilePath::canonicalPath is expensive on Windows, so only call it
if we cannot find the filePath in the cache and save the result to the
cache again. This reduces the time to parse the auto test for the Qt
Creator repository from 10s to 2s here. It also improves the performance
of various quickfixes and follow symbol of the built-in code model by a
similar factor.

Change-Id: I7025828e1b91f492825b10753e3b97e1c917fbfd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-11 10:19:12 +00:00
Marcus Tillmanns
7f15f720ac ProjectExplorer: Directly use DeviceSettings
Change-Id: I2c7d0395bbc59238a23c30b1f233e7bf922e0be4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-11 10:12:28 +00:00
hjk
50c9c9aa86 ProjectExplorer: Start merging "unix" toolchains
They are similar with quite a bit of overlap, with the odd "base"
GccToolChain and discovery scanning mostly by scanning the same
directories for each "sub type".

This here aims at one class (currently still the mis-named GccToolChain,
later to be re-named to UnixCToolChain or similar)

Change-Id: Ia721932d4125d3673250ae727731acc7acd48def
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-11 08:36:54 +00:00