Commit Graph

143 Commits

Author SHA1 Message Date
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Alessandro Portale
5c65115271 Android: Convert to using Tr::tr
Change-Id: Ie9110093101b0f49808b4da7b13ac3f47c3bb994
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 10:24:32 +00:00
hjk
52e8b83bd5 Android: Code cosmetics in ToolChain
Avoid a global static that doesn't buy much; some namespace changes.

Change-Id: I80d0f5c0e6c7a77e91930ec198c39080b6c7404a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-28 06:10:48 +00:00
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
Alessandro Portale
afe0b5a42d Utils: Use FilePaths alias instead of QList<FilePath>
Change-Id: I2eb0956377e46a34e73208b301eb662704a25e8b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-07-21 16:05:38 +00:00
Assam Boudjelthia
f079479756 Android: Look for latest JDK version and not 1.8 specifically
Recent SDK Manager that is used by Qt Creator works with JDK 11+,
and JDK 11 is needed by Qt 5.15.7+, so look for the newest JDK
instead of 1.8 as currently being done.

Change-Id: I6ff415aa300d742735e8636b24a03116d5bfe2b6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-07-08 10:40:43 +00:00
Alessandro Portale
13af635b5e Android: Use native paths format when setting an environment
ANDROID_HOME, ANDROID_SDK_ROOT and JAVA_HOME should be set as native
paths in an environment to follow common practice.

Change-Id: I073d125c93e27a02cc2b909e8c641ea61b3e9f8e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-01-24 12:40:44 +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
hjk
652b9844e6 Utils: FilePathify Environment::{ap,pre}pendOrSetPath etc
Change-Id: Idfa5ec247337570936b0236cab9d3a5669792ca0
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-10 07:26:31 +00:00
Assam Boudjelthia
d5a3435798 Android: drop const from AndroidConfigurations::currentConfig()
Since the config can be expected to modify configuration values
(e.g. setEmulatorArgs()) it shouldn't be const, but can be set
to const whenever creating a reference that is not meant for
modifying the config.

Change-Id: I8c816a5422d4d57afa158c723d908e3a9a9a0db8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-26 18:34:58 +00:00
hjk
2aaa0a2180 Android: Simplify clangPlusPlusPath in toolchain
Change-Id: I195cc3657813a681a625567116c91fd1bdc463cc
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-08-17 06:59:20 +00:00
hjk
7c28c4f744 Utils: Introduce a FilePath constructor from char arrays
Similar to QT_RESTRICTED_CAST_FROM_ASCII to avoid the need for
decorations in user code.

At the same time, drop some convenience constructors and functions
in CommandLine and Icon essentially serving the same purpose.

Change-Id: Ida4e5ac19c2da0a4298a97b2a8e1511d56bbb79d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-17 05:34:10 +00:00
Assam Boudjelthia
1372dfdf7f Android: Fix multiple clang clazy warnings
Change-Id: I2ea6cebd16c09a8a4502f4719d99a9d85e5e7d02
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-06-01 08:11:56 +00:00
Eike Ziller
1de74cceab Merge remote-tracking branch 'origin/4.13'
Change-Id: I015bac0cccdf466a923c706abdedd8bd8800b0cd
2020-07-06 10:30:54 +02:00
hjk
430a33dcd9 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-06 06:07:13 +00:00
Assam Boudjelthia
35564328b8 Android: reduce unneeded logs for Andoroid toolchain generation
Change-Id: Ie76d441204d9f3179d0bd12a56815107aa01e02d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-01 20:10:26 +00:00
Christian Stenger
4b1adeca7f Android: Use QRegularExpression instead of QRegExp
Task-number: QTCREATORBUG-24098
Change-Id: Ic19bd73dd2bac39b393bf87c4567193631b57c80
Reviewed-by: hjk <hjk@qt.io>
2020-06-16 06:19:01 +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
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
94a9528156 Android: deduce the NDK path of saved toolchains from compilerCommand()
The change 290840, made AndroidToolchain tied to an NDK location, but
when restoring a toolchain the NDK wasn't being assigned. This deduces
the NDK location from the toolchain compilerCommand().

