Commit Graph

306 Commits

Author SHA1 Message Date
Assam Boudjelthia
19154bf0e7 Android: shorten the kit and debugger names
The multi-abi kit names are too long since they contain the full list of
ABIs, this might cause build issues at least on windows host.

Task-number: QTBUG-83875
Change-Id: I137fa9a177eb2143be1421129b9dbd12515a3da9
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-03 09:33:07 +00:00
Eike Ziller
5b364de168 Use dialogParent() instead of mainWindow()
There are very few reasons to use mainWindow() directly.
Especially for modal dialogs, using dialogParent() is important, since
that guarantees the stacking order in case of other dialogs currently
being open.

Change-Id: I7ad2c23c5034b43195eb35cfe405932a7ea003e6
Reviewed-by: hjk <hjk@qt.io>
2020-06-02 11:44:53 +00:00
Eike Ziller
8292807e0d Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/android/androidextralibrarylistmodel.cpp

Change-Id: Ica69c24e83deff819e640dcb4c2682a554d8a2d2
2020-05-19 15:23:16 +02:00
Assam Boudjelthia
2c6563c69d Android: make sure to remove the adb daemon logs from devices list
Fixes: QTCREATORBUG-21797
Change-Id: I9153a5b2a0da4826179b436945fcc4616d65bb25
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-05-18 16:11:34 +00:00
Christian Kandeler
eb96f9900a Fix clang 10 warnings about unnecessary copies in range loops
Change-Id: I3b57869b5a04528518bc432b76768b01e3f53e81
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-05-12 13:45:43 +00:00
Eike Ziller
bf490b62e0 Merge remote-tracking branch 'origin/4.12'
Change-Id: I11936ad9e4515c3c6c9df1d949cc8116aeccd4c4
2020-05-06 09:43:20 +02:00
hjk
d10f6a031a Android: Guard against kits without Qt version
... in AndroidConfigurations::updateAutomaticKitList.

Also, simplify code a bit.

Task-number: QTCREATORBUG-23963
Change-Id: I6835721ec8b89dec57d668393178427ffa03ff6d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-05-05 05:54:22 +00:00
Christian Kandeler
f4f9d9cdbb Android: Remove some unused variables
Change-Id: Id6d8f0735c410a331c406a3f3a094aac5f03f5a9
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-04-23 09:20:17 +00:00
Eike Ziller
ad9e4cd2f6 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/android/androidconfigurations.cpp
	src/plugins/qtsupport/qtoptionspage.cpp

Change-Id: I91ee3e771ab630ac3a54be53ac4be6d3c1c46950
2020-04-20 08:40:54 +02:00
Assam Boudjelthia
9e057a5536 Android: add support for new SDK Tools package cmdline-tools
The newly added cmdline-tools is not used by Qt Creator.
So QC Android settings will be broken for users who have
an Android SDK installed from Android Studio, or who
updated their SDK package (i.e. tools -> cmdline-tools).

This patch fixes both of the following issues:

1- QC looks for sdkmanager tools under <SDK_ROOT>/tools/bin/sdkmanager,
and with the new SDK it's under
<SDK_ROOT>/cmdline-tools/latest/sdkmanger.

2- QC checks the version of the SDK tools and opens the
old SDK Manager for SDK tools version 25.3.0 or less.
However, since cmdline-tools is now version 1.0, it causes
QC to think this is an old version.

Fixes: QTCREATORBUG-23726
Change-Id: I7e6bbc6840d24d358f68dfa3e229799394ace950
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-04-18 16:31:36 +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
021cab2048 Utils: Introduce FilePath::operator/(const QString &)
Including some random uses.

This mimics  std::filesystem::operator/(std::filesystem::path).

Change-Id: I0b0f5cf0d962fd33d4cbb9be96645a0b4a21ee03
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-04-09 07:48:22 +00:00
Eike Ziller
c8a2ea5433 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp

Change-Id: I2a0ccb84560174c5170d5baaff526c0e095f0ba0
2020-03-19 09:35:50 +01:00
hjk
c3420c7fc3 Android: Remove AndroidConfig::updateDependenciesConfig()
Not used. Amends f46099d21e.

Change-Id: Ib943549f4a2171d8a1fe11c8f8aa303e6ddb8f16
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-03-18 14:52:43 +00:00
Assam Boudjelthia
41dd8dc8ef Android: read SDK configuration from user editable path
By default, copy the sdk_definitions.json to Qt Creator user resource
path. The user can use that to make any updates if desired.

Add SdkDownloader instance as a member of AndroidSettingsWidget.

Change-Id: Ieabc9c6ddecbe63586f750b26bcf4ca990caee26
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-03-18 10:53:15 +00:00
Assam Boudjelthia
76c2208bac Android: Add windows usb drivers to SDK essentials
Add "extras;google;usb_driver" to essentials packages to be installed
automatically. So, change would also account for platform specific
packages.

