Commit Graph

1898 Commits

Author SHA1 Message Date
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
Assam Boudjelthia
94a9528156 Android: deduce the NDK path of saved toolchains from compilerCommand()
The change 290840, made AndroidToolchain tied to an NDK location, but
when restoring a toolchain the NDK wasn't being assigned. This deduces
the NDK location from the toolchain compilerCommand().

Change-Id: I3cd936ac48570fadbec15ac1e13496706718c0ea
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-28 11:42:43 +00:00
Assam Boudjelthia
351f39fb3b Android: fix sdkmanager duplicating packages list
It seems that forcing sdkmanager reloadPackages is causing a duplication
in all packages and ndk listings.

Change-Id: I7e92d1c6dcec2a09db088d9596aca31a3d8b437f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-28 11:42:28 +00:00
hjk
a84e626b67 ProjectExplorer: De-QObject-ify ToolChainFactory
As collateral damage, use a capital C in  KeilToolchain*.

Change-Id: If9d64de2108366546683144975d975d9d1727712
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-27 13:58:24 +00:00
Eike Ziller
0585ad0f64 Merge remote-tracking branch 'origin/4.12'
Change-Id: I4523ea36332772a310fd462df55683c93c61bb18
2020-02-27 09:41:05 +01:00
Assam Boudjelthia
c3c5708741 Android: make sure old autodected toolchains are marked as autoDetected
Some toolchains that were auto detected in previous sessions or version
of Creator might re-appear as manual toolchains. Thus, make sure that's
fixed. Also, make sure the name of old toolchains is updated with the
current name format.

Change-Id: I04d2145cb9c5e1e25e2bcbc21c014280bc355195
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-26 11:59:01 +00:00
Eike Ziller
61dc14b67f Merge remote-tracking branch 'origin/4.12'
Change-Id: I3e7049da2c3da6f784e3cb3407c22ada556e5d24
2020-02-26 08:35:05 +01:00
Ville Voutilainen
82dab12acd Android: make icon removal actually work
Also adjusts icon preview sizes and adds a master icon from which
the other icons are generated.

Task-number: QTCREATORBUG-23283
Change-Id: I21c3d11f9b5d4d815dc6d9ad7c2363b67767d03a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-25 20:07:54 +00:00
hjk
5c9141241b Android: Inline AndroidManager::intentName into only user
Using Target is actually not optimal as handle to access that
information (BuildSystem + BuildKey or sth to that effect would
be better), so reduce the visibility of this kind of interface.

Change-Id: I138f156b51795d51d2af49c5119d160663dfc20d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-24 12:56:41 +00:00
Tobias Hunger
144ee4103f android: Do not crash when node is nullptr in CreateAndroidManifectWizard
Change-Id: I1988fa72be535210e50d9ed18ef9d081e6ae39ed
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-02-24 10:47:43 +00:00
Tobias Hunger
2e59ef8c1c Android: Consistently allow Qt version to be nullptr
Do not crash when Qt version is nullptr. This was checked for in
some places, but not in others. Not sure whether or not it is safe
to assume that Qt version is never a nullptr here, so I went for
the better-safe-than-sorry option.

Change-Id: Ief9a479ee5719204582902bfa72412145658f0c2
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-02-24 10:47:28 +00:00
hjk
b6cd57b4f9 Android: De-Q_OBJECT-ify AndroidPackageInstallationStep
Change-Id: I49a839405c8b3b61a29c79bf13620a2e98cdca2e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-21 13:14:19 +00:00
hjk
f0fcc4e5c5 Android: Use timer for delayed execution
Reduce need for moc.

Change-Id: Ibbd85de60e891ca57738e44ad25e05e86ccb0c24
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-21 13:14:05 +00:00
Assam Boudjelthia
37ff19c002 Android: update UI after downloadSdk() is done
Make sure the UI ticks are updated directly after SDK Tools package
is downloaded.

Change-Id: If1d94c624dcbc5be14246f61b197d849438d19e5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-20 17:55:53 +00:00
Assam Boudjelthia
2191bcea36 Android: avoid calling m_sdkManager->reloadPackages() twice
AndroidSettingsWidget::onSdkPathChanged() is being called then
m_sdkManager->reloadPackages(true) after it at start, that's not
necessary.

