Commit Graph

152 Commits

Author SHA1 Message Date
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Jarek Kobus
a98b185e90 Drop Qt5: Android, IOS & WASM: Get rid of QOverload
Add a context object into some lambdas.

Change-Id: I72631aeb36703f8f335f3819796fb52148f1b377
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-20 10:30:48 +00:00
Jarek Kobus
2853660a59 Utils: More forward declarations / drop unused headers [D-G]
Round 1 - focus on headers.
For classes with initial in range [D-G].
Try to keep the same separators between different kind of headers.

Change-Id: Id42cd7b3743a816f75cecb6b576c0e37cb057473
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-05-25 07:13:52 +00:00
Artem Sokolovskii
bef1bd18f7 Android: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464
Change-Id: I2530688c44735bc4c69d57f9e8f392867be316f0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-05-05 11:00:36 +00:00
Assam Boudjelthia
0f6e9f7146 Android: don't add all the Service meta-data for Qt 6.2+
These values were removed in Qt 6.2, don't add them in that case.

Fixes: QTCREATORBUG-27088
Change-Id: I5560b18c0a849f7382b498097923ba425e47c40a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-08 10:57:12 +00:00
hjk
25f5771aa4 Rename QtSupport::BaseQtVersion to QtVersion
... and the Utils::QtVersion enum to Utils::QtMajorVersion to avoid
conflicts.

Change-Id: Ib688c67388272b7204a91444155f60b8c18a56bd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-24 12:13:19 +00:00
Eike Ziller
3749cfc896 InfoBar: Make adding more buttons possible
Change-Id: Ic0c946cf3f87fe46cd06391f38e0bc71374ad340
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-01-18 09:33:20 +00:00
Assam Boudjelthia
cd8da8fe5f Android: Get the minimum sdk level based on the used Qt version
Currently, Creator gets the minimum sdk version from a hard-coded
value (16) which is used for all projects. However, this is not ideal
because some Qt versions require a specific sdk level to build and run
properly. So, this change ensures that the minimum sdk value is obtained
based the Qt version used in the project.

Fixes: QTCREATORBUG-26127
Change-Id: I948dd18d16c3d9ca587ad7712aa4c9a1bfd53972
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-08-26 08:03:09 +00:00
Assam Boudjelthia
03712d6a92 Android: remove app lib_name field from the manifest editor UI
This field is supposed to hold the name for the *.so lib that
contains the main() function, ideally it shouldn't be edited by
the user, because some users might use the field to set an invalid
name or use the app's human readable name which is wrong.

Change-Id: Ie7feb79d6231d1785c29754ed277e057181e9ca0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-06-28 10:28:41 +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
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
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
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
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
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
Assam Boudjelthia
aa9367f5d4 Android: re-organize manifest editor widget
The current manifest editor has too many things at once with
a long scroll bar, that can be overwhelming, this changes that
by re-organizing elements and grouping others.

Change-Id: Ie997af475939effbc575fa9e2a1d20184e943ff1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-22 07:37:39 +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
Ville Voutilainen
64896a9436 Android: parse image file names from manifest
Also scales splash images without stretching and reflects them
to other orientations.

Task-number: QTCREATORBUG-24149
Task-number: QTCREATORBUG-24150
Change-Id: Ie23a8ba5f75132971673d3232807e941dfd50f97
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-26 08:39:56 +00:00
Eike Ziller
7c5ed6f7d9 Move InfoBar to Utils
The only reason it was required to be in Core plugin, was its use of Id,
which now is available in Utils.

Change-Id: I66ce863c24924e6448d339b3422538a7fe167336
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-06-18 06:39:54 +00:00
hjk
3a690154cb Android: Use QRegularExpression to check package names
Task-number: QTCREATORBUG-24098
Change-Id: I1082d39e65c4237592c81758fcdde614fc50d6e0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-10 09:24:52 +00:00
Ville Voutilainen
a2cd1e45df Android: add a splash screen editor to manifest editor
Task-number: QTCREATORBUG-24013
Task-number: QTCREATORBUG-24011
Change-Id: Iea7e8ff8f9bf616612827b70de67e01801ab1229
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-06-07 17:47:57 +00:00
Eike Ziller
e5bb7d1ffe Remove unnecessary removeContextObject calls
They are removed on deletion now.

Change-Id: I08461ea4938e24ab450df013a0f8f820032381da
Reviewed-by: hjk <hjk@qt.io>
2020-05-27 08:42:00 +00:00
Ville Voutilainen
52188918c0 Android: add service editor to manifest editor
Task-number: QTCREATORBUG-23937
Change-Id: Iec0435721504df744ec985bd3e5cefcc0700e852
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-05-25 11:18:09 +00:00
Eike Ziller
10114dc036 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/android/androidmanifesteditorwidget.cpp

Change-Id: I8143d9e02837dcd78a637da7b333a6eeebb105cb
2020-04-07 11:13:58 +02:00
Assam Boudjelthia
8f8b1b3d9d Android: fix manifest editor appending lib_name meta-data
The manifest editor is always adding the meta-data part for
"android.app.lib_name" because parseMetaData() is wrongfully
returning false.

Change-Id: Ic5f1971e98f213b6fe517bf6605120b21ca51508
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2020-04-03 11:54:51 +00:00
Ville Voutilainen
3af1a7b4cf Android: fix a thinko in syncing icons to widgets
The path can't be set unconditionally, and copyIcon
sets the path when necessary. So call copyIcon here.

