Commit Graph

106 Commits

Author SHA1 Message Date
Eike Ziller
5af531cd39 Utils: Fix build with MSVC with C++20
Rename process.h back to qtcprocess.h

MSVC's "threads" standard header includes <process.h>, and that ends up
including our process.h from Utils.

There already was a hacky workaround in place for a similar issue with
MINGW, but that doesn't work with MSVC because that doesn't have

Simply use a name that doesn't conflict.

Change-Id: I1159cd2096b4f2dbc4a1728d0131dd6edd30ebd3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2024-02-28 08:09:05 +00:00
Eike Ziller
a8414effd8 Merge remote-tracking branch 'origin/13.0'
Change-Id: If752e3383b35873b696e8beca27d8838a4096c8a
2024-02-27 09:04:51 +01:00
Eike Ziller
76cd84b7cd iOS: Fix some missing full stops
Change-Id: Ie6c1b9dafc3e3fe349adcbe6011244136002cc01
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-02-26 09:09:47 +00:00
hjk
7c5a0e6bb2 Rename RunControl::aspect to RunControl::aspectData
It's the "persisted" form of the content of the original aspect's data,
calling it 'aspect' already confused me a few times.

Change-Id: I88a6f76f0ca39d3d36dde9b84287032ceecf7033
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-02-16 10:21:15 +00:00
Jarek Kobus
656a30b407 IDevice: Replace QSharedPointer with std::shared_ptr
According to https://wiki.qt.io/Things_To_Look_Out_For_In_Reviews
QSharedPointer impl is poor and it's going to be removed from Qt 7.

Replace QWeakPointer with std::weak_ptr.
Replace QEnableSharedFromThis with std::enable_shared_from_this.
Use std::static_pointer_cast and std::dynamic_pointer_cast
for casts used with QSharedPointer before.

Change-Id: If255a100c790860934f36d52906b93f33c31cfe8
Reviewed-by: hjk <hjk@qt.io>
2024-02-02 16:45:57 +00:00
Eike Ziller
acf7d30cbd iOS 17: Print messages for starting and stopping
In the application output, like we do when running elsewhere.

Change-Id: I842701162df20403e2b9757bc78bdd61176d581d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-02-02 08:16:55 +00:00
Eike Ziller
a7a06d6f79 iOS: Move launch result from devicectl to a function
And add a test to document what we expect from devicectl.

Change-Id: I1a7f03c50393b99eddb2bfd34b5857e15b28d0a7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-02 08:13:27 +00:00
Eike Ziller
e32d3da321 iOS: Move process id gathering from devicectl to a function
And add a test to document what we expect from devicectl.

Change-Id: Ic69af99a472976a6c06801a646af59f8139d5624
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-02-02 08:13:15 +00:00
Eike Ziller
2898e09bb4 iOS: Move app URL gathering from devicectl to a function
And add a test to document what we expect from devicectl.

Change-Id: I2f5312ebadef60239b77308acb7114f1d55143b4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-01-30 10:06:29 +00:00
Eike Ziller
7e1b406229 Create a RunWorker for running apps on iOS 17 devices
That uses the various devicectl commands for starting and stopping the
app, and polling it's state for Qt Creator's stop button.

Getting app output and debugging and profiling are not supported, since
devicectl doesn't provide the necessary functionality.

Fixes: QTCREATORBUG-29682
Change-Id: Ied63b280458e5c109446a140a7774c2909aad62f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-01-18 18:46:32 +00:00
hjk
68f67d5a1a Debugger: Move plugin class definition to .cpp
Change-Id: I82327b20fb3bd970fe66b43228ca2f014c877f12
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-15 09:06:08 +00:00
hjk
2a07253a42 Debugger: Rename debuggerkitinformation.{cpp,h}
... to debuggerkitaspect.{cpp,h}

