Commit Graph

57165 Commits

Author SHA1 Message Date
Eike Ziller
5bc38589d8 Fix crash when adding file to sub folder in generic project
The moment the file is added to the project, a reparse is triggered,
which invalidates the tree sub-nodes.
So we need to check if the context node (on which the wizard was opened)
still exists before trying to access it, similar to how we do that in
JsonSummaryPage::findWizardContextNode.

Change-Id: I9154e000a31ea8d5d4ebc66c25528d422c377b94
Fixes: QTCREATORBUG-21342
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-10-18 12:29:44 +00:00
Orgad Shaneh
a9ac438ad8 Git: Add quick filter for branches panel
Change-Id: Idef4ab2db69f24bb004c00fa010b814fdaa7d56d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-10-18 12:26:26 +00:00
David Schulz
170e599a11 LSP: support file pattern filter and multiple mime types for lsp clients
Change-Id: I6d1b6c38d41dfd247c8883e765e5e432dbe53a9e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-18 12:00:40 +00:00
Christian Stenger
2d7d08710e Squish: Adapt to debugger related ui changes
Change-Id: I452d4ccab7dc7c196277f008877ee58a1b2c8f7b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-10-18 11:44:01 +00:00
Ivan Donchevskii
3f613d25a1 Clang: Move text cursor utility methods into ClangCodeModel
These 3 are only used in ClangCodeModel.

Change-Id: Id7c2cead40473bcb746e4b105aa36cb7d51a2740
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-10-18 09:13:35 +00:00
Andre Hartmann
4e0f14b8a5 BranchView: Add ellipsis to rename and remove action
Both open a new dialog to perform the action.

Change-Id: Ie93b99b1ff64927de24de49cd5e30ee729d749b2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-10-18 08:16:23 +00:00
Orgad Shaneh
14d1cffe1e README: Adapt to clang submodules
Change-Id: I518b3b3d48b24de28b253188e78665ef299cde9f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-10-18 07:51:56 +00:00
Christian Stenger
4656446ab4 QmlDesigner: Silence compiler warning
Change-Id: I29f725b918c84cebfbf0a8b735bbfb66c620c803
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-10-18 07:42:26 +00:00
Christian Stenger
9bf4cf485e QmlDesigner: Fix compile for auto tests
Amends ada0c6f405.

Change-Id: I5a092fca7e7ce95d62e36e0efd9135beabccfd65
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-10-18 07:42:14 +00:00
Tim Jenssen
ada0c6f405 QmlDesigner: fix to not use not existing puppets
also remove the path if it is the same as the default path

Task-number: QTCREATORBUG-21303
Change-Id: I811ffab789c1cfc200aa2c68672ee4d6ee83ecfe
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-10-17 16:07:37 +00:00
Orgad Shaneh
218a439bd5 Qbs: Fix pch detection when there are multiple tags
Change-Id: I21f789cbaa01b36180b3566420a01e5b052d6ace
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-10-17 13:29:43 +00:00
Christian Kandeler
5bf9ac7d56 Android: Prevent invalid assertions in toolchain detection code
NDK r17 removed the MIPS toolchains, but kept the respective
directories, which was enough for us to assume the compiler binaries
were also present.
Instead, we now explicitly check for the presence of the compiler
binaries.

Change-Id: Ice68cf497a66f5e8b900e29634a988547fdee0d8
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-10-17 12:46:46 +00:00
Eike Ziller
e06c8672ac Add changes file for 4.7.2
Change-Id: I042c29592b46a4f094251d241dba442bc4d728c6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-10-17 12:21:26 +00:00
hjk
32b4dbbd84 Debugger: Use actions in different contexts
... for F10-as-in-Start-and-break-at-main and F10-as-in-step-over.

