Commit Graph

69 Commits

Author SHA1 Message Date
hjk
d54c61b4bd Android: Simplify gdbserver upload logic a bit
Change-Id: I3b1950633ef99f1ead01edc864add8bb7f8a2031
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-05-19 10:41:58 +00:00
hjk
3d04efa0c8 Android: Determine debugger type from Kit settings
Change-Id: I7e83fa1df923fd2449eecfac9c9d82bae249e6c1
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-05-12 09:42:17 +00:00
hjk
4486f78e49 Android: Check existence of debug server binary before upload
Debugging will fail later, better catch the problem early.

Change-Id: I973ff346db718e2050f5aafab068717d4e723fa6
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-04-29 13:31:08 +00:00
hjk
7d3c6f7c02 Android: Start lldb-server and attach
Change-Id: Id7c45d9161d3389e9de419835c312d87916a34bc
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-04-22 08:12:48 +00:00
hjk
d7b1adae78 Android: Setup lldb-server path in AndroidRunner
Currently unused, guarded by an always-false m_useLldb flag.

Change-Id: Icedfa4bace3d5160cdc3d4fbcf72a22d74d0aa0f
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-04-16 04:54:22 +00:00
hjk
3a1dc3c3ed Android: Move gdbserver path determination to androidrunnerworker.cpp
That's the only user, and it's easier to extend to handle LLDB there.

Change-Id: I7ce236e2ff509b419d52b10d086a75ff0c2ea14b
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-04-15 07:14:34 +00:00
hjk
6d66733d50 Android: Rename some gdbServer* to debugServer*
There's LLDB coming into play, and debugServer is what we use on
BareMetal and RemoteLinux, too.

Change-Id: I77f8545ebbe6685708215ac579789f7d4990b7be
Task-number: QTCREATORBUG-23260
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-04-15 07:14:04 +00:00
Assam Boudjelthia
67df868f5c Android: Automatically use the correct NDK for each Qt version
Based on change 286266, we can find a correct NDK version for Qt for
Andriod version. This change allows Android plugin to get relevant NDK
information and registers appropriate toolchains and kits settings.

[ChangeLog][Android] Automatically use correct NDK version
corresponding to used Qt version.

Task-number: QTCREATORBUG-23583
Change-Id: Ic6b0d7a1ae8962c075b77498de88e018a008ac3e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-17 16:14:50 +00:00
Alessandro Portale
9904464074 Make various Q_LOGGING_CATEGORY's static
Change-Id: I43d3a198b0863d85a7fb305c7cb768f68acbd139
Reviewed-by: hjk <hjk@qt.io>
2020-01-15 14:54:10 +00:00
Eike Ziller
267946d100 Merge remote-tracking branch 'origin/4.11'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/boot2qt/qdbrunconfiguration.cpp
	src/plugins/boot2qt/qdbrunconfiguration.h
	src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
	src/plugins/qnx/qnxrunconfiguration.cpp
	src/plugins/remotelinux/remotelinuxrunconfiguration.h

Change-Id: I17c8e1bf300bb75d7317ccf7749dd3cc07709c21
2019-12-16 16:19:44 +01:00
Alessandro Portale
79bbe93c1b Android: Make more logged command calls copy&pasteable
Change-Id: I43e01efc4cb583235ad2d97150d4478b23558659
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-12-09 10:23:16 +00:00
Orgad Shaneh
49f6b0146a Merge remote-tracking branch 'origin/4.11'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/mcusupport/mcusupportrunconfiguration.cpp
	src/plugins/python/pythonproject.cpp
	src/plugins/qmakeprojectmanager/qmakestep.cpp
	src/plugins/qmlprojectmanager/qmlproject.cpp
	src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp

Change-Id: I22507be28fd80c49c9fee0dff5937a40db176a82
2019-12-07 18:39:54 +02:00
BogDan Vatra
e21fe24c40 Android: Get the preferred Abi from apk & device
Change-Id: I47325aaec0575dde0e9c9669e61248dac753c670
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-11-29 09:30:58 +00:00
Eike Ziller
4e6142c932 Merge remote-tracking branch 'origin/4.11'
Conflicts:
	src/plugins/autotest/testresultspane.cpp
	src/plugins/cmakeprojectmanager/cmaketool.cpp

Change-Id: Iade695ac9cab8bf3e3a1abd6e2c71f4a19132ac0
2019-11-21 22:18:35 +02:00
Alessandro Portale
cd4fe07708 Android: Use numerical options for remote chmod call in uploadGdbServer
androiddeplyqt does not deploy gdbserver anymore, since Qt 5.14.
Therefore the gdbverver deployment of Qt Creator is triggered for all
devices, some of which do not support the symbolic chmod parameters
(e.g. +x).

Change-Id: I66e9fabeb0da4a1a3693c655a085d81c15f9d263
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-11-20 16:34:11 +00:00
Cristian Adam
b6ab85a440 Android: Fix debugging on Windows
The pid script was wrongly quoted on Windows resulting in not having
logcat ability, and no debugging.

