Commit Graph

1245 Commits

Author SHA1 Message Date
Tobias Hunger
45046f7071 ProjectNodes: Do not derive Project Nodes from QObject
That should save some memory per node, and since creator has a lot of nodes
(e.g. opening the LLVM project adds about 1 000 000 nodes) this should be
noticeable:-)

Calling update inside ProjectTree::currentNode() and rename it to
findCurrentNode() to make sure it is an still existing pointer.
Also, try to reduce the somehow more expensive currentNode() calls
and sprinkle some const around that usage.

Change-Id: I6a7c5db01a71d53d39544d3013cad557d5b96cdc
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-08-01 11:24:53 +00:00
Nikolai Kosjar
941af98716 QbsProjectManager: Make version and profile selectable/copyable
...in the qbs settings dialog.

Change-Id: I5c0de7b10fe156d3c29fc17a9ed3963f61a06f7d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-07-31 15:04:26 +00:00
Tim Jenssen
afbfcf8d70 ProjectConfiguration: Add project() member
Change-Id: I0a7170c1721a9e5bcf18af1bab8158af71c64454
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-31 13:20:48 +00:00
Christian Stenger
27cb331b4b AutoTest: Avoid guessing run configuration
Base the selection of the run configuration on the executable
we have gotten already from the BuildTargetInfo and take
deployment information into account.

This also reverts cce1e130 partially and avoids
stuffing unrelated information into the buildsystemtarget.

Change-Id: I3de6e910a5fd1092d428ec4afc33c4ca62daaa25
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-31 06:11:35 +00:00
Tobias Hunger
366ada9fea RunConfiguration: Centralize enabled state handling
Centralize handling of enabled state of RunConfiguration widgets.

Remove code that does the same thing in all the different run configuration
widgets.

Change-Id: I175d7e19d031bd28a2b19cd825e0b6568da19bc3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-28 17:26:10 +00:00
Tobias Hunger
131c7a1c4e ProjectExplorer: Introduce base class for enabled/disabled project configuration
... and use this as a base for all RunConfigurations.

Clean out code in the individual run configurations dealing with their
enabled/disabled state.

Change-Id: Icc2ea136b056f7aea7ce96480b4402459d7ac0ce
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-28 17:26:03 +00:00
Eike Ziller
c01ddc4660 Merge remote-tracking branch 'origin/4.4'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/qbsprojectmanager/qbsproject.h

Change-Id: I6b9cdf704be95ade02488c8b19582b6621282fb8
2017-07-28 15:24:14 +02:00
Orgad Shaneh
21fd430db8 QbsPM: De-static const strings in constants header
Having a static variable in a header is strange.

Change-Id: I42c0244f6e73f1cbf530e704a36b96bf5b85a017
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-07-28 08:58:48 +00:00
Orgad Shaneh
abbea9a84e QbsBuildStep: Remove QLatin1*
Change-Id: I46e47531cba5c650a8e40e957d7423ae60ffb989
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-07-28 08:57:51 +00:00
Christian Stenger
9205bc7aeb QbsPM: Implement configureAsExampleProject function
This function is used in some of the plugin unit tests of
QC.

Change-Id: I8e5f5b734a78a207f139b676aa6616abcc9ce7c0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-07-27 11:14:02 +00:00
Tobias Hunger
09b127f9f1 Project: Move signalling of parsing state into Project
Get rid of duplicated code to do such signaling in derived Project types.

Change-Id: I26914a1d751d72ee65c15a7943e0e7f34978f042
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-26 09:29:21 +00:00
Eike Ziller
5a1a20f2ee Merge remote-tracking branch 'origin/4.3' into 4.4
Change-Id: Ifb1dcc847ba4b32a79b349955fad5207e402cb7b
2017-07-12 10:50:49 +02:00
Christian Kandeler
3b956976d7 QbsProjectManager: Fix qbs build against installed qbs
Change-Id: Icfe86b98ab8162fe613dbf089fec1692c5d3dbea
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-07-10 14:14:14 +00:00
Eike Ziller
e4a6267036 Merge remote-tracking branch 'origin/4.3'
Conflicts:
	src/shared/qbs

