Commit Graph

293 Commits

Author SHA1 Message Date
hjk
080cb86761 Core: Pimpl MainWindow
I'd like to disentangle things a bit, and there's quite a bit
non-window-ish stuff here.

Change-Id: Iad1e1d17ccd10b3ffff14251039ae2a5d6bfb675
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-25 08:47:45 +00:00
Jarek Kobus
53f16e9b49 AndroidManager: Remove some unused functions
Hide one internally used function.

Change-Id: If286880397a1c6fd808b3eee22332e905911f4d1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-08-22 15:14:52 +00:00
Jarek Kobus
c72734e678 AndroidManager: Make it a namespace
Unexport it, as it seems that no method is used outside of the
Android plugin.

Change-Id: I5c76234a1f37ddfa3dcfa51ded5a441163ec9093
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-08-22 14:52:56 +00:00
Jarek Kobus
c8a25e8fd9 AndroidManager: Cleanup includes
Change-Id: I779eadcc978e76adff8f6e4a0671f3db6a2a2402
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-08-22 14:01:23 +00:00
Jarek Kobus
8bdf70e271 AndroidManager: Use Utils::Process for startAdbProcess()
Change-Id: I675d0103bee854af67d379d08a7e0ddbc6654e8d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-08-22 13:59:19 +00:00
Jarek Kobus
b8acef5d8c AndroidManager: Rename runAdbCommandDetached() into startAdbProcess()
The process wasn't started detached in fact.

Change-Id: I60aee6d4de3be2499727ea43c3492c1c478f5e94
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-15 10:40:21 +00:00
Jarek Kobus
ae51dedbd1 AndroidManager: Remove deleteOnFinish arg from runAdbCommandDetached()
Change-Id: I6a54c85921e27a2256417f730f56c41b1152fefc
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-08-15 10:02:23 +00:00
hjk
aa25fdcc69 QtSupport: Rename qtkitinformation.{h,cpp} -> qtkitaspect.{h,cpp}
Change-Id: I12229e5e98b468101d32edd35be74bbda0921d89
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-08-15 08:59:52 +00:00
Jarek Kobus
f313c5538f Android: Simplify return statements
Change-Id: I100b16a1fd74c4528f61f681bbeb5cdb4adddee5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-08-04 09:52:39 +00:00
Alexey Edelev
1e81f206b0 Android: Pull android debugging related files to a subdirectory
When building the project in QtCreator using the Debug configuration,
android deployment procedure pulls app_process from the device to
establish the debug environment. This operation litters the project
build directory with the libraries and executables that don't belong
to it. Instead of pulling the files to the root build directory, it's
better to isolate these files using subdirectory.

Fixes: QTCREATORBUG-29336
Fixes: QTBUG-113851
Fixes: QTBUG-111284
Change-Id: I32c3403dc5f79c42b1ff2bd676c2cf3ae8d43ec3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-06-29 11:41:02 +00:00
Assam Boudjelthia
cae4dd01a8 Android: Skip "Build APK" for non-app builds
For projects using Qt 5.15 and Qt 6, the deployment settings
file is generated by CMake/qmake and not Qt Creator, so if
such file doesn't exist or it's been generated by Qt Creator,
we can assume the project is not an android app.

