Commit Graph

57165 Commits

Author SHA1 Message Date
Marco Bubke
7cac843343 ClangRefactoring: Remove unused code
Change-Id: I752d688039e8bb85654fd54b61a0c8a4e6677954
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-09-03 12:14:24 +00:00
Marco Bubke
be9537667f Use Utils::setUnionMerge
And fix some details of the implementations.

Change-Id: I8e77fee4b95658a69ef1656bb406811de091ce16
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-09-03 12:14:16 +00:00
Marco Bubke
a86867eb8a Clang: Introduce parallel indexing
Change-Id: I522cb18e6d24b7dbed5d5dfa3a732e5b3b5113bb
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-09-03 12:13:10 +00:00
hjk
86cd29b13c Debugger: Simplify thread switching more
This moves the thread switcher combobox, the only consumer
of part of the threadhandler interface, into the threadhandler.

Change-Id: Icafd72e7777fad9196ce8fb33a79cae26c29a521
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-09-03 11:37:17 +00:00
Tobias Hunger
944aa963a8 Journald: Do not try to read journal entries for remote applications
Task-number: QTCREATORBUG-20995
Change-Id: I27911183084f8423ab7638b9443949a84c47b953
Reviewed-by: hjk <hjk@qt.io>
2018-09-03 11:10:30 +00:00
Marco Bubke
2f41886c4b ClangRefactoring: Process tasks after a task has been finished
It could be that processTasks is executed before the future is finished
but in that case there are other tasks which will be called later.

Change-Id: I9b1bfb6fdd642f23842b9c70d60d5b1552193b99
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-09-03 09:40:03 +00:00
Eike Ziller
c81070aa7d Help: Remove reading of old settings
Change-Id: Icb479dd0c558f45e70cb1ff0665b1e51e131d0b6
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-09-03 09:38:50 +00:00
hjk
0c58248894 Debugger: Fix cdb switching back from stopper thread
Amends 9f9c72302f.

Change-Id: If97ca13de30fa4d24deddd58177f55e2c71010a8
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-09-03 09:02:43 +00:00
Christian Kandeler
7a739b3b32 Update qbs submodule
To HEAD of 1.12 branch.

Change-Id: Ia932667870d12108a7735c6103f89053b9138ec1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-09-03 08:34:10 +00:00
Ivan Donchevskii
b23bb73bee CppTools: Do not auto-trigger completion after '{' and '(' in the new line
There's no token before the first symbol in the line.
With no information it's better to avoid triggering
automatic completion after the first token.

Change-Id: I9d3aca3bf72485c6eca6e03d9b8691abf0492bcc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-09-03 08:30:24 +00:00
David Schulz
d61d29cf16 Introduce a basic client for the language server protocol
The language server protocol is used to transport language specific
information needed to efficiently edit source files. For example
completion, go to operations and symbol information. These information
are transferred via JSON-RPC. The complete definition can be found under
https://microsoft.github.io/language-server-protocol/specification.

This language server protocol support consists of two major parts, the
C++ representation of the language server protocol, and the client part
for the communication with an external language server.

The TypeScript definitions of the protocol interfaces are transferred to
C++ classes. Those classes have getter and setter for every interface
value. Optional values from the protocol are represented by
Utils::optional<ValueType>. The JSON objects that are used to transfer
the data between client and server are hidden by a specialized
JsonObject class derived from QJsonObject. Additionally this JsonObject
provides a validity check that is capable of creating a detailed error
message for malformed, or at least unexpected JSON representation of the
protocol.

The client is the interface between Qt Creator and language server
functionality, like completion, diagnostics, document and workspace
synchronization. The base client converts the data that is sent from/to
the server between the raw byte array and the corresponding C++ objects.
The transportat layer is defined in a specialized base client (this
initial change will only support stdio language server). The running
clients are handled inside the language client manager, which is also
used to connect global and exclusive Qt Creator functionality to the
clients.

Task-number: QTCREATORBUG-20284
Change-Id: I8e123e20c3f14ff7055c505319696d5096fe1704
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-09-03 08:00:46 +00:00
David Schulz
8749ccc69f TextEditor: sync code completions in snippets
Update all identical snippet placeholder after selecting an item from
the completion proposal.