Change-Id: Ie8e9e9be389a09a1485cadeea8b2d035a130920a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-10-17 10:50:23 +00:00
David Schulz
77635c0ec9 LSP: warn on non existing language client executables
Change-Id: Ie996f80f4c4d836970f62f1a174bb92967dfb281
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-17 10:38:20 +00:00
David Schulz
7a7dcc9064 LSP: Fix positions for code completions
The columns are also zero based. All previously checked language server
that were tested seem to ignore the fact that the completion was
triggered outside of the line when triggering a completion on the last
character in a line. Never the less this issue can easily be reproduced
with other than the go language server when trying to complete code in
the middle of a line.

Fixes: QTCREATORBUG-21325
Change-Id: I1485f041a27b8fe8b85de4e13bac8bbb296dbf69
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-17 08:26:48 +00:00
Ivan Donchevskii
239c15b5e2 Fixes: Clang: Sort the initial list of includes for the code completion
Task-number: QTCREATORBUG-6242
Change-Id: Icdd5671801079a547a08b1276a6dbc76fed4bd30
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-10-17 08:09:59 +00:00
Ivan Donchevskii
f8e6ba916c Clang: Fix abandoning the parentheses for function
Was introduced in 0f96f735f0 because the the incorrect
move to the '&' character.

Task-number: QTCREATORBUG-21305
Change-Id: I55d79e68795f55b758aa95072fca10bc00d49037
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-10-17 07:31:05 +00:00
Ulf Hermann
d1cd39081b QmlProfiler: Further improve QmlProfilerTool test
Don't close the fake debug server after receiving one connection. The
client might time out after establishing the TCP connection, but before
receiving the hello message.

Also, retry more aggressively, just like we do in the
QmlProfilerClientManager test.

Change-Id: Ib0a6c068c97d8000b599d51f31f90712db219af2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-17 07:16:29 +00:00
Ivan Donchevskii
cafd5ced1a Clang: Significantly improve ClangFormat plugin usability
What's new:
1. New LibFormat option is used to prevent lines shrink,
   which allows to drop most of tricks used before for that purpose.
2. Cached UTF-8 source code is used to improve performance
3. Improved error handling.
4. Slightly improved UI.

Change-Id: I4605200fa103167369a40650b2e1ad2c61e8133b
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-10-17 07:16:04 +00:00
Christian Stenger
6f73b3b175 AutoTest: Limit test execution under cursor
Run and debug under cursor simply used the literal under
the cursor to find matching test cases or functions. This
obviously finds more than the test under cursor.
This patch limits this behavior by taking current file
and line number into account as well.
If the action gets triggered on a test definition then
the found tests are limited to this position.
If the literal under cursor does not belong to the
definition of the test (declaration, string, comment) the
original behavior gets triggered.

Fixes: QTCREATORBUG-21093
Change-Id: I051d25c1d18e819caf2950b5c62d51e6d70d1b22
Reviewed-by: pawelrutka <prutka13@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-10-17 07:02:56 +00:00
David Schulz
613280bbe4 Debugger: Fix warn on release for CDB
Fixes: QTCREATORBUG-21328
Change-Id: I0dd09fa7df57d708aeb08e37d26d96031d28fb0c
Reviewed-by: hjk <hjk@qt.io>
2018-10-17 07:02:42 +00:00
David Schulz
c882286529 ProjectExplorer: cancel MSVC tool chain detection on shutdown
Task-number: QTCREATORBUG-21329
Change-Id: I681757f1a2e77ecd7f766f25ab554d57473f1c6d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-10-17 07:01:49 +00:00
Ivan Donchevskii
3c1565efcb Clang: Fix build with clang 7.0
As an addition update the header with Clang-Tidy checks.

Change-Id: Ib4a4d324e8cad95403a3e799e352205b05ed7475
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-10-17 05:56:51 +00:00
Ivan Donchevskii
78211741c8 Clang: Make SourceLocation lazily calculate its fields
Trigger path, line, column and offset evaluation only if one
of them is accessed.

