Commit Graph

598 Commits

Author SHA1 Message Date
hjk
6eaf239777 ProjectExplorer: Prepare more flexibility to aspect layouting
This hides the explicit use of a QFormLayout from the aspect
interface in a new LayoutBuilder class. That currently works
only on a QFormLayout in the back, but opens the possibility
to use e.g. a QGridLayout as use on the Kits and some option
pages.

The aspects now only announce sub-widgets they like to add,
actuall positioning is does by a new LayoutBuilder class,
also cramming several widgets in an hbox in the right column
of the QFormLayout is done there.

Change-Id: I2b788192c465f2ab82261849d34e514697c5a491
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-10-18 12:24:39 +00:00
hjk
ddf0dd8734 Utils: Add a FilePath::isDir() convenience function
Change-Id: I1df0ee1b136299ae6e4f2e5bd0bdc24bfeca33dd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-11 12:46:10 +00:00
hjk
e9d8ff21b0 Remove unused QObject parent arguments on options pages
In the new plugin setup scheme they are data members of the
plugin pimpl and never use the parent.

Change-Id: I28fe150393e8159064dcfbd113ce0320af50fd58
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-11 06:03:40 +00:00
hjk
d471b6df90 iOS: Avoid one use of runconfiguration in IosRunner
Change-Id: If0f1e4a64db692ad373fc73087dd1f5c329a3832
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-05 08:47:06 +00:00
hjk
d39d26a54f iOS: Avoid use of RunControl::runConfiguration() in QmlProfiler support
Change-Id: Id296ddb364c7503506e32c01d594cdca15715859
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-03 09:10:46 +00:00
Sona Kurazyan
8e31932c29 Remove usages of deprecated APIs of QLayout
Replaced:
  QLayout::setMargin() -> QLayout::setContentsMargins()
  QLayout::margin() -> QLayout::getContentsMargins()

Task-number: QTBUG-76491
Change-Id: If28ef6910b3afe5d04e4746b74f9362a3e3b3c8e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-02 13:01:07 +00:00
hjk
228f5fc319 iOS: Remove unused IosRunConfiguratoin::profilePath() declaration
Probably unused since the invention of buildKey().

Change-Id: I1bddd5f790e6dfdd509fd47bc5f5209cbaac091c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-02 12:17:31 +00:00
Tobias Hunger
8bfe0da2f7 Ios: Silence warnings about unnecessary ';'
Change-Id: Ie77d1f49da7eaf970a508f316034741b5d7b94b7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-02 09:35:36 +00:00
Tobias Hunger
ac8fe14508 Ios: Fix spelling in id
Change-Id: I96b4a19615560c5d22afca9f07ae715e7ff4e646
Reviewed-by: hjk <hjk@qt.io>
2019-08-30 14:31:54 +00:00
hjk
7cd3bda4c0 iOS: Fix/add RunWorker ids
Easier to debug worker setup errors.

Change-Id: I1d050c715488db2bcce323f4efcd9808d1770eaa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-30 12:25:53 +00:00
hjk
335ea0c831 iOS: Avoid double-indirection between DeviceTypeAspect and run config
No need to leave the aspect context.

Change-Id: I96a93f7c85d8bbb1fdc28352a4c70a29bc510e4c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-30 07:11:45 +00:00
hjk
3844f59806 ProjectExplorer: Standardize RunWorker creation logic
This unifies the remaining paths of RunWorker creation to always
use RunWorkerFactories in the plugin pimpls.

There were, and are, still effectively three basic kinds of workers:
 - "toplevel" tools corresponding to the run modes, that are often all
    that's used for local runs and directly started via the fat buttons
    or e.g. entries in the analyze menu, with factories already previously
    located in the plugin pimpls
 -  core "tool helpers", providing tool specific functionality typically
    used in conjunction with a remote device specific run mechanism,
    set up via RunControl::registerWorkerCreator
 -  target/device specific runhelper like port gatherers contructed e.g.
    via *Device::workerCreator(Core::Id id)

Worse, these categories are partially overlapping, so it was not
clear how a "clean" setup would look like, instead some ad-hoc cobbling
"to make it work" happened.

In some cases, the runMode id was used throughout the whole ensemble
of run workers for a given run, and which worker exactly was created
depended on which of the mechanism above was used in which order.

With the new central setup, the top-level runmodes remain, but the
second kind gets new ids, so the implicit dependencies on order
of setup mechanism are avoided.

This also helps in the cases where there was previously unclarity of where
and how to set up worker factories: It's always and only the plugin
pimpl now.

Change-Id: Icd9a08e2d53e19abe8b21fe546f469fae353a69f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-08-27 07:54:45 +00:00
hjk
dca7edbeef Let PortsGatherer produce full URLs instead of ports only
This is what the consuming code expects in most cases.

Change-Id: I135592039e28b994996186f627215ab1d2f8d6dc
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-08-26 08:16:03 +00:00
hjk
f187ddd590 iOS: Put common IosDevice constructor code into a function
It is not even clear that the remaining difference are needed.

