Commit Graph

176 Commits

Author SHA1 Message Date
Jarek Kobus
6c15cc6bf9 Android: Simplify removeForwardPort()
There is no need to split the output into separate lines
and search for port number in each line afterwards.
Search for port number in the whole output instead.

Change-Id: Id020bd5a73080be30b6cef47853e027235105ae3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-07-24 17:54:39 +00:00
Jarek Kobus
b52bded0a7 Android: Don't pass error string
Instead, emit remoteProcessFinished() directly from the
startDebuggerServer() function. Make this function void.

Change-Id: Ibeeb2a1e3aabb9b3021203003e31a7b44eef573e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-07-24 04:15:15 +00:00
Jarek Kobus
715240257d Android: Detect preNougat inside AndroidRunnerWorker
Remove setIsPreNougat() setter.
Remove m_isPreNougat field and provide isPreNougat() getter
instead.

Change-Id: Ie906024840be78a0b17fbd3d4df00667b4812cfb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-07-19 12:18:11 +00:00
Jarek Kobus
15e510abcf TaskTree: Make use of the trivial DoneResult handlers
Change-Id: I71915fc50f073cc90b0fb2562bb82e9c4a73ccd1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-19 08:32:37 +00:00
Jarek Kobus
dfef293aa4 Android: Fix find process and user PID recipe
Before, the loop got finished after the very first
failure of the pid command. Fix it so that the loop
stops on the first successful execution of any child.
Make timeout task return error, so that the loop
continues executing after the timeout.

Simplify some commands' constructions.

Amends a7ece15f6e

Change-Id: I637002f0248ec69e61e058c7246471396aac1142
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-04 18:41:46 +00:00
Jarek Kobus
c9fac8ca2e Android: Transform AndroidConfig into namespace
Change-Id: I1926758f3dcaffb4de11a85c0873eec7bd2d223c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-28 22:18:12 +00:00
hjk
f30d369b99 Fix QMetaType::type() related deprecation warnings
Not in sdktool, which still builds with Qt 5.15

Change-Id: I6e6f4331127b821e471e2840e7959cd65e6419e9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-23 13:04:22 +00:00
Jarek Kobus
a7ece15f6e Android: Reuse TaskTree for findProcessPIDAndUser()
Don't run blocking processes in a separate thread.
Run them asynchronously from the main thread.

Change-Id: I5343f05d992d974720e786e2814cba2d6b295cd4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-23 05:47:04 +00:00
Jarek Kobus
5453d13290 Android: Inline AndroidRunnerWorker::adbKill()
Change-Id: I2c4fefac4f18b65fe73619cc70090133eb4dbbf5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-23 05:46:54 +00:00
Jarek Kobus
8b87f8f0b7 Android: Pass const reference instead of a copy
Change-Id: I5058478c99b6316c836003239490c606ca0efb4b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-03 15:37:07 +00:00
Eike Ziller
1b97fdc100 Merge remote-tracking branch 'origin/13.0'
Conflicts:
	src/plugins/debugger/gdb/gdbsettings.cpp
	src/plugins/perfprofiler/perfprofilerruncontrol.cpp

Change-Id: I0d5b914f9d9b5499920a5db484ef77af6ae748d5
2024-03-12 09:27:39 +01:00
Cristian Adam
47018e59d2 Android: revert to using 'threads' in handleJdbSettled
But this time ignore unhandled exceptions which were caused by the
'threads' command in certain situations.

Amends db307978bf

Change-Id: I50819306eeb392ebae8dc869694ed588739c44fb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-03-07 17:18:57 +00:00
Eike Ziller
8abc95331f Merge remote-tracking branch 'origin/13.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	src/plugins/cppeditor/cppcodemodelsettings.cpp
	src/plugins/cppeditor/cppcodemodelsettings.h

Change-Id: I54937c39b06897a72a105e4e0a8b5f8a76c38e26
2024-03-06 15:10:15 +01:00
Alessandro Portale
db307978bf Android: Send suspend/resume instead of threads in handleJdbSettled
"threads" causes an exception in my jdb on my machine. "suspend" and
"resume" do not, and they also cause enough delay for JDB to settle.

Change-Id: I5297d720c5fdbe5ee2eaa421624491af50bc40bf
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-03-05 20:17:54 +00:00
Cristian Adam
97db1645ad Android: Log jdb communication
Change-Id: If4833de2b65e57dd55c58c82bf707e57d4561031
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-03-05 20:12:57 +00:00
Cristian Adam
21e48c1a59 Android: Enable writing to the jdb process
Amends 97461f6f18