Change-Id: Ib2f8b06ece94a3b7424db28523b5796628865202
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-10-17 05:56:39 +00:00
David Schulz
727ea78a5d LSP: restrict automatic completion
Only request an automatic completion if the cursor is after at least 3
'identifier' characters (alphanumerical characters and underscore).

Change-Id: I1bac8f184042fb68135ce24c20d17fc134aae5ac
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-16 13:44:14 +00:00
Christian Stenger
a2a29d1861 Debugger: Re-enable breakpoint state handling with keyboard
This patch re-enables disabling or enabling breakpoints using
the respective keyboard shortcut.
Had been disabled since d6911fd10c.

Change-Id: Iea3ce679bafcc78910be07984fd03b4a6e66eb8b
Reviewed-by: hjk <hjk@qt.io>
2018-10-16 12:07:33 +00:00
Christian Stenger
326adef0de Squish: Further adaption to UI changes of debugger
Change-Id: I0e28d2f929c7a69aa61313e3e5473143dc88e5b1
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-10-16 12:07:24 +00:00
hjk
d0d83f6b31 Debugger: Remove unused DebuggerRunTool::quitDebugger
Change-Id: Id3b59f9651ebc65e3fc7588bea789ccaa96522af
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-16 12:03:41 +00:00
hjk
7c562f1d4b Debugger: Remove unused DebuggerItem::m_autoDetectionSource
Change-Id: I02fb55cea393a4d8167942f66bdeb0af4e385e2c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-10-16 11:31:07 +00:00
Nikolai Kosjar
3160172b58 ClangFormat: Fix constructing libs for qbs
Assignment after concat() was missing.

Change-Id: I9a038cae6372648561a5450e9e3417c4c603ab7e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-10-16 11:06:22 +00:00
David Schulz
7826fdaa56 LSP: fix crashing and leaking memory
... in the language client code assist by making the
code assist provider a member of the client.

Change-Id: I8ea22300a2c824ff00b87cdeaf8ea5f0cf95e4a9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-16 10:40:48 +00:00
Christian Stenger
885be5524c Squish: Adapt to changed UI of debugger
Change-Id: I234ec55f69751f9fc9c543956fe5b9f058ef9633
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-10-16 10:40:41 +00:00
hjk
fa96f73192 Debugger: Rework step{In,Out,Over} handling
Main menu action pass operation to current engine, everything else
is handled there.

Combine execute{Step,Next} and execute{Step,Next}I functions.
Implementation were mostly similar, in some cases unneeded
(the instruction-wise version e.g. for Python)

Drop GDB-isms 'step', 'next' in favor of 'step in' and 'step over'.

Change-Id: I232232bc7a67d9d297a74f1c81dc43be96787d34
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-16 10:34:31 +00:00
Ivan Donchevskii
78fbb0826b Clang: Fix fix-its positions calculation
Code completion does not save the unsaved file contents
in translation unit therefore we need to access unsaved
file directly to calculate the proper UTF-16 column.

Change-Id: I0f217b0d36e0ff94ebc483ed6bef94b55efd311a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-10-16 10:08:08 +00:00
Ivan Donchevskii
3e93f66c5d Clang: Fix SourceLocation column recalculation
Fix column conversion according to the fact that
columns are 1-based.

Change-Id: I75e9b966d96b9bb7648822b564e57f8838ebb3f8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-10-16 09:58:20 +00:00
Leena Miettinen
fac917b477 Doc: Describe the experimental language client plugin
Change-Id: I14e227a242dc101f9e535f56da52beddb5bc325a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-10-16 09:06:11 +00:00
Marco Bubke
2c885fa3d4 Clang: Split symbol storage
We need UsedMacros and source related statements in the PCH manager too,
so we have to split that class.

