Commit Graph

57214 Commits

Author SHA1 Message Date
Ivan Donchevskii
fb25bd53c1 CompilationDatabase: Create target in the same thread
Causes a warning otherwise.

Change-Id: I040c3298e7c0898364b49ff4c6605f11f01c538f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-11-02 13:37:13 +00:00
Christian Stenger
6cdcae528d Squish: Ensure text cursor has safe position
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>
2018-11-02 12:02:42 +00:00
Christian Stenger
42ced7ac94 Squish: Test latest added pasting service
Change-Id: I2b062a3c3c0ad172e0f5ad3b37262c9278351a48
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-11-02 12:02:35 +00:00
Andre Hartmann
a59097086b CppLocatorFilter: Fix result sorting
* Fix rating items with startsWith()/contains() higher
* Rate matches in function parameter list lower

Task-number: QTCREATORBUG-19377
Change-Id: I2ea4c3ba96cd086aef82627326fa0888f700850f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-11-02 09:32:41 +00:00
Nikolai Kosjar
a80396f807 C++: Reformat token_names table
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>
2018-11-02 08:46:21 +00:00
Ivan Donchevskii
38d39fb9f0 CompilationDatabase: Add target to the compilation database project
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>
2018-11-02 06:59:43 +00:00
Leena Miettinen
5f008c9cfd Doc: Describe scheduled updates
Change-Id: I0003d3689978dca2b79d594de2af2bf6b5034332
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-11-01 15:13:11 +00:00
Ivan Donchevskii
f604c8a77c CompilationDatabase: Support both code models
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>
2018-11-01 14:52:05 +00:00
Ivan Donchevskii
cb75aa3e58 ProjectExplorer: Make setRequiredKitPredicate protected
Allow inhereted projects to set the required kit predicate.

Change-Id: I9b8568061c8a93ff965fa10684854420198cd1f8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-11-01 14:39:35 +00:00
Nikolai Kosjar
0d29fea0b3 C++: Fix parsing enum specifier III
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>
2018-11-01 14:29:52 +00:00
Robert Loehning
0bc120b87c Squish: Remove redundant line
Change-Id: I819ace3fc7c3223c5bcd52377db3e7833371c7ec
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-11-01 13:56:47 +00:00
Ivan Donchevskii
f91862a212 ProjectExplorer: Get predefined clang-cl macros in g++ and cl driver modes
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>
2018-11-01 10:45:27 +00:00
Ivan Donchevskii
b97d4c2f80 Clang: Check that file kind matches the language version
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>
2018-11-01 10:04:24 +00:00
Ivan Donchevskii
cb9df98efb CompilationDatabase: Fix escaped quotes handling
Change-Id: Iaecd38f921bd719899e478a76d8a8b9d4230a7cc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-11-01 10:02:53 +00:00
Orgad Shaneh
24bcce4aa6 CppTools: Change default of "Ignore precompiled headers" to false
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>
2018-11-01 09:14:49 +00:00
Ivan Donchevskii
1442a1186d ProjectExplorer: Fix typo in findNodes
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>
2018-11-01 09:13:21 +00:00
Oliver Wolff
181b935c69 winrt: Remove --install from winrtrunner's default run arguments
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>
2018-11-01 07:02:41 +00:00
Oliver Wolff
e0b0c30748 winrt: Code cleanup
Replace 0 with nullptr where applicable
Initialize members in declaration

Change-Id: I3d8bae845be01e27db2c591f8037d3823f25f67d
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-11-01 07:02:37 +00:00
Nikolai Kosjar
d52ac9a708 Clang: Fix unresolved #includes for ui_*.h headers
...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>
2018-10-31 10:38:27 +00:00
Sergey Belyashov
91ed30ffac Update Russian translation
Change-Id: I4d94737f7e542c02b9e7137b150c8a4888c36092
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-31 09:44:24 +00:00
Nikolai Kosjar
8bccd8a428 Clang: Do not insert "::" after namespace completion
...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>
2018-10-30 14:11:35 +00:00
Ivan Donchevskii
b385171eb8 Clang: Don't wrap Qt headers when generating compilation database
This trick is needed only for internal purposes.

Change-Id: Ic10c0898519eed663d14c4b1665a0d6b0d47b4a4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-10-30 13:07:45 +00:00
Ulf Hermann
1b6d57263b Tracing: Force alpha channel of RangeMove into a sane range
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>
2018-10-30 08:29:44 +00:00
Cristian Adam
b8c5f918bd CMake: Do not generate build directories with spaces
Fixes: QTCREATORBUG-18442
Change-Id: I35aea2322801086d1ae11d123f53973dff7847be
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-10-29 14:14:50 +00:00
Ivan Donchevskii
8ab9b93b79 CompilationDatabase: Fix opening relative file paths
Change-Id: I0d0ac8af9cd48510b8b8a80adfb20b8c526cd2e4
Fixes: QTCREATORBUG-21386
Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-10-29 11:45:39 +00:00
Thomas Hartmann
9ab3a69c65 QmlDesigner: Crash fix
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>
2018-10-29 11:45:30 +00:00
Orgad Shaneh
5b7e0afc10 Revert "Android/ProjectExplorer: Include parameters into quotes"
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>
2018-10-29 11:01:56 +00:00
Thomas Hartmann
4f7d24acb6 QmnlDesigner: Avoid paths starting with '//'
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>
2018-10-29 10:54:25 +00:00
Christian Kandeler
81f019f033 Update qbs submodule
To HEAD of 1.12 branch.

