Commit Graph

188 Commits

Author SHA1 Message Date
Jarek Kobus
eaba657d90 Fix warnings about possible detach of temporary objects
Calling first() or last() on temporary container may
unnecessarily detach the container. Fix it by calling
constFirst() and constLast().

Change-Id: I2460efd5dbee1534eec8a514d9bff2a947bfddf9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-16 22:11:46 +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
Robert Loehning
a53cd311e5 Android: Remove trailing white spaces from translated strings
Change-Id: Ie88b3bcd8f5e5c04bcd639924c278871245fad70
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-08-11 11:38:02 +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
Assam Boudjelthia
88be337b0d Android: change openssl error dialog Ok to Cancel
Change-Id: Ib2be438e330c969a2ddb46db35c8f11e5cf94e9e
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-28 09:43:55 +00:00
Alessandro Portale
e0915b7eff Android: Fix rendering of settings background in dark mode
This amends faad83d5a3 by undoing the
insertion of a QScrollArea + QWidget under the whole form. The reason
for adding this was to be able to scroll down to the license agreements.

Since Core::SettingsDialog already puts the settings widget into a
QScrollArea, we have two of those and one is superfluous. When using a
dark theme (e.g. flat-dark), this extra QScrollArea introduces wrong
background color. Also, it complicates the already quite blown
androidsettingswidget.ui

This change removes the QSrollArea + QWidget while keeping the feature
of scrolling to the license text. This is achieved by searching through
the parent chain for a QScrollArea and using the first found one for
scrolling.

Task-number: QTCREATORBUG-24379
Change-Id: I2bdae9367eb06b68fa47badf2556eb1ec7ebcafb
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-07-23 10:28:48 +00:00
Alessandro Portale
8a8453e55d Android: Set more columns in AVD table to ResizeToContents
Give the columns with potentailly more content some space.

Change-Id: I4c213f97df077801e3b11ef09519973a61c58c4f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-07-23 09:04:27 +00:00
Assam Boudjelthia
ee1b8c2f16 Android: move tooltip from ui to widget class and shorten long phrases
Change-Id: I15bd9f54e7d4dbc3fae62b331172d6bc8e74e7ad
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-23 09:00:54 +00:00
Assam Boudjelthia
35ead659c7 Android: fix settings widget palelette in dark mode
Change-Id: I2ef4f0d510bbbe732c790134b39a9ea5cb0af2fc
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-22 11:18:19 +00:00
Alessandro Portale
4d94f959f8 Android: Fix initial validating with clean settings and default paths
Relying on the PathChooser::rawPathChanged handlers to initially
validate default paths with clean settings does not work (I think)
because of a mix of interdependent (via m_androidConfig) synchronous
and asynchronous validations.

Let's assign the initial values for jdk, sdk and openssl also to
m_androidConfig, so that everything works on the first run.

Task-number: QTCREATORBUG-24372
Change-Id: Id6945d7bf81949a1f90cd20f9b3bd4e14a5bbe07
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-07-22 08:29:11 +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
Assam Boudjelthia
c05755a2e1 Android: set summary widget ticks to false by default
To avoid any false positives.

Change-Id: I30a0056975d99a85230b83df44dd119a9f1dabcd
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-03 08:15:30 +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
Alessandro Portale
a6313a1d6b Android: Reduce vertical spacings in the SummaryWidget
Less margins, less spacings. More space.

Change-Id: Ida15baa5ba2579332d4f67edcf0c785719cbad8d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-07-02 11:20:48 +00:00
Leena Miettinen
ec05ab94fd Android: Fix UI text capitalization and punctuation
Change-Id: I5fd24f164d45fea6e666e0e95f82273d2f91f934
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-07-01 15:05:13 +00:00
Assam Boudjelthia
67634d0d46 Android: disable controls when sdkmanager is running a task
Change-Id: Ib8220fa3510a186d69e17ae46a23c5b40f1de76b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-01 15:02:42 +00:00
Assam Boudjelthia
097c9ed484 Android: remove unnecessary validateNDK function and ticks
The NDK is installed via sdkmanager anyways, and custom NDK paths are
verified upon choosing in the file dialog and rejected if not valid.