Change-Id: I9b452b9ee30be9f606ca77fcd79712d66fab84e7
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2020-03-18 10:50:28 +00:00
Eike Ziller
22cdc47077 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/baremetal/debugservers/uvsc/uvtargetdevicemodel.cpp

Change-Id: I4a90920e52dbbe9eb46aef3437ee3c5a6e7b31c6
2020-03-16 08:30:33 +01:00
Assam Boudjelthia
be8cdeafd6 Android: Allow adding OpenSSL libs directly from project settings
This serves as a convenience addition to allow users to directly
include OpenSSL prebuilt libs for Android. The path of the OpenSSL
would be defined once in the Android options page, and always used
to include the libs when needed by the user.

How this works:
1- A download button is provided, it first tries to automatically
git clone the OpenSSL repo to the defined path. If the cloning fails,
the repo URL is opened externally for maunual download.

2- If SDK tools auto download is used (like for first time setup),
the OpenSSL download will start after SDK eseentials are installed.

3- Once the libs path is set, it can be used by AndroidBuildApkWidget
to include() function to the project (qmake/cmake). It also, should
detect if the include() part already exists in the project file.

Task-number: QTBUG-80625
Change-Id: I338e916f03f4ff55db25a118f1ea08f1da5dd103
Reviewed-by: hjk <hjk@qt.io>
2020-03-12 12:09:54 +00:00
Eike Ziller
995ba78fae Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/cmakeprojectmanager/tealeafreader.cpp
	src/plugins/cmakeprojectmanager/tealeafreader.h
	src/plugins/projectexplorer/miniprojecttargetselector.cpp

Change-Id: I88d85be3903f57a55fddb7901e771a4822db1b85
2020-03-04 08:15:50 +01:00
Assam Boudjelthia
3f61e9a391 Android: Allow adding custom NDKs and auto detect their toolchains
This adds the option for the user to add a custom NDK out of the
predefined list installed from SDK manager. Once an NDK is added and
settings saved, both the toolchains and debuggers will be detected
automatically. The user then can create a custom kit with those added
toolchains and debuggers.

Task-number: QTCREATORBUG-23286
Change-Id: I46200accca6fc956b73f211213bfe2a495093934
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-28 19:19:12 +00:00
Assam Boudjelthia
a75cb04442 Android: keep the debuggers list updated with auto detected toolchains
Current autoDetected Android debuggers list is never cleaned, if one
sets up many NDKs it could get really big and messy. This change tries
to keep it clean from old or duplicate entries, as well as keep it
chained to the autodection mechanism of Android toolchains and kits.

Relies on 291807 to allow autoDection for kits, toolchains, debuggers
to work out-of-box.

Change-Id: I320a021f0435d80fd3d56c060caa316def533afa
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-28 12:39:48 +00:00
hjk
3f68292dbe ProjectExplorer: Introduce ToolChainKitAspect::{c,cxx}ToolChain
Special accessors to the repeatedly used C and C++ cases to denoise
and slim down user code.  Plus some code cosmetics nearby.

Change-Id: Iba4662bd4731d8c4256e658529f39d5c995691ce
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-19 15:59:12 +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
Assam Boudjelthia
f46099d21e Android: Automatically download SDK tools and essential packages
Automatically download Android SDK Tools to default path
used by Android Studio, then essential packages will be installed
using the sdkmanager tool. Automatic installation can also be
triggered by an added button in the settings page.

Essentials packages include NDK Bundle and other NDK versions
required by previous Qt versions.

An sdk_definitions.json file holds download paths for SDK Tools,
and other (Qt version <-> essential packages) combinations.

[ChangeLog][Android] Automatically download SDK Tools, NDKs and
all essential packages for Android builds.

Task-number: QTCREATORBUG-23285
Change-Id: I90e7aafecd017d2bdc959e403711d9d440a6bbb2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-07 18:21:30 +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
Alessandro Portale
b7acfc37b5 Android: Remove "qtlive" support
Productization of Qt Live preview for Android didn't happen.

Change-Id: Ie69d8193afec9b59d859bc65c45d36028247e2b9
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2019-12-18 05:46:53 +00:00
Eike Ziller
15b2765dff Update Qt validity in options when changing Android device settings
When changing the Android device settings and pressing "Apply", the
information in the "Qt Versions" tab is no longer correct.

The Abi information is parsed from the mkspec, and that depends on the
NDK setting in the environment.
When the NDK in the device settings changes, it updates the toolchains,
and that triggers a re-validation of the Qt info in
QtOptionsPageWidget::validInformation, but since the Android Qt version
already has tried parsing the mkspec, and got (possibly empty) Abi
information, it never is parsed and updated again.

We need a way to force BaseQtVersion to update these things again.

Fixes: QTCREATORBUG-23095
Change-Id: I9cb55ad1a73db942804637344e4c856c7e95afd3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-11-20 11:28:47 +00:00
Christian Stenger
358574f44d Android: Fix compile for gcc 5.3
Change-Id: Ic70d6507babeb4b782ace7fb62c37485335311e1
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-09-17 05:28:31 +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
8b72e92167 Utils: Add CommandLine convenience constructors
... taking a QString for the executable.