Task-number: QTCREATORBUG-21289
Change-Id: Ie27d4b518b3d6d9174e93fcb243fdb55a09ddf51
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-16 08:57:00 +00:00
David Schulz
468dcc67cb LSP: remove unused LanguageChooseDelegate
Change-Id: I1003d96e603789a9c627d5ecffb6051722c0862a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-16 08:52:27 +00:00
David Schulz
4a7051213b LSP: Create settings widget based on settings type
Change-Id: I4ecdfa386a33114a9d36d21e02ac5eecd9d8f3b7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-10-16 08:43:48 +00:00
hjk
f18176d6c0 ProjectExplorer: Remove Run{Control,Configuration}::abi
Unused now, and arguably not a valid concept anymore.
A run control may consist of different runworkers,
'operating' on different systems.

Since the removed RunConfiguration::abi() implementation uses
only public Target ABI, user code could revive that locally
in case it was needed again.

Change-Id: I658c6e88b4a1aec18bf4de91fc86230552bc0710
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-10-16 08:13:38 +00:00
Nikolai Kosjar
db4e7b2224 ProjectExplorer: Fix detection of OpemMP language extension
Regression introduced by

    commit 6aa11eb75e
    CppTools/ProjectExplorer: Remove enum duplication

Task-number: QTCREATORBUG-21213
Change-Id: I76ab42cf0433f437ca08b4582b91afc43b2f85fd
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-16 07:45:35 +00:00
Nikolai Kosjar
fcada78b3f VCS: Remove trailing return type of lambda
Change-Id: Iba1033ed5eaaf68815ac83a91a514845c0f2347a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-10-16 06:47:53 +00:00
Nikolai Kosjar
d67ddfb5d1 Clang: Avoid starting backend jobs for inactive app and during VCS operations
...to reduce file locking on Windows caused by clangbackend's
parse/reparse jobs.

Considering inactive application state should help for external VCS
operations, e.g. on the command line. However, activating Qt Creator
while such a VCS operation runs might still lead to undesired behavior,
but this should be the less common case.

VCS operations started from within Qt Creator should see less locking
conflicts as we know when they start and finish. However, we just avoid
starting new jobs - there might be still jobs running.

Pending or new jobs will be started once Qt Creator is activated again
and all VCS operations finished.

Task-number: QTCREATORBUG-15449
Change-Id: I5f04c34f006e66162368efbdd58bd822a706f35e
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-16 06:40:43 +00:00
Eike Ziller
3f3ba92fe9 Fix debugger "step into" icon
Fix-up of 3b5ecac238

Change-Id: I0c9197e4c1cf62ccdb57710af00189b32c850fd5
Reviewed-by: hjk <hjk@qt.io>
2018-10-16 05:13:09 +00:00
Alexandru Croitor
f612833d83 Debugger: Pretty print the name of a function when using lldb
This is achieved by calling "po" on an address value casted to a
simple function pointer type, regardless of the actual type of
the function pointer. lldb does not complain, and reports the
library where the function is defined, its name, and location
in the source code if available.

Change-Id: I23ccce62e33bcf213ccdcb55c9836d54333f3c86
Reviewed-by: hjk <hjk@qt.io>
2018-10-15 15:39:16 +00:00
Christian Kandeler
c920c8aafa Botan: Fix MSVC build
Was broken by a patch rebase.

Change-Id: Ifce3a4c799895bac30b5b3e07a18e3fe6a1da070
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-15 12:39:03 +00:00
David Schulz
c37bedfb02 LSP: split out settings specific for std io clients
Change-Id: I25eebfc15a9d0d5665e57137f016e54a069ca849
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-15 11:51:10 +00:00
hjk
0ebe8402c7 Debugger: Fix breakpoint disabling using context menu
Change-Id: I3fa5ef2dc123f5f7f8292147626453284c1afd76
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2018-10-15 10:56:02 +00:00
Christian Kandeler
922a363fb4 Botan: Enable optimizations in release mode
Because we override the cxx flags manually to silence some warnings, we
have to pass the -O flag too.
On my machine, this results in a speed-up of factor four when uplading
via SFTP.

Change-Id: I3279f0cc95624530fdb5b7ea868a8a51962fb4f8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-10-15 09:17:04 +00:00