Change-Id: I18f876dfacdbc1045679c6b082a500527a933673
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-30 10:05:55 +00:00
Assam Boudjelthia
518e7970bf Android: remove "Bundle" from ndk name
Change-Id: I5368d77cfe3e94560fb897bfd0213fc3dec74d55
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-30 09:38:37 +00: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
c90d1c61ce Android: recommend AdoptOpenJDK in settings UI and docs
Show JDK downlaod button on Linux and point it to OpenJDK becuse
it's the most used on Linux. Otherwise, recommend AdoptOpenJDK because
it works on all platforms and easy to install as well.

Change-Id: I94fd61262fe759b96db59a9e2abfbd063f6795f0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-06-26 20:06:32 +00:00
Alessandro Portale
97ac63b401 Android, McuSupport: Change "download" icons to "online"
The download icon might suggest that clicking that button causes an
automated download/installation. Since we have similar automation in the
Android settings, that could be misleading.

Change-Id: Ia1e4f1cfe15f79daf090546ee7c991f93b23fd13
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-06-26 11:18:40 +00:00
Assam Boudjelthia
5c5c505910 Android: validate jdk path at start and reload sdkmanager after that
* Validate Jdk path at the start to avoid showing valide settings on
empty path.
* Reload sdkmanager after jdk path is changed to reflect changes.

Change-Id: Ib5eafead9d4f695cf79c55b79866bd3269dadbd5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-26 09:52:28 +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
03f6517a6a Android: use text button for openssl download instead of icon only
Change-Id: I37dd0076c9dad78f8e40921facfec62a7363c27c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-06-26 08:38:54 +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
Alessandro Portale
b5ffff28ce Android: Make OpenSSL clone progress dialog application-modal
We need to hold the user off from doing funky stuff while cloning, like
for example from pressing the clone button multiple times in a row.

Change-Id: Ib20218e0b0fa28852412da2b71ec5ba410d682e8
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-06-25 11:11:04 +00:00
Alessandro Portale
143ff3e126 Android: Trigger PathChooser validation after OpenSSL cloning
In case the path was non-existent before the cloning, it should not be
"red" anymore after cloning.

Change-Id: If33cfbd07710e317505a9fe1e4b3b9f19a10d5db
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-06-25 11:10:08 +00:00
Assam Boudjelthia
998c07dcbe Android: handle more potential fails for when cloning
Fixes: QTCREATORBUG-24200
Change-Id: I3f54f0610a70654c3711e7dc3bfd5f22863b2cd2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-25 11:09:36 +00:00
Assam Boudjelthia
a927c320f7 Android: fix sdkmanager detached from AndroidSettingsWidget
This was caused by 7419e09d0f.

Change-Id: I423047d353698798c712f9a32603e955ae1ee15c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-06-22 14:12:17 +00:00
Eike Ziller
8b8ecfa28f Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/cmakeprojectmanager/fileapiparser.cpp

Change-Id: I39f8c2be859be043f506bef77de9bb5b42d38165
2020-06-15 11:30:34 +02:00
Assam Boudjelthia
759b38e2ac Android: don't delete the openssl dir when cloning
Avoid removing the openssl dir if the selected path already exist
and is not empty, rather just recommend selecting a different path
or empty the provided one.

Fixes: QTCREATORBUG-24173
Change-Id: I1e501b361d4917a59a5720146b11580e79ac32aa
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-06-15 07:58:23 +00:00
hjk
4c2e76385c Android: Settings widget code shuffling and cosmetics
Avoid a few casts, consts, #include

Change-Id: I803d0b728ce6f7502893d07679f638c2504629e3
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-05-20 11:24:22 +00:00
hjk
7419e09d0f Android: Settings widget code cosmetics
unnecessary indirections, const, namespaces, ...

