Commit Graph

6441 Commits

Author SHA1 Message Date
Christian Stenger
35ffc930b8 Tests: Fix QJson dumper test
Change-Id: Ic9f5b7da358164bb9b66f2c75965377cdbf09c4e
Reviewed-by: hjk <hjk@qt.io>
2020-10-05 11:18:45 +00:00
Christian Stenger
bf19509642 Tests: Fix boost pro file additions
Otherwise we might end up with a messed up project
file.

Change-Id: I432d45063092d0a5dead3ef975ba3ce5294c1af0
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-10-05 10:02:14 +00:00
Eike Ziller
ad7dbc4619 Merge remote-tracking branch 'origin/4.13' into master
Change-Id: I565a0bd783dc80b53d4715fdc153dba1f1d3f7c7
2020-10-05 09:05:23 +02:00
Christian Stenger
a37a02a6b3 Squish: Add test for clean whitespaces
Task-number: QTCREATORBUG-24565
Change-Id: Idd763004f6ce9f1d34b902ea2fcf5c166ce8d4cf
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-10-02 14:59:00 +00:00
Robert Loehning
48a3423fcc Squish: Don't wait for the same object item twice in a row
Change-Id: Ib6ebc6f0c4fff5e29c7613dc6098da663539dc3e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-02 12:20:56 +00:00
David Schulz
000f1bb338 Debugger: Fix char pointer dumper test for cdb
Change-Id: I3a1bf50a32076199791283d4bb661feb72c85f6d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-01 07:00:48 +00:00
hjk
950aa580ab Debugger: Make QList test pass with Qt6
QStringList is a typedef now

Task-number: QTCREATORBUG-24098
Change-Id: I0f12655a9b86e4813245fbb08cc0a1c3e21d2dcf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-25 14:17:40 +00:00
hjk
60c4dfb5e5 Debugger: Fix QString dumper test for Qt 6
QStringRef gone etc.

Task-number: QTCREATORBUG-24098
Change-Id: I416f274bccc19c73e226dbf809729c3b72b565a8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-25 13:05:13 +00:00
Christian Stenger
b1af27d14a Squish: Fix handling of shared folders
If the respective option is omitted we should not
use all python files of the current working directory
as this may lead to bad side effects.