This is mainly a workaround for now to avoid a more involved
fix which would need to potentially remove the method
AndroidManager::deploymentSettings() (and it's use cases) which
is used to generate a minimal version of deployment settings
file, which was added some time ago where the build system
CMake and Qt wasn't handling that generation, but now with Qt
5.15 and Qt 6, that shouldn't be a concern of Qt Creator.

Fixes: QTCREATORBUG-27167
Fixes: QTBUG-111334
Task-number: QTCREATORBUG-26888
Change-Id: I15657f3b67acc52c28c92e6af24668f778432a19
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-22 11:22:26 +00:00
Jarek Kobus
a0f6e8dc04 Utils: Rename qtcprocess.{cpp,h} -> process.{cpp,h}
Follows QtcProcess -> Process rename.

Change-Id: I97235a9a40cb7fd52944515b7ab878d96528f919
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-04 05:52:26 +00:00
Jarek Kobus
470c95c94b Utils: Rename QtcProcess -> Process
Task-number: QTCREATORBUG-29102
Change-Id: Ibc264f9db6a32206e4097766ee3f7d0b35225a5c
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>
2023-05-04 05:52:16 +00:00
Alessandro Portale
3eb60d80e5 Android: Skip "Make Install" and "Build APK" if not ProductType::App
If the target's product type is not "App", the "Make Install" and "Build
Android APK" build steps need to be skipped.

Fixes: QTCREATORBUG-26980
Change-Id: Ia8bb61d407d040b851a74bad3d23876a7d31af73
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-04-06 13:32:41 +00:00
Alessandro Portale
6079b7b378 Android: Update SDK manager tree display
Adopt latest naming in Android Studio.

Change-Id: I524adf5858933fddefe496db434b2fdca029d18f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-03-22 10:55:47 +00:00
Eike Ziller
c7e94d80c7 Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/shared/qbs

Change-Id: I33e13270c8c15a51b4ce4eaa6b4584041ed124e0
2023-03-13 12:30:04 +01:00
Orgad Shaneh
70369aca13 Android: Remove unreachable return
Reported by Coverity.

Change-Id: Id1b67f0adae3ff0c9157428726778c8c3b2a03a7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-03-06 08:32:01 +00:00
hjk
3e7d93c788 ProjectExplorer: Move some not-fully-session related bits
... out of SessionManager.

The idea is to later move SessionManager into the Core plugin,
which both is sensible conceptually and also prerequisite to
merge the Bookmark plugin into TextEditor plugin.

Currently, only the interface is split, as the load/save
implemetations are non-mechanical to disentangle.

Change-Id: I31631db3094ea192825a2ccaa6add6188662940b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-01 09:26:50 +00:00
Alessandro Portale
b9a24753a0 Android: Fix opening of package location after build
Fixes and consolidates into one common function the package path
retrieval for the eight combinations of:

(apk|aab)(debug|release)(signed|unsigned)

Fixes: QTCREATORBUG-28791
Change-Id: I6e8c54f555b95aca448032783938f9f7f89bc653
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-02-23 13:10:07 +00:00
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
6f7837e5e9 Android: Remove gradle.properties file handling
The modification of gradle.properties files was originally a feature of
the Android plugin which eventually moved over to androiddeployqt.

Moreover, this code got accidentally disabled in Qt Creator 4.10 and was
appartently not missed till now. I only noticed it while "FilePath-
ifying" code in the Andsroid plugin.

This change removes the gradle.properties file handling code from Qt
Creator.

Fixes: QTCREATORBUG-28494
Change-Id: Id4f2722f4965c877a065386b34a71d8368147b08
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-11-30 10:53:56 +00:00
Alessandro Portale
65f27c765a Android: FilePath-ify certificate handling
Change-Id: Ic7bf25567ac74555926d105c03cdac5a9e49b5a6
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-30 10:29:29 +00:00
Jarek Kobus
ccb2317a16 Android: Fix clazy "Mixing iterators with const_iterators" warnings
Change-Id: I90fd2c10240a367ef546f9b48b2a2f784f00f4e0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-30 07:09:10 +00:00
Alessandro Portale
4536258c9e Android: Revive second half of AndroidManager::updateGradleProperties
The extra "gradlew" which gets inserted into packageSourceDir makes all
paths that are subsequently based on packageSourceDir be invalid.

Amends: ded34daa2b

Change-Id: Ied7fe12a3d68c27b56eeb4d0ad4ce375ee228f4e
Reviewed-by: hjk <hjk@qt.io>
2022-11-24 10:57:58 +00:00
hjk
c8fbc0b13c Android: Code cosmetics
Change-Id: I2a877e1f94ba9ef9e8487aa78dee95f89ec16312
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-11-10 09:59:42 +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
Alessandro Portale
a917770053 Replace QtSupport::QtVersionNumber with QVersionNumber
Task-number: QTCREATORBUG-27786
Change-Id: I71a44709c264829f629c9dfce702076eda297a77
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-09-19 12:08:39 +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
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
Alessandro Portale
8ad4acdd30 Android: Don't quote log lines with path names
Change-Id: I70f23af46bd6c8318971b20727e4010889bdcebc
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-07-17 11:11:45 +00:00
Alessandro Portale
83c380665d Android: Try harder to get a valid ABI in apkDevicePreferredAbi
For AndroidDeployQtStep::gatherFilesToPull to pull the right
app_process, the first attempt at getting the ABI is a peek inside the
APK.

If that APK does not exist yet (due to clean 1-st time build), it falls
back to get the "AndroidAbis" from the project node. That fails in the
case of CMake because AndroidAbis is only set by qmake, and never by
cmake.

Thich change adds another fallback to query "AndroidAbi" instead.

Fixes: QTCREATORBUG-27737
Change-Id: I2e944d6d30a61047b4c66ed73211296c87d57b51
Reviewed-by: hjk <hjk@qt.io>
2022-06-29 08:46:36 +00:00
David Schulz
153ff77a6b Utils: use cleaned stdout all over the place again
Amends 5ee880ce5e

Change-Id: Ie0202db7d8455372c3697087d9571db6706b45a1
Reviewed-by: hjk <hjk@qt.io>
2022-06-17 13:04:42 +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
Alesandro Portale
3d2c5ee81c Android: Align Android SDK display names with Android Studio
Let the SDK packages have the same names as in Android Studio. Including
the code name (in brackets) makes things easier for people like me who
remember sweets better than numbers.

Fixes: QTCREATORBUG-27161
Change-Id: Iedf2d1ebaf5405669c49536258143db5c7570a9e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-04-08 10:31:28 +00:00
Assam Boudjelthia
851171f772 Android: rename avdname to avdName in AndroidDeviceInfo
Change-Id: I9f4743b0d9f953f1fa407acfea41345571cb9998
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-14 17:48:31 +00:00
Eike Ziller
cd8c4ced81 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: Ic02df53b880d0861d9d9ea0df3e0d381ae99f350
2022-03-11 09:50:48 +01:00
Assam Boudjelthia
e1643c8903 Android: display Android 13 packages correctly in sdkmanger
Change-Id: I49cc45dce0523e55ff56df7e429dd9dc93f46534
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-07 11:45:33 +00:00
Jarek Kobus
8e0ae8ba96 QtcProcess: Limit the inclusion of qtcprocess.h
Move the rest of QtcProcess enums to processenums.h.
Move ExitCodeInterpreter into processenums.h.
Remove superfluous Utils:: prefix.

Change-Id: Iaa596f353d33d6930085a621b114cc15a35caa80
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-02 13:30:39 +00:00
Assam Boudjelthia
328886ed4d Show Android api 32 as Android 12L
Change-Id: I48122062de4ce3bc092089d73d7bbae5abced73b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-01 11:50:04 +00:00
hjk
1fc83d2a56 Utils: Wrap various file system iteration flags and filters
... into a single class.

This makes passing them around as a whole easier, and opens a path
to have "generic" filters in form of a lambda or such.

Change-Id: Ibf644b2fedcf0f1a35258030710afff8f5873f88
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-26 13:13:41 +00:00
Jarek Kobus
5127d155d2 QtcProcess: Get rid of setProcessUserEventWhileRunning()
Introduce EventLoopMode enum and pass it to the
QtcProcess::runBlocking() instead. There is no need to
store this setting. By default this value is NoEventLoop.

Change-Id: Icad98b77bec5280b79039b7e5aa4ec408261521c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-25 08:44:11 +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
Assam Boudjelthia
d80f3f4d8a Android: remove unused function that couldn't be removed in 5.0 branch
... because of binary compatibility.

Comes after a2b6dba0bc.

Change-Id: I18866de39a05c6690b47632cc5503f8555e006da
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-11-08 09:18:29 +00:00
Assam Boudjelthia
12ccd9ec54 Andriod: declare QLatin1String as char[] instead in AndroidManger
Change-Id: I4f11950dcdfa0caddf02bf2b123ff78a9c01c062
Reviewed-by: hjk <hjk@qt.io>
2021-11-05 14:16:03 +00:00
hjk
a7c8c97a68 Android: FilePathify part of debugger abi detection
Change-Id: I3abbc780c1e1301db4c6d367dcdf1dcf8cbf556d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-11-05 10:26:52 +00:00
Eike Ziller
e8ba5b75cf Merge remote-tracking branch 'origin/5.0' into 6.0
Conflicts:
	src/plugins/android/androidpackageinstallationstep.cpp
	src/plugins/cppeditor/cppmodelmanager.cpp

Change-Id: I3bad38e1cfe717e98209d49461c9813a8e555eff
2021-10-26 09:13:24 +02:00
Assam Boudjelthia
ec55b1a483 Android: remove AndroidDeviceType and State from AndroidDeviceInfo
No need to have these enums which are now only a duplication of
IDevice::MachineType and IDevice::DeviceState.

Change-Id: Icc3f112f2670c7354bb282b36fad0f0631b9e047
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-10-25 09:21:37 +00:00
Assam Boudjelthia
fbcb45c105 Android: get build dir based on settings file path for qmake projects
Check Constants::AndroidDeploySettingsFile path first, and use
the buildTarget's workingDir only if that former value is empty.

Fixes: QTCREATORBUG-26357
Change-Id: I726a4b5cd60042845988b4428eea03ef0adb9920
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-25 09:20:23 +00:00
Assam Boudjelthia
91117a1c36 Android: Clean up for extraData constants
clean, rename and delete unused constants, we well as unify the
usage between qmake, cmake, and qbs.

Change-Id: I8827ac2f2f7660e337694fef17f744e727bd776a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-06 08:07:42 +00:00
Christian Kandeler
49569574de Fix some warnings about unused variables and functions
Change-Id: I5f0acd9598bc7f3a79963cc4e1b255e2b6fb2e5d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-27 08:47:36 +00:00