Commit Graph

433 Commits

Author SHA1 Message Date
Eike Ziller
1283b15117 Merge remote-tracking branch 'origin/4.14'
Conflicts:
	doc/qtdesignstudio/examples/loginui1/qtquickcontrols2.conf
	doc/qtdesignstudio/examples/loginui2/qtquickcontrols2.conf
	doc/qtdesignstudio/examples/loginui3/qtquickcontrols2.conf
	doc/qtdesignstudio/examples/loginui4/qtquickcontrols2.conf
	share/qtcreator/debugger/dumper.py
	share/qtcreator/debugger/qttypes.py

Change-Id: Id44a67cdeeb0889ff96eddcdf409d20ca7cbdd0b
2020-12-10 13:02:02 +01:00
Assam Boudjelthia
ee199c3fed Android: setSticky behavior to follow other platform's kits
Don't set the whole kit's values to sticky, instead set only
device, toolchain, qt version properties to sticky to follow
the behavior of other platform's kits.

This also allow users to set specific CMake version for the kits
in case the selected one is not correct, since Android plugin doensn't
handle that anyway.

Fixes: QTCREATORBUG-25042
Change-Id: Ia6f6474b5ad9132e841e6e7024113439649b61f1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-12-09 07:38:30 +00:00
Christian Kandeler
9cbcbfff33 Fix various clang warnings
Unused variables & functions, unneeded copies in range-for loops,
missing overrides.

Change-Id: I27b60e7c92a6ca425a84c89b537d5c3815449a94
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-12-08 15:39:20 +00:00
Assam Boudjelthia
ec68b4e96c Android: fix SDK path on macOS
Change-Id: I369cf218eb2fd42ede04a6cb6b638d6fa6282994
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-12-07 11:51:40 +00:00
Alessandro Portale
b2a766a79a Don't access static functions/fields via instance
Courtesy of readability-static-accessed-through-instance

Change-Id: I71f54244f1e091315dac2943d9e1bfad6efa56a9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-11-19 08:42:14 +00:00
Alessandro Portale
323f353c6c Android: Replace AVD partition-size spinbox with emulator args input
The android emulator supports many more command-line startup options
than "-partition-size". Let's allow the user to take advantage of the
full functionalty, by providing a free-text input field for the options.

A link to the online documentation is also provided.

As a side-effect, the issue that an overridden parition size can cause
the "Cold Boot: different AVD configuration" warning is solved by not
having -partition-size by default.

Task-number: QTCREATORBUG-24735
Change-Id: I41d7b826133708c7ff447c1e257f62368745dea1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-10-07 11:25:28 +00:00
Eike Ziller
3f42c989ee Fix Qt 6 build of ProjectExplorer and targets & build systems
QStringRef is gone.
qsizetype vs int.
QMultiHash::insertMulti is gone.
QXmlStreamWriter writes UTF-8 by default.

Task-number: QTCREATORBUG-24098
Change-Id: Id217e40a1f17993a84fc725976e9cb84618b0580
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-21 11:31:54 +00:00
Alessandro Portale
a159af342e Android: Remove unused functions
As found by Cppcheck

Change-Id: I9274fe45ed49099b52b4f8556508ec0adc676386
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-09-15 08:56:55 +00:00
Alessandro Portale
b6e4c9e133 Android: Remove some unused functions
Change-Id: I5c6549ed931b5132898abd6ce519560851838e65
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-09-10 11:38:50 +00:00
Eike Ziller
3944162039 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/cmakeprojectmanager/cmakebuildstep.cpp
	src/plugins/cmakeprojectmanager/cmakebuildstep.h
	tests/auto/debugger/tst_namedemangler.cpp
	tests/auto/qml/codemodel/check/tst_check.cpp

Change-Id: Iefd5f71c03c0078513b76a92af764a4fb22ee4c2
2020-08-10 15:56:54 +02:00
Alessandro Portale
7b6d44a90a Android: Introduce constants for Android ABIs
Avoiding string duplication prevents typo-related runtime errors and
allows an IDE to use find symbol rather than plain text search.

Change-Id: I7fba7c7c5cf90c0b371efce3b575537b2708dd0f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-07-26 05:49:49 +00:00
Assam Boudjelthia
aee2094c33 Android: fix jdk path retreival on linux
Change-Id: I4303b5f5636dce0096ae73ef6229a579b7fee202
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-22 08:35:47 +00:00
Alessandro Portale
26f3157262 Android: Fix that Android Studio's jdk does not get detected (Windows)
If all jdk detection methods on Windows remain unsuccessful, let's try
to find an installation of Android Studio via the registry and use the
"jre" folder (which is actually a jdk) from there.