Change-Id: I6171e8a5fb765fa26aecb505ca50231c3e609b74
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-20 17:55:32 +00:00
Assam Boudjelthia
ad927dac85 Android: call cancel() instead of hide() in sdk download progressdialog
The proper use is to call cancel(), the dialog will be hiden after that.
Otherwise, it will not be cancel  and can get visible again.

Change-Id: Ifb2a00721571ce2bc8ded7c96e6b69e587020b34
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-20 17:55:05 +00:00
Assam Boudjelthia
b9b2145396 Android: parse Android 11 (R) packages
Allow parsing packages of the latest Android 11 (R) with API level 30.

Change-Id: Ia50d2ff23395b79828d47a8f9aeb3880aa131d83
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-20 15:00:13 +00:00
Assam Boudjelthia
1f4028d834 Android: remove repeated call to AndroidConfig::connectedDevices()
This causes a delay when clicking the deploy button for an Android
project. Also, it is a repeated call as this will be called inside
AndroidDeviceDialog::device() then refreshDeviceList().

Change-Id: I9203e746e4e9b3e5bfa42133d9a5246863c87e5a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-20 14:22:59 +00:00
hjk
04f933fd67 Android: Inline aabPath computation
Mainly to avoid an explicit use of BuildStep::buildConfiguration()

Change-Id: I96f1403d0aa2b9f5bcde06e994809466700b1357
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-20 09:47:39 +00:00
Assam Boudjelthia
0a8d675c66 Android: fix Android options page blocking behavior
The change 286266 was causing an unwanted modal dialog upon entering
Options > Devices page, this fixes that.
Also, this fixes the synchronous SDK and AVD list reloading that was
causing some hang time upon opening Devices page.

Fixes: QTCREATORBUG-23581
Change-Id: I1a55aaadb873c77612aced1c687cc5a0ded3441d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-20 08:40:38 +00:00
hjk
3fe1911d46 ProjectExplorer: Introduce some BuildStep convenience accessors
... and use in ProcessStep and related classes.

Change-Id: Ie6f1403d0aa2b9f5bcde06e994809466700b1357
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-19 16:11:05 +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
Eike Ziller
edc3eccd12 Merge remote-tracking branch 'origin/master' into 4.12
Change-Id: I20de58817658e2c715ce550761976ae67b3bef4d
2020-02-19 07:37:41 +01:00
hjk
644f1e4faa Android: Un-export CreateAndroidManifestWizard
Not needed outside.

Change-Id: I390802c73d3d8c2a3fa95bc24e944913cea49393
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-02-18 11:58:09 +00:00
hjk
b18fceb15d Android: Pass BuildSystem to CreateAndroidManifectWizard
Instead of a Target and hoping that its activeBuildystem is the
right one.

Change-Id: Ieb384d89e8f580b24205ce46a38f151aa72e2f6e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-18 11:56:23 +00:00
hjk
7ba45c66ff Android: Remove one more buildTargetSdk() finding roundtrip
... and avoid the implicit used of Target::activeBuildConfiguration()
there,

Change-Id: I08ec72be601ef7b854b5aec5784b0636c738faa4
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-18 11:19:56 +00:00
hjk
4bd316ab62 Android: Access buildTargetSdk directly when possible
Change-Id: I1f9996919d982f8e54c595abaa44ed0e10a79422
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-18 11:14: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
Alessandro Portale
4960b2ac2a Android: Use FilePath::fromUserInput for user input
... or when reading non-Qt config files. FilePath::fromString would make
FilePath keep native dir delimiters, which would cause wrong negatives
for example in FilePath::isChildOf().

This change here fixes that AndroidToolChain:::isValid incorrectly
returned true.

Change-Id: I28b321fe3c4064f61b78dc7fc36b8af3d18b806c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-02-17 13:29:58 +00:00
Assam Boudjelthia
38cae133bd Android: don't parse sdkmanager AvailableUpdatesMarker
We don't have logic to parse that part and it's not
even needed, because if an update is available the package
will be listed in "available packages" section. This is now
throwing errors and it's not needed.

