Commit Graph

1562 Commits

Author SHA1 Message Date
Alessandro Portale
9db70d8810 Translations: Fix stray QApplication::translate() calls
For references to the module-own context, use Tr::tr().
For references to other modules, use the right context name (with "::"
prefix).

Change-Id: I6dce8f1ceccb23c44d93f1826402cd3be8e98e5a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-02-08 08:32:42 +00:00
Marcus Tillmanns
144dff8d74 Gdb: Use path() of executable
Change-Id: I872da3995344b6337b5d72925768034b58f9b339
Reviewed-by: hjk <hjk@qt.io>
2023-02-07 08:17:08 +00:00
hjk
1285b80c40 Utils: Use an enum indication the possible abort of an dir iteration
The bool is not really clear.

Change-Id: I4ce6412736aec6b1853fd53d4e535ad045748350
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-26 07:38:21 +00:00
Christian Stenger
3e14368d29 Debugger: Adapt to change in FilePath
Change-Id: I947f7c22bd59e445c94784fc50f29f6b571aad5a
Reviewed-by: hjk <hjk@qt.io>
2023-01-18 07:59:03 +00:00
hjk
4ddd28ae22 Utils: Rename QtcProcess::readAllStandard* to readAllRawStandard*
... and re-use the old QtcProcess::readAllStandard* names for
a QString-returning 'decoded' version.

For now, only use that in 'full Utf8' cases, to stay bug-compatible,
the plan is, however, to employ the QTextCodecs we have already
in the channel buffers. That will be one-by-one, though.

Change-Id: Id209e0671920d4ea4197918e872f441254112d52
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-10 12:08:53 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
hjk
6b2b52937d Debugger: Check for skippable frames early
This avoids unnecessarily opening of files with functions that
are skip.

Change-Id: Ie435949ad4033444ad5814a91109f33e022711d0
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-03 16:13:29 +00:00
Marcus Tillmanns
0aeec80eeb Docker: Add Filepath::localSource()
FilePath::localSource can return a filepath that represents a local version
of a remote file.

It is used to let the debugger select the local version of a file when
debugging a remote target.

Change-Id: Ieb934ef0d454e8ff55e71df41dca825974d85da7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-12-16 12:27:49 +00:00
hjk
e0b856f0b0 Debugger: Remove DebuggerCommand::arg(FilePath)
It's better when the user code has to be explicit in what
format and/or which parts of the FilePath is needed.

Change-Id: I9d70e073f853a1bbc47c8482ebe77d7c4612b4b7
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-11-17 14:03:57 +00:00
Alessandro Portale
92f7da917e Debugger: FilePath-ify .so libs handling
Side-effect is the stabilization of the order in which the paths are
passed to the debugger (was random, before).

Change-Id: I2dba3ae6f2feef57b26eab93dee0903ee2f93dde
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-11-17 10:24:07 +00:00
Christian Kandeler
13f40f5471 Utils: Add sorted() function
For simpler calling code.

Change-Id: Ia0a16a28770fd172f74d06a626148248bf5d3c0c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-25 14:29:45 +00:00
Jarek Kobus
866a658b42 Get rid of unneeded includes of RunControl
Removed also some other includes that were marked
with yellow triangles. In some cases includes of
runcontrol.h were substituted with other includes,
like qtcassert.h.

Change-Id: Ica40f68198c7f8f70e6047acb2eddc8ef017e43d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-25 09:49:13 +00:00
Marc Mutz
8eb4d52342 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.

Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 13:47:53 +00:00
Marcus Tillmanns
21df100b21 GdbEngine: Support interrupting docker executable
Change-Id: I084ff34b0455f069868aaac10d0003ac81ef1903
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2022-09-15 07:34:13 +00:00
Eike Ziller
d5bacfc087 Debugger: Use qtcEnvironmentVariable* instead of qEnvironmentVariable*
And instead of qgetenv.
Takes Qt Creator's setting at "Environment > System > Environment" into
account, which makes it easier on some platforms to set them (e.g.
macOS), can be configured differently in different settings paths, and
potentially can be changed at runtime (depending on usage).

Change-Id: I3ea7623fb528e13a202afa2f89b00e5ee83962d8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-31 06:25:01 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Eike Ziller
90a03391d7 Merge remote-tracking branch 'origin/8.0'
Change-Id: I37a1f78caf9ae258c6b052efa3be15b3dbcbe164
2022-07-12 13:56:23 +02:00
Marcus Tillmanns
78e7c7b2a6 docker: Fix run environment setup
When starting a debug session the systemEnvironment() was used
as the basis for the debugger process. If the docker device
did not have the same shell installed as the host, this would
break gdb as the SHELL= env variable might point to a
non-existing shell binary.

