Commit Graph

6116 Commits

Author SHA1 Message Date
Eike Ziller
4a8b3268dd Merge remote-tracking branch 'origin/4.12'
Change-Id: I0935f0087efc1ddd4f17fcafc2e3b5c58c23bef4
2020-06-22 09:33:40 +02:00
Christian Kandeler
f9a5ad4d3c ClangBackEnd: Adapt skipped source ranges from libclang
... so that the first #if is not grayed out.

Fixes: QTCREATORBUG-23714
Change-Id: Ia014fd8cd768ea9530567ba8c712bdc0c4063091
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-19 09:14:24 +00:00
hjk
dd9519b1c4 Debugger: Remove QLinkedList occurrences from manual tests
And restrict the auto test to Qt<6.

Task-number: QTCREATORBUG-24098
Change-Id: Idfbe94bc1a4b2d5a8c23a07a031520775bb17cd3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-18 13:41:56 +00:00
Christian Kandeler
8eac3fba80 CPlusPlus: Fix lexer crash
At some point in the preprocessing stage, some tokens get "squeezed", so
their associated string no longer refers to the document content, but
only to their own symbol. However, there is at least one context that
operated under the assumption that the token's offset still pointed into
the "global" string. As the token's offset is zero after parsing, this
lead to the same piece of code being preprocessed in an infinite loop.

Fixes: QTCREATORBUG-19525
Change-Id: I231ba51811cfa0b5c6dfe7f75fe0384472252c6f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-18 07:52:02 +00:00
Eike Ziller
1b431fe271 Move Id from Core to Utils
And add a compatibility wrapper for Core::Id, so we don't have to rename
all occurrences from Core::Id to Utils::Id.

This allows us to use Id also in Utils, which makes it possible to e.g.
move Core::InfoBar to Utils without work arounds.

Change-Id: I5555d05b4e52f09d501dbfe5d91252a982a97c61
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-06-18 05:58:23 +00:00
hjk
5a7256b4bf Debugger: Start making auto tests work using cmake
Change-Id: Ibe6c9bdfb52a16171e6f6acb841f185d936878f3
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-17 12:15:43 +00:00
Christian Kandeler
5ca17578d5 Tests: Fix Qt 5.15 deprecation warnings
Change-Id: I458cced795f29479557853919bd6d317e5870f07
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-17 10:22:09 +00:00
Robert Loehning
c9355626d5 Squish: Update expected tree for qbs
Change-Id: Ib2fd3ec1df0772de2ae2ef7c4083431ccd32095b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-16 14:17:53 +00:00
Christian Kandeler
0861ba2fc9 sqlite: Fix qbs build
Exporting the full sqlite interface can lead to run-time conflicts with
the system sqlite that Qt's SQL support pulls in.
So re-build the sources for the unit test, as in the qmake build.

Change-Id: I8394b9c0aa4e21704bc84600f40b8f5d706ad66d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-16 12:43:00 +00:00
Marco Bubke
270e7b4ea5 UnitTests: Fix fake project.h
Change-Id: I5bd3be88c900af0caaccf8ca3ba2793f20ccf6f8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-06-16 12:24:28 +00:00
Volodymyr Zibarov
9be4a5f839 C++: Fix Find Usages false positive results for function arguments
Code snippet:
void bar();         // call find usages for bar from here
void foo(int bar);  // bar from here should not be in results

Add test for member function false positives, that is part of
QTCREATORBUG-2176. That was already fixed before.

Fixes: QTCREATORBUG-2176
Change-Id: I9a079caa83bbaea1edb7ba6aeb151d4d4c77952f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-06-15 13:19:51 +00:00
Volodymyr Zibarov
7d82741602 C++: Fix find usage to see Catch test functions bodies
Catch test functions defined with function-like macros.
To speed-up semantic analysis, find usages does not expand function-like
macros.
Semantic fails with "expected a function declarator" on such functions
and skips function body.
To avoid that, we create dummy function type specifically for this case

Change-Id: Ie2f2464ee57aa4dc86eed07b8b699458f95c0266
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-06-15 10:16:06 +00:00
Eike Ziller
8b8ecfa28f Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/cmakeprojectmanager/fileapiparser.cpp

Change-Id: I39f8c2be859be043f506bef77de9bb5b42d38165
2020-06-15 11:30:34 +02:00
Eike Ziller
e2670bf3e6 CMake build: Build tests with relaxed QString casting
Like in the qmake build.

Change-Id: I216649123b4f25e5c01f2a71162fc200e0a36d85
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-12 14:30:08 +00:00
Robert Loehning
70662eeb90 Squish: Don't "Save All" at the end of tst_rename_macros
There are no unsaved files.