Fixes: QTCREATORBUG-29928
Fixes: QTCREATORBUG-30405
Change-Id: I3d4dad5bbc72a17f1246510ba10370811fda293a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-03-05 18:11:23 +00:00
Eike Ziller
6c2df76737 Merge remote-tracking branch 'origin/13.0'
Conflicts:
	src/plugins/android/androidsettingswidget.cpp

Change-Id: Ifcb16aa16c7bc2792de25d0ee7a22cf0e39a05f8
2024-02-29 12:44:58 +01:00
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
Jarek Kobus
e95ad3778f AndroidRunnerWorker: Avoid deleting process directly from its handler
Task-number: QTCREATORBUG-29928
Change-Id: If25c742e57ddaa90ed3342d09dafe626288f0783
Reviewed-by: hjk <hjk@qt.io>
2024-02-27 09:49:14 +00:00
Jarek Kobus
0114933deb AndroidRunWorker: Remove redundant variables
Change-Id: I6677ce5d4640fdd68d3571d833f9c3651068facc
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-27 09:38:59 +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
hjk
2beaba4627 Android: Use more direct access to current config singleton
Change-Id: Ica5ba556ac022fe39ed4439d023cda1742344eed
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-01-24 13:41:13 +00:00
Jarek Kobus
63fc22e274 Process: Change signature of waitForXxx() functions
Change the arg to QDeadlineTimer type.

Change-Id: Id3dee0717e44130c16baf7925e5b06346a1a1ad1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-01-23 07:09:22 +00:00
Jarek Kobus
665beaead9 Process: Change signature of setReaperTimeout()
Change the arg to std::chrono::milliseconds type.

Change-Id: I7b79fc318e2fd06971148038a31fecd4c1805a79
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-22 20:42:36 +00:00
hjk
d7d78df9da Plugins: And more Store and Key
After this one, is compiles with the opt-in macro. Not changed yet,
though.

Change-Id: I29a66ecb5daa71d0d97566b81fd9f47d92f6368a
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-25 11:45:22 +00:00
Jarek Kobus
8bdf70e271 AndroidManager: Use Utils::Process for startAdbProcess()
Change-Id: I675d0103bee854af67d379d08a7e0ddbc6654e8d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-08-22 13:59:19 +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
Jarek Kobus
b8acef5d8c AndroidManager: Rename runAdbCommandDetached() into startAdbProcess()
The process wasn't started detached in fact.

Change-Id: I60aee6d4de3be2499727ea43c3492c1c478f5e94
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-15 10:40:21 +00:00
hjk
aa25fdcc69 QtSupport: Rename qtkitinformation.{h,cpp} -> qtkitaspect.{h,cpp}
Change-Id: I12229e5e98b468101d32edd35be74bbda0921d89
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-08-15 08:59:52 +00:00
Jarek Kobus
97461f6f18 AndroidRunnerWorker: Replace jdb process with Utils::Process
Change-Id: I269c9910a6d0ca1f259a3632abe3601bcdb19f8e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-08-09 12:41:16 +00:00
Jarek Kobus
81d38bb711 AndroidRunnerWorker: Replace adbLogcat process with Utils::Process
Change-Id: Ia4e0e7e0b49ca1847bac537a7672c39b069bf767
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-08-09 11:46:30 +00:00
Jarek Kobus
297ff3b9b1 AndroidRunnerWorker: Remove no-op code
Since there is no call to recordData()
with ANDROID_PRESTARTSHELLCMDLIST or
with ANDROID_POSTFINISHSHELLCMDLIST, the recordedData()
will always return empty variant.

Change-Id: I2d96ddee12181c614a0282f5103fba3fc06b6486
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-07-01 21:23:17 +00:00
Alessandro Portale
42a62a3a5d Android: Obtain values for AndroidRunnerWorker from settings data
The members of AndroidRunnerWorker are supposed to be initialized with
aspect values from the AndroidRunConfiguration. But they were instead
unsuccessfully obtained from the RunControl's aspects.

This obtains the values from the RunControl's settings, instead.

Fixes: QTCREATORBUG-29160
Change-Id: I124184c32d158e0648a0ee1d23dfe8707d18eab8
Reviewed-by: hjk <hjk@qt.io>
2023-06-26 07:34:57 +00:00
hjk
37d2240dfc Some more Qt deprecation
s/type/typeId/