Change-Id: Iac4f4183c30517a8133269cc607edadce0c6bd23
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-09-03 04:43:58 +00:00
Orgad Shaneh
a5533fefd1 GDB: Avoid running internal commands for breakpoints with 'c' command
Do not try to read locals and threads when hitting a breakpoint with
"continue" command, as it doesn't really stop.

Change-Id: I2adc02d9f94375c390a874122afe2a82a764dc64
Reviewed-by: hjk <hjk@qt.io>
2018-08-31 14:03:43 +00:00
Thomas Hartmann
9c24aa5875 QmlDesigner: Fix generateNewId()
WE have to ensure the prefix starts with a lower case letter.

Change-Id: I62ed21150f5d7e320661424f71dd5002d2a61a42
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-08-31 13:08:03 +00:00
hjk
62fba85057 Debugger: Fix switching threads using the threadsview
Amends 9f9c7230.

Change-Id: I58193f2d159bb6b839762b0cf02ec8fc4a9df48a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-31 13:06:10 +00:00
Christian Stenger
02936521ec CPaster: Fix compile for some older compiler
Change-Id: I32d9f29aa091cb1a9e44b4ce8d519e6ee1aa403a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-08-31 12:18:45 +00:00
Christian Kandeler
fc1ecd6f82 CodePaster: Add support for pastecode.xyz
Our users are running out of choices for code pasting: KDE has required
an account for quite a while now, and pastebin.ca appears to be offline,
leaving them only with the ad-heavy pastebin.com.
Therefore, we add support for a new site: pastecode.xyz seems
responsive enough, has a simple API and has been around for a bit.

[ChangeLog] Added support for the pastecode.xyz code pasting service

Change-Id: I9b622853df24c28d65c6e388f953c82fc5380fae
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-31 08:53:53 +00:00
hjk
06f3e959d3 Debugger: Remove unused ThreadsHandler::pidForGroupId
Change-Id: I3028a85246a8fb78bac7c99e77676341206e687f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-31 08:48:22 +00:00
hjk
06f3d2bf10 Debugger: Make updateThreads() a setThreads()
(and keep updateThread() for the single-thread case)

All backends create full lists, making that explicit allows to
simplify the interface.

Change-Id: I717cfcf3ec9f8e81df8a5dfc71ae84855bc3beae
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-31 08:39:36 +00:00
Leena Miettinen
7125f6853d Doc: Use defines in "Indenting Text or Code" topic
To enable single-sourcing Qt Creator Manual and Qt Design Studio
Manual.

Add the menu path to Typing options.

Change-Id: I99708fe39d414462c743b0f01a52dcefcce1d65b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-31 08:15:25 +00:00
Ulf Hermann
67b09f5132 Tracing: Adapt aggregator test to new ctor signature
Change-Id: Ifb94c1e1f14b26aa2bb365cd08d36fa67642ecc7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-31 08:14:04 +00:00
Christian Stenger
f38932dd72 Tests: Fix compile after referred file has moved
Amends 5c658ac968.

Change-Id: Ia876cbd49edc60aeeaf564b787f3ec05c4b303aa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-31 07:44:46 +00:00
Thomas Hartmann
cfab83d9fe QmlDesigner: Raise and Lower should be ModelNodeContextMenuAction
Otherwise the action shows up in the form editor.

Change-Id: If61fbeb8fefe2f7db1ab9cb5cdd5756b3bcaa9de
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-08-30 15:48:25 +00:00
Tim Jenssen
693c6dcc0b QmlDesigner: fix crash
Change-Id: If0dc946e49d226144b4a9da673d7138dd1105af9
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-08-30 15:47:58 +00:00
Ivan Donchevskii
8b6a16c95b Clang: Fix completion after '{'
Follow-up fix for 8d0391a4f9.

Do not complete after '{' coming not after an identifier.
Take constructor completions only for '{' and function
completions only for '('. Filter constructor completions by
class/struct type.