Change-Id: I521ed7703298062d3860ddce3c82444bedd49e60
2017-06-28 10:28:16 +02:00
Orgad Shaneh
b57372f2b5 Replace include guards with #pragma once
Change-Id: Ic36cf0e9cac61d4d9a7e4434192944f5301b8aaa
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-06-28 08:07:56 +00:00
Eike Ziller
90690fbc8e Qbs: Remove unused member
Change-Id: I076ce22ff2cf18732da4ffbc32fe5dbfff6b7fdd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-06-27 12:28:34 +00:00
Jake Petroules
829bf2b9e6 Qbs: move both Qbs settings pages into a single page in Build & Run
Now all build system settings (qmake, CMake, Qbs) are in the same place.

Change-Id: I006168de6ebb1a93b141e81f00788fa7097ab6fd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-06-26 17:44:56 +00:00
Tim Jenssen
56db0df2e6 Qbs: Fix crash when renaming files
Fix a crash when using file nodes to change the project. The methods used
to take const references, with the data living in the nodes of the project
tree. Since the methods change the project tree and thus cause the tree to
be rebuilt, the original data may get lost. So copy the data instead.

All the qbs::*Data classes are using shared data, so the overhead is not
too big.

Task-number: QTCREATORBUG-18440
Change-Id: I45ca5403a04e17790416dfe15b836f12c732e824
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-06-26 14:13:07 +00:00
Christian Kandeler
d5066ac06e QbsProjectManager: Introduce QbsKitInformation
... and use it to allow users to set custom properties in the
corresponding profile. This replaces the idiosyncratic and more
complicated approach we had before, when that was done in the qbs
profiles settings page. The profiles view is now read-only.

Change-Id: I0c29c1ac0c510e17d685e7bbaa38b54c8100ddb8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-06-20 12:00:11 +00:00
Orgad Shaneh
687466ac47 Merge remote-tracking branch 'origin/4.3'
Change-Id: I126f3a05212a3d5df78812e66285bc9e8078360b
2017-06-20 11:32:02 +03:00
hjk
f047e1a2a2 ProjectExplorer: Simplify standard run control construction
A lot of the target-and-tool specific run controls nowadays
have something like a single main RunWorker. This patch
removes the need to have user-implemented RunControlFactories
in those cases and adjusts local run, remote linux,
python and nim to take advantage.

There's more potential use downstream.

Change-Id: Ie2d2f839b8be1fad2be3b79e21de3c0e475d88cf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-20 08:04:33 +00:00
Jake Petroules
a251c2c966 Adapt to new architectures handling in qbs
This lets qbs handle architectures entirely for GCC/MinGW, ICC, and MSVC
toolchains, as well as projects targeting Android or any Apple platform
with any toolchain. Now Qt Creator only passes down architecture
information to qbs for QNX/QCC and Clang on Windows, Linux, BSD, etc.

Change-Id: I44925671d7f280890f9e25a5726d019d3f98dea9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-06-19 14:26:55 +00:00
Christian Stenger
cce1e130d7 AutoTest: Fix handling of multiple build targets
If project files are not mapped 1:1 to targets the result
of the chosen executable was more or less random.
Try to handle multiple targets as correct as possible by
checking for build targets already where we still know
which files are part of the respective test cases.

Task-number: QTCREATORBUG-17783
Task-number: QTCREATORBUG-18357
Change-Id: I82dcc26bf52c9918e2727b439a719af08879ef49
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-06-19 08:14:55 +00:00
Christian Stenger
bde8ebc56c QbsPM: Re-introduce uniqueProductName()
This patch prepares for enhancing information stored inside
buildSystemTarget.

