Commit Graph

901 Commits

Author SHA1 Message Date
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
hjk
8b532c2cc5 Utils: Replace FileName::FileName(QFileInfo) by a named constructor
More consistent with the fromString case and avoiding false
conversions QString -> QFileInfo -> FileName in case the
inheritance of QString suddenly disappears.

Change-Id: Ib14646ab1a660fd45dd1ea6862a0b5faa52ad0e3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-13 11:33:33 +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
555360c1d4 ProjectExplorer: Use the fromMap(toMap()) pattern to clone devices
Change-Id: Ie6e73f5ef1019907dd311aac116d71f08b5a5202
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-10 12:35:59 +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
7bea21cff1 Ios: More IosBuildConfiguration aspectification
Move IosBuildSettingsWidget closer to IosBuildConfiguration,
start replacing bits by existing aspect functionality.

Change-Id: I2016f0298f5e0c40d93c4d3bb144904453a5af02
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-06 12:13:22 +00:00
hjk
b3eded3ee1 Ios: Inline IosBuildSettingsWidget ui
First mechanical baby-step towards using aspects in IosBuildConfiguration.

Change-Id: I6eec5136ec05f0f26c3ca915fa7d84dccaafcb82
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-06 09:09:37 +00:00
hjk
36f4b9a81e Ios: Remove direct compile time dependency of IosRunConfig on qmake
Change-Id: Ieb0cbc71b525972afb66883b010cbf389657c406
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-06 08:37:31 +00:00
hjk
1787715165 Ios: Use aspects for build configuration date storage
Change-Id: I6c14cd5acc5dcc820339ccc0e7ef7b30ca7724ab
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2019-05-02 07:27:24 +00:00
Nikolai Kosjar
0612d45b9b iOS: Fix build
Change-Id: Ie120067468d84dbfe9c4b1bb7cbfc3efd0a53a5f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-04-25 08:05:19 +00:00
hjk
d2f2e9e218 iOS: Simplify IosDeployStep config widget setup
There's nothing special here.

Change-Id: Ifce935a7c6e8dd6d745d27353cde3f2c370d0abc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-04-25 07:25:03 +00:00
hjk
0c6f234d43 iOS: Use SimpleRunWorkerFactory instead of manual registration
Same result, less code, more fashionable.

Change-Id: I43b0fcc6e5efb5e394b1652c3c9b34871cbe2fee
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-04-03 06:59:03 +00:00
Christian Kandeler
d6dfa7fa77 ProjectExplorer: More registerKit() simplifications
Change-Id: I61c9e9886f3952b2823433a5c94aedd441ebe7f1
Reviewed-by: hjk <hjk@qt.io>
2019-03-12 14:44:37 +00:00
hjk
9ef0b97716 Avoid some visible uses of RunControl::runConfiguration()
For a long time, probably from the very beginning, a RunControl
was meant to hold (a copy of) data needed for its operation, that was
valid at the time of its construction, to be resilient in cases
where RunConfiguration setting were changed while the RunControl
was running, or to properly re-run with the original settings.

Unfortunately, the task was repetitive, as RunConfiguration
classes had no generic access to properties / "aspects"
and there was was the runConfiguration() accessor (probably
for mostly unrelated reasons in the output pane handling) which
made the idea of just casting that to the original runConfiguration
and access the data directly there appealing, with all the
expected consequences.

This patch here partially addresses the issue by copying some
more of the related data at RunControl construction time and
adjust the using code, avoiding most uses of the runConfiguration()
accessor in a mostly mechanical matter.

Complete removal appears possible, but will be less mechanical
in "difficult" plugins like ios, so this is left for later.

The new accessors in RunControl are very much ad-hoc, leaving
room for improvement, e.g. by consolidating the access to the
run config settings aspects with the other runconfig aspects
or similar. For now the goal is to remove the runConfiguration()
accessor, and to as much as possible fixed data after RunControl
setup is finished.

Next step would be to officially allow construction of RunControls
without a specific RunConfiguration by setting the necessary
data independently, removing the need for the various workarounds
that are currently used for the purpose of faking (parts of) the
effect of the non-existing RunConfiguration or refusing to operate
at all, even if it would be possible.

Change-Id: If8e5596da8422c70e90f97270389adbe6d0b46f2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-12 12:27:35 +00:00
Christian Kandeler
3aea3a13cb ProjectExplorer: Refactor KitManager::registerKit()
The interface of this function was rather unfortunate. In particluar,
the fact that it took ownership of the std::unique_ptr that was passed
in required some weird boiler plate code at all the calling sites.
Instead, it now becomes a proper factory function.

