This introduces an API change for the project managers. Those are not
expected to call updateSourceFiles() anymore.
Task-number: QTCREATORBUG-9581
Change-Id: I77befd29fb851c9acf87204d571da00183c9cd05
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
...so parsing progress will also be reported for projects consisting of
only one source file.
Task-number: QTCREATORBUG-9597
Change-Id: If35a00b6f949258d64921f144919269fa0c81d36
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Now it uses ProjectPart::evaluateToolchain() to read toolchain info with
given compiler flags, so it saves old behavior and also reads C version
and C++ extensions.
Removed check that model doesn't need to be updated, since check didn't
account ProjectPart enums.
Change-Id: I6dbebeecdb162ec5b885f9f1846756b586c22b23
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Now it provides information about C language standard and C++
extensions. No new behavior added to project managers.
Change-Id: Ib7c19641f452a75c9b14cd7e33d104dcd1603720
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
If a qt version does not support shadow building, this just means that
the qmake for that qt is broken. That has no bearing on whether cmake
could shadow build.
Change-Id: If2b69b42094d87cd0c3be26d043e344aa8b370da
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
In recent CMake versions, a new backend, Ninja, was added with the intention
of providing an alternative to makefiles. However, this backend stores the
CXXFLAGS for the project in a different format than it does for the makefiles
backends. As the CMakeProjectManager assumes a makefile backend, it fails
to correctly obtain the CXXFLAGS of the project when Ninja is used.
This small patch will attempt to read CXXFLAGS from the build.ninja file
to correct this issue.
Task-number: QTCREATORBUG-9047
Change-Id: Ic19ae3b4802c7a12b5d0a92a7f1a2254bec5a3d2
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Rename ModelManagerInterface.(h|cpp) to cppmodelmanagerinterface.(h|cpp).
Rename TypeHierarchyBuilder.(h|cpp) to typehierarchybuilder.(h|cpp).
Change-Id: I035d833fd205d7460819bd0fb7031294359032f9
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
There were quite a few classes using CPlusPlus namespace in the
CppTools plugin. Rename them and do some other small namespace
related coding style fixups.
Change-Id: I093fc1f3fc394fd9923e3f18d5f66522e288f21d
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This was mostly used to disambiguate the char * and the QString
constructors.
Change-Id: Ib6923ef8e8c0e5d514a883e73aa001a1cd9fb534
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Partially revert 20cfccd753 that somehow
assumed that compiler flags would also include the defines.
See comment on
Task-number: QTCREATORBUG-3922
Change-Id: Ic7cb9dfa33f53fde9302f38018102c15cb12f83d
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
The new name is a better description of what the class is all about,
it matches the filename and it does not conflict show up when trying
to expand "PE" to ProjectExplorer.
Change-Id: Ie6a10b9a83dc8bc529e35e3381f733dbe25847a3
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
In fact, it is same with the XXX target.
So, ignore it would make it clean.
Change-Id: I2527f839461f0be07b6d40e257db23ef5ca35007
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
All targets should be displayed, even without
binary artifacts, otherwise it's not possible
to select a CMake custom target to build.
Change-Id: I4b7640f460a248fd2d4b56428c2c8da3b13b9103
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Yuchen Deng <loaden@gmail.com>
CMake generates the ui*h file in the directory that corresponds to the
CMakeLists.txt. Creator does not have the information whihch
CMakeLists.txt file includes the .ui file. This patch adds a crude
heuristic that searches for the right CMakeLists.txt.
Task-number: QTCREATORBUG-8509
Change-Id: I0f31d9766c6b5988a00ab618026ea052690dd649
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
#!/usr/bin/env ruby
Dir.glob('**/*.cpp') { |file|
# skip ast (excluding paste, astpath, and canv'ast'imer)
next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
s = File.read(file)
next if s.include?('qlalr')
orig = s.dup
s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
res = $&
if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
res
else
res.gsub!('} else', 'else')
res.gsub!(/\n +} *\n/m, "\n")
res.gsub(/ *{$/, '')
end
}
s.gsub!(/ *$/, '')
File.open(file, 'wb').write(s) if s != orig
}
Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
Those 3 project managers can't easily figure out the right mode for code
parsing. The code we are parsing is predominantly C++98 code. But for
those using C++98 toolchains having valid C++11 code not be marked as a
error is probably not much of a problem, whereas the reverse, using a
C++11 toolchain and having valid code being marked as a error is
annoying.
Change-Id: I8dcc172029045cf591b3ba0adef1585f3f94fd39
Reviewed-by: hjk <qthjk@ovi.com>
Switching the stdlib implementation is possible with clang and results
in different include pathes being used (and potentially different defines).
Change-Id: I9c856256f51ceded9dc7892c1dde2bcc8c1b024c
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
To make the interface the same as NamedWidget.
Change-Id: I5961b4e5aa7f5acf3a7f83e82b6fa4266b9ebf97
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Also fix the code to not reparse the wrong file if the bc for a non
active target would be changed.
Task-number: QTCREATORBUG-8063
Change-Id: I40be4bbb1a5ef6ccc78515f153534a7304cae0e1
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
On initial run we offer the user a choice between all the kits, which
are compatible with the cached generator. After the initial run, the
user can't change kits nor generators anymore.
Except if the builds into a new directory or adds a buildconfiguration,
then the user can choose between generators but not kits.
Task-number: QTCREATORBUG-7940
Task-number: QTCREATORBUG-7928
Change-Id: I9b663435cd2e021f7fe08379c1c487a6aebe8976
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Peter Kümmel <syntheticpp@gmx.net>
The cmake wizard proposes also ninja if ninja support is available
Ninja must be in PATH, but it is only called once, so it doesn't hurt.
Task-number: QTCREATORBUG-7720
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Change-Id: If3c9c7ae55e6990fa16b031fc2998a8d8d9ed17a
Reviewed-by: Peter Kümmel <syntheticpp@gmx.net>
Reviewed-by: Yuchen Deng <loaden@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
The cmake wizard proposes also ninja if ninja support is available
Ninja must be in PATH, but it is only called once, so it doesn't hurt.
Task-number: QTCREATORBUG-7720
Change-Id: If3c9c7ae55e6990fa16b031fc2998a8d8d9ed17a
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
They are deprecated in Qt 5. Use fromLatin1() and toLatin1() instead. In
Qt 5, these always do the same thing as their "Ascii" counterparts. The
same goes for Qt 4, provided QTextCodec::setCodecForCStrings has not
been set, which it hasn't.
Change-Id: I04edeb376762b6671eff8156094f0d5e2cb8e1ea
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Function signature was prepared for that on
4c6b794774 but it wasn't really used
Change-Id: I1ee7059a00f0441d42a117b8f8d2c8c776d93815
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>