Change-Id: Ia6316fcdc893ca066933658a52c78ef1587a76e8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-08-16 07:33:43 +00:00
hjk
017d7c0e47 ProjectExplorer: Rename kitinformation.{h,cpp} to kitaspects.{h,cpp}
Change-Id: I069bddeb457366210d339edcbb8ffb359a40fab8
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-08-15 07:31:03 +00:00
Jarek Kobus
5aa3e6655c IosRunner: Do some cleanup
Move some public methods into private section.
Remove unused / no-op functions.
Make some functions const.

Change-Id: Iffcac68aef12db939bfc60b3a01272cf07c67c89
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-07-04 10:17:06 +00:00
hjk
6243c302d1 iOS: Proliferate FilePath a bit
Unlikely to make a difference in practice, but removes so unwanted
.toString/.exists.

Change-Id: I32c037aa87bb13cecb5b783fe0b36850e163f9c5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-08 10:16:25 +00:00
Jarek Kobus
a0f6e8dc04 Utils: Rename qtcprocess.{cpp,h} -> process.{cpp,h}
Follows QtcProcess -> Process rename.

Change-Id: I97235a9a40cb7fd52944515b7ab878d96528f919
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-04 05:52:26 +00:00
hjk
6a1a6d85b8 iOS: Tr::tr
Change-Id: I547af218546927622414999e5b9019ab62916e7e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-16 16:11:20 +00:00
hjk
ac5db86129 iOS: use dedicated classes to create run workers
Change-Id: I3ba7b75edf69b9cf88726132f154de5c4cc7ca7b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-11 09:39:36 +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
Jarek Kobus
bd170f3748 Ios: Don't call mutable expressions inside QTC_ASSERT
In order to conform to the theory: "Removing all
QTC_ASSERTs and QTC_CHECKs should not change anything".

Change-Id: Ieed804e44f4ca78a020444eb3f73d64d1bbdc916
Reviewed-by: hjk <hjk@qt.io>
2022-12-14 11:58:35 +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
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
hjk
17ee387756 ProjectExplorer: Dissolve a few uses of Runnable
Change-Id: I71b8f1b00e488360e7f9c136912bc64b5a76609a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-30 14:10:59 +00:00
hjk
6e5415e95f Ios: Move runControl's runConfiguration calls further up
The data is now pulled out of the runconfig directly instead of relying
on the indirection using the runconfig pointer inside RunControl.

This is only barely better, but gets rid of one direct user of
RunControl::runConfiguration().

Change-Id: If93576ba25ea9f3ddbeae2535217f5c2f361eaf6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-27 10:03:57 +00:00
hjk
52e5023bcc ProjectExplorer: Use Utils::CommandLine in ProjectExplorer::Runnable
Change-Id: Id965f1f9047dcbc3ea5c9ddaa550d12668cf8ae6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-13 15:04:30 +00:00
hjk
c0fe038f93 Utils: Simplify FilePath::toFileInfo().lastModified() calls
It's the same as FilePath::lastModified locally, and toFileInfo
doesn't work remotely. So it's overall at least not worse.

Change-Id: Ice8d80dcfd01dc38edc1dce2b53e1b5e6274380f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-06-22 08:57:28 +00:00
hjk
f2f40efa03 Utils: Move process arguments class out of QtcProcess
The main QtcProcess interface is nowadays a CommandLine, with no
explicit references left to QtcProcess::Arguments and related static
helper functions, so it only clutters the QtcProcess class interface

So move these items out of QtcProcess, later potentially to a separate
file pair.

Change-Id: I45c300b656f5b30e2e2717232c855fdd97c2d1d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-11 09:45:24 +00:00
hjk
da147880e8 Debugger: Rename 'AttachExternal' to 'AttachToLocalProcess'
And AttachCrashedExternal to AttachToCrashedProcess
And AttachCore to AttachToCore.

Clearer.

Change-Id: I47c2eca5cbdbbc0eb38b9f62b2504c96558ff112
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-07 12:11:42 +00:00
Jarek Kobus
eccebe41dc Fix a warning about calling virtual method from d'tor
Fix the following clang-tidy warning:
Call to virtual method 'IosRunner::stop' during destruction bypasses
virtual dispatch [clang-analyzer-optin.cplusplus.VirtualCall]