Change-Id: I804b5f44e3b468140c20c1cf381d1c4a19f0bce9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-29 08:54:41 +00:00
Andre Hartmann
44205a961e Git: Add push to branch view
Allows pushing the selected local branch to any remote branch.

Change-Id: I6fb9ee8e1659070c1c759fe64b713fb2235c8816
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-10-28 17:33:30 +00:00
Orgad Shaneh
8278b4a24d Git: Remove wrong soft assertion
There is no restriction of renaming the current branch.

Change-Id: I51f3f8d69d1fb108a23a9e9f98364361828531d3
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-10-28 11:51:52 +00:00
Orgad Shaneh
ce15a0f447 Git: Fix detection of current selected index
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>
2018-10-28 11:51:33 +00:00
Robert Loehning
82e997cf59 Android: Capitalize properly
Change-Id: Ie5f35592db6c83feff63df519cc15a47eabc8d9c
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-10-26 13:45:53 +00:00
Christian Kandeler
4c82dd6d12 SSH: Fix decryption in CBC mode
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>
2018-10-26 12:30:32 +00:00
Ivan Donchevskii
93269f3ecd Clang: Add unit-tests for function overloads completion order
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>
2018-10-26 07:22:24 +00:00
Orgad Shaneh
fe87339888 Git: Fix resolving top level for non-existent sub-sub-directory
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>
2018-10-25 17:52:28 +00:00
Robert Loehning
9c5afd8e96 Android/ProjectExplorer: Include parameters into quotes
Change-Id: I7778d3749e29497365e1bce4f599cc31a161bb01
Reviewed-by: hjk <hjk@qt.io>
2018-10-25 16:40:05 +00:00
Marco Bubke
f8ec57919f ClangPchManager: Add PchTaskGenerator
Task-number: QTCREATORBUG-21358
Change-Id: Ia460ce82c3c896f4d0ac00638d03800a55dd27dc
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-25 13:35:11 +00:00
Marco Bubke
ee2122be70 ClangPchManager: Add build dependencies to include collector
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>
2018-10-25 13:35:02 +00:00
Marco Bubke
e571220663 Clang: Add top system includes to include collector
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>
2018-10-25 13:34:52 +00:00
Marco Bubke
be3e06cc7e Clang: Fix test
Change-Id: I599d42f3a2584b40cbcec1368db9a2b11b0112d5
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-25 13:34:44 +00:00
Leena Miettinen
4d892acbbb Coreplugin: Fix UI text
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>
2018-10-25 13:24:21 +00:00
Eike Ziller
1c17ed6db8 Debugger: Use engine specific contexts for delegating actions
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>
2018-10-25 12:58:25 +00:00
Leena Miettinen
9274a42485 Doc: Add info on disabling automatic creation of run configs
Reorganize and edit the information about run configurations.

Change-Id: I84f835da2f6b6cd4ff02831e387475e8c07c6e55
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-10-25 12:48:24 +00:00
Leena Miettinen
f61c8c680d Doc: Describe the Clang Format plugin
Change-Id: I596af2775a4abb8e0331e1eb3de1b55cae0f15d7
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-25 12:48:04 +00:00
Leena Miettinen
45ec0aea37 Doc: Describe the Compilation Database Project Manager plugin
Change-Id: Ie548caa6e3b7288cf554fd898a5b69f267f65bbb
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-25 12:47:47 +00:00
Nikolai Kosjar
9d6a0c7055 Clang: Adapt plugin test testCompleteWithDotToArrowCorrection
Change-Id: Ibc272eb768f6d92c4b02c3164f7171fc769cfd41
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-25 12:14:03 +00:00
Nikolai Kosjar
d946ff5403 Clang: Fix adding completion snippets after {
...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>
2018-10-25 12:13:57 +00:00
Eike Ziller
7d3686359a Fix missing translation contexts
Change-Id: I4402157e7991ad0050333a34394b87ff3d6f4a1b
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-10-25 11:46:57 +00:00
Ivan Donchevskii
83a63c7914 Clang: Go through CLANG-UPGRADE-CHECK
Change-Id: Iaaaea598d020a44bcdc60a8d06ee28a1f28386bb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-10-25 10:34:18 +00:00