Commit Graph

1898 Commits

Author SHA1 Message Date
Assam Boudjelthia
2d05822e27 Android: move <b> from displayName to summaryText
In case or error QC will mention the name of the step where the error
happened, and it doesn't look right quoted in <b> tags.

Change-Id: I4b0b49367daeda845483c0bdbbc036c6d4c90f51
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-26 18:54:40 +00:00
hjk
5951b26f1a Android: Make compile with Qt6 again
Use the special exception to use 'auto' for the return type of
QXmlStreamAttributes::values() to avoid preprocessor use.

Task-number: QTCREATORBUG-24098
Change-Id: I52362e6af6db728cb296bba033f9bfa08e93ca1b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-26 15:59:28 +00:00
Ville Voutilainen
23501b4271 Android: Don't remove icons or splashes if files with similar names exist
Task-number: QTCREATORBUG-24879
Change-Id: Ie13a8a94534889c473414b5a5e771aae11d0f167
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-26 10:52:53 +00:00
Eike Ziller
8245523653 Merge remote-tracking branch 'origin/4.14'
Conflicts:
	src/plugins/designer/cpp/formclasswizard.h
	src/plugins/designer/cpp/formclasswizarddialog.h

Change-Id: I9f9d166e1a9249022305503f9cbe571136c2a2b1
2020-11-25 11:25:34 +01:00
Assam Boudjelthia
b52ad29f3a Android: fix logcat not fetched when app exits/crash at start
Application output from logcat might not work if an app
crashes at the start, so with this patch we avoid that by
making logcat process fetch logs faster by not getting
the full logs but only the logs starting from the moment
we start the app (using -T arg).

This can be very annoying bug, because when starting the
app from QC it usually only prints "app_package_name died."
which forces the user to go into the logcat manually and
search for an error from thousands of lines.

Change-Id: Ic5ac0389cb28e7c80586490877a697272f3648af
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-24 07:51:26 +00:00
Assam Boudjelthia
bc5ffdb56b Android: fix copy gradle files button function
The the value was being set before the checkbox is connected, which
is useless.

Change-Id: Ifdbbccc1fe190e4dd646e77303af78757fadebb2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-23 19:31:31 +00:00
Assam Boudjelthia
34a7f6f9f2 Android: remove newline chars before adding output in error/warning pane
The output of androiddeployqt that is picked by QC, can contain newline
char at the start of the received line like:
"\nNote: Recompile with -Xlint:deprecation for details."
Such output is sould be only a warning
and not an error, that's we try to remove the newline from the start to
avdoid this behavior.

Fixes: QTCREATORBUG-24881
Change-Id: Iad7556917cb0f53dc691dfb316f999ad504976e9
Reviewed-by: hjk <hjk@qt.io>
2020-11-23 07:23:07 +00:00
Jarek Kobus
6b588d7227 Remove unused variables
Mark some of them with Q_UNUSED, since it looks like
sometimes the copy is done on purpose, to force detach
or used for some hack with memory management.
In one case make unused variable used again.

Change-Id: I3825cd3399fa63bf6e12173c64509287d4a125e5
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-20 13:58:46 +00:00
Eike Ziller
5ca70bdcb3 Merge remote-tracking branch 'origin/4.14'
Change-Id: Iea84f23cf394de13e99a9ed777c8c113e4eff473
2020-11-19 15:38:13 +01:00
Jarek Kobus
b269066435 Use const iterator with std::find_if where possible
Make the resulting interator const.

Change-Id: I4aadcfff35f6b1015e506bc75bcfc2a1f1be4d65
Reviewed-by: hjk <hjk@qt.io>
2020-11-19 09:46:31 +00:00
Jarek Kobus
48c2afe157 Decorate some classes and methods with final keyword
This way we silence the clang warnings about calling
virtual methods from c'tor or from d'tor:
[clang-analyzer-optin.cplusplus.VirtualCall]

Change-Id: I8d6318b490152133da4833bda2ba28622bce30dd
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-19 09:45:53 +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
30aec82285 Add missing "final" to unexported/unshared classes
Change-Id: I84d5fc39d7ef5588a20545854d0cfd0b993db090
Reviewed-by: hjk <hjk@qt.io>
2020-11-18 15:40:29 +00:00
Jarek Kobus
d2e1feceac Don't clash signal names with other methods
In case when signal name clashes with other method name -
rename accordingly.
Remove some repeated signal declarations - they are already
declared in superclass.

Change-Id: Ie1430b85d6436d26996494fa44c7554fb354b6ce
Reviewed-by: hjk <hjk@qt.io>
2020-11-18 12:20:43 +00:00
Fabio Falsini
21b03918b7 New method for show Android splashscreen
New method use theme for show splashscreen
in the first phase (from when an app is
launched to when Qt takes control of the
surface) and in the second phase draw through
Qt the same drawable object used for the theme.