Change-Id: I5d81fd01ab6b06c162f47fd9536de697ddfd24a3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-06-19 08:14:39 +00:00
Christian Kandeler
70e6bb2827 QbsProjectManager: Allow to import builds
Task-number: QBS-1059
Change-Id: Ibf45fbd870eb22f79883331f6559e1487df25ad0
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-06-16 16:02:01 +00:00
Christian Kandeler
aedcccd78f Update qbs submodule
To HEAD of master branch. One API adaptation was required in
QbsProjectManager.

Change-Id: I59dd76ffa0381d13b4d5f4b4609e85cf73ab32c5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-06-15 11:54:55 +00:00
Christian Kandeler
b5c8428285 QbsProjectManager: Delete ProjectDocuments along with project
The documents have a reload callback that accesses the project. This
would lead to a crash on a reload for a document belonging to a closed
project.

Change-Id: I171cacd0da347fb279609baaea4050ba1cc12008
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-06-15 10:00:40 +00:00
Christian Stenger
706da24733 QbsPM: Fix compile with Qt5.6
Change-Id: I21855bfd173ad6e85329d83b2337efc37359be6e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-06-14 12:22:20 +00:00
Christian Kandeler
7ffdcd102d QbsProjectManager: Make the configuration name explicit
This is a prerequisite for being able to import builds.

Change-Id: I22bd8f201db943335edadc899bfe9fa64d39e845
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-06-14 09:11:56 +00:00
Christian Kandeler
cbc5b21110 QbsProjectManager: Introduce QbsBuildInfo
We will need to pass additional build info data in order to
support importing builds.

Change-Id: Ic62d0da246f5a19b53632ef3dc61b1f4fc434e5b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-06-12 15:10:55 +00:00
Orgad Shaneh
6b0e1bc5f8 Merge remote-tracking branch 'origin/4.3' into master
Change-Id: I83af635dcac98e4fd78b21d8dd9dc3a27a4fdf94
2017-06-12 10:01:16 +03:00
Christian Kandeler
8ff6284e15 QbsProjectManager: Set up QML-related paths
This was simply missing.

Change-Id: Ie8b8cac88fef1c0560f9212b4c00edcd05d04a61
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-06-06 15:32:04 +00:00
Christian Kandeler
6754514489 QbsProjectManager: Re-introduce install step
... in a modified variant. The install root is now taken from the build
step to ensure consistency.
A dedicated deploy step can be useful on Windows if one wants to rebuild
while the application is running.

Task-number: QTCREATORBUG-17958
Change-Id: I93bc59b0e6d954d61d84bcfc81576cdb4fac1216
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-05-16 07:19:22 +00:00
Eike Ziller
64b19af7dd Merge remote-tracking branch 'origin/4.3'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: I6d89ea588de955f5d878500b59285d3adde6c77d
2017-05-15 15:31:55 +02:00
Tobias Hunger
2b4715c208 QbsProject: Use deleteLater to free QObjects
Change-Id: I33af237b271f32adc606befef081b97ded5e67ff
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-05-09 13:21:16 +00:00
Eike Ziller
6e8ee7479e Merge remote-tracking branch 'origin/4.3'
Conflicts:
	src/plugins/debugger/cdb/cdbengine.cpp

Change-Id: Ib9aeccc4162c43e9ee3d85847d96678045625dd0
2017-05-09 15:07:30 +02:00
Christian Kandeler
63e395c876 QbsProjectManager: Fix object files appearing in locator
This bug got re-introduced by commit fc5ce1e710.

Task-number: QTCREATORBUG-17382
Change-Id: I6114ca8f4305b3c0e356f4849094ecb1ccca7601
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-08 12:55:39 +00:00
Eike Ziller
105b69836c Merge remote-tracking branch 'origin/4.3'
Conflicts:
	tests/auto/debugger/tst_dumpers.cpp

Change-Id: Id8b53b000f94a1b5ab923db79f67bad3276d09dc
2017-05-04 10:03:50 +02:00
Christian Kandeler
dacf13948e QbsProjectManager: Fix updating of run environment
When the build environment was changed, the run environment widget would
not update.