Change-Id: I7955a81eafdce3fbb14646a57ce8436b00045278
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-05-20 10:03:24 +00:00
hjk
1b3920452a Android: Use Utils::ListModel for AvdModel
Change-Id: Iebbe137658288e60954bc63a97ddda948736fb09
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-05-20 07:52:36 +00:00
hjk
3a8bedf60b Android: Fix AvdModel::indexForAvdName
This was using serialNumber instead of avdname, whereas the
reverse function avdName() actually used avdname.

Change-Id: Ieb91f97323f2adcf9306c90c91b145e494f177c0
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-05-20 07:52:28 +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
BogDan Vatra
fdb0cf0f6b Update openSslPath when we change the android sdk path
Change-Id: I39bd02d4f5bba8d03d4606b0de89b50778c7aa01
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-04-17 13:04:38 +00:00
Eike Ziller
602d690bab Merge remote-tracking branch 'origin/4.12'
Change-Id: Ie35e9959693b6f6f78509eea5b259d6493ef87f2
2020-04-17 08:09:55 +02:00
Assam Boudjelthia
2d4a2d19ae Android: fix potentiallyy big clone of android_openssl with --depth=1
Change-Id: I839221ee7a3fe8c1dec90d010ecbb492517fcba1
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-04-15 08:18:09 +00:00
hjk
e86a2bfdd2 Android: Simplify some PathChooser accesses
Change-Id: I270e7f662a2c148252e1b70166a784af8d0e0933
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-04-14 07:02:07 +00:00
hjk
68c539bb9d Utils: Replace FileChooser::path() by filePath().toString()
Keep the old method for now to ease downstream porting.

The change is kept mechanical, there's a lot of cleanup possible now
on the user code side.

Change-Id: I936baedd45b7ba057f1c789a1bec896886f48eff
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-04-09 17:45:06 +00:00
hjk
79b680e7f0 Utils: Rename PathChooser::{f,setF}ileName() to {f,setF}ilePath()
It's returning a FilePath, so it's a better fit.

Keep the old versions as inline function now to ease downstream migration.

Change-Id: I535887928018f42b92895c8b0c82527f0d55e5ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-04-09 17:30:23 +00:00
Assam Boudjelthia
8009962584 Android: remove automatic sdk setup ambiguity
Use label text instead of icon for Auto SDK download button.

Fixes: QTCREATORBUG-23774
Change-Id: I5f10bafb0cdf88210f7121504778885291169e07
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-04-02 09:12:32 +00:00
Eike Ziller
9a149e295b Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/tools/qml2puppet/CMakeLists.txt

Change-Id: Id6243b0f725a68075d789bf35e771113b742645b
2020-03-30 17:27:55 +02:00
Oliver Wolff
faad83d5a3 Android: Make sure that to be accepted licenses are visible to the user
If Qt Creator is not run in fullscreen or the user's resolution is too
small it is possible, that the licenses which have to be accepted are not
visible when the according message box is shown.

In these cases we scroll down to the SDK manager so that it's obvious that
the licenses have to be accepted there and no additional message box will
be shown.

Task-number: QTBUG-79664
Change-Id: Ic24bd8c4457a43011b4035b659063dd45b321bcc
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-03-28 09:25:07 +00:00
Oliver Wolff
a4be1e8b66 Android: Check for usable JDK version in settings
sdkmanager only works with version 8 of JDK specifically. We should warn
the user if a different version is used.

Task-number: QTBUG-79664
Change-Id: I5be8d068e4ec119453654adda1a684dc65b4c631
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-03-27 08:55:45 +00:00
Eike Ziller
bac32dc740 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/coreplugin/dialogs/shortcutsettings.cpp

Change-Id: I1f21845350bb69268ca51bc77167a8244adce22a
2020-03-26 15:26:27 +01:00
Oliver Wolff
b04391619b Android: Fix download link for JDK
sdkmanager only works correctly with JDK 8, so we should not point to the
latest JDK release, but specifically that one.

Task-number: QTBUG-79664
Change-Id: I29dc2d26d41eed96c1abc03907ee835d70b9553b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-03-26 07:33:46 +00:00
Robert Loehning
08e5e84c9d Android: Remove pointless line break
Change-Id: I3f8d94cb637c279d7549c819a03233cc8d4aff87
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-03-25 09:44:51 +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