Change-Id: I4d76322a5640cb95f99f5605c5775051e6de7daf
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2020-11-17 17:16:46 +00:00
Jarek Kobus
0a230928c0 Drop autoconnections
Use typed connections instead.

Change-Id: I04205c877541722cc059398a146a216727daa103
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-17 10:13:52 +00:00
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
Jarek Kobus
2b414508b7 Remove unneeded includes
Change-Id: I67fee9303509b7080e123a2a5826e200ce498ce2
Reviewed-by: hjk <hjk@qt.io>
2020-11-12 12:14:11 +00:00
Assam Boudjelthia
9d5ab6ef4b Android: show image type for each android version in New AVD dialog
If the user has multiple installed system-images for the same type of
device and same Android version, it might become confusing to know what
to choose.

Change-Id: I9be7f55731448efb47a6ab79e45f7f1717ade3eb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-11 07:50:36 +00:00
Orgad Shaneh
3122a1bfc5 Aspects: Remove some more default values
Change-Id: Iadee8b8f1eeb3ff009a667d45a51f6f5a94329ca
Reviewed-by: hjk <hjk@qt.io>
2020-11-10 08:06:51 +00:00
Assam Boudjelthia
33b06f5b81 Android: avoid adding ANDROID_ABIS to the project file
Use buildSystem::property()/setProperty() to keep track of the
selected ABI and avoid polluting the *.pro file with it.

Task-number: QTCREATORBUG-24674
Change-Id: I5516a77c9f2d1a8975045e1d7c383e72c52db9d7
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-11-05 17:08:46 +00:00
Jarek Kobus
34c97ac868 Fix a build with Qt 6
In Qt 6 implicit conversion between QFuture and other types
is forbidden. Make it explicit instead.
See ff0ba7e2d7b91fd5809cb314935a1ca1a436f6c9.

Change-Id: Ie42e6b9b5047ba5eeec9f63fd03179e73f95314d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-05 08:46:43 +00:00
Assam Boudjelthia
cb34bfc493 Android: add line breaks to new AVD warnings
Change-Id: Ie533c468717674959060c7732952892086f37640
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-03 15:10:00 +00:00
Assam Boudjelthia
54667ae51c Android: disable Ok button for new AVD dialog if there is error
Change-Id: I626e80f540e42d726f37cd4802a14a32fa46595d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-03 14:30:13 +00:00
Assam Boudjelthia
9d3c156fd3 Android: fix parsing Andorid Abis for Qt 6
Amends 4946677df4, to allow
parsing the correct supported Abis from qmake.

Fixes: QTCREATORBUG-24828
Change-Id: I20f8cbf5c0f1bcdf3debb0d9b5c47fa77de163ab
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-10-27 09:16:06 +00:00
Assam Boudjelthia
62e84f129a Android: fix "uninstall app first" checkbox placement
Change-Id: I2f79e9a5c344e5364fa377422f682f8e0c2927e2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-10-26 07:13:30 +00:00
Assam Boudjelthia
4946677df4 Android: fix aab label name and supported versions
Task-number: QTCREATORBUG-24681
Change-Id: I5634deaf395d547d2659d71d1612897e1a3d9a2b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-10-16 11:43:37 +00:00
hjk
5a97fa53dc Android: Aspectify AndroidDeployQtStep
Change-Id: Ibc2f04336831494c04a2283a59e1f550776c8bf3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-10-16 07:24:46 +00:00
Assam Boudjelthia
d1a42414c5 Android: fix misleading warning when creating an AVD
When no system images are installed in the used SDK path,
the warning should point to install a system image because
none are installed instead of blaming the SDK.

Task-number: QTCREATORBUG-24754
Change-Id: Ic3dc6cb25f014f4216fd63636b3b312b14f76e6d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-10-08 18:18:21 +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
hjk
97c6c13dcb ProjectExplorer: Remove BuildStepConfigWidget
After the previous changes it was only an empty wrapper around QWidget.

Change-Id: I58dcd82d8342c7de5e2df537044f6cf3de878a67
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-06 08:06:39 +00:00
hjk
b97b7dc6f2 ProjectExplorer: Move BuildStepWidget::summary etc to BuildStep
The step is the source of information anyway, and available at the
only place of use. No need to copy that over to the widget, neither
for keeping it up-to-date there when the mechanism is already
available in the step itself.

This creates quite some potential for the simplification of
the various createConfigWidget implementations in follow-up patches.