Change-Id: I8a318d86b5ac56ca9233cf4c694ca3c9f88870ed
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-05-02 10:08:44 +00:00
Tobias Hunger
7c8125b480 Qbs: Set displayName from rootProjectNode
Set the displayName of QbsProjects from the rootProjectNode if that
exists. This fixes the project name not updating based on the name
set inside the qbs files.

Extract that into a new method so that it can be used consistently.

Task-number: QTCREATORBUG-18100
Change-Id: I417264ee8843a9e0665bbc190f1dbc7869eed0e9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-04-28 14:17:18 +00:00
Tobias Hunger
72f769c9ba Qbs: Make QbsNodeTreeBuilder handled uninitialized project
Make QbsNodeTreeBuilder handle uninitialized projects more gracefully.

Return a nullptr, so that the ContainerNode with the main project file
is used in that case.

Change-Id: I7ab90231c3fc24b7b676326f98f79c4b79018327
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-04-28 14:17:03 +00:00
Eike Ziller
88897f3a87 Merge remote-tracking branch 'origin/4.3'
Conflicts:
	src/plugins/genericprojectmanager/genericproject.cpp
	src/plugins/genericprojectmanager/genericproject.h
	src/plugins/genericprojectmanager/genericprojectnodes.cpp
	src/plugins/genericprojectmanager/genericprojectnodes.h

Change-Id: Ie0c870f68c8d200a75489b75860987655b2f6175
2017-04-19 09:56:14 +02:00
Christian Kandeler
660c4ced86 QbsProjectManager: Fix collecting unreferenced build system files
We cannot use std::set_difference on a QSet, because those are not
sorted.

Change-Id: I6238a2bd06bcc6e5dba64572f0c3b0caaa57a7eb
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-04-13 09:21:37 +00:00
Christian Kandeler
4b39baa8c1 QbsProjectManager: Add project file nodes for sub-projects
They got lost somehow during the project tree refactoring.

Task-number: QTCREATORBUG-17859
Change-Id: I1d1178c3d0932322604e7035f15dcc4490309ca9
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-04-13 09:19:36 +00:00
Christian Kandeler
b520a90644 QbsProjectManager: Add unreferenced build system files to the right node
They ended up as children of the root node somehow during refactoring.

Change-Id: I2da3ac74369fd9456b62839f1498f84f0034a85c
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-04-13 09:19:04 +00:00
Christian Kandeler
b2be9b5b0a QbsProjectManager: Add "clean" and "rebuild" actions for products
... and sub-projects. We used to have only the "build" action for these.

Task-number: QTCREATORBUG-15919
Change-Id: I31d06498c0cdadb8a8738be521a98e8b03de32ee
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-04-11 12:15:52 +00:00
Jake Petroules
83fd207a64 Qbs: use the separate QNX OS type
... instead of detecting it via the device type.

Amends e69c2eb2

Change-Id: If7bd19412e723c268d93e16d46828925b74d6a4b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
2017-04-07 15:58:44 +00:00
Tobias Hunger
0951589420 Project: Unify handling of displayName
Unify the handling of displayName with a proper changed signal across
all projects.

Change-Id: I7e503528854b85f6f38de4b0943775f82a0d6123
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-04-07 14:49:51 +00:00
hjk
bd5e2faa75 ProjectNodes: Handle supported actions one-by-one
Getting the full list for a node can get quite expensive e.g. in
cases of recursive calls of QMakeProjectManager::findPriFile.

However, the FlatModel needs to decide quickly on whether an item
is editable to potentially allow renaming.

So split up QList<Actions> supportedActions() into individual
bool supportsAction(action) calls and make sure Rename is not
on the critical path.

Task-number: QTCREATORBUG-17953
Change-Id: I31841847f8aa7d7b94c63d76ce71efb1c930fa69
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-05 12:47:03 +00:00
Orgad Shaneh
173cb9f20e QbsPM: Fix size_t -> int conversion MSVC warning (64bit)
Change-Id: Ib1f79c2e0e203c5cc6cfaadac0b3ae1ee09d88b2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-02 05:08:16 +00:00