Change-Id: I7253ad3c4995eed857279146f1b258febe1ca710
Reviewed-by: hjk <hjk@qt.io>
2022-07-12 10:43:43 +00:00
hjk
9894c6eaf0 Debugger: Convert to Tr::tr
Change-Id: I5d2475c790851c68f9997ac6af72b5eaca58482d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-07-08 12:32:38 +00:00
Jarek Kobus
e3f27b3d53 GdbEngine: Don't call blocking waitForStarted()
Connect to started() signal instead and continue
setup in its handler. Handle failed to start case
inside done() signal handler.

Change-Id: Iaf184ed3e934b1bd5f8128a6aa9c72e9f27e0f56
Reviewed-by: hjk <hjk@qt.io>
2022-06-21 14:49:06 +00:00
David Schulz
153ff77a6b Utils: use cleaned stdout all over the place again
Amends 5ee880ce5e

Change-Id: Ie0202db7d8455372c3697087d9571db6706b45a1
Reviewed-by: hjk <hjk@qt.io>
2022-06-17 13:04:42 +00:00
hjk
af4a6b1a74 Debugger: Use ProcessResultData a bit more
Instead of its individual items.

Change-Id: Icd668a61de1c2de676e0a44769f1c1bb5375c523
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-16 15:43:25 +00:00
hjk
1a019ca02a Debugger: Fix path to uninstalled gdb data
Affects only self-build gdb.

Amends adf1243ed9.

Change-Id: I0b8380f27c14e155629aaf7235721aa80c0a3d45
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-16 07:35:01 +00:00
Artem Sokolovskii
27fddc8dc7 Debugger: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464
Change-Id: Ib49afb4d0283aeeffead6b31e1a3d0bcb9a7ae14
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-05-03 09:32:04 +00:00
hjk
aa3bdcb427 Utils: Add a QString-based write to QtcProcess
Centralize some boiler plate and warn about best-guessed cases.

Keep the QByteArray based access as writeRaw()

Fixes: QTCREATORBUG-27445
Change-Id: I948d80fba78b36cf85cc73664175ab05eb7707d4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-04-28 08:20:11 +00:00
Jarek Kobus
7fadaff5d4 IDevice: Make it possible to forward declare Ptr and ConstPtr
Most inclusions of idevice.h inside other headers are
required just because of IDevice::Ptr or IDevice::ConstPtr
was used there. Unfortunately, since these "using"
are defined inside a IDevice class, we just can't
forward declare IDevice::Ptr nor IDevice::ConstPtr.

Instead, create a separate header that defines
IDevicePtr and IDeviceConstPtr while having IDevice
forward declared. Redefine IDevice::Ptr/ConstPtr
inside IDevice to use IDevicePtr/IDeviceConstPtr.

Now, instead of forward declaring a IDevice::Ptr
it's sufficient to include the idevicefwd.h.

This drops the number of files being recompiled
after touching idevice.h from ~770 to ~210.

Change-Id: Ib6f2982aa0761fb4cd6593badb9c3c0c527ea535
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-04-14 12:27:04 +00:00
Jarek Kobus
876047d6cf GdbEngine: Connect to QtcProcess::done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: Icf3e3d8cfdae3890cb4991da8b7d7e74e529ad39
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-14 11:06:54 +00:00
Jarek Kobus
82108e949a ProcessInterface: Rename interruptProcess() -> interrupt()
Both functionalities meant to do the same.

Change-Id: Idd9373cdb24b7b41f9e4befb09326c339263eeb1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-03-10 08:41:05 +00:00
Jarek Kobus
8e0ae8ba96 QtcProcess: Limit the inclusion of qtcprocess.h
Move the rest of QtcProcess enums to processenums.h.
Move ExitCodeInterpreter into processenums.h.
Remove superfluous Utils:: prefix.

Change-Id: Iaa596f353d33d6930085a621b114cc15a35caa80
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-02 13:30:39 +00:00
Jarek Kobus
8af62eb256 DeviceProcess: Minimize the usage of DeviceProcess
DeviceProcess doesn't provide any public API, so
replace all usages of it with QtcProcess.
Keep using DeviceProcess only for reimplementations.

Change-Id: I35a14251a81dd0dde426f56ca2e809b527cc863c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-28 13:10:42 +00:00
hjk
e2cb64471a Utils: Move QtcProcess constructor setup data to shared setup data
This includes replacing DeviceProcess terminal handling with base
member.

Change-Id: Id1541bfce33c71dddc71b4816ad0b174dce3879c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-02-11 17:33:48 +00:00
Jarek Kobus
239688180d Fix running as root
There is no need for TerminalRunner::setRunAsRoot()
as debugger is already being run as root.
Implement runAsRoot for non-terminal QtcProcess, too.

Fixes: QTCREATORBUG-26964
Change-Id: Id5110db86b7b809a5608714464241cee73875f2b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-02-03 10:23:25 +00:00
hjk
1fc83d2a56 Utils: Wrap various file system iteration flags and filters
... into a single class.

