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>
* Rename profiles to kits.
* Update some strings:
* projects mode has a Kits tab, not a Targets tab.
* " Settings" was dropped from the sub-tabs of the Kits tab
* menu entry "Build/Open Build/Run Target Selector" was renamed
to "Build/Open Build and Run Kits Selector".
* Use "Kit" instead of "Target" in miniprojecttargetselector.
(The class was not renamed as it does indeed select targets,
not kits)
Change-Id: I0727e086e2dfa0e8aaaf89fdc6f2e3596c7a4314
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
It adds almost nothing and introduced some bugs.
This fixes:
Double evaluation in cmakeproject on build directory changes.
Wrong runconfiguration update in cmake for set_target_properties(target
PROPERTIES OUTPUT_NAME [..]) changes.
Unecessary runconfiguration removal in AutoTools and Generic projectmanager.
Reevaluation of .pro files on changing the active runconfiguration or deploy
configuration.
Task-number: QTCREATORBUG-7723
Task-number: QTCREATORBUG-7761
Change-Id: I50249b186917cd3a4f399f187f09ac8428ab6f9e
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
* Handle 0 when calling createTarget to avoid the crashes in the first place
* Do not try to create/add targets for 0 profiles to avoid creator writing
a warning to the console
* Fix possible crashes in debugger when no default profile is set.
Task-number: QTCREATORBUG-7695
Change-Id: I9afc8e29c8b859ad078dad794ef5017168daac78
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Also removed all <QMainWindow> includes which are not needed
anymore.
Change-Id: I393c9a62a5c6df95d9f35d872e1473a4f13bcdc4
Reviewed-by: hjk <qthjk@ovi.com>
Introduce Profiles to store sets of values that describe a system/device.
These profiles are held by a target, getting rid of much of the information
stored in the Build-/Run-/DeployConfigurations, greatly simplifying those.
This is a squash of the wip/profile branch which has been on gerrit for a
while, rebased to current master.
Change-Id: I25956c8dd4d1962b2134bfaa8a8076ae3909460f
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
The CodeBlocks generator writes for each macro definition
<Add option=-D... />
(also make getters const)
Task-number: QTCREATORBUG-3922
Change-Id: I93e10397e76ad4f34126a76c4c36e4529d48d0ad
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Previously virtual folders, that is the "Sources", "Headers" folders used a
hack. This patch removes that hack, by introducing the following changes
- The FlatModel and the ProjectExplorer::Nodes now don't require path() to
be unique. Thus allowing the virtual folders to all return the same for
path(). [1]
- Introducing a new node type "VirtualFolder" which is sorted according to
a priority.
- Introducing a few new virtuals for displayName and toolip(), which can
be overriden.
[1] Note that all the project managers do require path() to be unique for
some types of nodes.
That also fixes:
Task-number: QTCREATORBUG-7100
Change-Id: I76b730f4c4254e2894467603bbe9a30e356a0bcc
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Most of them are done, or are not really todos but just notes on
the code.
Change-Id: Idc4836844ee7bc1444e1251f97118bd9103a6019
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Use Core::Id for all the project related objects in favor of plain
QStrings.
Change-Id: I790ab40cb29899efdb49c413a77609486f52e683
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This also allows simple setting of breakpoints on failed asserts.
Change-Id: I6dd84cbfaf659d57e39f3447386cebc0221b2b84
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
I don't remember why I did leave it alone in the reafctoring some years
ago, but surely it serves no purpose.
Change-Id: Idf920faf3f8f7128cd410501f2c3748e100dfbfb
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
And adapt the other API respectively.
Change-Id: I1e04e555409be09242db6890f9e013396f83aeed
Reviewed-by: Bill King <bill.king@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
A manual squash/merge of the changes below, plus a couple of subsequent
code fixes.
59085aa5fbb99e2d786cd2c1a06c24a111ccb49f:
Modify CppModel::ProjectInfo
Adding per project node information, to pass on the correct
defines/includes for each file, instead of aggregating them incorrectly.
Also split up SOURCES and OBJECTIVE_SOURCES.
Also ask the toolchain to convert the compilerflags to flags the
codemodel understands, for now only gcc and only c++11.
Also make the toolchain aware of the flags used to compile, so that it
can emit the correct defines.
Note: No header files are passed on.
74028802314cd4e75b41b46407433e07090a304d:
GCC: Evaluate cxxflags when checking for predefined macros
ebaaa4957e4c02cc9637a998eddae1d0acd74f83:
MSVC: Take cxxflags into account when checking for predefined macros
9bfce7e889bcf7bcc47bf880e3ea25945ca7d0d7:
Compile fixes
Change-Id: I9de94ad038dfc5dc1987732e84b13fb4419c96f5
Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
Getting the #include directives ready for Qt5. This includes the
new-project wizards.
Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
It is supposed to refer to the property of the file on disk (if there is
any).
Task-number: QTCREATORBUG-4998
Change-Id: Iaed62c17d124b364aecec4d1f910046bade42d40
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>