Change-Id: I3cd936ac48570fadbec15ac1e13496706718c0ea
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-28 11:42:43 +00:00
hjk
a84e626b67 ProjectExplorer: De-QObject-ify ToolChainFactory
As collateral damage, use a capital C in  KeilToolchain*.

Change-Id: If9d64de2108366546683144975d975d9d1727712
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-27 13:58:24 +00:00
Assam Boudjelthia
c3c5708741 Android: make sure old autodected toolchains are marked as autoDetected
Some toolchains that were auto detected in previous sessions or version
of Creator might re-appear as manual toolchains. Thus, make sure that's
fixed. Also, make sure the name of old toolchains is updated with the
current name format.

Change-Id: I04d2145cb9c5e1e25e2bcbc21c014280bc355195
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-26 11:59:01 +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
Alessandro Portale
9904464074 Make various Q_LOGGING_CATEGORY's static
Change-Id: I43d3a198b0863d85a7fb305c7cb768f68acbd139
Reviewed-by: hjk <hjk@qt.io>
2020-01-15 14:54:10 +00:00
Eike Ziller
7d00aeb33e Android: Make sure right Java is found in PATH
We not only have to make sure that the Java path from the Qt Creator
settings exists in the PATH, it must also be the one that is found when
running Java tools. Otherwise having two different Java versions in the
PATH can lead to the wrong one being run for the build.

Fixes: QTCREATORBUG-22504
Change-Id: I22ff88fb334bb8ba5f719fbc3482c4629713409f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-08-13 11:23:08 +00:00
Eike Ziller
21c2bf7e72 Merge remote-tracking branch 'origin/4.10'
Conflicts:
	src/plugins/python/CMakeLists.txt

Change-Id: I18808710dd99b97d4e1e7c3d223b7f814083de31
2019-08-12 17:04:12 +02:00
Eike Ziller
821f799ff3 Android: Fix adding Java SDK to environment
33a9a03121 broke it by inverting the
condition.

Task-number: QTCREATORBUG-22504
Change-Id: Id0b66ec025281e6d6c52b7309f35a3bdfb8e7170
Reviewed-by: hjk <hjk@qt.io>
2019-08-12 14:52:39 +00:00
hjk
251287f0d3 Avoid warning on empty expressions
For some reason, Q_UNUSED includes already a semicolon, adding one
on the user side creates an additional empty statement.

Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-23 11:55:59 +00:00
hjk
d56fa44964 ProjectExplorer: Use data member for ToolChain::typeDisplayName
Change-Id: Ia78ea3f8628b759706c5b024d687d917b203ec4d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-06-20 12:15:04 +00:00
hjk
66c2be6715 Android: Move AndroidToolChain::suggestedGdbServer to only user
Less code and casting.

Change-Id: I43e1b9f90b39a50b2fb4c35fadeb1b244dbe9930
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2019-06-20 10:03:46 +00:00
hjk
b412bd09a2 Android: Remove the CToolChainList type alias
The pattern to alias const types is not used elsewhere in creator
and apparently to difficult for me. It's the second time I wondered
why a const value can be bound to a "non const" CToolChainList &.

Change-Id: I0d179dcaed01a1eafde4390f3fc55bf77417adc8
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2019-06-14 10:44:39 +00:00
hjk
3c92742605 Android: Rename ANDROID_TOOLCHAIN_ID to ANDROID_TOOLCHAIN_TYPEID
That's what it is, and it's the only odd one out currently.

Change-Id: If098e2691b9f88fbd5f516cf869e390f43b9ddfa
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-06-14 09:42:09 +00:00
Alessandro Portale
a38c3ac08e Remove ToolChain::suggestedDebugger()
And inline it in AndroidConfigurations, which is the only place that
made use of suggestedDebugger()

Change-Id: I87f135b5d115adb7e46b0f009c5853221e9a3daa
Reviewed-by: hjk <hjk@qt.io>
2019-06-12 12:54:43 +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
cc877949ca ProjectExplorer: (Re-)start using strings for mkspecs
Even if this is part of a directory name it is naturally closer to a
"string" id than a file path.

