The display name is not editor instance specific, but belongs to the
document.
Change-Id: I3c936f04a86e10e6ca30063d85036d85b4b5880e
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* Move basic ui code model support from CppTools into QtSupport
* Use Kit infrastructure to retrieve uicCommand and environment
* Remove specialization for cmake projects (no longer needed)
* Remove specialization for qmake based projects (no longer needed)
Change-Id: I8569cc01acb46a540883c2da235d169bebf7db39
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
That is what it actually is, wrt how Qt API calls it.
Change-Id: Ied02055debf6aad75556b0d9d22e8ba2f72be555
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Instead of requiring subclasses to implement a method.
Also renames IDocument::rename to IDocument::setFileName,
since it doesn't really rename any files or such.
Change-Id: I1344025c24d2f74a6a983e04fb0a5245f1f37aad
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
We set the display name for cmake projects based on the projects's
name in the cdb file. The parsing of that happens quite late, so
we need to set a fallback displayname in the ctor.
Task-number: QTCREATORBUG-9641
Change-Id: Iabfef7a3cc9710e6ba04523845d4142a89493011
Reviewed-by: Tobias Hunger <tobias.hunger@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>