Change-Id: Iecdc6f6345232fc0f0a08bffaf8f1780edb57201
Reviewed-by: hjk <hjk@qt.io>
2019-03-12 10:16:33 +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
c1c3f74dee ProjectExplorer: Remove RunConfiguration::canRunForNode()
All implementations that were returning true effectively did that
in case of node->buildKey() == rc->buildKey(), either directly or
in disguise of qmake's projectPath, so this is the check that is
used now in the two places where this is used.

The new global has the theoretical potential of return true in
cases where it did not before.

Change-Id: Ic5829de5fef0f9a04d516a3d9207685055823775
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-26 08:39:29 +00:00
hjk
15673b6eca iOS: Code cosmetics
Remove unused functions and declarations, brace style, empty lines, ...

Change-Id: I1afe90484879fa93bb1feaa25d12cd4794aa0234
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-25 07:49:50 +00:00
hjk
9e965409d1 Move IDeviceFactory closer to IDevice implementation
Except for the DesktopDevice, which is kind of special. Also try
a bit to make (and partially fail at doing so) naming and code
structure (#include, use of namespaces) more similar to each other.

Change-Id: I9fe266e706b72c14f59ff03ca1ae02dba3adcc71
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-21 13:20:16 +00:00
hjk
139f700162 QtSupport: Replace BaseQtVersion::clone()
... by a mechanism that doesn't require re-implementation in each
derived class.

A QtVersion's type() is uniquely defined by the supported type of
the factory creating it, so that factory can be found and used
for cloning. Non-base data is copied by a fromMap(toMap()) dance
as done in the project configurations.

As a side-effect, the *QtVersion copy constructors are not used
and not needed anymore.

Change-Id: I3aa5a0fd90a27dd115769e0573647cb5669641a0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-19 09:21:56 +00:00
hjk
bfa53a8080 QtSupport: Provide implementation of BaseQtVersion::qtAbisFromLibrary()
Derived implementation either used that as-is, or used the
result as part of their own operation.

Change-Id: I2817c4e6c6701ae647a70e77382dd30c8ea2bd2f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-18 14:51:11 +00:00
hjk
06cc09a30f QtSupport et al: Move QtVersionFactory to *QtVersion implementation
At most a dozen lines each left.

Change-Id: Ifbf34f814266ba7bee83d3fee9db831eb450dfc4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-18 10:12:55 +00:00
hjk
7563cd6d39 QtSupport: Replace QtVersionFactory::canCreate
... by a functor checking some ad-hoc custom structure content.

This effectively replaces one ugliness (access to qmake specific
variable via qmake specific ProFileEvaluator) by an indirection
layer with similarly ungeneric contents, but I like the latter
setup better.

Change-Id: Iaee07c992fce4aabee2f4eae32a2413d772fe945
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-15 16:07:11 +00:00
hjk
3007105d86 QtSupport: Split QtVersionFactory::create()
... into a 'canCreate()' and the actual creation, which can be
done by the already registered m_creator.

Simpler interface, with the (temporary) regression that the
EmbeddedLinuxQtVersion get constructed twice, once only to
determine that it should be alive afterwards. Will be fixed later.

Change-Id: I5da2cafe473b25a0207bbd628632c9a259780361
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-15 15:50:50 +00:00
hjk
66fd5abe58 QtSupport: Drop one suite of QtVersion constructors
Use default plus polish afterwards instead.

Change-Id: Ibd137562128445a5bae5aaa4fc5fcce2df6c3e38
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-15 14:33:56 +00:00
hjk
72d962e949 QtSupport: Simplify use of QtVersionFactory::create()
Use two setters, one already pre-existing, to set autodetection
data instead of passing that through the create/contructor chain.

Change-Id: I8f9bdf2f82518aae765327a823bdea44210c2f96
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-15 11:37:59 +00:00
hjk
f0dabc7442 QtSupport: De-qobjectify QtVersionFactory hierarchy
Change-Id: I6ceccf96f5f6a5dc4e33d667d4fc234e15b88926
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-15 11:35:54 +00:00
hjk
1588205544 QtSupport: Move qmake existence check out of *QtVersionFactory::create
Test globally in advance instead. For two factories that means a stricter
check on the qmake executable but with qmake being a host tool the additional
exists/executable check should be in order.

Change-Id: Ib07ef19aeee2d0a19d4c38e178f3e20d22867c2c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-15 10:37:41 +00:00
hjk
d39dd1e5bd QtSupport et al: Use more data members in QtVersionFactories
Same pattern as for the project configuration factories.

Change-Id: Ia2f85eb2d787965f7a49be3bfe0be20c3f2aed8a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-15 10:37:34 +00:00
hjk
5b03c1e059 QtSupport et al: Centralize QtVersionFactory::restore
Similar to the various types of project *ConfigurationFactory

Change-Id: I7b721f127c8bcc13c7db6880d36c79dd091bc037
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-15 10:37:26 +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
2da48a47d7 iOS: Move updateAutomaticKitList() trigger closer to its user
This removes the IosPlugin::kitsRestored() member that does not
fully fit the standard plugin implementation pattern.

Change-Id: Iedd79e5326b85b189673c19e1920e21c34cd03bb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-02-01 08:18:38 +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
a235d33837 ProjectExplorer: Remove BuildConfigurationFactory::priority
It's essentially an intrusive hack that's used only to prioritize
Ios+Qmake over plain Qmake. The effect is now achieved by an
arguably equally evil dependency on the construction order of
BuildConfiguration factories.

It can be argued, however, that this is a feature as it allows
user plugins to intentionally override core functionality by
using the standard setup pattern and depending on the to-be-
overridden plugin.

Change-Id: Ic1efa305daf3ca19a880d2a7ccb40e2768d8f57c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-01-31 14:33:05 +00:00
hjk
4ae0ad3ab5 ProjectExplorer: Use a addSupportedTargetDeviceType function
... also for BuildConfigurationFactory, similar to Run and Deploy.

Change-Id: I453f08bf145d6a2e764d150646c698d624ae2ce9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-01-31 14:32:54 +00:00
hjk
9d046826f8 iOS: Move IosDeploy*Factory to plugin
Change-Id: I752a497ce95609cfb92207e1dfbc6cf91ffa9f3c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-01-31 08:21:25 +00:00
Alessandro Portale
f5974ad993 Fix warning: "Don't call QVector::first() on temporary QList/QVector"
[-Wclazy-detaching-temporary]

Change-Id: I23f5cbd80bb92d3f9f1bfb5ae07493818958c5b0
Reviewed-by: hjk <hjk@qt.io>
2019-01-28 11:03:39 +00:00
Eike Ziller
0345bcb7cc Help: Rename handleHelpRequest to showHelpUrl
Since that is what it does.

Change-Id: I13ffe21cdb625a0df1313f2ff09bf84196f08768
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-01-25 08:23:18 +00:00
hjk
537a4ba285 ProjectExplorer: Remove registerDeployConfiguration
Since the types are all the same now, no template is needed, and
effectively only m_configBaseId is set, so rename the function
accordingly.

Change-Id: I79bbf488a0549d78b6f3f0408e6744f71a5dc190
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-22 11:44:37 +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
Alessandro Portale
616e19ff9e Fix warning: "Missing emit keyword on signal call"
[-Wclazy-incorrect-emit]

Change-Id: I93bdc6e23cdaccf35c9899ae16870ccc65a54f80
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-01-17 15:54:56 +00:00
hjk
3f3eb40417 ProjectExplorer: Introduce a setter for IDevice origin and id
They are not completely orthogonal, so use one function for
now.

This is the step towards streamlining the IDevice::ctor/create
lines of functions.

Change-Id: I1fe9144c45c7da0c9dcbda3bf424e976e0519cd6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-15 13:02:28 +00:00
Alessandro Portale
eef5131962 Fix: Emit keyword being used with non-signal
-Wclazy-incorrect-emit

Change-Id: I02e54b1170fdd812f3bfee97e9b7ecd6b0560270
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-01-15 08:53:29 +00:00
hjk
09c1c170d2 ProjectExplorer: Use setter for IDevice::type
Second step towards streamlining the IDevice::ctor/create lines
of functions.

Change-Id: I8b0f2270a9f6545ff9419ef8cf44b456c2233223
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-14 15:45:00 +00:00
hjk
75bce4332d ProjectExplorer: Use setter for IDevice::machineType
First step towards streamlining the IDevice::ctor/create lines
of functions.

Change-Id: I44226f8a05902cadd40c8820ab67752070d186c0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-14 15:10:51 +00:00
hjk
a3c6d30b75 ProjectExplorer: Simplify IDevice extra device action setup
Function objects are easy nowadays.

Change-Id: Iec2b770b99d8f11b7a090fb3bd51af8aa60f6fe0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-14 12:55:51 +00:00
Christian Kandeler
c6a6c12f05 Canonicalize some includes
Our canonical style is
    #include <utils/fileutils.h>
rather than
    #include "utils/fileutils.h"
Which makes sense, as such headers will never be found in the local
directory.

Change-Id: I4ca46e90d6c4d19d4b1f235f4c79caad864ef222
Reviewed-by: hjk <hjk@qt.io>
2019-01-10 09:04:46 +00:00