Change-Id: I23d3c97971e40ecbc4c585b7fd12b58953b0f623
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-09-25 06:13:37 +00:00
Michael Weghorn
0ab97e1159 Debugger: Show actual type for 'gchar *' elements etc
When 'char *' typedefs (and the like) are used, this makes
the actual (i.e. the typedef's) type name shown instead of the
one that the type is a typedef for.
For example, 'gchar' is shown as type for all elements of a 'gchar*'
when expanding that one in the debugger's locals or expressions view.

Original display of text representation for 'char *' typedefs etc.
had been added with commit 70c4889ac9
("Debugger: Show text representation for 'char *' typedefs etc",
2020-06-26). Move the typedef resolution one level down so the
original type name is still available for display.

This also extends the existing 'gchar *' test case accordingly.

Change-Id: I9558360b3bf96906d6dc39a63706bb8ce28c2f1c
Reviewed-by: hjk <hjk@qt.io>
2020-09-24 14:31:43 +00:00
Christian Kandeler
a0af404faa C++ unit test: Fix another line endings issue
Change-Id: Ib25055ac73c25fa27253c424efe60bfdaaafe219
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-24 13:40:51 +00:00
Michael Weghorn
37ebbeb3a0 Debugger: Extend Bitfields test for GDB case
* add bitfield case for char as well
* add tests for expressions view

Task-number: QTCREATORBUG-24693
Change-Id: I716dcd0eae3002401c891b733440ea2c6acb32ff
Reviewed-by: hjk <hjk@qt.io>
2020-09-24 13:11:56 +00:00
Christian Kandeler
569d5ca4da C++ unit test: Another clang 11 adaptation
This was probably a bug in clang 10: The amount of whitespace after the
operator should not matter.

Change-Id: If161a7b2f60ee932bef19edb9fe71aac31be3c8b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-23 10:28:48 +00:00
Christian Kandeler
019af2cc9a C++ unit test: Adapt to clang 11
Change-Id: I3ea6278147577899ea97032e17f0cd257423586c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-23 09:13:47 +00:00
Alexander Mishin
229dfaab95 Add qmlImportPaths property to .pyproject file
Users should be able to add custom QML import paths for
Python/PySide2/PyQt5 projects in Qt Creator in order to
get syntax highlighting and code completion for custom
QML modules.

Fixes: QTCREATORBUG-23679
Change-Id: Iec7c691c4b8709c48a790cd27ac7c6e755967796
Reviewed-by: hjk <hjk@qt.io>
2020-09-22 13:43:21 +00:00
Christian Kandeler
ed3aba3626 Unit test: Fix use-after-free
The bind() function takes a view, so we can't pass in a temporary.
Amends 3b0de99cf5.

Change-Id: Ic11b47688ff37699a1a56e978780a610c969d3b7
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-09-22 12:46:21 +00:00
Eike Ziller
fd5f0e6819 Remove Core::Id
Moved to Utils in 4.13, and the compatibility typedef is ugly.
Remove it now.

Change-Id: I0d80165b427448eaf7ee6cc1c0a6a34a85b7083b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-09-22 09:47:56 +00:00
Eike Ziller
5cb5d8e585 Remove usages of Core::Id
It moved to Utils.

Change-Id: Ia4d12bb07db2d59b1cb084b2ebdea20e6e3b40ad
Reviewed-by: hjk <hjk@qt.io>
2020-09-21 13:06:21 +00:00
Christian Stenger
3b0de99cf5 Unittests: Fix test
Change-Id: I45669bd31497655b6c8a9f8c03fd20cae703042f
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-09-21 11:51:46 +00:00
Christian Kandeler
c229c667cf Unit test: Support qbs build with googletest submodule
This is necessary to be able to build on Windows.
Also add an include to fix building with clang 12.

Change-Id: I9278a2c942a5e50c89c3aac19492f3a1ef3177b1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-21 10:31:30 +00:00
Christian Kandeler
e162775bde C++ Unit test: Fix diagnostics export test on Windows
The file offsets are different because of CRLF line endings.

Change-Id: Ice859f3b279651b61d147bdd963f62897b090e47
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-21 09:23:18 +00:00
Christian Kandeler
f244a7ea4c CPlusPlus: Consider member initializations
... when checking usage types.

Change-Id: Ic875f3bcae9cf045dbb062670e8cf941de533404
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-18 11:01:47 +00:00
Eike Ziller
5ad724c61b Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	src/plugins/qmakeprojectmanager/qmakeproject.cpp

Change-Id: Ieb1c3e946f11d3c4fa1ee6b5afdf83cc532d8aed
2020-09-17 10:28:19 +02:00
Miikka Heikkinen
39e5d60570 QmlDesigner: Add new function to NodeInstanceView mockup
Model now uses requestModelNodePreviewImage so it's needed in mockup.

Change-Id: I9f9e43b288401de52ac010c333591c9184e10366
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-09-16 13:34:02 +00:00
Marco Bubke
7c8847333b QmlDesigner: Go into components
Task-nubmer: QDS-2696
Change-Id: I2f0ee71deea593da08fa4a754d783b53867473ed
Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-09-16 08:37:53 +00:00
Christian Kandeler
ee8e102cbc CPlusPlus: Look at all overloads
... when trying to find out the usage type of a function argument.
Otherwise, we potentially ignore functions which have additional
overloads with a shorter parameter list than is required for the call.

Change-Id: I02bf2cb359ea9d506e2644388234dc28fa072445
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-15 09:23:48 +00:00
hjk
a50f1baf5d Debugger: Change LLDB value creation hack
... to something that works with LLDB 12.

Task-number: QTCREATORBUG-24596
Change-Id: Ib2f8255d45a02fa3d2c737864994397f587e9b15
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-15 08:45:32 +00:00
Christian Stenger
eff72258be ProParser: Fix compile of manual test
Amends 58d288b52.

Change-Id: I5c142b0ce30f7145db6a8d332c8f0617e2c99fe5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-15 08:32:20 +00:00
Christian Kandeler
d14be7493f ClangBackEnd: Support highlighting of alias templates
Fixes: QTCREATORBUG-24552
Change-Id: I80d2b16114234cf896173cd4104e6a5f12009f69
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-14 11:42:09 +00:00
Orgad Shaneh
4d71cbe6d3 QmlDesigner: Add a missing return
Change-Id: If29854d7f4706bbea6a5f51fc7bef427600d79b5
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-09-11 12:56:57 +00:00
Cristian Adam
fc542c7631 Unittests: Remove external dependencies
External dependencies are targets built for Qt Creator e.g. Utils
unittest is building everything for itself.

It also fixes the MSVC building with PCH.

Change-Id: I7bca1e150f6890ea85f30efda5642f9242a7c9b5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-09-11 10:16:15 +00:00
Christian Kandeler
45dd074441 CPlusPlus: Categorize "Find Usages" results
That is, find out whether a certain access was a read, a write, a
declaration or something else, and report the result to upper layers.
Follow-up patches can make this information visible to users.

Task-number: QTCREATORBUG-12734
Task-number: QTCREATORBUG-19373
Change-Id: Iee79e39dd1eb5a986a7e27846991e0e01b2c3a2f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-03 14:32:47 +00:00
Eike Ziller
3b76714290 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ListViewSpecifics.qml
	share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/MouseAreaSpecifics.qml
	share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RowSpecifics.qml
	share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlickableSection.qml
	share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml
	share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml

Change-Id: Ie5deacd39ae4f3c0966e7cb41a8fd832dcefbb09
2020-09-03 12:18:02 +02:00
Marco Bubke
bfd8be99be UnitTests: Fix unit test build
Guard clang include.

Change-Id: Ia72b40fa787918f47508049b045a21edf976d93a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-03 07:32:18 +00:00
Christian Stenger
5355aa7a37 Unittest: Fix crash in Linux
Change-Id: I1e8dc10bd9f0f9d11b0f18716e284ffadef7c6c5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-03 04:21:00 +00:00
Orgad Shaneh
a408bcfd3d Clang: Add conditions for adding exceptions flag
For GCC it can be deduced from the compiler flags, so no correction is
needed.

For MSVC it can be deduced from the detected defines.

Amends 26693e8212.

Change-Id: Ie4850f328a2afdb3e5158c58f8c30a2644d9c592
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-02 15:26:19 +00:00
hjk
b5e2485fbf Debugger: Compile manual test with Qt 6
Task-number: 24098
Change-Id: I9fdaf913a0ed2017460ba8d4f63c94a1d62b0062
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-08-31 10:46:14 +00:00
Christian Kandeler
1652396ece CppTools: Fix CppSelectionChanger autotest
... on Windows.
We need to open the test file in text mode. Otherwise the raw string
literal will contain carriage returns. As these get dropped by
QTextDocument, the offsets will be inconsistent with the ones reported by
the tokens, causing the test to fail.

Change-Id: I161a3f5791c33416ff732f90fd615cf39d8152ce
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-08-31 09:15:50 +00:00
Christian Kandeler
d65ef60ea2 clang: Fix include/resource dir confusion
The getClangResourceDirAndVersion() function in ClangTools could return
the actual resource dir or the include dir, depending on the input. This
mistake happened because of misleading names spread all around the code.
Now the function returns what it says, and the other names are accurate
as well.

Change-Id: I0a8600857ee7b9fafb16256e0d1ad203ac3273d2
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-08-24 10:18:30 +00:00
Robert Loehning
70a1c6ccf5 Squish: Remove workaround for fixed bug
Change-Id: I1d8d104b9c97c26997a7e4867a51609c84471fa8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-08-21 15:16:47 +00:00
Eike Ziller
2a05186194 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	CMakeLists.txt

Change-Id: I799060da2cb299bb0c49a3da3530fad18427a23c
2020-08-21 10:08:55 +02:00
Miklos Marton
3299239095 C++ Refactoring: Fix the include macros in header files after renaming
Fixes: QTCREATORBUG-4686
Change-Id: If22078bb183910941d8e2a94b0e8629baa2fa8de
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-08-21 06:50:42 +00:00
Robert Loehning
f29d73115d Squish: Avoid focus problems after cloning
The dialog shows a kind of completion popup. After that, the Locator
does not get proper focus anymore. Clicking into the dialog closes
the completion popup and seems to fix the focus problem.

Change-Id: I0ae901cc4f23b66d2c3db2c96109be79a0ded52c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-08-20 10:44:12 +00:00
Robert Loehning
a3ddeb7399 Squish: Make workaround in tst_CSUP03 permanent
The bug is fixed in 4.14.

Change-Id: I7fe69f98d69de494f886bca3f854b7be626998e8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-08-20 09:29:18 +00:00
Robert Loehning
d305c4d6f4 Squish: Modernize failing test from tst_CSUP01
Change-Id: I5755a0265d2810a2a5929657ac455aa380a417e6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-08-20 09:12:58 +00:00
Cristian Adam
d6c3846ab1 CMake Build: Add Google Testing 1.10.x as submodule
Fixes: QTCREATORBUG-24510
Change-Id: I763d72524f2e581671e18bcd9cda42d5bf7bccdf
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-08-19 15:50:37 +00:00
Christian Stenger
abffbe3806 Squish: Fix expectations
Added observation functionality for a temporary move
of the URL.
Let the test fail if the move becomes permanent.

Change-Id: I7989d654ea6e89ccba112b5cb640144afba40339
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-08-19 13:55:09 +00:00
Christian Stenger
e9c27cca34 Utils: Fix persisting of QRect
And pass explicitly a QVariant to the writer to avoid
unexpected behavior when trying to store the geometry
of a widget.
This resulted in a warning for any session where the
user had used the debugger at least once.

Change-Id: I5cb2352ab29ff7d2a64c84ffcdf040efe6d04b94
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-08-19 07:39:43 +00:00
Eike Ziller
058f1e6918 Fix some license headers
Missing the GPL part.

Fixes: QTCREATORBUG-24501
Change-Id: I9e8e033399c050af29927d0ee735f9bcd05345bf
Reviewed-by: hjk <hjk@qt.io>
2020-08-19 07:05:55 +00:00
Robert Loehning
f830a21bf8 Squish: Update tst_git_local
This doesn't run into QTCREATORBUG-11074 anymore, because
Creator now uses "git add --intent-to-add" when adding files.

Change-Id: I125ff29f9974efad5d22fed220f6155cc5c6804b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-08-18 13:09:08 +00:00