Task-number: QTCREATORBUG-23747
Change-Id: I72a61798ad54c94a5c2a30bb313eb234f51d5ff3
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-04-03 10:03:14 +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
Assam Boudjelthia
86090059dd Android: remove unnecessary minimumSize limit to permissions listView
The minimumSize can cause the manifest editor UI to have a vertical
scroll bar even if it's not needed on some small displays.

Change-Id: I78b855d63d5a5f16a77ce58b86f0537f526aec44
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-03-18 14:05:51 +00:00
Ville Voutilainen
1fbc8a7f68 Android: turn manifest editor application icons into widgets
Change-Id: If192b1b4809cd68ebd214f3fd82e26c7818df32f
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-03-06 11:00:04 +00:00
BogDan Vatra
8bb3b3c4f1 Disable androidMinSdkVersion & androidTargetSdkVersion editing if needed
Starting with Qt 5.15 we moved sdk min & target versions from
AndroidManifest.xml file to build.gradle (the change was needed by
android gradle plugin).

Fixes: QTBUG-70817
Change-Id: I3b493d88da1a4a98f1a6d8ebadc26aebfc601090
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-03-06 07:18:04 +00:00
Assam Boudjelthia
fc3f5033e2 Android: fix minor syntax issues
This fixes minor things missed in previous commit
b081d7dc8f.

Change-Id: I47c0703a81726d7c0c2bf01d844e39096424ea5e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-03-03 13:02:10 +00:00
Assam Boudjelthia
75a895a7a3 Android: place add permissions combobox on top of the list view
It's more convenient to have the add permissions combobox
on top of the list view, so that it would be directly visible
without needing to scroll down, especially if on non-fullscreen
mode or small screen.

Task-number: QTCREATORBUG-23283
Change-Id: If3ef29fc91dd38f00d03ec63ce56103728c4b5f9
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-03-03 12:29:21 +00:00
Assam Boudjelthia
b081d7dc8f Android: allow style extraction method selection to the manifest editor
Make a bit more easier to choose the method of style extraction to
the manifest editor UI.

Task-number: QTCREATORBUG-23283
Change-Id: I65ad52f07d31913cf091ef4ef1693617ac82d4ad
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-03-03 12:29:01 +00: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
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
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
3ecf3d9575 Android: Simplify code in manifest editor
Change-Id: I1a54cc1d59b9fdf03083363cc26c25f72e893006
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-11-18 07:47:09 +00:00
Sona Kurazyan
8e31932c29 Remove usages of deprecated APIs of QLayout
Replaced:
  QLayout::setMargin() -> QLayout::setContentsMargins()
  QLayout::margin() -> QLayout::getContentsMargins()

Task-number: QTBUG-76491
Change-Id: If28ef6910b3afe5d04e4746b74f9362a3e3b3c8e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-02 13:01:07 +00:00
hjk
36fcd52136 Utils: Add toSet/toList functions
As replacement for functionality that's being deprecated
in Qt but still useful or needed, or that cannot easily be handled
without resorting to #if QT_VERSION checks in user code.

Change-Id: Id3575a54ff944bf0e89d452d13944fcaee270208
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-02 12:48:54 +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
413025db10 Android: Simplify AndroidManifestEditorWidget::iconPath
Avoid a use of FileName::appendPath().

Change-Id: Ifd5367dc9048bf379362d594d32809e0971e9524
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-16 08:02:04 +00:00
hjk
6f37348b4c Replace static_casts by QOverload where possible
Mainly to get rid of the QProcess::finished deprecation warning.

Also adjust coding style in the surrounding connects when needed.

Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-26 15:18:14 +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
Eike Ziller
71d60ee9c8 Merge remote-tracking branch 'origin/4.8'
Conflicts:
	src/plugins/cpptools/compileroptionsbuilder.cpp

Change-Id: I522f91de70aff28692d7c3a050e8d52df0b82a76
2019-01-15 08:40:23 +01:00
Andy Shaw
986ce6fb98 Respect the setting of the version code via the pro file
As a pro file can now set the version name and code via the pro file,
this enables support for the code part as it will default to a
variable (similar to the version name). Therefore we need to use
QLineEdit for this over QSpinBox so that it is kept intact.

Done-with: Markus Maier <markus.maier@rosenberger.de>
Change-Id: I0524a90dc94888c11365164c41259a934caffa1c
Reviewed-by: Markus Maier <markus.maier@rosenberger.de>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2019-01-09 11:42:16 +00:00
hjk
93257a56a0 QmakeAndroid: Replace remaining AndroidQtSupport
This uses the same approach as in the previous patches: Have some
generic interface in the base classes (here ProjectNode::targetData()
setTargetData()) and implement on the qmake project side.

Implementation for Cmake/QBS is architecture-wise possible, but
not used right now, and left for later.

Change-Id: I3bbf66170020cf9027a894cd66db15ec7ffbf499
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-12-20 13:13:51 +00:00
hjk
a9ce1a66a0 QmakeAndroid: Fill application combobox
... using a new base ProjectNode::targetApplications() function.

Change-Id: Id210683dce6bfa7ffbc89973423d326d76ac9309
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-12-17 14:02:06 +00:00