Allow for different extra compilers which may get called to generate
additional code for the code model. The build system is expected to
know what files are generated from which source file and the extra
compilers know how to generate the content of those files, without
touching the build directory. the uic adapter is refactored to be
the first such extra compiler.
The extra compiler is run when an editor for its source document
loses focus, or after a timeout of 1s when the source document has
been changed.
Change-Id: I13c110c61120c812f02639a3684144daf8979b37
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
We will need them for more things than ui_*.h.
Change-Id: I394aa8646095cdafb426c15746243b27c1c1ab1b
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
It is now deduced from either the type of the
QFutureInterface<ResultType> function argument, or the return type.
Change-Id: Iddab3cc329206c649a6e55a44b2de2d406701dee
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Using a global thread pool does not really make sense, since we do not
want to block any completely unrelated task. But the qmake project
manager still wants to limit the number of simultaneous threads without
managing that itself. A shared thread pool in project explorer sounds
like a sensible middle ground.
Change-Id: Ide6fd546a56e8f4896c387168513b608dfe7e3e8
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
The methods are only relevant for documents without a filePath, and
there was a mix of different irrelevant implementations present in
subclasses.
Change-Id: I4f57d306e5ddd913974cfe6ed0b4db062eb907a1
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
To fallbackSaveAsPath and fallbackSaveAsFileName. That makes it clearer
what they are for, and that they actually belong to each other.
Change-Id: Ie5b83b9db77d39a7fe9e979cc8f22b7f5b9101a3
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Add setRootProjectNode method and a default implementation of
rootProjectNode to Project. Use that in all derived classes.
Change-Id: Id28cde04457a20a8963d43020785ef9d77fea57c
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Implement default projectManager method in Project and use
these two everywhere.
Change-Id: I27e011e6fdc17b36aff1b8b931527307320e347c
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
so far, we would suppress any errors which occur during the (exact)
evaluation of projects which were included only by cumulative evaluation
of a parent project (see f53d37d48). this makes sense, as excluded
projects are likely to fail, producing unsettling noise on the way.
however, having no indication at all why a subproject failed to load is
not helpful, either. so print these errors, but tag them with a prefix.
note that we continue to suppress messages from the cumulative
evaluation of all projects, including from the exact evaluation of .prf
files done even in this mode. this is done because this output is
expected to be quite noisy and unhelpful. however, it can be argued that
this isn't a wise choice for projects which are known to likely fail for
reasons which would not impact our ability to show (an approximation of)
the project in the project explorer. for the time being, we assume that
the expected errors occur later on (typically during the .prf evaluation
phase due to unknown QT entries), so an unexpected error which would
also affect the cumulative evaluation is displayed nonetheless.
Change-Id: Idc2675744169b7cb52c0542a80075850e2b9317c
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Allow foldernodes to specify which files they care for when doing
"Add Existing Directory". Before we used a fixed list with C++ header
and source files, which does make no sense for e.g. adding to resources.
Task-number: QTCREATORBUG-15278
Change-Id: I15dad133391485c2bcebd2d864623304b31b5f8f
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
The functionality in that class is covered by initializers and
Utils::unique, so there is no need to keep a custom class.
This way FileNameList plays way nicer with utils/algorithm.h.
Change-Id: I8eeae6aca0558ecd998920c4fdfc5ea56bf75501
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
We need to re-parse the file after removing the old filename. Otherwise
we only hit the right spot by accident when adding the new filename.
Task-number: QTCREATORBUG-15241
Change-Id: I2e72da9f14033cc757a8b51d2ce1f5c2a5e5b557
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
before renaming the file.
This adds a new api:
FolderNode::canRename(oldFileName, newFileName) that asks the
project manager if a specific file renaming could be applied to
the project file.
Change-Id: I77bae56db06d81fd03e590285d6079abea2c514b
Task-number: QTCREATORBUG-14521
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Folder nodes with separators should be native.
They are native in the tooltip, as-well.
Change-Id: Iae56f352df3a58fe0eb75130c9171fa70d8b0204
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Of both nodes and run configurations.
Change-Id: I04cae590561f3c7b355a3385856dca13ebcd7acf
Task-number: QTCREATORBUG-13950
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
So that the code model can find the right files for ui files
that haven't been build.
Change-Id: I438a3ab9806c8ff6c47e5e188228a31ffb917bdf
Task-number: QTCREATORBUG-14910
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
For a reason that seems lost in time, all .pri files that are
(directly or indirectly) included in a .pro file are listed
in a flat list.
Change that to properly show a tree.
For example a.pro including b.pri, which includes c.pri is
now shown like this:
a.pro
|-> b.pri
|-> c.pri
Task-number: QTCREATORBUG-487
Change-Id: I1bc29a512fb27e6fe9b399738f2a37f2a95ce10f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
If the build directory is empty, which can happen if we are parsing
a completely unconfigured project, then UIDIR might end up being '/'.
The uiHeaderFile function appeneded /ui_XXX.h to that, leading to
a network path.
Fix that by ensuring in various places that we handle this case.
Task-number: QTCREATORBUG-10733
Change-Id: Ib848ed4efbeacc6ee7ff862bef861a58f6d3ea34
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Static libs can't be run on Android and on iOS, so we need to filter
them out.
Change-Id: I90b778ffaa5e7d6267cc0e8d753be56bf93007a7
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
First add the nodes, then add the subnodes. This is the correct
fix for
Change-Id: I50834ba7e0221623abe2954c88c47322677c142d
Task-number: QTCREATORBUG-14134
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
The OS X linker makes using dynamic_casts across shared object
boundaries fail, so do all casting in the projectexplorer library
and provide functions to do it.
Task-number: QTCREATORBUG-13864
Change-Id: I0e13c0986f8342d83c3b838ffdd2dd7b8312b13c
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
ProjectExplorer::compareSortedLists detects added and removed files
by comparing the "old" and "new" lists using the provided sorter.
If the sorter ignores case, then the file is neither added nor removed.
Task-number: QTCREATORBUG-13981
Change-Id: If91c18cfa58bd8f00acfc453779750248bb77c01
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
...since they are meant to end up in Makefiles.
A define like
DEFINES += SRCDIR=\\\"$$PWD\\\"
was passed on to the code model as
#define SRCDIR \"/tmp/dir\"
instead of
#define SRCDIR "/tmp/dir"
Change-Id: I7af5c8d82b3b937ca9db70f6580bab3419fb4550
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
It uses "ISO_ICONS" as its variable name.
This is necessary for the ISO Icon Browser Plugin. A previous attempt
at adding a more generic API to QmakeProFileNode that would allow for
reading and writing custom qmake variables was not sufficient. This is
because qtquickdesigner plugins do not get created until design mode
is entered, meaning that it was too late to register custom qmake
variables via static functions in QmakeProFileNode.
Change-Id: I2c8e0d944a1b9f07d1a7a70bd5e02ea371cf7680
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
EvalPartial is if the exact parse didn't work out at all, but the
cumulative did.
Task-number: QTCREATORBUG-13871
Change-Id: I98f6389783d15b156e56dc8be7d388b2951d9bdf
Reviewed-by: hjk <hjk@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>