Commit Graph

39 Commits

Author SHA1 Message Date
Assam Boudjelthia
168adf6cc6 Android: set copy gradle templates checkbox to false by default
The Gradle files are usually not modified by the user, so it makes
sense to make the default behavior not to copy them, unless explicitly
set by the user.

Change-Id: I67a5a8ea402def55a65a4e98588c57a598c5f7d0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-22 07:37:50 +00:00
Eike Ziller
92cd8e6005 Android: Use re-usable "copy and ask for overwrite" callable
Change-Id: I73779b5eaeebbd44fa6333f067adf220ddd77be4
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-13 08:22:04 +00:00
hjk
68c539bb9d Utils: Replace FileChooser::path() by filePath().toString()
Keep the old method for now to ease downstream porting.

The change is kept mechanical, there's a lot of cleanup possible now
on the user code side.

Change-Id: I936baedd45b7ba057f1c789a1bec896886f48eff
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-04-09 17:45:06 +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
Tobias Hunger
144ee4103f android: Do not crash when node is nullptr in CreateAndroidManifectWizard
Change-Id: I1988fa72be535210e50d9ed18ef9d081e6ae39ed
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-02-24 10:47:43 +00:00
hjk
644f1e4faa Android: Un-export CreateAndroidManifestWizard
Not needed outside.

Change-Id: I390802c73d3d8c2a3fa95bc24e944913cea49393
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-02-18 11:58:09 +00:00
hjk
b18fceb15d Android: Pass BuildSystem to CreateAndroidManifectWizard
Instead of a Target and hoping that its activeBuildystem is the
right one.

Change-Id: Ieb384d89e8f580b24205ce46a38f151aa72e2f6e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-18 11:56:23 +00:00
Alessandro Portale
8a8efbd60d Android: Use Utils::InfoLabel in CreateAndroidManifestWizard
Task-number: QTCREATORBUG-23346
Change-Id: I4d9049625e87bc8e770982fd10c59d8030774731
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2020-01-09 08:08:48 +00:00
Tobias Hunger
b489bfd615 BaseQtVersion: remove qmakeProperty(...) getter
Qt 6 will not use qmake to identify a Qt version, so this can not
be part of the public interface of BaseQtVersion anymore.

Provide getters for the information actually read via qmakeProperty(...).

Use the getters whenever possible.

Change-Id: Iadbee80b75e4f8b06caf90e7ed69fae2029b4dd7
Reviewed-by: hjk <hjk@qt.io>
2019-10-01 11:46:43 +00:00
hjk
fc2e22dad2 Android: Move logic to trigger AndroidManager::updateGradleProperties
Previously, AndroidManager::updateGradleProperties operated always
on a project node found using target->activeRunConfiguration()
which might or might not be the one that will actually be used
after the build.

This here still does not address the problem that the activeRunConfiguration
may change but introduces a way to specify the relevant node, and tries
to use the right one when available.

At some time, this could be developed into a real solution, e.g.
by invalidating the cache on build key changes.

Change-Id: I37a3d73e9ad3615025e4def2493f683d11add3c6
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-10-01 08:15:55 +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
1e9636ab8a Some more FileName::appendPath() -> pathAppended() changes
Change-Id: Ie494f7ae8a96d97c9497b3ef38d774d2cf787b7f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-17 07:46:56 +00:00
hjk
ce449e4219 ProjectExplorer: Remove BuildTargetInfoList wrapper class
Change-Id: I1a2ae06ec8c5b7278abca2386834d7edd31597d7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-14 13:30:34 +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
hjk
ea9dad4719 ProjectExplorer: Introduce Target::buildTarget(buildKey)
A convenience wrapper for

   applicationTargets().buildTargetInfo(buildKey),

the only context using the BuildTargetInfoList member.

Also, only one of the free comparison functions is ever used,
only in one place. Inline it there.

Change-Id: I7565e9d51d429af34352649e235243e5b3328fe9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-20 11:27:16 +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
hjk
5d1114fe52 ProjectExplorer: Drop the target argument
... from ProjectNode::targetData and setTargetData, and rename them
to data and setData.

It was only used in the implementation to retrieve the right node,
instead move the responsibility to find the right node to the caller.

Current assumption is that the functions were always called on
the right node already.

Change-Id: I9ae7e8a7ed5c79b924b99fd9a6a652bad56d114a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-12-20 16:18:37 +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
3ba3f74051 Android: Use QVariant for targetData/setTargetData
This makes it more similar to the classic QAbstractItemModel::{data/setData}
pattern and hides qmake-specific semantic (variables are QString*Lists*)
behind something more general.

Change-Id: I82d7006affd4af208be2b7640076698d13fd3a61
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-08-01 10:47:31 +00:00
Alessandro Portale
be5c228e5b Android: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-equals-default
modernize-use-transparent-functors

Change-Id: I6c9e567edf16cf436c0e0c1239b40f74574a1096
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-07-26 08:26:21 +00:00
hjk
6aeb06c8d3 Android: Move CreateAndroidManifestWizard and related build step to base
It does not directly depend on qmake anymore.

Change-Id: I3b9625e54d98c79ef137059cf4554b3f2807e88e
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-07-11 07:45:13 +00:00
BogDan Vatra
64e5a543a8 Move qmake specific part to qmake plugin, generalize android support
- Split up androiddeployqt into two steps: One building the apk,
  and one deploying it to the device.
- The build apk step base class AndroidBuildApkStep is ihneritaged by
  the qmake specific class QmakeAndroidBuildApkStep.