This makes passing them around as a whole easier, and opens a path
to have "generic" filters in form of a lambda or such.

Change-Id: Ibf644b2fedcf0f1a35258030710afff8f5873f88
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-26 13:13:41 +00:00
Eike Ziller
85b60d9608 Merge remote-tracking branch 'origin/6.0'
Conflicts:
	src/plugins/coreplugin/editormanager/editormanager.cpp

Change-Id: I80fe565749ad5c06dfe99436f2dc6ab4b66a2537
2021-12-16 10:50:33 +01:00
Cristian Adam
352e66531e Debugger: Unset previous Path environment variable
Newer gdb versions (11.1) on msys2 32bit environment pick up the
`Path` value and not the `PATH` value that we set.

By having one one value (`PATH`) we fix such issues.

Fixes: QTCREATORBUG-26670
Change-Id: I3fb9da75c2a037eb43a69f6f82474c7ec4972b75
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-13 10:53:54 +00:00
hjk
e64ce914f9 Utils/Ssh: Move SshRemoteProces::isRunning() to QtcProcess base
... and use it on a few places.

Change-Id: Id2cea709e355a46821a720e593740ac032888ced
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-12-06 13:44:23 +00:00
Eike Ziller
164aae53d2 Merge remote-tracking branch 'origin/6.0'
Conflicts:
	src/libs/utils/theme/theme_mac.mm
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/debugger/lldb/lldbengine.cpp

Change-Id: I5f2c62e0bce6c91a53a554b3278dbe23ff7dde36
2021-11-11 13:04:42 +01:00
hjk
a8afa5c65c Debugger: Fix setting of Qt version fallback, again
Change-Id: I6b6cd448884800cb6d08dbdce15cb99f4ea8ba2b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-10 11:50:21 +00:00
Eike Ziller
588ef08d46 Merge remote-tracking branch 'origin/6.0'
Change-Id: Ib49e73e6c69d71fd0d8402c08f4344476295e409
2021-10-26 09:15:45 +02:00
David Schulz
5a2b58550e Debugger: use Qt version from kit as fallback for dumper
Fixes: QTCREATORBUG-26456
Change-Id: If2cd664212b3fa07d7abaef7a1173f79716884bb
Reviewed-by: hjk <hjk@qt.io>
2021-10-25 12:06:18 +00:00
David Schulz
12bc192422 Docker: mount python dumpers to device
Change-Id: Ic0d67b4a18247439f5797a0dcf74df945ef6f61e
Reviewed-by: hjk <hjk@qt.io>
2021-10-25 08:56:16 +00:00
Eike Ziller
bb9774de92 Merge remote-tracking branch 'origin/6.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: If8baed5564470e550a0ba5c7720915217eec2412
2021-10-21 09:13:03 +02:00
Orgad Shaneh
52f9db1ae0 GDB: Expand macros on substitute paths
Change-Id: Ifb7a7f007a7c46045d7c315c02c8309f0a599dbc
Reviewed-by: hjk <hjk@qt.io>
2021-10-15 12:09:54 +00:00
Orgad Shaneh
dafc32d8e2 GDB: Do not pass regular expressions to set substitute-path
Change-Id: If647e2d12b261ba2137c952640dfdb3a984fcfbf
Reviewed-by: hjk <hjk@qt.io>
2021-10-15 10:55:24 +00:00
Christian Stenger
2cc28dea65 Debugger: Fix compile
Amends b6d3e67270.

Change-Id: I0acf8a7bb447e99f7bccfc8f5055a49163727619
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-10-12 07:22:09 +00:00
hjk
786dbcb9e8 Debugger: Force English debugger output
So that ptrace output can be recognized.

Fixes: QTCREATORBUG-26384
Change-Id: Ibd9456963a5379c333782287754bf9aed4235dc4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-12 06:55:41 +00:00
Artem Sokolovskii
b6d3e67270 Debugger: Use iterateDirectory
Change-Id: I37010d4b33ac1c555f05abe91376b9befe9fa65c
Reviewed-by: hjk <hjk@qt.io>
2021-10-11 11:53:02 +00:00
hjk
b237db519b Debugger: Use FilePath for core files and surroundings
Change-Id: Icd648147ee907a2c5ba75042f003229bbd9226fe
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-29 07:35:06 +00:00
hjk
4b5aeb9a74 Debugger: Use FilePath for debugInfoLocation
Change-Id: Id538ab4ddd1d634d0dc73a00fe42d3fd35341bea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-28 06:38:52 +00:00
Orgad Shaneh
74713e5ef1 Merge remote-tracking branch 'origin/5.0'
Change-Id: I7ca9791b95032a1f276c520f8eefde3801510eb9
2021-09-27 13:22:58 +03:00