Causes a warning otherwise.
Change-Id: I040c3298e7c0898364b49ff4c6605f11f01c538f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
When re-opening a file that had been opened and closed inside
the current active session we open the file at the last used
editor position.
Provide a function to explicitly jump to the first line of an
editor.
Change-Id: I0602d8ef46e80a20385fd1b205812776d6666326
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Token::spell() uses CPlusPlus::Kind as index into token_names. However,
checking whether CPlusPlus::Kind matches token_names is easier if it's
formatted in a similar way.
Change-Id: I3f32b72cf9508c2ea3a4fe6911c3853c309d9e9f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Target exposes information about kit and toolchain to the outside
and enables tools like Clang-Tidy and Clazy.
Change-Id: I27b73bbb3b810789f6ca3d447b744604f8e61286
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Extract headers, defines and fileKind from flags in
order to have complete project parts.
Side-effect: better support for MSVC-specific flags.
Change-Id: Iaa1413c91c96c3cf89ddbe76a7a1f0f46c5289c0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Allow inhereted projects to set the required kit predicate.
Change-Id: I9b8568061c8a93ff965fa10684854420198cd1f8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This amends the obviously wrong
aac1bebace.
Fixes
FAIL! : tst_Semantic::q_enum_1() Compared values are not the same
FAIL! : tst_CheckSymbols::test_checksymbols(EnumerationUse) 'resultCount > 0' returned FALSE. ()
FAIL! : tst_CheckSymbols::test_checksymbols(VariableHasTheSameNameAsEnumUse) Compared values are not the same
FAIL! : tst_CheckSymbols::test_checksymbols(enum_inside_block_inside_function_QTCREATORBUG5456) Compared values are not the same
FAIL! : tst_CheckSymbols::test_checksymbols(enum_inside_function_QTCREATORBUG5456) Compared values are not the same
FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_inside_block_inside_function) Compared lists have different sizes.
FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_inside_block_inside_function_cxx11) Compared lists have different sizes.
FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_inside_function) Compared lists have different sizes.
FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_inside_function_cxx11) Compared lists have different sizes.
FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_inside_class) Compared lists have different sizes.
FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_inside_class_cxx11) Compared lists have different sizes.
FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_inside_namespace) Compared lists have different sizes.
FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_inside_namespace_cxx11) Compared lists have different sizes.
FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_inside_member_function) Compared lists have different sizes.
FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_inside_member_function_cxx11) Compared lists have different sizes.
FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_in_class_accessed_in_member_func_inline) Compared lists have different sizes.
FAIL! : CppTools::Internal::CppToolsPlugin::test_completion(enum_in_class_accessed_in_member_func) Compared lists have different sizes.
FAIL! : CppTools::Internal::CppToolsPlugin::test_cpplocatorfilters_CppLocatorFilter(CppLocatorFilter-filtered) Compared lists have different sizes.
FAIL! : CppTools::Internal::CppToolsPlugin::test_cpplocatorfilters_CppCurrentDocumentFilter() Compared lists have different sizes.
FAIL! : CppTools::Internal::CppToolsPlugin::test_builtinsymbolsearcher(BuiltinSymbolSearcher::AllTypes) Compared lists have different sizes.
FAIL! : CppTools::Internal::CppToolsPlugin::test_builtinsymbolsearcher(BuiltinSymbolSearcher::Enums) Compared lists have different sizes.
Task-number: QTCREATORBUG-21413
Change-Id: I71ace00091e37f0a148086e5047efaec08923b1a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
By default clang-cl accepts only MSVC-style compile flags.
However it's possible to run it with gcc-style flags when
--driver-mode=g++ is set.
With this change clang-cl is run in order to get proper
predefined macros for both cases.
Change-Id: I248d411561a503a60385b3a3106beecb38f3d063
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
It was checked that pure C header and source files had proper
language version but not another way around.
Change-Id: I1eaf41f342731bdbe30ee73e81144334d0f15d19
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
If the project has no PCH it has no effect, and if it does have PCH it is
typically important to use it.
Change-Id: I20ce2a0c5713253d2754d31e7b7dca51696b208b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
It makes sense to add all matching child nodes for the folder
instead of the only one which can even be nullptr.
Change-Id: I134a8073cfae557db2cb44c313239f18b97bda97
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Passing --install to winrtrunner on run will cause the application to be
reinstalled if it was installed before. This reinstallation will result
in a clean sandbox so that all previously saved data will be lost.
If the user needs described behavior he can use the existing "Uninstall
package after application stops" aspect from the run configuration.
Change-Id: I5b5975fb4646a625bfc86975770a1860effcfc06
Fixes: QTCREATORBUG-20208
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Replace 0 with nullptr where applicable
Initialize members in declaration
Change-Id: I3d8bae845be01e27db2c591f8037d3823f25f67d
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
...with an extra parse.
Previously, the creation of an e.g. "Qt Widgets Application" from the
wizard could show code model errors in mainwindow.cpp. Depending on
timing issues, the first error is either
1. 'ui_mainwindow.h' file not found (QTCREATORBUG-15187)
The parse happened before the in-memory ui_mainwindow.h was
generated by uic. The file system watcher can't help here as the
#include was not resolved successfully. And libclang's reparse does
not handle this case (it would need to remember all failed #include
stats...).
==> Detect this case with the help of the include paths and trigger
a full parse.
2. or: allocation of incomplete type... (QTCREATORBUG-15187)
The parse happened after the generation of the in-memory
ui_mainwindow.h, but before the clangbackend received the unsaved
file.
==> Fix this by also writing the content of the unsaved file to our
behind-the-scenes-created ui_mainwindow.h.
Fixes: QTCREATORBUG-15187
Fixes: QTCREATORBUG-17002
Change-Id: I4f3a81adaa3d604746977a402c29f83fbc5b0e44
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
...as currently libclang does not provide "::" consistently and it
confuses users.
Ideally, once libclang provides it consistently, we probably want to
insert "::", but allow to "overtype" it by the user, similar to what we
do with function parentheses. That is, if the user accepts such a
completion and types "::" due to muscle memory, he should not end up
with "::::".
Change-Id: Ibfd19c22457641956ace0ba976672eddc51ecc88
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This trick is needed only for internal purposes.
Change-Id: Ic10c0898519eed663d14c4b1665a0d6b0d47b4a4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
We want the range mover to be visible, but not completely opaque and we
don't want to depend on the theme for this. Therefore if the alpha
channel is < 0.3 or or > 0.7 just clamp it.
Change-Id: I4e5ee32bd890dc8db2bc4b9bcd77b4687b23e22d
Fixes: QTCREATORBUG-21402
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This is likely to fix a crash we could only reproduce
with the Qt Design Studio release on one machine.
Task-number: QDS-270
Change-Id: Idc33ba145169613b866903fa5e259f8cd6ec4ee8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This is wrong. The executable can contain spaces, so it needs the quotes,
and arguments with spaces are also enclosed with quotes.
This reverts commit 9c5afd8e96.
Change-Id: I9c0d3ae7452170195441d0b47b76b5d16252e2c4
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Windows these are interpreted as network hosts
and the timeout when resolving those is way too long.
Task-number: QTCREATORBUG-21372
Change-Id: Ib796473158cec620de26592bf628ab18d676153d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Allows pushing the selected local branch to any remote branch.
Change-Id: I6fb9ee8e1659070c1c759fe64b713fb2235c8816
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
There is no restriction of renaming the current branch.
Change-Id: I51f3f8d69d1fb108a23a9e9f98364361828531d3
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Comparing the row is not enough. Row is relative to the parent, so the
second row in locals was wrongfully considered identical to the second row
in a remote.
This amends commit 299c777c01.
Change-Id: I4c5e43e3107a1f01bbed7abf9b7e2a2d3feb4feb
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Two function call arguments got switched around. Their types, while
looking different, were in fact just aliases for the same underlying
type, so this was not detected by the compiler.
Fixes: QTCREATORBUG-21387
Change-Id: I631d37634501759e37bfc594656f569c4ff1aa72
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Make sure that the same function overloads with different priorities
come together in the completions list.
Fixes the case when we complete the method without '.' or '->'.
Change-Id: Icaf7ea47f5e58b3ae5cc9764ad79c857f6f6e231
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
When a directory is renamed, and it has sub{sub-}*directories, executing
git blame on a file in the subdirectory -> Blame Revision (or parent) for
the file in the previous name -> Show failed because it couldn't determine
the top level directory.
You can test by opening qmakeprojectmanager/wizards/filespage.cpp and
blaming one of the lines that had it as qt4projectmanager/...
Change-Id: I7ac964c12f1f368c5ce92e9bedd972a2bc824935
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
It's a first step but we have to refactor the interface later.
Task-number: QTCREATORBUG-21379
Change-Id: Idda666bcaec950203f001c993c54a926779527e0
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
If we want to split the project part we have to filter out the top system
includes.
Task-number: QTCREATORBUG-21345
Change-Id: I258fa33ac39bd94b4699f4f39923d6ad274c1dc7
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
The context menu command name is "Open Command Prompt Here" on Windows.
Change-Id: I250cbf464ae185e548733ce94769a52ec1c99dbc
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Some actions that are engine specific are visible globally in the Debug
menu, like stopping, interrupting and continuing the debugger, and
various step variants.
These are registered in the action manager by the debugger plugin.
Avoid duplicating the state management of these actions in the debugger
plugin, by registering these actions as disabled dummies.
The actual actions of the specific debugger run are now registered in
the action manager by the debugger engine instance, for a debugger
engine instance specific context.
The engine manager sets the engine instance specific context when the UI
is switched to the specific debugger run.
Change-Id: I0a311cec0856365b830460dec2ce33d14a2289c0
Reviewed-by: hjk <hjk@qt.io>
Reorganize and edit the information about run configurations.
Change-Id: I84f835da2f6b6cd4ff02831e387475e8c07c6e55
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
...e.g. as in "void f() {".
The criteria whether to change snippets got invalidated with
commit 8d0391a4f9
Clang: Treat brace initialization as constructor completion
as the completion operator might be T_LBRACE now instead of T_EOF_SYMBOL
for normal completions.
This fixes the plugin test ClangCodeCompletionTest::testCompleteGlobals.
Add also unit tests.
Change-Id: I85cf522b9b307359c5c3e25198dd228cbb68ded0
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>