Commit Graph

1898 Commits

Author SHA1 Message Date
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
Christian Kandeler
45ba9fcd53 Output parsers: Replace the chaining approach
Use "flat" aggregation instead.
This is another step towards the formatter/parser merger.
Along the way, also fix some some subclasses (mostly in BareMetal) that
erroneously forwarded handled output to other parsers.

Task-number: QTCREATORBUG-22665
Change-Id: I12947349ca663d2e6bbfc99efd069d69e2b54969
Reviewed-by: hjk <hjk@qt.io>
2020-04-09 14:49:32 +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
Christian Kandeler
98fb412e6e IOutputParser: Replace std{Out,Err} with a single parameterized function
Another step towards parser/formatter unification.

Task-number: QTCREATORBUG-22665
Change-Id: I6de86b3aee2c54585cdd4b06d21b0ea67300aeac
Reviewed-by: hjk <hjk@qt.io>
2020-04-08 09:31:33 +00:00
Christian Kandeler
7745eacc7a Output parsers: Generalize the search directory concept
All parsers can now have search directories, not just the GnuMakeParser.
This allows us to get rid of the "task mangling", removing another
instance where the order of parsers in the chain mattered.

Task-number: QTCREATORBUG-22665
Change-Id: Id0d55522ae6800afd9f50ff36546224b0d8bb382
Reviewed-by: hjk <hjk@qt.io>
2020-04-07 15:20:22 +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
hjk
2033b438ca Android: Use BuildSystem to access some build related data
... that's currently stored in ProjectNodes. Plan is still to adapt
all user code like this, and finally move the data storage from
ProjectNode to BuildSystem.

Change-Id: Ida9b47c4a3013b857d00e7792eaf78d9f91b3c9a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-04-03 12:23:33 +00: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
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
hjk
d1173d2136 Android: Use BuildSystem in AndroidExtraLibraryListModel
... instead of Target. The model is tied to an ApkBuildStep, i.e.
already per-BuildConfiguration.

Make the update depend on its BuildSystem parsing state, not any
in the target.

Change-Id: I72c00b9c40bfb7bee0375ae7b3f912f27bd18ca8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-04-02 05:48:25 +00:00
hjk
553c3c2c74 Android: Use the new Target::activeBuildKey() function
Change-Id: I051874a2b44129740b2ecc19f7ff401663d8bf0a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-04-01 13:42:08 +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
Lars Knoll
99a81e78d5 Port from QRegExpValidator to QRegularExpressionValidator
QRegExpValidator is going away in Qt6, so port over to the
version using QRegularExpression.

Change-Id: Iecd1ba1f0e5e01009ae43b79c1ccc73f0fc046b2
Reviewed-by: hjk <hjk@qt.io>
2020-03-20 11:39:42 +00:00
Eike Ziller
d80f3972a4 Merge remote-tracking branch 'origin/4.12'
Change-Id: Ia8254720b2ba6e3e7b859017e1c2b6e289bed771
2020-03-20 08:16:19 +01:00
Christian Stenger
abca39aeae Android: Silence soft assert
Android toolchains need a fully loaded Qt version
manager.

Change-Id: Icf3ae7d79923b438047b87cbb400d0b8a341914e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-03-19 10:09:04 +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
ff33e4a57a Android: Fix a wrong use of QProcess::startDetached()
Change-Id: I447295611c8254afa85d7d60e29bf8a417d08960
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-03-19 07:26:51 +00: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
819663c12f Android: AVD Manager don't highlight header elements
The highlighted headers gets a bit annoying and serves nothing.

Change-Id: I5061792ee080cb10740d2dedc26f06f499043ac1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-03-18 14:06:16 +00: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
Christian Kandeler
f4473a6da8 OutputFormatter: De-virtualize the clear() function
... and make it also clear the text edit.

Change-Id: Ifd073167b8afc27f3adafca1bdaf95316be7fdaa
Reviewed-by: hjk <hjk@qt.io>
2020-03-18 13:54:31 +00:00
Christian Kandeler
9348ac5fec Utils: Remove the *SameLine OutputFormat enums
Presumably, they were intended for output that shouldn't get an
automatic newline, but if there ever was such a thing as automatic
newlines, it must have evaporated over time. All users of
OutputFormatter provide a newline if they want one.

Change-Id: Ibd219b7305fd503ce075d6f77930d2b538d5e2e8
Reviewed-by: hjk <hjk@qt.io>
2020-03-18 13:52:17 +00:00
hjk
b4a9801f05 Android: Drop some unneeded semicolons in class declaration
Less warnings. Amends f46099d21e.

Change-Id: I50f0bec7b0db9d9e16191523b183496c4cd5b552
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-03-18 13:33:11 +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
Robert Loehning
d1daf6a542 Android: Add missing space
Change-Id: I061c91c9f48579179591dc912ab3bd48c13af0b0
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-03-18 10:30:05 +00:00
Assam Boudjelthia
6bcd3cc4ad Android: AVD manager move "Start" button up in the layout
The start button being in the middle looks weird and not desired
from a UX perspective.

Change-Id: I524f61a8963aa7d81f50181150a2af3b94acfacf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-03-17 10:05:23 +00:00
Assam Boudjelthia
c03cc13bba Android: fix OpenSSL download minor wrong condition
Silent bool should be reversed.

Change-Id: I2b8506eb7af95dc51fab8e911c548dac766ce090
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-03-17 06:33:32 +00:00
Assam Boudjelthia
e857b02579 Android: rephrase some bad UI text sentences
Change-Id: If563b0778ceafcaeceb13f697d273c69f484929b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-03-16 12:08:42 +00:00
Assam Boudjelthia
7fd0f30776 Android: use QListWidget to show defined NDKs
Use QListWidget to show all installed NDKs (from SDK manager), and NDKs
Added manually by the user. Each item has an icon to indicate if it's
removable when added by the user, or non-removable if installed from the
SDK manager.

Change-Id: I26ae5909ce930d5cc8af561b6b4e9cc5415d12f1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-03-16 08:21:22 +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
Ville Voutilainen
a92156b08f Android: fix a logical thinko in manifest editor's icon handling
Change-Id: I9b9a4b602c8b01f4c9bc9c11fd0f029d6eff9596
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-03-12 12:04:59 +00:00
Christian Kandeler
1de9e9e402 Android: Add missing reset of state variable
The m_skipBuilding variable in AndroidBuildApkStep needs to be re-
calculated on every call to init().
Also add some debug statements that will help us find out why it becomes
true in the first place.

Task-number: QTCREATORBUG-23572
Change-Id: I058b58cf0e511557d1fad7e5bd03048a7d8b9c69
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-03-12 09:19:18 +00:00
Christian Stenger
3568b6bea1 Android: Fix build with namespaced Qt
Amends 1fbc8a7f68.

Change-Id: Idb76c31c2ab0bf93a49c255bae5b2c428f4961c7
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-03-09 06:38:29 +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
Eike Ziller
8f89c9a846 Merge remote-tracking branch 'origin/4.12'
Change-Id: I04d9cc69a07d4d07b1bf1df57681d6a68587d7ba
2020-03-06 09:44:11 +01: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
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
Eike Ziller
6959618d7b TextEditor: Use simple text indentation as default
Simple indentation based on the previous line was already available in
the NormalIndenter class. Merge that up the hierarchy chain into
TextIndenter which is the base for other text-based indenters, and make
that the default indenter for text editor factories.

Text editor factories that don't have a special indenter get at least
basic indentation support for free that way.

Change-Id: Ib977a990f10a99bead82bc8a8348c02a106665f1
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-03-04 06:55:37 +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
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