Commit Graph

2158 Commits

Author SHA1 Message Date
Eike Ziller
3666e3aaeb Merge remote-tracking branch 'origin/4.8'
Conflicts:
	tests/unit/unittest/unittest.pro

Change-Id: I4f0ab05f96ee60900a3a35fad4c7331238367593
2018-11-09 13:30:40 +01:00
Alexandru Croitor
de32a631c3 [Debugger] Fix bitfield values to show up correctly using lldbengine
The bitpos value returned by lldb is the bit offset relative to the
beginning of the type, there is no need to do an extra modulus
operation.

Adjust dumper test to add the previously failing case.

The failing case happens when the class containing the bitfield has
more members in front of the bitfield.

Change-Id: I93678f78e6799843558ec53342a0ed49cac74f48
Reviewed-by: hjk <hjk@qt.io>
2018-11-08 15:12:10 +00:00
Christian Stenger
ace6708b88 Debugger: Fix display of null references
Fixes: QTCREATORBUG-21210
Change-Id: I529f38aad9b93707e09ffdd28885e46c2cfd158c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-11-06 11:26:05 +00:00
Eike Ziller
1473bc5891 Merge remote-tracking branch 'origin/4.8'
Conflicts:
	src/plugins/debugger/debuggermainwindow.cpp
	src/plugins/qbsprojectmanager/qbsbuildstep.cpp
	src/plugins/winrt/winrtdevicefactory.cpp
	tests/unit/unittest/gtest-creator-printing.cpp
	tests/unit/unittest/gtest-creator-printing.h
	tests/unit/unittest/unittest.pro

Change-Id: Ie9b80b87a8a4fa81baf72a2daa7919b21371c15e
2018-11-06 09:20:00 +01:00
Christian Stenger
c355379a01 Tests: Fix disassembler auto test
Output has changed with 06a78b6264.

Change-Id: I32d401bf1111fe037b04873ff223cb916b4f886e
Reviewed-by: hjk <hjk@qt.io>
2018-11-05 10:07:59 +00:00
Christian Stenger
02760eafc8 LSP: Fix auto tests for Linux and macOS
Some URI/URL functionality (especially file protocol)
is based on the underlying file system and operating
system respectively.

Change-Id: I6a0956bbef292ff964aec581c2555c54d6d0dbe3
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-11-05 09:33:30 +00:00
Nikolai Kosjar
aac1bebace C++: Fix parsing enum specifier II
This amends the obviously wrong
de975aca4f, which did not honored nameless
enum specifiers.

This fixes e.g. "Find Usages" for declarations following "enum {};".

Change-Id: Id98c074156f576b9a63e6c25dab38721ca34e496
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-24 12:47:03 +00:00
Eike Ziller
fd7cba88ef Merge remote-tracking branch 'origin/4.8'
Conflicts:
	doc/src/editors/creator-only/creator-code-pasting.qdoc
	src/plugins/android/androidbuildapkwidget.cpp

Change-Id: Iea8b7135643d14ffe49d10b14bedb8fa5ac48063
2018-10-24 13:58:45 +02:00
Christian Stenger
03fece349b Tests: Fix plugin path for macOS
Change-Id: I085ddbbff09d52878b82f311381c13b94739e84c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-10-24 11:19:46 +00:00
Robert Loehning
4032f6383a Fix frequent typo
can not -> cannot

Change-Id: Ie872ada1bc9b4ed64bffb667c2e44dbb13b4ad11
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-10-23 09:30:20 +00:00
Christian Kandeler
1c6c64df20 SSH: Turn some manual tests into autotests
Change-Id: Id098709ff74dfc31a26ef42d559ce35d0120c0c3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-10-23 08:28:55 +00:00
Orgad Shaneh
bdc2b4b59f Remove hard-coded disabling of debug logs
Instead, set the default level of all logs to QtWarningMsg.

The call to setFilterRules overrides the user preferences in qtlogging.ini.

Change-Id: Id5f6cd550d14ff7f45ae04c5d3110e0bafb0f072
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-10-13 16:36:58 +00:00
hjk
03d525a3bc Debugger: Simplify 'short int' to 'short' in type displays
Change-Id: I63946a983c4dd47e31f26e5f70a4c3c9e31c92ea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-12 14:07:56 +00:00
hjk
53228b8b0d Debugger: Add a note on LLDB 6.0/Linux type mis-reading
Code "QStaticStringData<1> sd;" ends up as "QStaticStringData<4>"
when read by LLDB. GDB is fine.

Change-Id: Ieef8d4a4c267d6e0bb45c96f8dc9c05a79b66381
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-12 11:34:53 +00:00
Christian Stenger
6f14b6f399 Tests: Fix compile
Amends 4b42789bda.