Change-Id: Ica40d033b61b69bb2372f54f0eba19ae1d2e3c9f
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-11-20 11:00:15 +00:00
Alessandro Portale
9c43466485 Use HostOsInfo::withExecutableSuffix instead of if/else
Let's use our Utils.

Change-Id: I8cfbce55d2b41e42e86d050433df2cfd20cebe1b
Reviewed-by: hjk <hjk@qt.io>
2019-11-14 15:17:34 +00:00
BogDan Vatra
6b31f9cf23 Android multi arch support
[ChangeLog][Android] Android multi arch support for qmake

Change-Id: Ib8b1874604a3392130c96fbc00b26713b3d788ae
Reviewed-by: hjk <hjk@qt.io>
2019-09-16 07:34:54 +00:00
hjk
ca4ba34229 Use Utils::FilePath in SynchronousProcess
Adapt callers and surrounding code.

Change-Id: Ie6c1883a44169cf9d790d06b660f46d24dc24c89
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-06-11 08:11:07 +00:00
Orgad Shaneh
1e138fbe10 Remove excess blank lines after namespace
Change-Id: I4e4f83017f2bfc2cf842c4c971ed4b05e0447e6a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 06:50:16 +00:00
hjk
0595e67c82 More FileName::pathAppended()
Change-Id: Ie20ec34ea9712b3ec49e6233b23cef84c2019f03
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-20 14:37:13 +00:00
hjk
eb9e3c807c Even more FileName::appendPath() -> pathAppended()
Change-Id: I0a8bc391ff3704e14df87e4fa3bc82269146f943
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-20 13:13:06 +00:00
Eike Ziller
60c22e8549 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	src/plugins/qmldesigner/components/propertyeditor/gradientmodel.cpp

Change-Id: I170de608eaae795133105dedb76ae6f93f6e0d92
2019-03-25 11:55:48 +01:00
Vikas Pachdha
6ff0f94768 Android: Fix process id parsing for API 22
Task-number: QTCREATORBUG-22098
Change-Id: I8aeed9179538689083aacf9487ae0dca8feaed97
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-03-21 12:54:17 +00:00
hjk
5672e1199a ProjectExplorer: Remove RunWorker::runMode()
Only used once, and that use can be replaced.

Change-Id: I844254dfff9bb2b2c9c56ecbd56d2af2241fd2d8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-03-21 06:47:50 +00:00
hjk
164ae1428e ProjectExplorer: Move RunControl related classes to separate file pair
Change-Id: I5da56f80336673d595907abcc797f628be680cd5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-13 14:44:46 +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
Eike Ziller
0619de8681 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/tools/clangpchmanagerbackend/source/taskscheduler.h

Change-Id: I518adaf647df412887c2a372416634359f09ad2a
2019-03-05 10:22:45 +01:00
Leena Miettinen
031a82cd71 Android: Fix UI text
Change-Id: I918ded69e64ec3f91d7deeda086d36c6b73fdf8d
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2019-03-04 09:01:50 +00:00
hjk
8e6ac695a8 Squash more deprecation warnings
What a pain.

Change-Id: I257e06c647933cc0b752c3c7a83a925b8b627e59
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-27 10:00:52 +00:00
Christian Kandeler
83dd031960 ProjectExplorer: Rename KitInformation to KitAspect
The name "KitInformation" does not properly convey the fact that it
represents a certain *aspect* of a kit. The same goes for
"KitConfigWidget", which in addition was inconsistent with
"KitInformation".
We now use "KitAspect" and "KitAspectWidget".

Change-Id: I9804ee4cedc4d61fad533ea1dd4e4720e67fde97
Reviewed-by: hjk <hjk@qt.io>
2019-02-11 11:55:01 +00:00
Eike Ziller
88b29792cb Merge remote-tracking branch 'origin/4.8' into 4.9
Conflicts:
	src/plugins/android/androidrunnerworker.cpp
	src/plugins/android/androidrunnerworker.h

Change-Id: I52b9117c8a57dc4a34cfc09d1ae9bc76e0752bfc
2019-02-04 15:21:55 +01:00
Vikas Pachdha
59de3fcb64 Android: Fix gdbserver upload for Windows when using Armv8 arch
The gdbserver is not uploaded to device for armv7 as lib symlink
is available and we can use the gdbserver packaged with the apk

Task-number: QTCREATORBUG-21317
Change-Id: I263eb48bbf3cf05b969db934a928185dba10373b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2019-02-01 08:17:56 +00:00
Eike Ziller
e5c2ee922a Merge remote-tracking branch 'origin/4.8'
Conflicts:
	src/plugins/cpptools/compileroptionsbuilder.cpp

Change-Id: I743ea39480cc5c7b6febcd2e93713d15a3ae6d9c
2018-12-07 08:53:11 +01:00
BogDan Vatra
d51ddbb8f0 [Android] Fix qml debugging for Qt 5.12
Since Qt 5.12.0 we don't use qmljsdebugger extra intent param anymore
and we need to pass qmljsdebugger to the application arguments.

