1) When the compiler is invoked, the mkspecs dir is the very first
include path, but the code model got it as the very last (still before
the system include paths) include path.
2) We had it twice in the include path list.
Change-Id: Ia46b6009359c5799790e6c856113ea133b8212c6
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
The idea behind NodesWatcher was that it was the central place
to catch node related signals, so that users didn't need to
connect to each individual node and the nodes didn't need to
be QObjects. Somehow Nodes ended up being QObjects anyway.
Both the recently added ProjectTree and the FlatModels consume
the signals the NodesWatcher sends. Unfortunately there's a
ordering dependency between the ProjectTree and the FlatModels.
This patch removes all NodesWatcher and instead makes the
ProjectTree singleton the emitter of various project tree
related signals. The ProjectTree also ensures that the ordering
between the FlatModel and itself is taken into account.
And it makes Node not derive from QObject, saving some memory
in that process.
Task-number: QTCREATORBUG-13756
Change-Id: I8b0d357863f1dc1d2d440ce8172502594138b9fb
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
...instead of going through CppModelManager::projectInfo().
Now CppModelManager::projectInfo() returns an invalid ProjectInfo in
case there is no valid data for the given Project.
Change-Id: I11908bf2ddf865b1d3d71ff176eaf4139292b21c
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
the rationale is that postprocessing which is done by the generators (in
some cases right at the point of emitting code to the makefile) should
be abstracted inside the "medium-level" class which also does the path
resolution done by the generators.
along the way we also make minor fixes to the processing:
- we pay attention to CONFIG+=no_include_pwd
- we add the build dir as well when shadow building
Change-Id: Ib389942fdc0470e05c1aa49e3615b6ac00241662
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Centralize the handling inside a new class ProjectTree.
React to moving focus and remove most special handling.
This properly fixes the linked task.
Task-number: QTCREATORBUG-13357
Change-Id: I6b06aa32b1e4305ec8a6d432857b302585d8734b
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
The source and examples directory is not a sub directory of the qt
source directory in the sdks. But we still want to treat it as part
of a the matching qt.
Task-number: QTCREATORBUG-13469
Change-Id: Ib63722052a14c29e4198c879dd770fb4ecdcdb80
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
The QmakeVfs needs to be deleted after all evaluations have been
canceled. Those are canceled in the destructors of the nodes, so
delete the nodes before deleting m_qmakeVfs
Task-number: QTCREATORBUG-13421
Change-Id: I5883f5b2daa6a13ef4facf9b9dccc125a069df94
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Callign applyAsyncEvaluate in the desctructor might lead to further
parses, which we don't want. So bail out early in applyAsyncEvaluate.
Task-number: QTCREATORBUG-13421
Change-Id: I776ff477363a3985ebc26e9160c58c2ab9c910b7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
We reuse the m_checkForTemplateUpdate cariable, since this is going
to be reverted in master and replaced by a rework of the current node
handling anyway.
Task-number: QTCREATORBUG-13357
Change-Id: I7deb564219f258753263f3e1473625ce749393fd
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Analyzers can use this to rule out irrelevant (sub) projects.
Change-Id: I5a9eb66f06156f0619dc639f6f4080a8fc761ee6
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Check every project's path against the source paths of all existing qts.
If we find a match, make it build in the right place by default.
Works for both in source and shadow builds.
Note: There's a quadratic algorithm since foreach kit we check against
all qt versions. That's unlikely to be a problem and non trivial to
fix.
Change-Id: I9f3456f3e835ee6adc35c26fe5c328c01387a8aa
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
All static functions, can live closer to related code.
Change-Id: I54c5680256c78f1d09b4bee3e8843b2f4350b75a
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
20 lines above we actually search for qml libraries in the .pro/.pri file.
Do not overwrite this just based on the fact that there are QML files listed
somewhere in the project.
Change-Id: I01ea4304d98e40fca690d5bf3ce3f3de0543c82d
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Do not set the timer interval while the timer is running.
Change-Id: If72eb77fed88a5dda3f6356b1bd82aab781b160d
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Fall back to what we do for Windows/Linux/BSD and the rest of
Unix anyway.
The target architecture/os detection process is conceptually
not precise. Refusing to do anything at all, including steps like
copying files which do not depend on precise architecture data
anyway, is overshooting.
Change-Id: Ic6c98c4dac5fe4a625149be558c8b02440f8fdbc
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Replace the CppModelManagerInterface/derived CppModelManager
combo by a more common CppModelManager/CppModelManagerPrivate
pimpl pattern.
Change-Id: Ia4582845ed94d5ef60b8571bab9b2260c6290287
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
.. because they now hold only files for a single language+extensions
combination.
Task-number: QTCREATORBUG-11709
Task-number: QTCREATORBUG-12818
Change-Id: If294f6de07d60126be733d98de12b89b8af3efce
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Instead call it once per .pro file and pass that to all .pri file parses
and other functions. This cuts down the number of calls for opening
qtproject.pro from ~3000 to ~700 and speeds up opening qtproject.pro
by roughly 3%.
Change-Id: Iffd46d4bbedc9c380f70e916dae7151495990b39
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
So that recalculating the information is not O(n^2) but linear.
Change-Id: I69903e0b5ad321d071804d782ad634a3f300e71a
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
The current approach fails for all build systems where one project file
can define more than one executable.
Change-Id: Ieda413975709fbd6e7ea87b185aa962f63cb7c1f
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Instead of checking if a file is unique with a O(n) operation per file,
do one pass at the end after sorting. This makes opening qtproject.pro
roughly ~7% faster.
Change-Id: If30bdeb8f72e5b28fb900e8e7a45bddb5f9f7822
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This is in preparation for changes to the ProjectParts, where one part
can only hold files for 1 language.
Change-Id: I0e69e0f174341054ed89273d288a78d9aa468d59
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Language::Enum -> QmlDialect
* class instead of enum
* moved Language specific operations to it (from Document)
* nicer handling
QStringList -> PathsAndLanguages
* store language along with path, to perform a correct scan and improve
path handling
Change-Id: If69d35c63cfeb48aa670b51870916cd0c40f1916
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This removes qmakeprojectmanager and qmlprojectmanager dependency on
qmljstools.
Qmlprojectmanager still imports qmltoolsconstants.h for a constant
but that gives no runtime dependency.
Change-Id: Ifd2e76500a3b27a21937603925f03a70049900e1
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Instead of having two lists of paths, now only one list is used where
both include paths and framework paths can be mixed. This reflects the
way the compiler is invoked, and retains the (correct) search order.
Task-number: QTCREATORBUG-11599
Change-Id: I373953e3e305df5b7a0d10920e12d146584adf9f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Currently we pass in some places by value, elsewhere by const ref and
for some weird reason also by const value in a lot of places. The latter
is particularly annoying, as it is also used in interfaces and therefore
forces all implementors to do the same, since leaving the "const" off is
causing compiler warnings with MSVC.
Change-Id: I65b87dc3cce0986b8a55ff6119cb752361027803
Reviewed-by: hjk <hjk121@nokiamail.com>