Use QmakeParserProFileNode::AsyncUpdateDelay instead of
QmakeParserProFileNode::AsyncUpdateDelay.
Change-Id: I6628e566ce0f289778d61d146df58ca31345cdd7
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Use final, get rid of some useless headers and debug code
Change-Id: Icb1110f6eda4e17d143d8bdf17167d6c3046b884
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
We don't need two IDs for C++ and the QmlJS ID should look the same as
as the others.
Change-Id: Ib9747f6b36a90bb652951d85eec69666615670c4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Introduce a method that maps a RunConfiguration to the build system target
that created the executable.
Implement the method in all RunConfigurations where that makes sense (e.g.
no CustomExecutables).
Change-Id: Ifaac859c2cd9b2806a0d7c185b2239312a67752a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
... instead of peeking into versionInfo().
in fact, make versionInfo() private, to avoid subsequent deterioration
as happened before (after 5e596e89d).
some other functions that use it in its interface also become private.
this fixes several breakages related to working with non-installed
prefix builds of qt.
Change-Id: Ib67de79323c9e38f3de48a09854b155de9eef5b2
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Use std::function instead. Clean up API while at it.
Change-Id: I6e401ab57f5375e36710c30508c596af3f4b3385
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Make methods used to retrieve Qt versions from the Qt versions manager
take a predicate to select the interesting version.
Change-Id: I9218c57bae6d5033d49d618dfc0da41fe578444d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Some users set 'QMAKE_CXX = @echo $< && $$QMAKE_CXX' to prettify the
compiler output.
Another useful case for "incompatible" compiler is ccache, or other
compiler wrappers.
To eliminate warnings for these cases, pick the last value of QMAKE_CC/
QMAKE_CXX, excluding flags, and compare it against the configured toolchain.
Change-Id: Idc3b9377e6f7c39c09c50f36ec89460756510b97
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
...as the other project managers.
This removes extra code paths, duplication and improves classification
of source files (ambiguous headers).
Change-Id: Iae05cbbc61ab2e5dd841ae617bec994e0a1e52d5
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
...and add some basic tests.
Introduce the abstractions ProjectInterface and ToolChainInterface in
order to break the dependency to the ProjectExplorer. Also, some simple
logic can go there to simplify the (Base)ProjectPartBuilder.
Change-Id: I6c50a1804ce62098b87109931eb171f5c2542937
Reviewed-by: David Schulz <david.schulz@qt.io>
This applies for all project managers, except qmake. The qmake project
manager will make use of this in follow up changes.
Before, "foo.h" was always recognized as a CXXHeader. Now, it depends on
the other files. E.g. in a file list {"foo.h", "foo.c"} foo.h is now a
CHeader. In {"foo.h", "foo.c", "bar.cpp"} the file "foo.h" is ambiguous
and we will create two project parts, one where it is a CHeader, the
other where it is a CXXHeader.
Change-Id: I50505163368742584b1380c284d42cbe07cb4fc9
Reviewed-by: David Schulz <david.schulz@qt.io>
These are remnants of the time when we had only one snapshot.
Change-Id: I6ff4db645d1065a0ef195834890e0774e2e2c60e
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
No need to require the project managers to do this. Also, it is easy to
forget.
Change-Id: I96f7a5e5547418678af9653e5753c372f0880e5a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
- Objective C/C++ was not enabled in highlighter.
- QMake project part for Objective C/C++ did not have ObjectiveC extension enabled.
- As languageFeatures.objCEnabled is a bitfield, it was actually always set to 0.
- Highlight ObjC class & protocol declarations.
- Highlight ObjC message passing.
Change-Id: I64d12c9509058d05f7adce94598cb7ce91727ac8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This change adds a QTextCodec* member to QMakeVfs. It is used to decode
the qmake file contents in QMakeVfs::readFile. The QMakeProjectManager
sets it to the current "Default Codec".
This is necessary only in Qt Creator, where the parser would actually
use Local8Bit (unlike qmake's Latin1), which would sometimes lead to
misinterpreted multi-byte chars in comments swallowing newlines and thus
falsifying the actual code.
Bootstrapped qmake is not affected by this addition.
Task-number: QTCREATORBUG-17309
Change-Id: I34b42bd19e0de973deb2291e91f306d1ca7c630e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Correctly signal when parsing of a qmake project starts and stops via
the build- and runconfigurations.
The buildconfigurations are in the picture since they disable the run buttons
when the user has selected to build before deploy and deploy before run.
Task-number: QTCREATORBUG-16172
Task-number: QTCREATORBUG-15583
Change-Id: I44b5f5ce8e145cb93dc0022f66e1edcc202875e4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Use class enum to shorten the FileType to quint16. This frees up a couple
of bytes per FileNode and we can have many of those.
Change-Id: I3a9ae25059690fefa15305a4268269647d6dc1c9
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
don't resolve the source files once for deployment and once for the
project tree.
Change-Id: Ifddf8fc7883bf025d3640de0d6676b5930991088
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
consistently with Xcode, qmake nowadays knows only one SOURCES list,
which is automatically classified by extension.
to replicate that, we actually copy the objective_c.prf file from qt
5.6.3 and use it to override whatever comes with qt, so we can treat all
qt versions uniformly.
also, the code model throws away the information which files were listed
as sources and which as headers. this is technically incorrect, as a
source may be only included rather than compiled, but there is no point
in extracting information which is not used.
conclusion: lump all c-like sources into one variable as far as project
processing is concerned.
and as far as configuration goes, our code model doesn't differentiate
anyway, so the duplicated setup paths can be eliminated as well.
Change-Id: I24b1bc056f8d9eb579c9378817f602912ab49971
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
the cumulative evaluation has a good chance to make a mess of the
virtual file contents created by the exact parsing, so better contain it
to its own namespace.
the ProFile cache also needs to keep the files separate. this
specifically addresses the side issue discussed in QTCREATORBUG-10779.
it also fixes attempts to deploy the wrong build when the variant is
selected through a cache file, as in QTCREATORBUG-15815.
in the project explorer, we don't track from which evaluation pass
particular files came from, so we try the cumulative first to get the
most contents, and fall back to the exact one if the former file is
empty (or does not exist at all).
Task-number: QTCREATORBUG-15815
Change-Id: I2c1eb16c97526fa275a1c6a2eae9266d385859ac
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
qmake doesn't do anything with sysroots at this level, so this code
plain does not belong here.
sysrootification is used when resolving INCLUDEPATH, which is emulating
compiler behavior. this is done by higher-level code.
Task-number: QTCREATORBUG-11944
Change-Id: Ia25f0b6ef713e9809d974e3f3e49ba308b8c933f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
We relied on the CppModelManager to tell us whether a project was reparsed
after a kit change. While this worked, it was not guaranteed that the project
is really finished (and ready for e.g. building) after pushing new ProjectInfos
to the CppModelManager.
Rely on the projects telling when they are finished with parsing. This is more
accurate and future-proof.
The introduced signals in Project and SessionManager are (at the moment)
only for tests.
Change-Id: I1b368ec4585ffa8755eb28fac6d187cce31243ee
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
If both plugin and no_plugin_name_prefix are defined in CONFIG, QtCreator
would not assemble the file name correctly.
Change-Id: Iebfc0402ff7c89f2a964cfcee77dfc77a6e5b0db
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Move ownership of the ProjectImporter to the Project.
Task-number: QTCREATORBUG-16744
Change-Id: I7fc217ce8058287c5435b259bdc5300a926f8098
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This makes clear that the ABI encompasses all Darwin platforms (macOS,
iOS, tvOS, watchOS) in the wake of the OS X to macOS rename, and would
have been more technically correct anyways since ABIs are far below the
"macOS" parts of our favorite desktop Unix operating system.
Change-Id: I16d1477f44ffe70e5d8cddd67199a1602ba6fd97
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
The existing solution with the special-style horizontal
kit selector comes from a time when there was typically
one, at most four targets. Today's setup can easily
reach half a dozen targets with several toolchain versions
each and can't be sensibly handled with the overflowing
horizontal bar.
This here replaces the horizontal kit selector bar as
well as the top level project "tab bar" with a normal
tree view. All targets are visible (but possibly disabled)
at once, and can be enabled/disabled using the context
menu on the tree items.
Change-Id: I1ce7401ca96109bf34bc8c0ae19d265e5845aa88
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
BREAKS BACKWARD COMPATIBILITY OF TOOLCHAIN SETTINGS!
* Convert old ToolChainKitInformation to new version
* Store several toolchains in one kit (one per language)
Change-Id: Ia59a2ad067c57971ec34ce9b2e43758344443755
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>