Commit Graph

5903 Commits

Author SHA1 Message Date
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
Christian Kandeler
26d46fc19d ProWriter: Do not insert a backslash when adding new files
... if the previous line already has a trailing backslash.

Fixes: QTCREATORBUG-24083
Change-Id: Ieabce541da2ef55bcbf3bd14d139b14f3a7575c7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-02 11:20:16 +00:00
Volodymyr Zibarov
9ee693ee22 C++: fix built-in code model to work with shared_ptr on MSVC 2017
These changes target Find Usages feature to work with shared_ptr.
Improve libs/3rdparty/cplusplus and plugins/cplusplus:
parse __declspec() attribute,
call to variadic function template without specified template arguments,
if constexpr,
c++11 attributes [[value]],
function templates with default parameters,
resolve order for function vs template with default parameter,
template operator->() with default arguments,
template specialization with numeric values,
find best partial specialization,
fix partial specialization for non-first specialized argument

Fixes: QTCREATORBUG-7866
Fixes: QTCREATORBUG-20781
Fixes: QTCREATORBUG-22857
Fixes: QTCREATORBUG-17825
Change-Id: I31a080f7729edfb2ee9650f1aff48daeba5a673b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Nikolai Kosjar <pinaceae.pinus@gmail.com>
2020-05-29 12:39:28 +00:00
Volodymyr Zibarov
28a999be52 CMake Build: Set /permissive- (standards conformance mode) for MSVC
To make errors appear faster when developing on Windows

MSVC 2017 and later have this flag to disallow MSVC-specific C++
language extensions. Use it to make code more correct and more portable.

Set this option with add_compile_options() in root CMakeLists.txt to
apply it to all targets.

Add one #include to unittest/gtest-clang-printing.cpp as workaround for
forward template declaration bug in MSVC http://tiny.cc/fa4tpz

Change-Id: Ie0b19701ad773c79ffd2fed24fffbb1dcb29538c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-05-29 06:51:45 +00:00
Christian Kandeler
1989dbe0d7 Built-in lexer: Recognize also reserved user-defined literals
Otherwise, we trip over uses of operators from the standard
library such as std::chrono's operator"" ms(), potentially breaking
basic code navigation.
Amends 425811291d.

Fixes: QTCREATORBUG-24067
Change-Id: I3b2863ce88ee3787414e7a1acdf25f368041cdb4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2020-05-28 08:36:56 +00:00
Michael Brüning
de8eb93637 Add stylesheet merger
Adds classes to merge a template qml file and a qml stylesheet that have
been exported from other design tools into a resulting qml file that can
be used for further processing in Qt Design Studio.

Current issues:

* Sometimes it makes sense to define width and height
  if an anchor is present, but most of the time not.

* Actually if the hierachy was defined (e.g. Text item not child of
  background) most likely the anchors should be ignored.
  But this would be just a "dirty" heuristic. I suggest to let the
  template decide. If the template has anchors those have "precedence".
  It is always possible to define templates without anchors.

Task-number: QDS-2071
Change-Id: I9159514a8e884b7ffc31897aef4551b5efbbcb87
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-05-27 18:26:12 +00:00
Tim Jenssen
5b00401850 Merge remote-tracking branch 'origin/qds-1.50' into qds-1.59
Change-Id: If4869664ad4cbb5ec56e7c306f47d0bf0f1f075c
2020-05-27 19:02:07 +02:00
Marco Bubke
a9a205486d Sqlite: Improve SqliteStatement column check
We have done it for every getter. Now we do it only once as we ask for
the values. It simplifies the code and the test and could even improve
performance.

Change-Id: Ia7d4a33a77ec7c0a5fda548424fbf8b192f07511
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-05-27 13:26:07 +00:00
Marco Bubke
9f9140b196 Sqlite: Remove unused code
Binding by names is slower and we never used it.

Change-Id: Ia6b9b78401f8c2711be34b667ac6f08b44418773
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-05-27 13:09:35 +00:00
Marco Bubke
9c44f8d88d Sqlite: Add blob support
Change-Id: Ic2ec5f20c8585241b9e9aaa8465e70b6ab4f004c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-05-27 13:09:27 +00:00
Marco Bubke
22c33fb859 Sqlite: Improve LastChangedRowId
Change-Id: I2fe559d4b40f93561e44eb138119416291dc7d41
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-05-27 13:09:20 +00:00
Marco Bubke
64cbffe959 UnitTests: Fix LastChangedRowId
Change-Id: I538d068168488eee2662618dede598135c45e396
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-05-27 13:08:55 +00:00
Christian Kandeler
e4fb3de165 C++: Add tests for recent indentation fixes
Change-Id: I90ae2da3a82bff2e966c4327cf8e42f7ebbddd27
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-05-27 04:45:12 +00:00
Marco Bubke
75da71e1fa Sqlite: Fix test
Change-Id: I04de9c429b7779c5c4ecde4a4a44e3b5e60699b3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-05-26 18:11:14 +02:00