Commit Graph

252 Commits

Author SHA1 Message Date
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
hjk
c95bde6f6a ProjectExplorer: Pass Id to BuildStep constructor
Allows to use constants in fewer places, similar to what e.g.
RunConfiguration does.

Change-Id: I9d049128206c4acf0ce14b06b66d6c090a7c5242
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-01-09 11:26:01 +00:00
hjk
d0b8e1a1ae Android: Inline *AndroidBuildApkStep::findInBuild() into callers
This is an unusual and unneeded indirection.

Change-Id: If0e241364899555f5fe6e07fed38f440bbf2812b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-12-20 14:21:46 +00:00
Christian Stenger
52106ecfef Android: Remove unused variable and function
Change-Id: I435bbd35c65a099fc202869a674431c11c76b0b9
Reviewed-by: hjk <hjk@qt.io>
2019-12-19 10:12:45 +00:00
Eike Ziller
e16876df0c Merge remote-tracking branch 'origin/4.11'
Change-Id: Ieb0bb1ebab9a5efb42d15bbeac2cd4c46a6de962
2019-12-18 09:14:14 +01:00
Alessandro Portale
b7acfc37b5 Android: Remove "qtlive" support
Productization of Qt Live preview for Android didn't happen.

Change-Id: Ie69d8193afec9b59d859bc65c45d36028247e2b9
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2019-12-18 05:46:53 +00:00
BogDan Vatra
ce95e31766 Fix debugging armv7a & x86 when running on 64 bit targets
We need to choose the preferred ABI based on what it's in the package
not based on what Qt supports.

Change-Id: I243fbf67913af7804af868d507323c0934ad3752
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-03 14:15:20 +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
BogDan Vatra
6b31f9cf23 Android multi arch support
[ChangeLog][Android] Android multi arch support for qmake

Change-Id: Ib8b1874604a3392130c96fbc00b26713b3d788ae
Reviewed-by: hjk <hjk@qt.io>
2019-09-16 07:34:54 +00:00
hjk
9d206a2bc4 ProjectExplorer: Hide parts of BuildStep's QObject-ness from users
This lets the compiler catch issues like QTCREATORBUG-22818 and
saves visible casts on the user side.

Change-Id: I5a307a55364daa0bec039a4c38cc9827841ff9c1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-20 10:35:57 +00:00
Eike Ziller
917636b88b Merge remote-tracking branch 'origin/4.10'
Conflicts:
        src/libs/utils/consoleprocess.h
        src/libs/utils/consoleprocess_unix.cpp
        src/libs/utils/consoleprocess_win.cpp
        src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp
        src/tools/clangrefactoringbackend/source/symbolscollector.cpp
        tests/unit/mockup/projectexplorer/project.h

Change-Id: I8d10f26b9bcb54829ba31cdc2272885691df1e16
2019-06-18 12:30:55 +02:00
BogDan Vatra
30e863b676 Fix crash when project node is not found
Change-Id: I235fecb579023530692742f14474ae5229237c28
Fixes: QTCREATORBUG-22564
Reviewed-by: hjk <hjk@qt.io>
2019-06-17 06:56:23 +00:00
hjk
ca4ba34229 Use Utils::FilePath in SynchronousProcess
Adapt callers and surrounding code.

Change-Id: Ie6c1883a44169cf9d790d06b660f46d24dc24c89
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-06-11 08:11:07 +00:00
hjk
611e1ea837 Utils: Encourage marking of raw command line parameters
Change-Id: Id66ac07732c66ab8c1232fe1f58042de8a61abb0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-06-06 12:22:47 +00:00
hjk
8e7138f06a Android: Use Util::FilePath for working directory in deploy step
Change-Id: I37e716f267cbcc39bc0bddc8b37e84613e048721
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2019-06-05 09:58:33 +00:00
Anton Danielsson
a154f26af5 Fix AndroidDeployQtStep
Bug was introduced by Utils::CommandLine.
Cased "executable" to be an empty string.

Change-Id: I2b5cd31e3eb1d2d18252dac90de07c053de9f3ce
Reviewed-by: hjk <hjk@qt.io>
2019-06-03 12:13:52 +00:00
hjk
a7345b67c1 ProjectExplorer/Android: Some more use of Utils::CommandLine
And surrounding cosmetics.