Change-Id: I4474665f194a1ff7c5792ad086ed53c8d3ce13e6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-05 08:16:51 +00:00
Eike Ziller
ad7dbc4619 Merge remote-tracking branch 'origin/4.13' into master
Change-Id: I565a0bd783dc80b53d4715fdc153dba1f1d3f7c7
2020-10-05 09:05:23 +02:00
Ville Voutilainen
2e39132deb Android: Set the manifest dirty when app icons are set or removed
Task-number: QTCREATORBUG-24700
Change-Id: I862b5a17f47c7c6bbf7900b8923a246b8e902190
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-10-02 16:05:06 +00:00
hjk
591e93316d Consolidate build/deploystep default display name handling
Use the display name from the factory as default, override if needed.

Change-Id: I03519c998432fea4120b0de8b2fc2686644635f2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-02 13:18:45 +00:00
Fabio Falsini
30997838e7 Add support for Android xhdpi, xxhdpi and xxxhdpi splashscreen format
Current Android Qt Creator plugin allow to convert a single
image to the basic format ldpi, mdpi and hdpi for use as
splashscreen. However Android guidelines require to add
xhdpi, xxhdpi and xxxhdpi format size also. This patch
add conversion of the master image to these additional
formats.

Change-Id: Ibb3e9e0bd0d2aeaf6119b04c64275ffc00e820ad
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-09-30 15:37:39 +00:00
Fabio Falsini
63dc880b9f Add control for set Android manifest screenOrientation param
Android manifest have a param called screenOrientation for
instruct Android to show the app in landscape mode, portrait
mode and so on. This patch add a control allowing to set
the preferred one by selecting from the list of all currently
availables.

Change-Id: Id53dd8aa1efaa603bc30b02c8a5a8db55e97e75b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-09-26 07:59:51 +00:00
Fabio Falsini
e6a0babab6 Add support for Android xhdpi, xxhdpi and xxxhdpi icons format
Current Android Qt Creator plugin allow to convert a single
icon to the basic format ldpi, mdpi and hdpi. However Android
guidelines require to add xhdpi, xxhdpi and xxxhdpi icons
size also. This patch add conversion of the master icon to
these additional formats

Change-Id: Ie330d6ac146194eb06e6e8896b3af85b6bdab492
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-09-25 18:19:21 +00:00
Eike Ziller
c74714da04 Remove parent argument from IEditor constructor
Editors are owned by whoever created them via the corresponding editor
factory, usually the EditorManager.

Change-Id: I4432eab1a3a8c38ce1bba6bb10b0f9273695a524
Reviewed-by: hjk <hjk@qt.io>
2020-09-24 09:10:37 +00:00
hjk
cec468d78a Utils/ProjectExplorer: Move re-usabled bits of aspects to Utils
Classes involved are BaseAspect and some derived classes,
LayoutBuilder and VariableChooser.

This is mostly mechanical, with various include/using changes
to make it compile.

Change-Id: I624a457f3555f102e541c4c71e33a9423af32250
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-23 07:44:42 +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
hjk
0d185a0ad3 ProjectExplorer: Simplify use of AbstractProcessStep::init()
1. Systematically check for AbstractProcessStep::init() first in
   derived classes.
2. Use setupProcessParameters(processParameters()); by default in
   the base implementation.
3. Drop all re-implementations that are effectively the same.

Change-Id: I0ae54dd4909b354672a63ee56d0b7c2ea0732494
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-16 16:16:13 +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
hjk
0d6409c20c Android: Fix use of commandline arguments to build apk
After 69ff17aa2d, the concealed password was passed to the process.

Change-Id: I69aab38e8898e5416231e863484e6702f3357841
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-09-15 06:45:17 +00:00
hjk
ca61a35910 Android: Edge towards AndroidApkBuildStep aspectification
Unexport AndroidApkBuildStep, remove AndroidBuildApkWidget file
pair, de-Q_OBJECT-ify AndroidBuildApkWidget (and as roadkill
PasswordInputDialog).

Change-Id: Id3b51dd33774aac70a4f23a8ab4cfb556ed1f2b5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-09-15 05:15:31 +00:00
Assam Boudjelthia
14024f810e Android: expose deployment warnings and errors to issues pane
This makes the deployment process more transparent and easy to follow
warnings and/or errors.

Change-Id: Ie6a7bde4dfb5748adff1be077299ecdceb0e3930
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-09-14 08:33:04 +00:00
Alessandro Portale
6aced79f18 Android: Build fix #2
Change-Id: I1ea4d753889d3da8c357d0a388af1c04797b0759
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-09-11 11:40:41 +00:00
Alessandro Portale
651cbfece7 Android: Build fix
Change-Id: Ia5f2118971ae6a7d0c13b8ea82c146b0b678b848
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-09-11 10:50:49 +00:00
Assam Boudjelthia
e9c9440653 Android: allow passing apps arguments via manifest on non-debug mode
Uses 00a1e5da7e1aea373a7e6be1d51e1573ff167dd8.

Task-number: QTCREATORBUG-23712
Change-Id: I9a7e134420b608815589578f3851abf150674fd3
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2020-09-11 10:00:32 +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