Change-Id: Ief078f521a7bf6e257d862b69b8dc003b47da31e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-12 09:42:48 +00:00
Christian Kandeler
11f7c4da9f clangbackend: Fix libclang's priority adjustments
... for member qualifiers.
For instance, when doing completion on a non-const object, non-const
member functions get a higher priority than const member functions. This
does not seem particularly sensible and can make our list of completions
appear unordered.
As each matching qualifier only increases the priority by one and the
base priorities are generally further apart, we can fix this problem by
considering two priorities as equal if they are sufficiently close.

Task-number: QTCREATORBUG-6242
Change-Id: I1d04fdf68869cf07cc00626aaac3030b360c2546
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-12 09:39:57 +00:00
Christian Kandeler
ff348e0dcc Unittest: Fix qbs build
Change-Id: I2f573b820745ecbbf5fc00931b4f96b3d43f634a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-12 09:15:19 +00:00
Robert Loehning
0575e1bbc2 Squish: Fix finding commit
Change-Id: I87d2345babe91c449c20aec8c93dbafee5773d4f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-11 16:22:43 +00:00
Christian Kandeler
aaacfb4945 Fix a clang unit test
This particular test was apparently supposed to check that the two
occurrences of "foo" (one const, one non-const) appear next to each
other in the list of completions. However, there is only one occurrence
of "foo" and the test only succeeded because it happens to be at index 0
and -1 is returned for the second lookup, resulting in a absolute
difference of 1.
So let's explicitly check for that instead.

Change-Id: I6049689911decc114239f2be7e63b091a4a18226
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-11 15:24:07 +00:00
Christian Stenger
7c669a06be Squish: Adapt to changed ui
Change-Id: Ibad3b2080040f7345125c549527f22f2c246fbef
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-06-11 13:44:24 +00:00
Tim Jenssen
3acdb7891b Merge remote-tracking branch 'origin/qds-1.59'
Change-Id: I8891e7490a7fd51997a3b57561961f6134be3252
2020-06-11 12:54:10 +02:00
Tim Jenssen
83148cbb89 unittest: another adjustment to new constructor
Change-Id: Id1d38fcca8f4b51dea2c17b466521534b73d7ae7
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-06-10 15:22:08 +00:00
Marco Bubke
50d3067bcd UnitTests: Refactor printing
Move standard printing functions to extra header.

Change-Id: Ib032047235297dfe3ac0bcdbd39c353493f3ae0d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-10 13:34:37 +00:00
Marco Bubke
5a7a6cb02d Sqlite: Remove last usages of UpdateCallback
Change-Id: Ie7ffe06c55a7827fae20996e5b0eadb9892b9e23
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-10 13:34:27 +00:00
Christian Kandeler
4fbd68183b clangbackend: Fix lexicographical sorting of completions
Utf8String has a weird operator<, so we did not get the expected results
from our string comparisons.

Task-number: QTCREATORBUG-6242
Change-Id: I0e94dc42d6e04ab833efcce41463b7024455b6d8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-10 12:50:50 +00:00
Tim Jenssen
bca0c2c3f4 clangrefactoring: fix cmake and qbs after file rename
Change-Id: Ic78df938ad4edced664ef968d834c59110f4ab37
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-06-10 11:32:30 +00:00
Marco Bubke
acf5329422 Sqlite: Fix null handling
Most of it is only silencing a warning but one is fixing a faulty test. So
writing null values should now be working.

Change-Id: If702e1fc8176a9e0ae82a5589c719d567929202b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-10 09:05:00 +00:00
Marco Bubke
06866c3ee9 Sqlite: Use a more efficient update hook
Change-Id: Ic6df1f4ba6b914c7751faf7cf89083fa50a92793
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-09 14:48:27 +00:00
Cristian Adam
be339abb16 CMake Build: Fix unittests
Change-Id: I4214954d880d19dbe9a070d031c417dc3caf068a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-09 12:44:29 +00:00
Eike Ziller
c644e7c80a Merge remote-tracking branch 'origin/qds-1.59'
Conflicts:
	src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp
	src/plugins/qmlpreview/qmlpreviewconnectionmanager.cpp

Change-Id: Ifa7c66330c1995378280cdb4c57c30015dc11b68
2020-06-08 16:04:15 +02:00
Tim Jenssen
42cad89708 fix tests
Change-Id: I5a0f10e6afb85dc0306e224710d2c103f24404f3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-08 13:02:40 +00:00
Christian Stenger
28ce5f497a Squish: Clean issues before filling them
Change-Id: I5ba9f8d73bdb72c02919261057e6d5bf00183f4e
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-06-08 11:28:45 +00:00
Christian Stenger
311ed87e30 Squish: Remove handling for closed bug
Change-Id: Ib78d62620b45458ebaddc3d0e8575ffe9be093db
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-06-08 11:28:26 +00:00
Christian Stenger
7778ef9597 Squish: Test newly added code paster
Change-Id: Ied5d08393185cc117a5f3986f05c3d6fbbb45718
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-06-08 11:28:11 +00:00
Alexis Jeandet
77d7bb5014 Meson build plugin initial support
Most basic project management is implemented:
- Project config/build
- Build options accessible to user
- Lists most build targets
- Meson and Ninja added to kit setup
- Basic project file tree with files known by Meson
- Some basic meson and ninja process output parsing
- Some project templates