Change-Id: If66f930526744379ce86e2b18bd9eac7fabfe773
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 11:12:00 +00:00
hjk
33a9a03121 Android: Avoid a temporary QFileInfo
Change-Id: I58f31177506c1e25f07dc51d5b24ac368ebf9024
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2019-05-28 05:50:15 +00:00
hjk
eb9e3c807c Even more FileName::appendPath() -> pathAppended()
Change-Id: I0a8bc391ff3704e14df87e4fa3bc82269146f943
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-20 13:13:06 +00:00
hjk
b38657bcf6 Android: Inline special constructor into only user
... in a attempt to unify ToolChain class interfaces.

Change-Id: I9135576492a4b8080317aecbe7b74775340e62e8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-17 10:34:38 +00:00
hjk
86f072daeb ProjectExplorer: Make ToolChain::makeCommand return a FileName
... instead of a QString. This is in line with the qmakeCommand().

Change-Id: I617cb03522be5ebaac6cab58a3606f659fddb833
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-15 10:50:08 +00:00
hjk
728010a705 ProjectExplorer: Use functor for ToolChain creation in ToolChainFactory
Change-Id: I935eecab2f16618a2a5b34d31a79672db82c3398
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-13 12:13:21 +00:00
hjk
d116559cd8 ProjectExplorer: Drop Detection argument from ToolChain constructor
This was used wildly inconsistently. Use a setter instead in
circumstances where the context is reasonably clear.

The assumption is that this will always be done at some time in all
code paths.

Use a new 'Uninitialized' value to avoid triggering the first update.

Change-Id: I82c38cb9da3ccdbd8fbae8beefcbfa0e559ff794
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-10 14:38:45 +00:00
hjk
881b59c36e ProjectExplorer: Replace ToolChainFactory::supportedLanguange
... by a member-based approach.

Change-Id: I5c7fef196df6c37fd26c60a58c774426eca562a0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-09 14:43:23 +00:00
hjk
78fd99f5d3 ProjectExplorer: Replace ToolChainFactory::canRestore
... by a member-based check.

Change-Id: Id7d19e488695e76ea17cf2d02c7b6eb2cd0246cc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-09 14:36:41 +00:00
Vikas Pachdha
ce9081f340 Android: Find triple from predefined targets
Task-number: QTCREATORBUG-21780
Change-Id: Ic6e94a0ef94fc253f8a60383b2d060851b135d9f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-01-09 12:38:25 +00:00
Eike Ziller
8d19b306ed Android: Detect clang and gdb from older NDK
Get some minimal compatibility with the older NDK that is used for
Qt < 5.12 back.
This detects clang-3.6 and gdb from NDK 10e.
For building, the android-g++ mkspec continues to be used for Qt < 5.12
(it uses Qt's default mkspec, regardless of toolchain in the kit,
because the toolchain reports to support both).

Task-number: QTCREATORBUG-21595
Change-Id: I3487c38093f43ccae2418fb28807a50fbda101a8
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-11-29 14:28:59 +00:00
Ivan Donchevskii
e164717108 Android: Fix clang executable suffix on Windows
Change-Id: I78e8e49efd52d33f9f26f554a3400fabbe74d9ed
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-11-16 12:07:51 +00:00
Christian Stenger
2cf2cebfc9 Avoid enabling all message types by default
Passing no QtMsgType parameter ends up in enabling all
message types by default.
Follow the common pattern of only enabling the warnings
by default.

Change-Id: Ic7ec0420089c95f716a86feb9791d9cb13f4dd90
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-11-06 09:40:05 +00:00
Vikas Pachdha
de97b8cf3e Android: Auto detect clang toolchains
Remove GCC auto detection
Make Clang toochain default for Android
Remove auto detected toolchains from old NDK

Task-number: QTCREATORBUG-11846
Change-Id: I618e6f8eda4f24f498260b8de778ef543311acd1
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-11-02 15:10:50 +00:00