Change-Id: Iad3d2d43856b1fcd9530d4a209fff9887e6cec42
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-29 16:49:47 +00:00
hjk
4098be05b2 Utils: Extract a CommandLine structure from a QtcProcess
We regularly pass around strings or filenames or pairs of strings
or filenames and stringlist etc the in the end will be used
as a kind of "command line", with quite a bit of ad-hoc user
code and QtcProcess::addArg etc to set them up and manipulate them.

Let's have a class for that concept.

Change-Id: I288ab939d853b32c717135a65242c584c2beab50
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-29 14:36:46 +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
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
BogDan Vatra
57c48630a8 Android: Add proper QBS support
Now we can use QtCreator to build, deploy, run & debug QBS projects.

[ChangeLog][Android][QBS] Add Android support for QBS projects.

Fixes: QTCREATORBUG-15573
Fixes: QTCREATORBUG-19880
Fixes: QTCREATORBUG-22182
Change-Id: I08b153a44dcf7ca178689c1c30fa2201c4cc0dbb
Reviewed-by: hjk <hjk@qt.io>
2019-04-26 06:37:00 +00:00
Eike Ziller
c53ccceff1 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/debugger/debuggerkitinformation.cpp
	src/plugins/languageclient/languageclientmanager.cpp
	src/plugins/plugins.pro
	src/plugins/projectexplorer/kit.cpp
	src/plugins/projectexplorer/kitmanager.cpp

Change-Id: I66fb941202991f35f7d7761430b21e42dfc678a8
2019-03-14 15:51:15 +01:00
Eike Ziller
a1973090da Fix lupdate issues
Change-Id: I0db9094a8161aa8f854ca4fafa16d8bc79a67868
Reviewed-by: hjk <hjk@qt.io>
2019-03-12 16:29:59 +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
Christian Kandeler
966f4ea6a9 ProjectExplorer: Rework the build step run interface
Originally, the build manager used to run all build steps in a dedicated
thread. Communication between the step and the manager happened via a
QFutureInterface that was passed into the step's run() function.
Later, new steps were added that operated asynchronously, so the build
manager had to differentiate between the different kinds of steps for
starting and stopping.
These days, almost all build and deploy steps work asynchronously, which
made the QFuture-based interface look increasingly odd.
With this patch, all build steps are expected to work asynchronously, so
the build manager no longer needs to differentiate. Steps are started
and requested to stop via the run() and cancel() functions,
respectively, and emit the finished() signal when they are done. Build
step implementors no longer have to deal with a QFutureInterface. For
steps whose implementation is inherently synchronous, the BuildStep base
class offers a runInThread() function.

Change-Id: If905c68b234c5a669f6e19f43142eaa57d594803
Reviewed-by: hjk <hjk@qt.io>
2019-01-31 16:10:01 +00:00
hjk
fd5916ae23 Android: Simplify deploy step widget setup
Remove the nested QGroupBox, inline code into only callers, etc.
Also use better display name for deploy step widget.

Change-Id: I579810c04dea032a98ba28db6de035048f801f75
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-01-28 10:16:17 +00:00
hjk
90e31668d6 Android: Code cosmetics
Remove unused functions, inline rarely-used code, ...

Change-Id: Ib3b0645cebf6bfabea1f4f2b4c5a582afca18101
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-01-22 15:14:58 +00:00
hjk
372fbf9c05 Use new DeployConfigurationFactory::addInitialStep in some cases
Less code, less classes.

Change-Id: I3ba9920f4f389e14c67cd8c5d937a4b4659865e7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-21 12:05:28 +00:00
hjk
f007bc7593 ProjectExplorer: Simplify BuildStep::init() signature
The extra parameter was always computed but used only in one place,
and that use got removed lately.

Change-Id: Ie10c0107ca70ee97ce03f83294992aab8d1a3ffe
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-18 09:11:37 +00:00
hjk
a1ae5820af Android: Make device info caching hack a bit less intrusive
The list of earlier build steps is not used anywhere else,
so it's not a really useful generic feature to have.

Avoid its single use here by searching for the interesting
step directly.

Change-Id: I52fffc75008dc01ff8ec6ca16045cbf151087ec1
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2019-01-15 13:18:02 +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
Robert Loehning
82e997cf59 Android: Capitalize properly
Change-Id: Ie5f35592db6c83feff63df519cc15a47eabc8d9c
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-10-26 13:45:53 +00:00
hjk
bc5e640a46 ProjectExplorer: Use a data member for BuildStep::runInGuiThread
Change-Id: Ia219fcf595c05c6f1b82f420454bd906c6870ee7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-10-23 15:38:43 +00:00
hjk
0f5d5dbfe4 ProjectExplorer: Make BuildStep::immutable use a data member
Default to false, remove all no-op reimplementations.

