Commit Graph

5903 Commits

Author SHA1 Message Date
Eike Ziller
10fd921e26 Merge remote-tracking branch 'origin/4.13'
Change-Id: I4240608a7a0529bb2f6612ba84abae46166458f5
2020-07-10 08:02:27 +02:00
Christian Kandeler
782ca5d8d8 Clang: Fix error when including float.h with mingw
Prevent mingw from trying to #include_next a private header from a path
we cannot add to our list of includes.

Fixes: QTCREATORBUG-24251
Task-number: QTCREATORBUG-24027
Change-Id: I18a9db130b9c2265cd208c3506d08d2e1c4cee45
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-07-09 17:24:16 +00:00
Marco Bubke
b73ce9eccf QmlDesigner: Add row move up and move down buttons
Task-number: QDS-2294
Change-Id: Ia1e64d0811f55151dfe529db4868821840a8fba9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-07-08 09:17:41 +00:00
Marco Bubke
7504c966bf QmlDesigner: Move code from list editor dialog to model
And add tests to the code.

Change-Id: I9fb183729c716a50bbab861d207a212ff704ee7b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-07-08 09:17:26 +00:00
Eike Ziller
770b07f71c Merge remote-tracking branch 'origin/4.13'
Change-Id: I0125351c7c6fa33f9fc7171469493e4fa53e87c4
2020-07-06 16:43:39 +02:00
The Qt Project
5671b3a7be Merge "Merge remote-tracking branch 'origin/4.12' into 4.13" into 4.13 2020-07-06 14:24:55 +00:00
Eike Ziller
b18711da91 Merge remote-tracking branch 'origin/4.12' into 4.13
Conflicts:
	share/qtcreator/debugger/lldbbridge.py

Change-Id: Ia444f6424fb35b9a539e157afcee868161535272
2020-07-06 16:23:13 +02:00
Christian Kandeler
8bc01aee75 qbs build: Fix sdktool autotest
Change-Id: I069d9b3eaea295efa8d78d4d96b52b61cecbb783
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-06 14:10:46 +00:00
hjk
20be1f5ddf Debugger: Set WITH_DEBUGGER_DUMPERS to ON by default
The option went in with the initial CMale port, presumably because
the test itself created and compile qmake projects at the time.

I do not think it makes sense to leave out existing tests by default,
even if they run for some time.

Change-Id: I7ff055a2a432b9d8f6af16f7da63ebc56995c31e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-06 11:15:34 +00:00
hjk
e1c88116b3 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
(cherry picked from commit 430a33dcd9)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-06 11:15:18 +00:00
Robert Loehning
d35cf4b846 Squish: Stabilize tst_HELP02
Depending on the sizes of the treeview and its contents, the
click might hit the scroll bar and result in a script error.

Change-Id: Ic3658b1f180d1aa5a792d6664d2d7f56d8d0c353
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-06 10:48:25 +00:00
Eike Ziller
1de74cceab Merge remote-tracking branch 'origin/4.13'
Change-Id: I015bac0cccdf466a923c706abdedd8bd8800b0cd
2020-07-06 10:30:54 +02:00
Christian Kandeler
15a1266d50 clangbackend: Do not handle built-in types specially
... when collecing tooltips. The more general functions provide more
information, such as constness.

Fixes: QTCREATORBUG-14950
Change-Id: I6d0a890a695e19e9754b5538ba092a188a3bbbb0
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-07-06 06:32:33 +00:00
hjk
a2bf75bb55 Debugger: Add test for char * display
Change-Id: I7319ab6c12aab30e58c5b9fd9223534745fa741c
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-06 06:20:18 +00:00
hjk
430a33dcd9 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-06 06:07:13 +00:00
Christian Kandeler
4c2938a366 Fix qbs build
Change-Id: Ic19d1f42d98a0bec31f2f5788063f6b2e7d61cef
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-03 14:49:01 +00:00
Robert Loehning
9c7a1577a5 Squish: Don't try to "Save All" when there are no unsaved files
Change-Id: I431c9754d84d36f0c09e45e6c43fe67f173da59f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-02 11:16:09 +00:00
Robert Loehning
ef4bc4432a Squish: Update expected output
Change-Id: If5fdc09ee57ab476e7d434f084fffceb82df23cf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-02 11:15:40 +00:00
Robert Loehning
cc63b3b47a Squish: Update menu items
Change-Id: Ibbca07fb02092ce829246e99b2365b513b1fa4e0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-02 11:15:13 +00:00
Tim Jenssen
6c59ceb6e0 Merge remote-tracking branch 'origin/qds-1.59' into 4.13
Change-Id: Ia5756102fa014a8376c8b277e9a50a112c594d35
2020-07-02 02:05:28 +02:00
The Qt Project
fa81549844 Merge "Merge remote-tracking branch 'origin/qds-1.59' into 4.13" into 4.13 2020-07-01 16:21:30 +00:00
David Schulz
2915ee0832 Core: remove impractical offset member of text position
It is just accessed when getting the length of multiline ranges and in
that case we can pass the string that range is used on to calculate the
real length.