Change-Id: Ibd4d024ad836accf4fdda880eb342c61a6c32219
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-09-26 10:05:18 +00:00
Christian Stenger
3e4dc83a95 Tests: Fix compile for boost > 1.64
Change-Id: Idf5d68e4528fd49023b21912a48a3cc109a1bbfa
Reviewed-by: hjk <hjk@qt.io>
2018-09-24 09:58:57 +00:00
Orgad Shaneh
41dee83bec TextEditor: Modernize
override, auto, nullptr, member initializers.

Change-Id: I04c6ebb683849568973bd7782fb5a3279267141e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-09-20 08:48:49 +00:00
Nikolai Kosjar
9dea4c0743 Tests: Fix generichighlighter/highlighterengine test
highlighter.cpp: In member function ‘void TextEditor::Highlighter::applyFormat(...)
highlighter.cpp:572:22: error: ‘fontSettings’ was not declared in this scope

Broken by 6ea686faa9.

Fix by adapting the mock/fake header.

Change-Id: I700a7ed4573c44f04ead5a2e6f2df198edaaebb4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-09-20 06:12:33 +00:00
hjk
83a8b8bf8f Debugger: Do not count not matching test as failed
Change-Id: I37a109915426d17b65ab0782e90f238a5da94a1c
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-09-18 06:13:43 +00:00
hjk
e507abf6a6 Debugger: Use new CheckSet infrastructure in AnonymousStruct test
Change-Id: Ib3e2ea2ab8a70ebfe94d80a0b0bf4b57fdb9027a
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-09-17 09:22:23 +00:00
Ulf Hermann
2b582ed455 QmlJS: Fix reformatter test
Apparently the reformatting truncates any sequence of multiple empty
lines into one. That seems to be by design. Therefore, remove one of the
two adjacent empty lines from commments.qml. Also, don't invert the
actual and expected values in the test code.

Change-Id: Id87c6fa0b2c7a03884d42d109b7d55f5040a927a
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2018-09-12 08:09:51 +00:00
Ulf Hermann
88074a4aa8 QmlJSEditor: Remove disabled qmllookup test
This test has been disabled since Qt4 times and is unfixable. In order
to test lookup of QML types, we need to write a new test.

Change-Id: I13909c277d0b9552c158b74529c350cb28fb3794
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2018-09-11 11:59:41 +00:00
Ulf Hermann
51adb199ab QmlJS: Fix and enable remaining pieces of importscheck test
Change-Id: Idaaf19cee1a0a971b9c3bf5ad3371a68ebd81f40
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2018-09-11 11:13:29 +00:00
Ulf Hermann
b6195f3de7 QmlJS: Fix case-fallthrough.qml test
The warning about strange interactions between QtQuick1 and QtQuick2
doesn't exist anymore, and I don't see why it would show up in that case
anyway. QmlJS::StaticAnalysis::Type used to have a member 324, and the
comment references that.

Change-Id: I4f0a256588919a146068b8771954bcabf0468dbc
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2018-09-11 10:31:31 +00:00
Eike Ziller
eccc24e5c9 Merge "Merge remote-tracking branch 'origin/4.7'" 2018-09-07 13:27:01 +00:00
Christian Stenger
0dc1b4e7b3 Dumper: Tests: Fix handling of skipped single tests
Amends b3b4465b2.

Change-Id: Ie268a97af944d17f20077363fa37c89ad998f53e
Reviewed-by: hjk <hjk@qt.io>
2018-09-07 12:48:17 +00:00
Eike Ziller
ac9f1f798c Merge remote-tracking branch 'origin/4.7'
Change-Id: Ifb51ca9893549c478e99c9fc3ea6c32d5d5a28a2
2018-09-07 14:39:42 +02:00
hjk
9a0030a8ba Debugger: Make inheritance dumper test pass again
Change-Id: I2dcb6f811c34beda52e4b4d01526222b4e2abfd7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-09-07 08:55:33 +00:00
hjk
4cb0b3fa73 Debugger: Make enum class dumper test pass again for gdb
Change-Id: Iaded82ab13f30e7222eb14f548ac72d1c6502b7d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-09-06 13:41:51 +00:00
hjk
b3b4465b2f Debugger: Make std::unordered_set test pass again
For some reason order is not important in that context...

Change-Id: I0961dd5be7775d190b9bef6b739dc9d690eb36a9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-09-06 13:11:18 +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
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
Eike Ziller
8e05783019 Merge remote-tracking branch 'origin/4.7'
Change-Id: I4332eba9f1f66fef185359c79c4d96420d8b78ca
2018-08-30 08:31:25 +02:00
Christian Kandeler
faccb8fd71 qbs build: Fix highlighter engine autotest
We link against the TextEditor plugin as of 601eebd832, so don't pretend
anymore that we are the plugin.

Change-Id: I8afdce57ceffdcbf965e16e7a24c0a9ab6d7d234
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-28 13:06:32 +00:00
Eike Ziller
601eebd832 Fix painting of current line in generic and python editors
The generic highlighter and the python editor explicitly map some tokens
to the format C_TEXT. Unfortunately this format is special, because it's
foreground and background colors are handled by setting the editor's
palette, and should not be used for setting the format on characters.