Change-Id: Ie4d7a4c5cc56f0b4675c86e436c3f1007994633c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-07-21 13:51:26 +00:00
hjk
43b658e9e7 Utils: Drop Utils::SkipEmptyParts again
We require Qt 5.14 nowadays.

Change-Id: Iff245257d3cb19207007c0445ee13814e66152dd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-21 12:42:27 +00:00
hjk
babc1006f2 Various Qt6 porting
Rename QHashSeedType to QHashValueType and use it also for return
values.

Use qHashMulti directly instead of continuing using temporary QPairs.
Avoids ugly namespace tricks to find the new pair overloads, and is
actually clearer.

Classes used in signals cannot be forward-declared.  ...

Change-Id: I22450a0c642437a43f876e8e89cc8788fff3db61
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-16 09:45:43 +00:00
Christian Stenger
39bd05c159 Android: Fix compile
Amends 3f655815be.

Change-Id: I19cd488322f50b0319ca18c094598f0bce4fcb45
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-07-08 09:11:53 +00:00
Assam Boudjelthia
3f655815be Android: keep manual Qt version names in the autodected kit name
With in 19154bf0e7, When having
an offial Qt for Android and a manual Qt for Android with the name
version, the kit will have the same name, avoid that
by keeping the exact name of the manual versions.

Change-Id: I280a286f99cbc17185a5309c8825381e03ea7ff6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-08 08:28:14 +00:00
hjk
e1c88116b3 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
(cherry picked from commit 430a33dcd9)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-06 11:15:18 +00:00
Assam Boudjelthia
e3e0dd6c4d Android: pass sdkMaanger to allEssentialsInstalled() to keep sync
Change-Id: Ibe8385140c0d64394941b215324b70138d6f0cdf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-03 08:14:14 +00:00
Assam Boudjelthia
0cfb9e2bce Android: remove old android tool
Follows af7c218d95, the old android
tool is not useful anymore.

Change-Id: I126ecc24622f2e90465440c86b84cdfb30c103e1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-01 13:24:38 +00:00
Eike Ziller
5a97e8ceb9 Merge remote-tracking branch 'origin/4.13'
Conflicts:
	src/plugins/android/androidsettingswidget.cpp

Change-Id: Iadf1d58a1e867ae7bb2dca55d3951613cfcc3d07
2020-07-01 09:01:26 +02:00
Assam Boudjelthia
34963768c0 Android: move non UI functions from settingsWidget class
Change-Id: I2d6c6806fc8b219b65d241a0243ee1edab5125a1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-29 08:13:27 +00:00
Assam Boudjelthia
b410def067 Android: fix some issues with jdk path detection
* There were two functions to detect jdk path, unified them.
* First try to find jdk 1.8, if not found, look for newer versions.
SDK Tools version 26.x needs jdk 1.8 however, the new cmdline-tools
can work with the newest jdk, so the UI will warn the user if the
selected jdk cannot run sdkmanager potentially because of the jdk
version.

Change-Id: Iee2c378598c26e8a9a8245262110ac20322a2d2b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-26 09:52:17 +00:00
Assam Boudjelthia
ef9f57b5cb Android: remove unused function
Change-Id: I9c267c9dd979ae02070b08d5d95099846749eb2f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-26 09:11:52 +00:00
Assam Boudjelthia
af7c218d95 Android: remove native sdk and avd manager buttons
The native SDK and AVD manager buttons are no longer useful, since the
original, visual Java-basd tool for managing SDK and AVDs were removed
from Google's offering. The replacement is a set of command line tools
and a visual tool within Android Studio, which can not directly be
launched from Qt Creator.

Qt Creator has it's UI on top of the command line tools.

Change-Id: If660d7f566c173f46d9b2a97c9204746d33270e6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-26 07:15:07 +00:00
hjk
1c81a3b3e8 All: Use Utils::SkipEmptyParts
Task-number: QTCREATORBUG-24098
Change-Id: Iab45de9a9c17ddc39a0e343b1175d4f6cb94b098
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-17 05:55:25 +00:00
Christian Kandeler
0d60ee3906 Fix clang warnings about unwanted copies in range loops
Change-Id: I11ae3317fd251a463809ee48917d2daf0f8b43d1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-04 07:16:57 +00:00
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