This weakens the very explicit QString -> FileName conversion via the
named constructors for the special case of constructing a CommandLine.

I think that's worthwhile here, as it reduces the noise on the caller
site under circumstance where the nature of the thing is obvious.

Change-Id: I27b4a73639728893d053b2e7ba65cb745f0ffe83
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-23 15:51:45 +00:00
hjk
3c92742605 Android: Rename ANDROID_TOOLCHAIN_ID to ANDROID_TOOLCHAIN_TYPEID
That's what it is, and it's the only odd one out currently.

Change-Id: If098e2691b9f88fbd5f516cf869e390f43b9ddfa
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-06-14 09:42:09 +00:00
Alessandro Portale
a38c3ac08e Remove ToolChain::suggestedDebugger()
And inline it in AndroidConfigurations, which is the only place that
made use of suggestedDebugger()

Change-Id: I87f135b5d115adb7e46b0f009c5853221e9a3daa
Reviewed-by: hjk <hjk@qt.io>
2019-06-12 12:54:43 +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
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
2ac89cba92 ProjectExplorer: Use an alias for QList<Abi>
Change-Id: I69231c5974620ae30296bfc4e0ab41c900d95a3c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-27 09:35:53 +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
hjk
0e4df97f90 Some more FileName::appendPath -> pathAppended() changes
Change-Id: Ia05b54f157b08353d5a9efccee48dfc212d3a489
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-15 13:19:58 +00:00
hjk
d1f9e466da Utils: Introduce a non-mutating FileName::pathAppended
... and start using it. The plan is to replace all appendPath() uses.

Change-Id: I555bcfa742b99b0951b98b0c0e707422c348fadb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-15 11:45:24 +00:00
BogDan Vatra
dd9086530f Android: Nuke mips[64] support
There is no mips[64] support in Android anymore.

Change-Id: Ia7829e06c8e5658fb6ee9d20ea34d621a9651f37
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-05-07 15:08:03 +00:00
BogDan Vatra
57c48630a8 Android: Add proper QBS support
Now we can use QtCreator to build, deploy, run & debug QBS projects.

[ChangeLog][Android][QBS] Add Android support for QBS projects.

Fixes: QTCREATORBUG-15573
Fixes: QTCREATORBUG-19880
Fixes: QTCREATORBUG-22182
Change-Id: I08b153a44dcf7ca178689c1c30fa2201c4cc0dbb
Reviewed-by: hjk <hjk@qt.io>
2019-04-26 06:37:00 +00:00
Christian Kandeler
d6dfa7fa77 ProjectExplorer: More registerKit() simplifications
Change-Id: I61c9e9886f3952b2823433a5c94aedd441ebe7f1
Reviewed-by: hjk <hjk@qt.io>
2019-03-12 14:44:37 +00:00
hjk
f1eac5f30a Android: Simplify Kit creation logic a bit
Instead of creating and destroying in some cases only create the ones
that will be used.

Change-Id: I5c3200101ec21b4a4cf1e3c6e91bf94153278b5c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-12 14:44:28 +00:00
Christian Kandeler
3aea3a13cb ProjectExplorer: Refactor KitManager::registerKit()
The interface of this function was rather unfortunate. In particluar,
the fact that it took ownership of the std::unique_ptr that was passed
in required some weird boiler plate code at all the calling sites.
Instead, it now becomes a proper factory function.

Change-Id: Iecdc6f6345232fc0f0a08bffaf8f1780edb57201
Reviewed-by: hjk <hjk@qt.io>
2019-03-12 10:16:33 +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
hjk
da4d395ff4 Android: Cosmetics for AndroidDevice interface
Change-Id: I291f51a3baeb3768428485c63914627c0d91037b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-17 16:27:59 +00:00
Eike Ziller
8d19b306ed Android: Detect clang and gdb from older NDK
Get some minimal compatibility with the older NDK that is used for
Qt < 5.12 back.
This detects clang-3.6 and gdb from NDK 10e.
For building, the android-g++ mkspec continues to be used for Qt < 5.12
(it uses Qt's default mkspec, regardless of toolchain in the kit,
because the toolchain reports to support both).

Task-number: QTCREATORBUG-21595
Change-Id: I3487c38093f43ccae2418fb28807a50fbda101a8
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-11-29 14:28:59 +00:00
Ivan Donchevskii
e164717108 Android: Fix clang executable suffix on Windows
Change-Id: I78e8e49efd52d33f9f26f554a3400fabbe74d9ed
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-11-16 12:07:51 +00:00
Vikas Pachdha
de97b8cf3e Android: Auto detect clang toolchains
Remove GCC auto detection
Make Clang toochain default for Android
Remove auto detected toolchains from old NDK

Task-number: QTCREATORBUG-11846
Change-Id: I618e6f8eda4f24f498260b8de778ef543311acd1
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-11-02 15:10:50 +00: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