Change-Id: I3bb65694fbef9218e5a294d9dbfd9e3f1f4c8333
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-13 16:37:35 +00:00
hjk
afd8bc2c9e De-Q_OBJECT-ify various IEditorFactory derived classes
Change-Id: I1470b06d4e10073bb6e4f7ae735f9829fab3bb7b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-13 12:38:35 +00:00
Eike Ziller
c3911002fd Merge remote-tracking branch 'origin/master' into 4.12
Change-Id: I60aa7c97c13144d3c31989244517c21a72202ab9
2020-02-13 09:10:52 +01:00
hjk
299d34d547 Remove apparently unneeded QtPlugin includes
Change-Id: I511c0318a72dbf2a92e4749dee02eabfc9826139
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-12 16:03:37 +00:00
Christian Stenger
6a23f644dc Android: Fix qbs build
Amends f46099d21e.

Change-Id: Idf5405a6cd571eedb0932dbba2c981f63ab59ae3
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-02-12 07:54:59 +00:00
Assam Boudjelthia
e50c744710 Android: use QDir::mkPath() instead of QDir::mkdir() in SdkDownloader
Allow creating nested dirs path.


Change-Id: I38106c148b177e5af06a59dd624ee74e2db1df40
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-11 14:30:35 +00:00
Assam Boudjelthia
9645906ae2 Android: don't show Android info bar if Android version is installed
If no Qt for Android version is installed don't show the config info
bar.

Fixes: QTCREATORBUG-23580
Change-Id: I880594701cdd6d5c0fc0586b5e49cc6a66efedb7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-11 12:51:26 +00:00
Assam Boudjelthia
2555f4b8dd Android: Fix UNINIT_CTOR and PASS_BY_VALUE issues
Change-Id: Ie77e69226769d9ea0440611f2f5985c5ec08beaa
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-11 08:52:48 +00:00
hjk
919571e955 Android: Avoid one use of Target::activeBuildConfiguration
A build step knows where it belongs to.

Change-Id: I990cf1fb7f22b608a2f317a05b05f1219649aa6e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-10 15:57:34 +00:00
hjk
9c934ed44c TextEditor: De-QObject-ify TextEditorActionHandler
Change-Id: I8c4919b89ce35d421edd4a21a650d5e0df4a7ead
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-02-10 13:54:39 +00:00
hjk
fcafb8b482 Android: Fix Manager
Change-Id: I5ca3cda3bd64a1b4570a330f98b4b2d18b831efa
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-02-10 08:50:37 +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
hjk
a44bfdd779 Provide an empty default IPlugin::extensionsInitialized()
And remove all empy re-implementations.

Change-Id: I19f0b4e55c042c96693ecb89766f97f0a97b54ae
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-07 10:21:34 +00:00
hjk
d7ae3b79f8 Core: Make IEditorFactory::createEditor use a function object
Also, replace or remove unneeded Q_OBJECTs, and make base
setters and adders protected.

Change-Id: I212257ef53984d8852dc8c478537199fc9483486
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-05 11:41:29 +00:00
The Qt Project
183048b587 Merge "Merge remote-tracking branch 'origin/4.11'" 2020-02-05 11:00:37 +00:00
Eike Ziller
5c121d5791 Merge remote-tracking branch 'origin/4.11'
Conflicts:
	src/plugins/genericprojectmanager/genericproject.cpp

Change-Id: Ib54f1645ec70a9e6460a888a13190ede130bccca
2020-02-05 11:59:35 +01:00
Igor Sidorov
a9e40ad14c Add final specifies to classes
Warning -Wfinal-dtor-non-final-class in clang trunk

Change-Id: I2bf17064bf8898eab10b82b69583a283157766d0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-05 09:33:55 +00:00
Ville Voutilainen
0f3f85278d Android: make the manifest editor's icon selector's layout more compact
Change-Id: I89c6aba9ebffd02521f0c849f5dcad40245ce5db
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-01-30 08:14:43 +00:00
Ville Voutilainen
c4113381ee Android: make manifest editor icon buttons more self-evident
Task-number: QTCREATORBUG-23283
Change-Id: I727a0c808c2ce5a50b696889ac973692a03422be
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-01-29 08:01:45 +00:00
hjk
d08c0f31c4 De-Q_OBJECT-ify most DeviceFactories
WinRt is the odd one out.

Some were using setObjectName, but only used for debug reasons,
not really needed.

Change-Id: I4a370e4694443bc1c455fda4337ef3acfb9259b8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-01-23 13:32:12 +00:00
Christian Stenger
4979b5286e Android: Fix compile for gcc 5.3
Change-Id: I535b5873390910ca2a9963c70ed2912820c1df0e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-21 06:36:55 +00:00