Remove the reimplementation of IosRunSupport::stop(), as it was
calling base implementation. Make base IosRunner::stop() a final
method.

Change-Id: I8e57a6dd6a44d2a6f00f5af96a11530f62c92429
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-19 07:41:56 +00:00
hjk
61bfd32438 ProjectExplorer: Introduce a ProjectConfiguration::kit() function
For convenience, and use it in some places.

Change-Id: I8f7cb502b37b2fbf4cf2d17cac9c6299558332dc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-09 06:27:21 +00:00
Eike Ziller
3944162039 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/cmakeprojectmanager/cmakebuildstep.cpp
	src/plugins/cmakeprojectmanager/cmakebuildstep.h
	tests/auto/debugger/tst_namedemangler.cpp
	tests/auto/qml/codemodel/check/tst_check.cpp

Change-Id: Iefd5f71c03c0078513b76a92af764a4fb22ee4c2
2020-08-10 15:56:54 +02:00
Christian Stenger
b9c5d63c27 Help:iOS: Replace QRegExp by QRegularExpression
Task-number: QTCREATORBUG-24098
Change-Id: Ie63ac88e3afdc39db0d9ead4b058efbaec402001
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-13 12:45:11 +00:00
Eike Ziller
72bf4cd15f iOS: Fix slow debugger startup on devices
We need to pass the path to the device symbols, that Xcode downloaded
for the device's OS version, as the sysroot to the debugger. Otherwise
debugger startup is very slow.

We already tried to do that, but it looks like, depending on the
devices, this path can contain an architecture specific part, e.g.
"iOS DeviceSupport/13.5.1 (17F80) arm64e" instead of just "iOS
DeviceSupport/13.5.1 (17F80)". It can still be just the latter, so we
get the devices architecture information, try the architecture specific
directory first, and fall back to the architecture agnostic name as
before if the former doesn't exist.

Fixes: QTCREATORBUG-21682
Change-Id: I2efdbfda0282f1cf0f8d10bd4e5217a298027fcf
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-13 11:55:33 +00:00
hjk
e1c88116b3 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
(cherry picked from commit 430a33dcd9)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-06 11:15:18 +00:00
hjk
430a33dcd9 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-06 06:07:13 +00:00
hjk
0334b6e491 ProjectManager: Add convenience Task subclasses
For Compile, BuildSystem and Deployment. Unclutters user code and reduces
binary size.

Change-Id: Ia18e917bb411754162e9f4ec6056d752a020bb50
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-01-20 10:11:59 +00:00
hjk
ddf0dd8734 Utils: Add a FilePath::isDir() convenience function
Change-Id: I1df0ee1b136299ae6e4f2e5bd0bdc24bfeca33dd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-11 12:46:10 +00:00
hjk
d471b6df90 iOS: Avoid one use of runconfiguration in IosRunner
Change-Id: If0f1e4a64db692ad373fc73087dd1f5c329a3832
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-05 08:47:06 +00:00
hjk
d39d26a54f iOS: Avoid use of RunControl::runConfiguration() in QmlProfiler support
Change-Id: Id296ddb364c7503506e32c01d594cdca15715859
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-03 09:10:46 +00:00
Tobias Hunger
8bfe0da2f7 Ios: Silence warnings about unnecessary ';'
Change-Id: Ie77d1f49da7eaf970a508f316034741b5d7b94b7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-02 09:35:36 +00:00
Tobias Hunger
ac8fe14508 Ios: Fix spelling in id
Change-Id: I96b4a19615560c5d22afca9f07ae715e7ff4e646
Reviewed-by: hjk <hjk@qt.io>
2019-08-30 14:31:54 +00:00
hjk
7cd3bda4c0 iOS: Fix/add RunWorker ids
Easier to debug worker setup errors.

Change-Id: I1d050c715488db2bcce323f4efcd9808d1770eaa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-30 12:25:53 +00:00
hjk
3844f59806 ProjectExplorer: Standardize RunWorker creation logic
This unifies the remaining paths of RunWorker creation to always
use RunWorkerFactories in the plugin pimpls.