Task-number: QTCREATORBUG-21004
Change-Id: I7ae2d6bee23cf907648c42b93eb12742942833f6
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-08-30 13:36:52 +00:00
hjk
a6719ed0ff Debugger: Remove thread handler location reset handling
Has not been needed since Utils::TreeModel was used.

Change-Id: Iff60a631e306e9756f83d70eacf19c2fe49bcedd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-30 13:31:24 +00:00
Michael Weghorn
34840e8088 Improve displayed type for GDB's PlainDumper
Use the name attribute of the gdb.Type rather
than that of the pretty printer.

This e.g. displays 'std::vector<int>' rather than
just 'std::vector' for an int vector.

Change-Id: I53da01bb5ba67bcd8d7113beda6ff03e708d60f9
Reviewed-by: hjk <hjk@qt.io>
2018-08-30 12:39:05 +00:00
hjk
a93760c789 Debugger: Move handling of currentThread to thread handler
Make the individual thread items more agnostic of their environment.
The result is closer to the break handler setup.

Change-Id: I1a3f6138e5f32e930313e07d3c6a37144c180050
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-30 12:12:34 +00:00
hjk
cc198547e9 Debugger: Replace module polling in gdb by handling notifications
Explicit polling is still available and accessible as fall back in
the gui, but is at least in theory not necessary anymore.

Change-Id: Ifd184fb88bdbf5de53f5776e2c94a03f8ad44a06
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-30 12:07:20 +00:00
hjk
2d631c7a0b Debugger: simplify GdbEngine::handleAdapterStartFailed
Both branches did effectively the same.

Change-Id: Iebfc3ace62acd3bd6f73fb1ee8573d8e884237c3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-30 12:07:03 +00:00
Ulf Hermann
0b706608fc QmlProfiler: Listen on QHostAddress::Any in QmlProfilerToolTest
The attach dialog retrieves the host address to connect to from the
device's toolControlChannel(). All of the toolControlChannel()
implementations currently specify "localhost" as host address.
"localhost" means IPv6 on macOS and IPv4 everywhere else. Unfortunately
there is no shortcut for listening on a dual-stack local address in
QTcpServer and urlFromLocalHostAndFreePort() will try both v4 and v6,
returning whatever works. There is a shortcut for listening on a
dual-stack "any" address, though. As this is only the test, we can live
with exposing a TCP server to the internet for a short time.

Change-Id: I4114f03668e608f80353d21a59edf67db4b7f738
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-30 11:52:13 +00:00
Tobias Hunger
97b7dce264 ProjectTree: Take const Node* to look up project based on node
Change-Id: I79e6008c93f7adcf295031767ba6f6d931cb8ae0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-30 11:02:12 +00:00
Christian Stenger
09b611acde Squish: Fix checking for plugin loader issues
Change-Id: Ibf894f3792f78c496be5fcbdfcd6c19b8b1246e4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-08-30 11:01:43 +00:00
Ivan Donchevskii
5c658ac968 Beautifier: Move formatting tools to TextEditor
Formatting is moved from Beautifier plugin to formattexteditor.h/.cpp.
Diff and Differ classes are extracted from DiffEditor to Utils
to prevent extra TextEditor dependencies.

This change will make possible to use formatCurrentFile
and similar functions not only from Beautifier code.

Change-Id: Ic5ca668afe88f4e9376d49e6bd3594807172b0dd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-30 11:01:08 +00:00
hjk
7777df42cf Debugger: Only hide, not destroy toolbars when switching perspectives
May save a few cycles for re-creation and re-layouting flicker
when switching back.

Change-Id: Ifc29adb008d2fa0966f68fe45b3258e6dd199d08
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-30 10:16:38 +00:00
Christian Kandeler
71e94e4e28 Theming: Fix value of TextColorDisabled for classic mode
TextColorDisabled has always been the same value as TextColorNormal
(which was presumably unintended), and nobody seems to have noticed for
a long time. However, as of commit f7a0a3cd26 we have been using
TextColorDisabled to display disabled project nodes, which means users
could not tell enabled and disabled parts of the project apart anymore
when using classic mode.
We now use the same value as in the other themes.

