The RunWorker will carry the amPreStart/amPostFinish commands later,
and the run control is still accessible via worker->runControl().
Change-Id: Ieac1a1d2a5a8689025a7707b218df44ef2485b16
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
It was only set up in AndroidRunner from the run configuration
and passed to AndroidRunnerWorker, instead get in in the
AndroidRunnerWorker from the run configuration directly.
Change-Id: I52fc793f07ca766a80a1b06f216f850da0b563ed
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
It was only uses to pass the intent from the Runner to the RunnerWorker,
use a normal stand-alone QString member and setter instead.
Change-Id: I0fde87b0177d4ed013f9599600929070362ea09c
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
The difference was the selection of findProcessPID vs
findProcessPIDPreNougat functions, done by a flag now
passed to and used inside a combined findProcessPID function.
Change-Id: I738cdac1a81302c2207f9bc3c74c7cf916ca4089
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
The idea was actually to make AndroidRunnable and "everything else",
i.e. StandardRunnable more similar over time to lessen the impact
of the "matrix" problem. The two removed items are avoidable.
Change-Id: I8ef011d76e2ad0154194ff5141ef8eb92cf235f3
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
It's nothing that can be chosen freely, rather a feature of
the current setup/device.
Change-Id: I39460e22dab56adcce9da44f61a895923fb8c2a0
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
The new way is much reliable and now we can debug all the libs from very
first start, including static constructors, JNI_OnLoad, etc.
The downside is that the startup is a little bit slower then before.
On a Ryzen 1700X is 2 to 5 seconds slower.
Task-number: QTCREATORBUG-19081
Change-Id: Iacedf7b8aa84de5026f9c81eeca35dd377cf4640
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
The Qt/Android runtime does support passing parameters to the
application. We have to pass '-e extraappparams <base64 string>' and
'-e extraenvvars <base64 strings, concatenated by ";">'. This is very
handy and should actually be exposed in the GUI.
Change-Id: I8c84a53ab8f6f07ea5b6e01c902f53385df8b35f
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
The only things specific to AndroidRunConfiguration are
amStartExtraArgs() and postFinishShellCommands(). Those are considered
to be empty on foreign configurations.
Change-Id: Ia0b8381c30225942e8704db04d17a8bdd3d2c806
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Use the URL scheme to distinguish between them, check that in
QmlProfilerClientManager and test all possible combinations of URL
parts.
Change-Id: I6583e5bf18eda0344a299a279c12578c4ebc7ffe
Reviewed-by: hjk <hjk@qt.io>
This is only usable with versions of Android older than 5. Now that
Android 8 is the current version, we say goodbye to this feature as it
is almost certainly no longer of use to anyone.
Task-number: QTBUG-62995
Change-Id: I19795eb385b18f4dd87a1bb8df57d36c3fa28dc5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Host and port reasonably belong together, using a QUrl makes that more
explicit and follows the lead of the Qml profiler in that area.
Change-Id: I754cb17d165ce6b2f25c655eeebfd8ac8f5a93c7
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Specify the qml server address and use correct default loop back
address in qmlengine
Change-Id: I9b77cb3385041bbe79900e7f7a188ca26124bacc
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Let user specify list of shell commands to run before app starts
and after app quits.
Change-Id: I9794fb96180530ca6c28ce6581fda51a25be28d4
Reviewed-by: hjk <hjk@qt.io>
This moves all of the RunControl implementation into a single
RunWorker, not yet splitting it up into separate RunWorkers
which is the final goal of this series.
Change-Id: I7373105603505aa4fffd7fe5ff0145f0128b34bc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
- allow the user to choose the visible log levels
- allow the user to choose which activities/service(s) logs are visible
- wakeup the device (API 20+)
- use only the most recent logs (API 21+ add "-T 0" to logcat params)
- use logcat -v time format, which is the same on all Android versions
In the future we can even allow the user to choose which parts of the
log line are visible, e.g. time, log level, TAG, PID, Message
Task-number: QTCREATORBUG-16887
Change-Id: I07ce00aff59a479660f5ac6da75eef973ba3f627
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
android tool is deprecated since sdk tools version 25.3.0.
Use the new avdmanager tool
Task-number: QTCREATORBUG-17814
Change-Id: Id6f495f14e12d0069df08164cac1929b76d9e932
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
This patch adds the missing include statements for QRegExp.
Change-Id: Ibb03b929940adb84ae190b5090cb6b88653cc14c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Both wrap the corresponding Qt class, but make sure all temporary files
or directories are created inside a "master temporary directory".
Change-Id: I55461be507c828c965224c02863ea5ed9bbf9498
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
On Android 7.1.1 the error is fired on "stderr" on previous versions on
"stdout"
Change-Id: I72c06694a22084d455e26eea95ddfdb8a93a39b2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Method to find the pid is changed. Not all android versions support grep
and test commands
Task-number: QTCREATORBUG-17272
Change-Id: Ifa67444af55eaf06fb2d6f6bb0439cfaf3bf305e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
"m_tries" and "m_wasStarted" must be initialized before "m_psProc-
>start" call, because m_psProc will emit "QIODevice::readyRead" signal
before the function ends.
Change-Id: I10c63ca2d15c362d6df04018757b1916b9989893
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Previously, the code depended on the device to send the whole "ps"
output back quickly after "ps" was written to the shell. If the output
was not there by the time the input was considered written by Qt
Creator, we would mis-parse the port and generate wrong conclusions on
if the process was actually running or not.
By filtering the correct line from the ps output on the device and
outputting a clear negative result when none is found we can determine
the "running" status of the process more easily. Each output line
directly corresponds to the state of the process at the time when ps
ran. We buffer the output in order to guard against lines being broken
up during transmission.
Change-Id: I0e1726b7f0d725d982a0f2d60d0c8ab7d59fc371
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
We don't need to do this for plain character literals as we allow
casting those to QString now.
Change-Id: I25569cfb8a2ff618176b7d5ab048f03ecaaee460
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This removes the need for blocking queued connections and runAsync(),
reducing the risk of deadlocks and eliminating unguarded concurrent
access to various members of AndroidRunner. No mutex locking is
necessary anymore as all communication between the two threads is
either done on initialization, before the worker thread starts, or
via queued signals.
Change-Id: Icc2fcc2c0ce73d1c226bc4740413e57490d1cbc6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
We're not using it as QThread.
Change-Id: Ib277325179a46fe7d153ff9d37043f54d0d41037
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>