There were, and are, still effectively three basic kinds of workers:
 - "toplevel" tools corresponding to the run modes, that are often all
    that's used for local runs and directly started via the fat buttons
    or e.g. entries in the analyze menu, with factories already previously
    located in the plugin pimpls
 -  core "tool helpers", providing tool specific functionality typically
    used in conjunction with a remote device specific run mechanism,
    set up via RunControl::registerWorkerCreator
 -  target/device specific runhelper like port gatherers contructed e.g.
    via *Device::workerCreator(Core::Id id)

Worse, these categories are partially overlapping, so it was not
clear how a "clean" setup would look like, instead some ad-hoc cobbling
"to make it work" happened.

In some cases, the runMode id was used throughout the whole ensemble
of run workers for a given run, and which worker exactly was created
depended on which of the mechanism above was used in which order.

With the new central setup, the top-level runmodes remain, but the
second kind gets new ids, so the implicit dependencies on order
of setup mechanism are avoided.

This also helps in the cases where there was previously unclarity of where
and how to set up worker factories: It's always and only the plugin
pimpl now.

Change-Id: Icd9a08e2d53e19abe8b21fe546f469fae353a69f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-08-27 07:54:45 +00:00
hjk
dca7edbeef Let PortsGatherer produce full URLs instead of ports only
This is what the consuming code expects in most cases.

Change-Id: I135592039e28b994996186f627215ab1d2f8d6dc
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-08-26 08:16:03 +00:00
hjk
1ca91b16a0 iOS: Remove unused qtsupport includes
Change-Id: I0f5c867e712d152377d05c3e4105e7705e7a4547
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-08-14 08:37:49 +00:00
hjk
251287f0d3 Avoid warning on empty expressions
For some reason, Q_UNUSED includes already a semicolon, adding one
on the user side creates an additional empty statement.

Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-23 11:55:59 +00:00
hjk
1396c6e8e9 ProjectExplorer: Use Utils::FileName for Runnable::executable
Change-Id: I584bc18aa19a4c9886af7b13e95052dfd4350b34
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-06-21 10:32:31 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 12:23:26 +00:00
hjk
166cb39709 iOS: More FileName::appendPath -> pathAppended changes
Change-Id: I3db6b1778e6e47e26e243fb2609c481651aa91fe
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-17 09:26:57 +00:00
hjk
9ef0b97716 Avoid some visible uses of RunControl::runConfiguration()
For a long time, probably from the very beginning, a RunControl
was meant to hold (a copy of) data needed for its operation, that was
valid at the time of its construction, to be resilient in cases
where RunConfiguration setting were changed while the RunControl
was running, or to properly re-run with the original settings.

Unfortunately, the task was repetitive, as RunConfiguration
classes had no generic access to properties / "aspects"
and there was was the runConfiguration() accessor (probably
for mostly unrelated reasons in the output pane handling) which
made the idea of just casting that to the original runConfiguration
and access the data directly there appealing, with all the
expected consequences.

This patch here partially addresses the issue by copying some
more of the related data at RunControl construction time and
adjust the using code, avoiding most uses of the runConfiguration()
accessor in a mostly mechanical matter.

Complete removal appears possible, but will be less mechanical
in "difficult" plugins like ios, so this is left for later.

The new accessors in RunControl are very much ad-hoc, leaving
room for improvement, e.g. by consolidating the access to the
run config settings aspects with the other runconfig aspects
or similar. For now the goal is to remove the runConfiguration()
accessor, and to as much as possible fixed data after RunControl
setup is finished.

Next step would be to officially allow construction of RunControls
without a specific RunConfiguration by setting the necessary
data independently, removing the need for the various workarounds
that are currently used for the purpose of faking (parts of) the
effect of the non-existing RunConfiguration or refusing to operate
at all, even if it would be possible.

Change-Id: If8e5596da8422c70e90f97270389adbe6d0b46f2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-12 12:27:35 +00:00