Change-Id: I403af524146f0582709c1264e7517d8769dd723b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-09 09:38:20 +00:00
hjk
e98c523b3f QmlDesigner: Fix a few more Qt deprecation related warnings
Change-Id: I245693e0aa58454f631b9150cd86f3034c5cfbe6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-09 07:57:24 +00:00
Jarek Kobus
abb85b073a QScopeGuard: Make all usages of QScopeGuard consistent
Change-Id: Icfc35ecbdbdee8dadbb1b17789694093427c3ed9
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-06-07 10:35:01 +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
Jarek Kobus
470c95c94b Utils: Rename QtcProcess -> Process
Task-number: QTCREATORBUG-29102
Change-Id: Ibc264f9db6a32206e4097766ee3f7d0b35225a5c
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>
2023-05-04 05:52:16 +00:00
Jarek Kobus
a3a5b8f806 Utils: Rename asynctask.{cpp,h} -> async.{cpp,h}
Follows AsyncTask -> Async rename.

Change-Id: I37f18368ab826c9960a24087b52f6691bb33f225
Reviewed-by: hjk <hjk@qt.io>
2023-05-03 13:24:20 +00:00
Eike Ziller
4e6877753a Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/plugins/android/androidrunnerworker.cpp
	src/plugins/qtsupport/exampleslistmodel.cpp

Change-Id: I1628528dbc0ffe874b49bbe022da5933b1348057
2023-04-18 12:53:45 +02:00
Christian Stenger
bb551f4b60 Android: Fix compile with Qt6.2
Just removed redundant check.
Amends 2d01003c4e.

Change-Id: Ie7ce3836804199bcb561b8c34a70814856a4033a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
2023-04-18 04:25:40 +00:00
Jarek Kobus
7ab0fd56ae RunExtensions: Move onResultReady and onFinished into asynctask.h
Change-Id: I96dbf5b0253251224ae678172cd5fca12b34326a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-17 09:10:33 +00:00
Zoltan Gera
2d01003c4e Android: Automotive debugging capability
Android Automotive images use special system users to run Android apps
and activities. To maintain compatibility with all Android flavors not
only the process ID but also the user ID of the process should be
detected in order to be able to start the debugger with the correct
user credentials. Failing to do so caused the debugging server to
terminate upon not being able to connect to the app to be debugged.
This also disabled the native debugging in Qt Creator.

Task-number: QTCREATORBUG-28851
Change-Id: Ib4cd0ba7f252096cb7b8b14f959c8f0c743d8bf2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-04-14 10:51:44 +00:00
Jarek Kobus
8175d5abda onResultReady: Provide a context object for all usages
Remove overloads for onResultReady() and onFinished()
that don't take context object.

Change-Id: Iaec538bcccd29e22791ec65cc95b4b87640708c3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-12 11:05:16 +00:00
Eike Ziller
c7e94d80c7 Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/shared/qbs

Change-Id: I33e13270c8c15a51b4ce4eaa6b4584041ed124e0
2023-03-13 12:30:04 +01:00
Cristian Adam
d154388f27 Android: add "threads" command for jdb settelment
By issuing "threads" the jdb will output the names of the running
threads. This makes sure that jdb has "settled" and is in a running
state.

Task-number: QTCREATORBUG-26592
Task-number: QTCREATORBUG-26709
Task-number: QTCREATORBUG-28141
Task-number: QTCREATORBUG-28428
Task-number: QTCREATORBUG-28851
Change-Id: Ib371e333eb9fc4d93a6b797bf7be68793f887fcd
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-03-10 17:36:44 +00:00
Jarek Kobus
2f5aad0cdb Android: Use QtConcurrent invocation for async run
Change-Id: I275af7c52197ecdb0c02e2e1039b37bd8c9bb1c1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-10 15:36:06 +00:00
hjk
dab859e776 Utils: Replace Environment.isValid() with .hasChanges()
That's closer to the intended semantics. The "other" use in docker
will be changed to an optional<Environment> as follow-up to
keep this here mechanical.

Change-Id: I43ef9da6c9c7731b28f9d6fab6413ce9c4f428b4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-01-27 12:37:35 +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
hjk
f5e4b7bd9f Android: Remove unused function lldbServerArch
Change-Id: I2482d85b553dc394d689b823a2abea46fedb852a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-09 15:36:09 +00:00