Do not report success of a qmake parsing run based on every .pro-file
having reported success. Take the top-level .pro-file's success value
instead.
This fixes e.g. Creator, which has some .pro-files that error out in
some conditions.
Task-number: QTCREATORBUG-18992
Change-Id: I888141e723da84fb780ccd84c86acc25d03f5f28
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Let project managers store information whether a project part
belongs to an executable or a library and use this information
inside the AutoTest plugin.
This information will help to determine which targets are
relevant for the execution of tests.
Change-Id: I93b42797bf55225425398dc83aecea3c99eea290
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
The old code model expected the macros as C++ formatted text
("#define Foo 42) but newer targets like the Clang codemodel expect key
value arguments like "-DFoo=42". So instead of parsing the text again and
again we use an abstract data description.
Task-number: QTCREATORBUG-17915
Change-Id: I0179fd13c48a581e91ee79bba9d42d501c26f19f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
qmake from Qt4 does not provide C++ standard and
clang can't properly compile Qt4.8.6 and earlier
with c++1z. Behavior in this commit mimics qmake
from Qt5 which also provides c++11 as a default
standard.
Task-number: QTCREATORBUG-16441
Change-Id: I3d29891d6e47f2367f2b3b2bf4be4d86661924e9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Since QNX was split into it's own Abi (QnxOS), it is no longer
piggybacking on the UnixOS Abi. When this change occurred,
there was no change done to collectLibraryData function so on
QNX we were no longer seeing libs created from projects that
were subdirs of a main project.
Related QnxOS change: e69c2eb
Change-Id: Ibb4ff8932ca5d6eea317946aecb53f58ddccc0ea
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
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>
... 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>
asyncUpdate is only ever called via scheduleAsyncUpdate, so only
notify about parsing start there.
Change-Id: I4311c6ac1add354de96cc25c0cccd0504409e0a8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Get rid of duplicated code to do such signaling in derived Project types.
Change-Id: I26914a1d751d72ee65c15a7943e0e7f34978f042
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
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>
Suppress spurious warnings about compiler mismatches on Apple all the time
at the cost of potentially supressing some real issues.
Task-number: QTCREATORBUG-17794
Change-Id: I7bef3b8065de676d625905f3bf9936c91094b04f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Not checking the parentFolderNode triggered a crash elsewhere already, so
double check other uses of parentFolderNode and use QTC_ASSERT to make sure
no nullptr is going to be accessed.
This is necessary now that we have a forest of project trees and no longer
have a sessionnode anymore.
Change-Id: Ibc380c2ec9b12b983e709d2eeb03a8b741fe1058
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
The Qml code model needs the contents of resource files. This was done using
QmakeVfs::readVirtualFile, which is not correct, since it does not read data
from files on disk. So fix this mistake by using QmakeVfs::readFile instead.
Task-number: QTCREATORBUG-18140
Change-Id: I25fd07d63ab02764bdf3fa705e2ff025d6831581
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
If in a .pro file VERSION is set with less than three version
components, for example "1.0", qmake on Linux still creates the .so with
the following links to it:
- libexample.so
- libexample.so.1
- libexample.so.1.0
- libexample.so.1.0.0
Creator only deployed first three of those.
Pad the version number with zeros to three components in order to find
all of them.
Change-Id: I0ca3b7cb9d2150e7e9a5c22a5522678aec085b95
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Unify the handling of displayName with a proper changed signal across
all projects.
Change-Id: I7e503528854b85f6f38de4b0943775f82a0d6123
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Ensure that target is not empty and avoid storing a path instead of
the real executable.
Change-Id: I408a54befbbb7004773d04f4bdd3898469efbaa7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Handle the generation of the list of files in a project globally, based
on the project tree.
Creator now has the concept of TreeManagers which can enrich the project
tree with additional data (e.g. the files found in a resource file), which
the project does not necessarily know about. So use that tree to find
the files that belong to a project instead of implementing similar features
in each project.
Change-Id: Ia375a914a1f2c0adaa427f9eda834eec2db07f68
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This is important to be able to map sources to actual things that are
going to be built.
Change-Id: I1aef940767d60192642ed79a1703cff8dfdad9e1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Create an initial project tree with a ProjectNode and a FileNode for
the project file itself.
Fix the Projects to not implement their own tree before they have
better data.
Change-Id: I147ccd5603d22d1d60880a97f30fd8c271eac88c
Reviewed-by: hjk <hjk@qt.io>
Do not update the existing project tree anymore: Start a fresh one
and throw the old one away.
Change-Id: Ifabe293b6ca668b0672516a6d81acd5346d98fe5
Reviewed-by: hjk <hjk@qt.io>
And inline it into user code. Less code in total and no intermediate
node lists.
Change-Id: I3724883408bfaa868266110aee27bbffd4d96bd8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This reverts commit 05942b63f8 because it
breaks refactoring, e.g. Q_PROPERTY generators.
Change-Id: I9a14b912ba72663f08ea99e7e066d824b18da4b0
Reviewed-by: David Schulz <david.schulz@qt.io>
We always operate on specific types of proFiles, knowing the types
suffices as interface.
Change-Id: I5ffe8862ae31234843a71bdae537825b37ccd311
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Can be done generically when creating projects. The only wart is
the use from BaseQmakeProjectWizardDialog::writeUserFile.
Change-Id: Ie98c9f88ec142e82443e204a0075e3ae9e163752
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
No need for each target to do essentially the same.
Change-Id: I76b6a0f2d064d7721f4ebe676f6efe12d3b5f87c
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
${AnyProject}::updateCppCodeModel() did two potentially not that cheap
operations in the ui thread:
(1) Querying the MimeDatabase for the mime type for the source files of
the project. In 99.9% of the cases no files need to be read for
this as the file extension will resolve the type. The expensiveness
comes from the sheer number of files that can occur.
(2) Calling compilers with the "(sub)project's compiler command line"
to determine the macros. While the caches avoid redundant calls,
the number of the unique compiler calls makes this still a
ui-freezing experience.
These two operations are moved into a worker thread. For this, the
expensive compiler calls are encapsulated in thread safe lambdas
("runners") in order to keep the "mutexed" data minimal. The original
API calls of the toolchains are implemented in terms of the runners.
While adapting the project managers, remove also the calls to
setProjectLanguage(). These are redundant because all of the project
managers already set a proper value in the constructor. Also, currently
there is no need (client) to report back detection of C sources in
project parts. This also keeps CppProjectUpdater simple.
There is still room for improvement:
* Run the compiler calls in parallel instead of sequence.
* Ensure that the mime type for a file is determined exactly once.
Change-Id: I2efc4e132ee88e3c8f264012ec8fafe3d86c404f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Use QmakeParserProFileNode::AsyncUpdateDelay instead of
QmakeParserProFileNode::AsyncUpdateDelay.
Change-Id: I6628e566ce0f289778d61d146df58ca31345cdd7
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>