Fixes: QTBUG-72132
Change-Id: Icefb75e94027b145832c114fd90579bd10bcb898
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-12-03 12:39:29 +00:00
Orgad Shaneh
7096649fc2 Merge remote-tracking branch 'origin/4.8'
Change-Id: I5b18233936e3b2cd674df92a694ba73b5a3ed752
2018-12-03 09:56:07 +02:00
Christian Stenger
c5d1ec5144 Android: Fix debugging using old devices
Uploading a binary file had been remade using base64
encoding, but base64 tool is not available on older
devices.
Fallback to the old approach of relying on the
symlinked lib folder that contains a gdbserver if
the upload failed.

Task-number: QTCREATORBUG-21317
Task-number: QTCREATORBUG-21547
Change-Id: I54539d8912b1722bb799068c33e7a9175699ff70
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-11-29 14:40:33 +00:00
Eike Ziller
29c9f8080d Merge remote-tracking branch 'origin/4.8'
Conflicts:
	src/plugins/android/androidrunnerworker.cpp

Change-Id: Ibd8b99435365fb7e7d488313fd1d2b3a75adad1b
2018-11-29 13:36:14 +01:00
Christian Stenger
069ac16e19 Android: Fix passing binary data through pipe on Windows
Passing binary data through a pipe may break as soon it hits
a control sequence. Encode binary data before piping and
decode it on the device before writing to file.

Fixes: QTCREATORBUG-21547
Change-Id: Iddef5582631575fdd2091c3795d2468be10b8c74
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-11-21 17:30:14 +00:00
Christian Stenger
04b20a1a46 Android: Fix uploading file on Windows
Quoting of arguments on Windows behaves differently
depending on the used start() overload of QProcess.
Setting the program and arguments before calling start()
with only the QIODevice::OpenMode parameter allows to
preserve the wanted quoting.

Task-number: QTCREATORBUG-21547
Done-with: Oliver Wolff <oliver.wolff@qt.io>
Change-Id: I644ea0737d51d6114facb19a0ad70f10aeb79f2c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-11-21 14:35:29 +00:00
Eike Ziller
fd7cba88ef Merge remote-tracking branch 'origin/4.8'
Conflicts:
	doc/src/editors/creator-only/creator-code-pasting.qdoc
	src/plugins/android/androidbuildapkwidget.cpp

Change-Id: Iea8b7135643d14ffe49d10b14bedb8fa5ac48063
2018-10-24 13:58:45 +02:00
Robert Loehning
4032f6383a Fix frequent typo
can not -> cannot

Change-Id: Ie872ada1bc9b4ed64bffb667c2e44dbb13b4ad11
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-10-23 09:30:20 +00:00
Eike Ziller
511bd64f3f Merge remote-tracking branch 'origin/4.8'
Change-Id: I0ff6f659b7ccd4ff5a79e422a1d54488508fe05f
2018-10-16 07:11:57 +02:00
Orgad Shaneh
bdc2b4b59f Remove hard-coded disabling of debug logs
Instead, set the default level of all logs to QtWarningMsg.

The call to setFilterRules overrides the user preferences in qtlogging.ini.

Change-Id: Id5f6cd550d14ff7f45ae04c5d3110e0bafb0f072
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-10-13 16:36:58 +00:00
Vikas Pachdha
8c95ab7ac8 Android: Remove multiple code paths to run adb
Refactor the code to use adb from AndroidManager, do cleanup
and improve logging

Change-Id: I77b682d37c9328e6aa978eaf05b3b5c131907f09
Reviewed-by: hjk <hjk@qt.io>
2018-10-05 12:58:37 +00:00
BogDan Vatra
5811848a7b Android: Remove old support for gdbserver
Change-Id: I6d2e8abf0baa5606ad3d79cc7f1f57813e8255b1
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-10-05 10:37:23 +00:00
BogDan Vatra
25264d9bd9 Fix debugging on Android arm64/x86_64
On Android 64, there is no lib/ symlink anymore, so we need to upload
gdbserver from QtCreator.

Change-Id: Ib6f6d9b623dc61b72dd434ce1b3b409e880bdeaa
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-10-04 15:36:35 +00:00
hjk
1c9410e353 ProjectExplorer: Rename 'extraAspect' to 'aspect'
Using aspects is the standard pattern nowadays, there's nothing 'extra'
to them anymore.

Change-Id: I446f9d7b1db58a4899e5e44df33ce51f655e7be4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-10-02 08:32:51 +00:00
Vikas Pachdha
960fccc763 Android: Fix the executable permission of the package dir
This fixes the problem where gdb fails to connect to the gdbserver on
Android with API > 23

Task-number: QTCREATORBUG-20583
Change-Id: Ia581f8ae5dd6d819ac5ffedf633d1423e9e30074
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-08-06 11:47:08 +00:00
Vikas Pachdha
d55373cab2 Android: Enable setting environment variables for android apps
Change-Id: Id4625f081d6997dcabad9b01fb09d6c9c6ef7477
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-08-02 10:01:12 +00:00