And rename the getter to isImmutable according to the rules.

Change-Id: I8cce79d88fb59badfa1cffcf30a46f7ff3b09e8b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-10-23 14:12:39 +00:00
Eike Ziller
511bd64f3f Merge remote-tracking branch 'origin/4.8'
Change-Id: I0ff6f659b7ccd4ff5a79e422a1d54488508fe05f
2018-10-16 07:11:57 +02:00
Orgad Shaneh
bdc2b4b59f Remove hard-coded disabling of debug logs
Instead, set the default level of all logs to QtWarningMsg.

The call to setFilterRules overrides the user preferences in qtlogging.ini.

Change-Id: Id5f6cd550d14ff7f45ae04c5d3110e0bafb0f072
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-10-13 16:36:58 +00:00
Vikas Pachdha
ca69b8a8a8 Android: Re-install Qt live on version mismatch
Use version code to determine the app's version, version
name is only for display

Change-Id: I8e3a8f6b1b8fab2014a762ebabf09b3ce2e0b559
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-10-08 08:54:36 +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
hjk
d8326afcff Android: Simplify apkPath determination
It doesn't explicitly need the qtSupport indirection anymore.

Change-Id: I25f0649a3b7760fdef3b62097ac55341e6b16fe4
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-08-01 10:47:02 +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
Vikas Pachdha
b8da47af9c Android: Log Qt live apk path and few more code paths
Change-Id: Id743db4865b399c619c04fc393540758352c60e1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-07-19 14:47:58 +00:00
Vikas Pachdha
f10002e3f5 Android: Deploy Qt live apk for QML projects
Task-number: QDS-16
Change-Id: Iafb1f7ea5d354e73020ff3c5175efa82f99bdffe
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-07-10 11:51:44 +00:00
Vikas Pachdha
aa4407e332 Android: add logging for build and run
Change-Id: Idca5a45713762aa9e2861dcc58c3bbd96cbe687e
Reviewed-by: hjk <hjk@qt.io>
2018-07-04 07:04:03 +00:00
hjk
1058e21d02 Android: Merge {Qmake,}AndroidSupport::androiddeployqtPath
... into its only user, in the build-system agnostic base.

Change-Id: I1fe312125a32e3150e4f3183470df716896e55c4
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-06-22 12:47:08 +00:00
hjk
2093781f3a Android: Remove code to help with upgrades from Qt 5.1
Change-Id: Id9cf0cd585ebdaabc03ff58ab04e7c12a5af39ba
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-06-13 12:06:37 +00:00
hjk
b774dff4e8 QmakeAndroid: Move some build-system agnostic items to Android base
Change-Id: I0f258ee5e4afcb3abc7c2bbbaa612b1912a8d2b9
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-06-13 11:23:59 +00:00
hjk
f44e73b858 ProjectExplorer: Simplify BuildStepFactory
De-QObject-ify class, tr contexts are now the product's
context, which was the case in some BuildStepFactories already,
and is current state in {Run,DeployConfiguration}Factory.
One spurious object name removed.

De-virtualize canHandle(), it was never overloaded and is not
intended to be overloaded anymore.

Remove unused clone() function.

Change-Id: Iff7fba5f707505f868f94458084a18650535fa23
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-31 10:15:42 +00:00
Eike Ziller
58bd043e27 Centralize retrieving the "parent" build configuration
If a step is part of a build configuration, that is used, but many steps
can be used as part of a deploy configuration.
In that case the active build configuration of the step's target must be
used, and that logic was duplicated many times.
Instead, let BuildStep::buildConfiguration take care of that logic. For
steps that are not offered for deploy configurations there is no
semantic difference, and for the others this removes code duplication.

Change-Id: I02f3bb50226590092cedcec02fce6fde9c7c6e63
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-22 12:18:36 +00:00
Vikas Pachdha
ee8b4f3512 Android: Do not deploy when missing build config
Fixes deployment on Android

Change-Id: Ie32407afc2151d7fdae62f69b4a1eecd1618da30
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-05-09 10:49:56 +00:00