Change-Id: Ic4418143242793d82a1f4c4c368af69a2e537078
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-19 13:51:56 +00:00
hjk
36d98d4af7 ProjectExplorer: Base IDevice::osType on a data member
Change-Id: I969563e6e62895a51fb4692c8eb0bab278f0ecae
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-19 07:44:45 +00:00
hjk
1ca91b16a0 iOS: Remove unused qtsupport includes
Change-Id: I0f5c867e712d152377d05c3e4105e7705e7a4547
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-08-14 08:37:49 +00:00
hjk
65f2f8a2b4 Drop connections to active target and build config changes
... for build step related widgets. These are specifig to a build step
which in turn is only interested in its own build config and target.

Change-Id: I5ec277ba279932d18a615e528acffaccdc41e307
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-13 13:21:52 +00:00
hjk
fcffb5f2fc Utils/all: Create an OutputFormatterFactory
Essentially following the scheme used for the various project
configurations. This makes it possible to construct OutputFormatters
by Id only, potentially reducing hard plugin dependencies and
opening the road to have several output formatters per
RunConfiguration/Outputpane/...

Change-Id: I4b5fb6fb6be8b0d9a0859f178bb0effc3398b09e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-13 13:07:06 +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
dcc47f2587 iOS: Share code for simulator display name
Change-Id: Iecfaa43aefc7ed783d4149dec008330ee5c124e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-08-12 08:37:12 +00:00
hjk
f9c221eb54 ProjectExplorer: Re-work setup runworker factories
This combines two of the previous three paths to create run workers,
and refers to RunConfigurations by id, not by type where possible
to decrease coupling between the classes.

Only allow "type of run configuration" and "type of device"
as the only possible kind of restriction and require a uniform
RunWorker constructor signature.

Adapt user code to fit that pattern.

Change-Id: I5a6d49c9a144785fd0235d7586f244b56f67b366
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-08-09 12:34:42 +00:00
Eike Ziller
babbb0a9db iOS: Fix simulator listing with Xcode 11
Xcode 11 changes the output of simctl slightly. At some point it
introduced a bool "isAvailable" in addition to the string
"availability". Now the latter has been removed.

To avoid listing all devices as available, we need to adapt our simctl
output parsing.

This already takes effect when installing Xcode 11 Beta, even when not
actually using it, since all Xcode versions share the simulator
infrastructure.

Fixes: QTCREATORBUG-22757
Change-Id: I1ef416f6c544db53d9ee99ccc3b0a2e97dfcc870
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-08-09 11:08:26 +00:00
hjk
16b9a47e83 ProjectExplorer: Replace Project::projectConfigurationChanged
... by a Project::buildConfigurationChanged. That's the only case
used, and saves filtering on the receiver side. Also, the passed
bc is (in non-null) the active one, so isActive checks are not
necessary.

The null case seems to be only possible to trigger when removing
the currently active build configuration manually i.e. happens rarely,
so having it trigger an unneeded final display update on the dying
build config is tolerable, so drop the null check in such cases
to achieve a more uniform pattern.

Change-Id: I46f72e9e277767214dbd6920dd86b026a7084f46
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-02 13:59:31 +00:00
Christian Kandeler
45f9c178e1 ProjectExplorer::IDevice: Add a default display name
Task-number: QTCREATORBUG-16281
Change-Id: Ieff929343b5dc3a84d9ecf5f4f0a032cb4ae4076
Reviewed-by: hjk <hjk@qt.io>
2019-08-02 12:23:12 +00:00
hjk
dcb892cf39 Update build step widgets only on changes to the owning build config
Updating on changes to other build config seem excessive, as the
updated details only depend the owning build config.

Change-Id: Iba86f2b56033ac55381d452dd2a435e5dda72674
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-02 11:20:45 +00:00
hjk
7d3091a7b9 ProjectExplorer: Remove ProjectConfiguration base from Target
Targets are different from {Run,Build,Deployment}Configurations,
both regarding the level in the ProjectExplorer hierarchy, and
also by the set of supported operations (e.g. aspects).

Change-Id: Ia8490e2280a9ecc518395c5e48ce2fd5d6d58fd2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-31 11:18:16 +00:00
hjk
e3b1106afa Compile fix with recent Qt dev
The reasoning in 1b4766e26c did not take into account that the scope
of QT_NO_JAVA_STYLE_ITERATORS may change over time, as done with
f70905448f6 in Qt base.

Change-Id: Ib1966ff26c4d36d5f62e149d6b45baa4aecf825d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-07-29 08:54:18 +00:00
hjk
8b72e92167 Utils: Add CommandLine convenience constructors
... taking a QString for the executable.

This weakens the very explicit QString -> FileName conversion via the
named constructors for the special case of constructing a CommandLine.

I think that's worthwhile here, as it reduces the noise on the caller
site under circumstance where the nature of the thing is obvious.

Change-Id: I27b4a73639728893d053b2e7ba65cb745f0ffe83
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-23 15:51:45 +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
Tim Jenssen
1df6443d4a Merge remote-tracking branch 'origin/4.10'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/libs/utils/synchronousprocess.cpp
	src/plugins/baremetal/iarewtoolchain.cpp
	src/plugins/cmakeprojectmanager/cmakeproject.cpp
	tests/unit/unittest/CMakeLists.txt