Change-Id: I3fe95ac0cd4b05a08924a5285a75ebc5eed2423b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-01 10:51:44 +00:00
Christian Stenger
f5f684a609 Squish: Fix expectation when canceling a clone
Change-Id: I674324a4a98e4329c4445de69ceddeffba607ff3
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-07-01 09:59:40 +00:00
Marco Bubke
327bec26bf UnitTests: Temporary disable the tests
I added QmlDesigner to the unit tests but I have no clue have this can work
with CMake. We only want some source files and are preloading some other
header.

Change-Id: Iadf8ca09b7e63055d1e2ff231a15ef7be2891204
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-07-01 09:09:57 +00:00
Thomas Hartmann
a97ea2e3b3 QmlDesigner: Fix test build
Change-Id: Ib24054b9caa1a2b1404c8af7af7f85bc3de1e6b2
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-07-01 08:16:36 +00:00
Tim Jenssen
0c6231d7ec Merge remote-tracking branch 'origin/qds-1.59' into 4.13
Conflicts:
	src/tools/clangpchmanagerbackend/source/pchtaskqueue.h

Change-Id: Ibe8ac2fa0eafcbcc86ac445f0be035839e06ff40
2020-07-01 09:40:01 +02:00
Thomas Hartmann
f9df5b445a QmlDesigner: Fix tests
Change-Id: I74442bf004a462d5d310f128b64f8bc82073d822
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-30 18:47:17 +00:00
Eike Ziller
6a095d6c9a CMake build: Make option to include dumper tests discoverable
Change-Id: I9828f362561b8392d31a56f8a60fe9531accf4ce
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-06-30 11:39:44 +00:00
Eike Ziller
7f44d8582b CMake build: Remove timeout for dumper tests
They take much longer, but are also optional.
Makes it possible to run via e.g. "ctest -V -R tst_debugger_dumpers"

Change-Id: I8bbda6ca36e25cd896b1f3be5d1696a27b8acc53
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2020-06-30 11:39:24 +00:00
Marco Bubke
1e6807c680 QmlDesigner: Add listmodeleditor
Task-number: QDS-2294
Change-Id: I66cae3a0d4265ab112eaf6b04e3a5972d185ff43
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-30 10:28:07 +00:00
Marco Bubke
32e181f5ce ClangRefactoring: Remove not used pch files
Because we use UUID for pch files every time we rebuild a pch we get
a new file. This patch is collecting and removing this pch files.

Change-Id: Ia8688e7215ee7b41f39b2285323eaa345056bda3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-30 09:52:50 +00:00
Marco Bubke
c924a45fb2 Refactoring: Fix unit tests
One if the LLVM 10 hot fixes was not working.

Change-Id: I1e6cab39ffd5c52f55fb83ff777f6eca457dea35
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-30 09:52:42 +00:00
Marco Bubke
36b72e2bab QmlDesigner: Break dependencies
To get the model under unit tests we have to break every depenedency to
code outside of the unit test scope.

Change-Id: Ib613c3308e48990c55b2ed0cd42bc4b0e1041a01
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-30 09:52:34 +00:00
Tim Jenssen
b8cd87dea0 Merge remote-tracking branch 'origin/qds-1.59' into 4.13
Conflicts:
	src/plugins/clangformat/clangformatplugin.cpp
	src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp
	src/plugins/qmldesigner/qmldesigner.qbs

Change-Id: Ie4a0beeb9fd32ac9683f4e8769988a9c3f3e369a
2020-06-26 16:51:22 +02:00
Christian Kandeler
22830fd5e2 Tests: Fix deprecation warning
Task-number: QTCREATORBUG-24098
Change-Id: Icea21e446173537d8fdb8113f1eff7d7176c34b3
Reviewed-by: hjk <hjk@qt.io>
2020-06-26 10:31:18 +00:00
Artur Shepilko
f3c2f68c39 Sqlite: Fix a compiler warning about unhandled switch-case
Change-Id: Id9cb6ebd6db7f718f8aa3e25d56581f953ad182e
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-06-24 15:04:20 +00:00
Volodymyr Zibarov
40173ad4ab C++: Fix auto variable resolving for template class constructor call
Code snippet:
template<class T> struct MyStruct { int value; };
int main() {
    auto s = MyStruct<int>();
    s.value;  // "value" is not found
}

This fixes find usages for unique_ptr declared as auto like this:
auto ptr = std::unique_ptr<MyStruct>(new MyStruct());
ptr->value;

Also fixes in-place constructors:
std::unique_ptr<MyStruct>(new MyStruct())->value;

Fixes: QTCREATORBUG-15364
Change-Id: I8d452a77fe85e63665ec8d4c4afbcf8aad063121
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-06-22 14:27:49 +00:00
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