Change-Id: I1f616b6808d6c2012748af24b90953e4eb75df18
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-30 10:08:00 +00:00
hjk
7c547eba9b ProjectExplorer: Add an option for automatic generation of runconfigs
Default to 'on'.

Task-number: QTCREATORBUG-18578
Change-Id: Ib430542b00d93138827fe8930db6a4e5a03c014c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-30 10:02:33 +00:00
Venugopal Shivashankar
24cabc6dbb Wizards: Fix minor language issues in the project templates
Change-Id: Ia999054ecbc674d2bb920ca78f5fb758055a8140
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-30 09:23:30 +00:00
Eike Ziller
1e55f02d2c More change log for 4.7.1
Change-Id: I79b26828ee572525cc32619fcddd3f70353e355c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-08-30 09:17:15 +00:00
Ulf Hermann
e56e964aa5 Tracing: Properly signal destruction of non-owned properties
When the zoomer, model, or notes properties for TimelineAbstractRenderer
are destroyed, the QPointers become null, and therefore the change
signals need to be emitted, and an update to the widget should be
scheduled.

If this is not done, clients using the property might keep a dangling
pointer in some cache and dereference it later.

Change-Id: I63fb657afb8138e9ac54c7d839d4a52271f8f3e8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-08-30 09:06:40 +00:00
Eike Ziller
d457604de1 Update change log for 4.8
Change-Id: I7493aaed9b7819dee5bdcf67b33f4298e0ca46b3
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-08-30 07:10:31 +00:00
Eike Ziller
8e05783019 Merge remote-tracking branch 'origin/4.7'
Change-Id: I4332eba9f1f66fef185359c79c4d96420d8b78ca
2018-08-30 08:31:25 +02:00
Sergey Morozov
db85693690 AutoTest: Create tree item for each failure
Introduce special location item for this purpose.

Task-number: QTCREATORBUG-20967
Change-Id: Icb6c6ec8ff9d2e4e8e3d13834427bae50d74bd2a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-29 16:57:05 +00:00
hjk
fa4693fd29 Debugger: Fix insertion of backend generated breakpoints
Change-Id: Ifb46995a787c111620b5270b2b60e4e7f39eb552
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-29 12:20:07 +00:00
Christian Stenger
7ba5bddded Doc: Correct license header
Change-Id: I5324b4a8ee23a7203591e0c35875027d8ac93e0d
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-08-29 12:11:06 +00:00
Ivan Donchevskii
4a6ad6c849 Clang: Do not replace class completion with constructor completion
Both completion kinds have the same name. Do not merge them
together when looking for constructor overloads.

Task-number: QTCREATORBUG-21010
Change-Id: I4c851033d63ad4e242b6179491f1fba00af466f6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-29 11:54:34 +00:00
hjk
9492066a31 Debugger: Identify a breakpoint's requested parameters with preset data
This removes the ability to have different enabled/disabled states
for the same breakpoint in concurrently running engines, but make
the behavior less surprising.

At least currently people *do* expect breakpoint changes in a running
engine to persist after the engine dies.

Change-Id: I911594765b24f2ce58f6747ae5ecab3e608882b8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-29 11:06:26 +00:00
Marco Bubke
6386cd54eb Utils: Add container wrapper for setUnionMerge
It works with contiguous arrays like std::vector but it is not so useful
for other containers anyway. Use the iterator interface for std::array.

Change-Id: I9f5dd665d38ca642bbd81e1925445127ea579c22
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-29 10:54:58 +00:00
hjk
a68e8c5b69 Debugger: Move session load/restore handling
... to breakpoint and watchhandler.

More modular this way.

Change-Id: I4a45481fcc2bfde67b164bd7274fb7b2a12cb7ac
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-29 09:38:38 +00:00
Thomas Hartmann
37dbc7ba85 QmlDesigner: Export ModelMerger
Change-Id: If1ecda6d1aab7eea3a634700a065b95b00d5c4b2
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-08-29 07:57:41 +00:00