Missing features, that will come later:
- Configurable project tree layout
- Locators for Meson
- Build importer
- Access to Machine files for better user fine tuning
- ...

Fixes: QTCREATORBUG-18117
Change-Id: I2811e71562c113fb0fc6b6177bcf0698fa71ef63
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-08 09:55:17 +00:00
hjk
28d34d196e Debugger: Fix QJson dumper for Qt >= 5.15
Storage is internally based on QCbor now.

Since this works better when having dumpers for QCbor values,
add those, too, for Numbers, Strings, Arrays, Maps for now.
None of the custom types.

Fixes: QTCREATORBUG-23827
Change-Id: Idf281d859aaf8556d9895646bbc091af85b34157
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-06-08 09:34:35 +00:00
Eike Ziller
623e607b23 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I19a7406f7e387b53f1e7b3f08a0b4c89a377ab82
2020-06-08 08:22:10 +02:00
Marco Bubke
cf441e8198 Sqlite: Add primary key table constraint to table builder
Change-Id: I60c158eb76db2217a2d045053bb8e47eef75ff7a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-05 09:57:47 +00:00
Marco Bubke
a61eff0079 Sqlite: Add session support
Session are captured by hooking in the sqlite changes. They are saved in
blobs and containing inserts, update and deletes. Because the are
semantically coupled to translactions we add a

Change-Id: Ie095558ebc50601fcaae32958ebeeb98b72d73b9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-05 09:52:42 +00:00
Christian Stenger
3a97df0f61 Squish: Adapt to changed menus
Change-Id: I8557003bbc94affb018b09e6d5d36cae0f72403a
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-06-04 19:53:35 +00:00
Volodymyr Zibarov
3ad203b56e C++: Fix variable template parsing in expression
Fix parser to not fail on TemplateId without parentheses, for example:
int i = foo<int> + foo<char>;

This fixes std::pair structure parsing in MSVC headers and find Usages
to work with pair->first and pair->second.

Change-Id: Ic300ea99d44a749705430d5eb47b2744715af995
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-06-04 08:18:40 +00:00
Christian Kandeler
02f2841a41 CppTools: Fix formatting for new-style function declaration
Fixes: QTCREATORBUG-23502
Change-Id: Ie80fe9aa77ffbf0b9ecc531841e78f2bd80de37e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-04 07:21:39 +00:00
Christian Kandeler
330b1bcbb5 Debugger: Fix misleading indentation
Change-Id: I20188acb2d00c255984a05f522bfca7938639a6b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-04 07:18:34 +00:00
Michael Brüning
083b02377d Add option to apply style sheet coordinates
Enables the user to have pixel positions in the style sheet even if the
template does not use pixel positioning.

Also adds some more ordered properties to make the test case
deterministic.

Task-number: QDS-2208
Change-Id: I79b6af0c24539d1b9eb03dcf0fb52bb078d74afe
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-04 05:42:07 +00:00
hjk
777ae8b87b Debugger: Adapt offset tests to changed QDateTime structure layout
Chandge with 5f1f0fe0b71c in qtbase.

Change-Id: Ifceac5125f974a1ebd2ab2e358ba906188d451a2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-06-04 03:14:25 +00:00
Eike Ziller
c9d357fdac Fix unittest build if Clang refactoring is turned off (now the default)
Change-Id: Ib129d2872a4550e14a888c1d98c4b78012a08982
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-03 10:31:17 +00:00
Michael Brüning
6419059362 Correct text alignment preservation and add basic options parsing
Also add a test case and Remove some dead code along the way.

Task-number: QDS-2071
Change-Id: If34d4e152860ec9ab098f07e36e3a5dc4368c67f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-02 20:25:51 +00:00
Thomas Hartmann
e5d892c74a QmlDesigner: Fix test data for StyleMerger
* This seems be the correct expected outcome.
* Minor fix in SwitchTemplate

Change-Id: I5de04d943d3522a37ac1664157f384594ddddcde
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-02 20:23:24 +00:00
Michael Brüning
96a511c979 Add some more tests for automatic stylesheet preprocessing
Currently, the tests fail, but the output is by and large correct.
There are some issues that still need to be analyzed.

Task-number: QDS-2071
Change-Id: Idb4618171a7256ec527368d6079c756eb734db82
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-02 20:23:12 +00:00
Michael Brüning
b7155a6a04 Adjust test case data for complex test and reactivate it
Change-Id: I5e61971ff420f3193bca1f63040044833e26cca8
Reviewed-by: Michael Brüning <michael.bruning@qt.io>
2020-06-02 20:22:56 +00:00