If the format is explicitly set on characters, their background will be
oblique and overpaint e.g. the highlight for the current line, which
looks pretty ugly.

Handle this directly in SyntaxHighlighter::formatForCategory for all
syntax highlighters, by returning an empty QTextCharFormat for C_TEXT.

Change-Id: Ifaeb556754ca8106ad6e55d7062b13b45457a809
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-08-24 08:15:21 +00:00
Orgad Shaneh
9ed36db854 Dumpers: Add a dumper for QPointer
It has an internal QWeakPointer<QObject>, which is not helpful. Cast to the
QPointer's template argument instead.

Change-Id: I9308c5eb9ea3867a682c4e4cba5d8041547981d1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-08-20 12:47:17 +00:00
Eike Ziller
9f60cdcdaa Merge remote-tracking branch 'origin/4.7'
Change-Id: I15962a85b0cc37c5a00e15ef7eac0445aad6c295
2018-08-20 09:05:18 +02:00
Orgad Shaneh
44776760ba Tests: Add #include <QtGlobal> for version checks
It is required with Qt 5.11.

Change-Id: Ie6aee4a5d71a370952f908561a40ccc2d34d31c5
Reviewed-by: hjk <hjk@qt.io>
2018-08-16 08:29:36 +00:00
Orgad Shaneh
98b6fd26bf Dumper: Fix enum display in nested types
When used in SubItem, enums were displayed as
"value of type E at address <addr>".

Change-Id: Ieecfb791126c6f63f272817afc6c8d05f28b9242
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-08-16 06:42:21 +00:00
Ulf Hermann
c679b3202a Tracing: Simplify TimelineModel signals
Instead of laborously calculating which properties have changed under
which circumstances, we can just connect the signals of dependent
properties. This will give us a few false positive signals at a greatly
reduced risk of missing some actual change. Also, the number of expanded
and collapsed rows will always be determined by the content of the
model. We don't need separate signals for those.

Change-Id: Id8495ee525a91405b039fd032509afa125f96412
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-07-16 10:03:30 +00:00
Ulf Hermann
5f9f8f9f16 Tracing: Handle mouse events in FlameGraph QQuickItem
Having an additional MouseArea as child of a ScrollView or a Flickable
is not well defined and leads to inconsistent behavior on different
systems. We can easily catch the relevant events in the FlameGraph item
itself. Also, don't redirect the typeSelected() signals through the
model. They don't belong there.

Change-Id: I77c17977b5a51d57ccd2ef880d3d6c6a604b7f78
Task-number: QTCREATORBUG-20573
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-06-18 12:35:36 +00:00
Christian Stenger
a926909010 Tests: Fix compile on macOS
Change-Id: Ic987e41c79cae531aa94ded8fa9fa87bce55c936
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-06-04 10:07:22 +00:00
Nikolai Kosjar
c9a3d2bea1 RunExtensions: Support specifying thread stack size
...with runAsync().

The stack size cannot be changed after starting a thread, so specifying
the stack size with a pool does not make sense. However, starting
with Qt 5.10 a stack size can be specified for the whole thread pool, if
needed.

Change-Id: I09eded606321388c779f762b77de6223081609fe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-04 09:56:50 +00:00
Christian Stenger
f1881ac2fc Tests: Fix defining path to sdktool
Replace backslashes with normal slashes as Qt handles them
inside paths correctly itself. Otherwise we might end up
using unknown escape sequences which leads to not executing
anything and a passing test.
Escaping the blanks is not necessary as they are handled
correctly automatically.

Change-Id: Ib1a81949c54d41b7864e30a1371de2e148f96bb8
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-06-04 04:52:27 +00:00
Christian Stenger
8b4dbfb8e1 Debugger: Fix member offsets in QFile
Change-Id: I8d806aabcf2c744165553f087831ce899db24d80
Reviewed-by: hjk <hjk@qt.io>
2018-05-22 08:16:07 +00:00
Eike Ziller
e7123b140e Merge remote-tracking branch 'origin/4.7'
Change-Id: I9d433fa6ce4f60a2acfbdb21da9f727cac8d7526
2018-05-14 09:52:58 +02:00
Orgad Shaneh
f615c9aa42 QmlDesigner: Remove outdated Qt version conditions
Change-Id: I7fa3147afbdc07814f8710a44140072e7bbd8511
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-05-11 12:41:20 +00:00
Nikolai Kosjar
23df884f4a ClangTools: Remove clang static analyzer
...since it's superseded by the tidy integration.

Change-Id: Idafa5e1fb5129b1af8e42231a664684d4b90821f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-11 12:17:55 +00:00
Ulf Hermann
734611131d Move Timeline and FlameGraph into a common "Tracing" library
This allows us to share code between the two, in particular the QML code
for the Details window, and the theme code. This way we can potentially
deduplicate some code.

Change-Id: I3a0d26b18488bd2a46b5b077b5b5d79ac2dfc5ce
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-04 14:08:47 +00:00