Change-Id: I124ad492df403286751e175d27fe36487ddf6d07
2019-07-04 15:17:55 +02:00
hjk
6a58666f44 More Utils::toSet/toList
... and unrelated cosmetic changes.

Change-Id: I591b17fd5289831e701b683f8fb47816efd1fa67
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-04 12:28:38 +00:00
hjk
9b0feb726e Use more toList/toSet to avoid deprecation warnings
Change-Id: I43575a54ff944bf0e89d452d13944fcaee270208
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-03 15:39:59 +00:00
hjk
54c82c950c iOS: Inline IosBuildStepConfigWidget
In preparation of aspectification.

Change-Id: I0a97440aa6c4bc749af51219ccace519982bfaa1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-06-26 12:59:33 +00:00
hjk
3170601b4d ProjectExplorer: Prefer ProcessParameters::setCommandLine
... over setting command and args individually.

Change-Id: Iec7c8d3a0b05fb8fa0639f7ddbe7ccdc7387d2a2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-06-24 13:47:05 +00:00
hjk
1396c6e8e9 ProjectExplorer: Use Utils::FileName for Runnable::executable
Change-Id: I584bc18aa19a4c9886af7b13e95052dfd4350b34
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-06-21 10:32:31 +00:00
hjk
f420788465 ProjectExplorer: Make Device::displayType a data member
Change-Id: If650f660e3b10bc28d575ded07a854f59be26f87
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-06-19 13:44:30 +00:00
hjk
514e3776a1 iOS: Inline createIosToolChain()
Plan is to only let the (base) factory create toolchains, having
the 'new' is a separate function complicates the process.

Change-Id: I1faff3e2ce4a19a2947ba4ac4e156ed56e5d18e5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-06-19 11:19:17 +00:00
hjk
bf83926372 ProjectExplorer: Add a central ToolChainFactory::createToolChain(type)
This is meant to be the only function directly creating tool chain
objects in the long run (and also the only one setting ids, removing
the need to spell them out in the individual constructors).

Change-Id: Idef242612a5a3f7012628b4080a03d6ee70e5ba0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-06-14 13:44:05 +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
Alessandro Portale
0933c20de8 connect() to ambiguous signals/slots: Replace static_cast with QOverload
Change-Id: I473d7a2a16509cee944a2a21b022a3f6f02cfd8d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 14:07:03 +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
2ac89cba92 ProjectExplorer: Use an alias for QList<Abi>
Change-Id: I69231c5974620ae30296bfc4e0ab41c900d95a3c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-27 09:35:53 +00:00
hjk
a889669369 iOS: Use base IDevice::clone() instead of local toMap/fromMap
Some non-persistent data is handled in the base.

Change-Id: I5f6c5429b88178115bf26f885b80fa3daebf227e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 08:19:27 +00:00
Eike Ziller
52d48c75ae CMake build/macOS: Centrally detect system libraries
And realize that at most places (except native help viewer) the code
using them is not optional on macOS.

Change-Id: I308406a0e8f176dad4151d23a33cd3fc0fb8635c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-24 13:04:15 +00:00
hjk
274bbefeff iOS: Remove remaining FileName::appendPath uses
Change-Id: Ia550151bbcad696a3bd59e630e80a8f89a908e08
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-24 07:32:17 +00:00
Eike Ziller
6fb9bf453f CMake build: Add ability to disable building of individual plugins
Adds a cache entry "BUILD_PLUGIN_${NAME}", defaulting to ON which
can be set to OFF to disable building of a plugin.

Adds a extend_qtc_plugin function that should be used to add
properties to a plugin after add_qtc_plugin, instead of the
standard CMake functions target_... . The new function results
in a no-op if the plugin was disabled.

Change-Id: I57f6799620aea0aaa8b56acead4815ccced95911
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-05-23 11:13:21 +00:00
Christian Kandeler
23a71e85bf Ios: Fix typo in device factory creation
Introduced in 0c2101d816, but only started to cause problems since
555360c1d4.

Fixes: QTCREATORBUG-22449
Change-Id: Id531d7cb94c80b762f7981cf3414348080d0d613
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-21 14:22:25 +00:00
Cristian Adam
d855b84c5d Qt Creator CMake port
Based on Tobias Hunger's work from a few months ago.

The CMake configuration needs libclang and Qt paths specified as
CMAKE_PREFIX_PATH.

Auto tests are run with "ctest". At the moment the pass rate is 87%.

Change-Id: Iba98e39bf22077d52706dce6c85986be67a6eab0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-17 13:33:28 +00:00
hjk
166cb39709 iOS: More FileName::appendPath -> pathAppended changes
Change-Id: I3db6b1778e6e47e26e243fb2609c481651aa91fe
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-17 09:26:57 +00:00
hjk
9433b8a7e7 ProjectExplorer: Use Utils::FileName in ProcessParameters
For the command and the working directory.

Change-Id: Ia69dc7100aeb57bb6e1b35f4dd4f3cf3763d8cda
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-15 12:55:22 +00:00