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>
For the command and the working directory.
Change-Id: Ia69dc7100aeb57bb6e1b35f4dd4f3cf3763d8cda
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This provides correct deployment information as seen by the build system
when Qt Creator cannot retrieve it directly.
It's most useful for autotools and cmake projects, but can also help
with qmake in certain edge cases.
[ChangeLog] It is no longer necessary to provide a
QtCreatorDeployment.txt file when using CMake projects with remote Linux
devices.
Fixes: QTCREATORBUG-21855
Change-Id: I27e07a45dd1565e489f4b573cc3fff8191c57d9b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Let's use the same approach we have for CMake projects by using
the same TreeScanner class.
Compilation database does not have a concept of the root directory
so let's show a file dialog and ask for it the first time the project
is loaded. Next times we open it we take this path from settings.
This root path can later be changed from the project tree context menu.
Fixes: QTCREATORBUG-22031
Change-Id: I151aed8d0504b2e8aa14aa774cad25f8c86d5c17
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Not much protection needed, and not provided either, as seen in
the removed workarounds.
Change-Id: Ib33f6481cdb04481c0324bdeb57eb50143ecb62f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Use setter of base class, similar to setListInProject() before.
Change-Id: Id620f0084a5dec0410f29c80f8f6393a6bcd5050
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
... to pass it around as real values, avoiding, among others,
the need of occasional explicit deletion.
The formerly extra members of the derived stuff are handled via
an extra variant (for data) and via a functor in the build
configuration factory.
The change is mechanical.
Change-Id: I19ca4e0c5f0a5b196fc16dfb98bb005dc679f855
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
... to BuildConfigurationFactory. It hasn't been an Interface for a
while and the new name matches Run- and DeployConfigurationFactory
Change-Id: I923c6a27e18a99628251b69e0270e910836e7b2a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
... instead of DefaultDeployConfigurationFactory::clone when copying steps.
It's effectively the same function, so functionality is unchanged, but
the Default* class name is misleading.
Change-Id: I004ddcd500498fc5a34f12fea74ddcab3c861e10
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
DefaultDeployConfigurationFactory used extra effort to not apply to the
Qbs (Desktop) case, with QbsDeployConfigurationFactory plugging exactly
that hole with essentially the same functionality, which is even the
default of the base class.
The only differences are the display name, which is dropped in this
patch, and the different keys in the .user file, which are updated
with this patch. Note that the display name "Qbs Install" for the
DeployConfiguration stays with this patch whereas a freshly created
one will get the default "Deploy Configuration" name.
Change-Id: I255371d0a0688fbc6303083eb6aa20563e876264
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The absolute test paths must be in the right format for the host
platform, i.e. have a drive letter on Windows.
Change-Id: Ibf08a9e8a8b1f9ee1bb19d5307205b53012049b5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Use std::binary_search instead of lower_bound. The iterator is not needed.
Change-Id: Ie40441c0780bcf0b912644c4cdfd2d73068fb441
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
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>
Amends c58da42bab.
This operates also on not-fully loaded projects now, which was
previously causing a crash on android projects.
Change-Id: I44eeb7af8ed53a47ef39e7f1bafb07b871879ce5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
For freshly created projects using the json wizard, this
expands the outermost level of that project's entry in
the project tree.
This intentionally does not trigger when reloading from existing
sessions do honor a user's choice after collapsing that
item manually.
Fixes: QTCREATORBUG-17800
Change-Id: I101efaea84e68a4e769c803918652a1447805b2b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
- add a QString FileNode::buildKey(), returning the build key
for a build represented by that node, if any.
* for QmakeProFileNodes the build key is traditionally equal
to the file name, so use that.
* for QbsProductNode use the uniqueProductName()
- add a Project::findNodeForBuildKey(QString buildKey) convenience
function searching a Project(!)Node matching that build key.
That's the only use case there is right now, and I see no reason
yet to travers all files (yet).
Change-Id: I388c0e06c03111e12d630899d762448e974a5737
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Let's enable all build system plugins to provide this information.
Task-number: QTCREATORBUG-20810
Change-Id: I0ef953e3c2c9a2be1fc4187e93232e9a2aeacafd
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
System includes suppress warnings and prevent indexing of unwanted symbols.
Using system includes for all includes outside of the project can be
quite advantageous. The rootProjectDirectory() can be extended to be set
in the project settings. An automatic generation could be possible but
could create an unwanted path which includes files outside of the
perceived project.
Change-Id: Ib9d3158f14f41efe1f6657f962d5c4437bb324b2
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Don't accept targets that get restored to an empty state. This un-confuses
the Projects page:-) Note that DeployConfigurations are not tested:
I see no use-case where a target with only a deploy configuration makes
any sense.
This can be triggered, e.g. by opening an existing cmake project after
making sure there are no more kits with cmake tool set up.
Change-Id: Iaf14f70e4e0d4206a88a08b47b0eccc666653f76
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Soft-assert when a root project node is set again, except when
that node is nullptr.
Change-Id: Ib7c1891defc79d464a692c0e982b668be9a40cf9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Report project-specific warnings about the kit used in Project Mode.
E.g. a python project should not complain about missing toolchains,
while a qmake project should.
Change-Id: I5ce6742683cdeffc7ff3f1a3e8f0b89aee9aa0b4
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
List folder nodes (e.g. used for QRC files) in Project::files(...).
Task-number: QTCREATORBUG-20220
Change-Id: I9879d79530fd78a6b0976fe7fdb45a23d2d9c553
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Following the RunConfigurationFactory lead this replaces
f = Foo::find(); f->do() by static Foo::do() stanzas.
Also de-virtualize/private-ize IBuildConfigurationFactory::canCreate()
as it is only a local helper nowadays.
Change-Id: Id36ba514f426ebd054592189aa29c170ba00d92f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Following the RunConfigurationFactory lead this replaces
f = Foo::find(); f->do() by static Foo::do() stanzas.
Also protect DeployConfigurationFactory::canCreate()
Change-Id: I80fa491f836c3b9186f6ce6dccac4d52d4b80fc8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
It's not an *I*nterface anymore
Also, remove the in-all-but-one case unused QObject parent and the
object name that was only there for debugging purposes. The class
type serves the same purpose in the debugger.
Change-Id: I0dafb01e6b4fd7c7df04a63aaa3ef3e4bd693f6f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Move some code around to make interfaces slimmer.
Also no need to check canHandle() twice per creation.
Change-Id: I7c86e2dc78ebd53a0f8e9609e9fa135aaf31e7b7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Fix the notification of subtree changes to keep the project in
the loop, so that it can adjust its list of known files.
Ignoring that will cause crashes, e.g. when the ResourceEditor
updates its subtree of the project.
Task-number: QTCREATORBUG-19613
Change-Id: Ib7bb9afe48eb248cdf675ba2093b266fd728d7b2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>