- The deployment step is still called androiddeployqt
- Move all qmake specific code to the qmakeprojectmanager plguin
- Flip the depencency between the android and qmake plugin, now
  the qmake plugin depends on the android plugin, implementing
  a interface the android plugin provides.

- Note: This removes the debug deployment for now.

Change-Id: I1c386640159ed14b637668abde8eb3b9009ab803
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-07-21 12:41:28 +02:00
Alessandro Portale
fe08cb8902 Centralize error/warning/info icons
There are multiple copies of these pngs in different plugins.
Let's have one version in core, also as @2x variant.

Change-Id: Iedff1a6190a72c1947dd202ae1ee46f59f9fb13c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-06-17 22:45:09 +02:00
Alessandro Portale
d6b12213a7 ProjectExplorer: Use constants for compile_warning.png and _error
Instead of repeating strings like
   ":/projectexplorer/images/compile_warning.png" all over the code,
we should use constants for it.

Change-Id: I91b36838d6da0a2332381e433788e796948d26db
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-05-19 16:51:59 +02:00
Tobias Hunger
dc61b989ac Project: Use Utils::FileName as return type for projectDirectory(...)
Change-Id: I3ea10aa204b1ea41702edab09884b416cd6d9e06
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-05-06 11:48:10 +02:00
Eike Ziller
cab8e4aa03 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/qtsupport/qtversionmanager.cpp
	src/shared/qbs

Change-Id: If7a93fb018799fe6ada76e79c24ab5b43dfa6fc2
2014-04-02 13:24:34 +02:00
Daniel Teske
765ad6c3d2 Android: Set ANDROID_EXTRA_LIBS scoped to the arch
The workflow for adding a library for multiple archs is not ideal, but
now a little better. The user has to go to the deploy setting for a
kit per architecture and add the right extra library.

Change-Id: I2bda6961f6f1164bdc58acd78fa3d2221977f0cf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-04-01 16:23:10 +02:00
Robert Loehning
5bc8e4d9fe Fix typo
Change-Id: I695e95dda92065ccc8c1385b4a1c3277b201f930
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-04-01 11:06:40 +02:00
Daniel Teske
e060086f5a Android: Don't let the user choose a stupid ANDROID_PACKAGE_SOURCE_DIR
On creating a AndroidManifest.xml we ask the user where to put the file,
which as a sideeffect also sets ANDROID_PACKAGE_DIR.

Since we copy everthing from ANDROID_PACKAGE_SOURCE_DIR into the build
directory, using the project's source directory is not desireable.

We now show a big error if the user tries that.

Task-number: QTCREATORBUG-11708
Change-Id: I7fade3efac0b7466cad8e83a92c2115d0a70c683
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-03-13 12:31:02 +01:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
Daniel Teske
f744372ed3 Android: Fix crash in CreateAndroidManifestWizard
Task-number: QTCREATORBUG-10833

Change-Id: I574f6c72b38e76f424b179919fee14a132b3ed4f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-11-20 11:47:31 +01:00
hjk
d7d27fccbc Rename plugins/qt4projectmanager to qmakeprojectmanager
This finally renames the plugin itself.

Change-Id: Ibdf4f4b4e9776c2fdc809e0127f3e1310de44bd1
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-10-29 17:57:06 +01:00
hjk
ce9c2efd1f Qt4ProjectManager: Rename {Qt4,Qmake}{Project,Pr{i,o}FileNode}
Change-Id: I27139d8ccc17b665853bec4a37e80568680b5fcc
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-10-29 14:54:53 +01:00
hjk
35695ebb0c Qt4ProjectManager: Rename the "normal" qt4* files to qmake*
Change-Id: I5e173900a4008c72c67a30eaa9c101027c1b43af
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-10-16 14:30:05 +02:00
hjk
ebcd992577 Rename namespace Qt4ProjectManager to QmakeProjectManager
First step towards plugin renaming.

Change-Id: I8ac017660a7aa2bda0d7bb7d72ab0cfceaf6cfd2
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-10-16 12:09:59 +02:00
Leena Miettinen
e902945b7e Android: fix UI text capitalization and punctuation
Fix typos and style issues.

Change-Id: I8d1bbccd55e7558e7f8a8bedbab95f4bb8a8478f
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-10-09 17:50:52 +02:00
Eike Ziller
56c3d8ffab Unify wizards with TOC and cancel button.
QTBUG-28385 is biting us over and over (QWizard doesn't have close
button nor cancel button on Mac in Qt 5), and actually there's no reason
for us having a wizard without the features from Utils::Wizard.

Task-number: QTCREATORBUG-10346
Task-number: QTBUG-28385
Change-Id: I80c0d82fe6738496c2ac03c31a1c2757ade8e266
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-10-09 14:31:14 +02:00
Orgad Shaneh
7aa91c0bd8 Fix compilation with Qt < 5.2
Change-Id: I8e8b29246274e0b358dad9f5596a64639f0255c5
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-10-01 13:24:33 +02:00
Daniel Teske
64c17eab22 Android: Qt 5.2 deployment add a button to create a Android manifest
The AndroidManifest.xml is no longer needed in as many use cases as
before. So the new deployment does not automatically create a
android manifest. Offer a button on the deployment page to create
a android manifest. This also edits the .pro file adding the
ANDROID_PACKAGE_SOURCE_DIR.

Change-Id: I2655dd6c96e2087732b4d7240b31fe9fcf168600
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-10-01 12:22:21 +02:00