Commit Graph

6116 Commits

Author SHA1 Message Date
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
Robert Loehning
2bb89a0fb2 Squish: Adjust expectations in tst_CSUP06
Task-number: QTCREATORBUG-22729
Change-Id: If945eaf188358a69e32e659a4bfa97a6a5e20083
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-08-18 11:34:59 +00:00
Christian Stenger
cf9cdd2a36 Squish: Update tst_cmake_speedcrunch
Server mode has been dropped.

Change-Id: I356f814bb4b0084cfcecd3b92ede1a0c27daf2b4
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-08-17 17:52:55 +00:00
Eike Ziller
0c4135e380 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	src/plugins/android/androiddeployqtstep.cpp

Change-Id: Id624bad384050d567efba0700046331086cb12dd
2020-08-13 13:28:33 +02:00
Eike Ziller
f296ed1328 Merge remote-tracking branch 'origin/4.13' into master
Change-Id: I1c426d95eedd82bd4470a64a9bafd734d23081ac
2020-08-13 11:41:32 +02:00
Tim Jenssen
4fe5b923cd Merge remote-tracking branch 'origin/qds-1.59' into 4.13
Change-Id: Ic720f3adab305c5ef8cd10e713ccabf510eff0c0
2020-08-13 06:39:40 +00:00
Christian Kandeler
0615d0ec06 CPlusPlus: Fix expectations in preprocessor autotest
... regarding unfinished macro calls.
Amends df0ffd8bb8.

Change-Id: Ia7b8752860ac9207e702697cbee87f16a39dd1dd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-08-12 08:21:32 +00:00
Christian Kandeler
868236886a Utils::Environment: Extend autotest
... to cover the diff/apply mechanism.

Change-Id: I7d9e794792d6730e935c99c66062ea417dc65fe7
Reviewed-by: hjk <hjk@qt.io>
2020-08-11 12:13:23 +00:00
Christian Kandeler
7938320291 TextEditor: Introduce shortcut for forcing a function hint proposal
... and support it in the ClangCodeModel.
This allows users to get function signature(s) displayed regardless of
where exactly the cursor is on the function call.

Fixes: QTCREATORBUG-19394
Change-Id: I033e8774db93680bfc3ee52610b817e0ef8ccc76
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-08-11 10:10:08 +00:00
Eike Ziller
3944162039 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/cmakeprojectmanager/cmakebuildstep.cpp
	src/plugins/cmakeprojectmanager/cmakebuildstep.h
	tests/auto/debugger/tst_namedemangler.cpp
	tests/auto/qml/codemodel/check/tst_check.cpp

Change-Id: Iefd5f71c03c0078513b76a92af764a4fb22ee4c2
2020-08-10 15:56:54 +02:00
Marco Bubke
e43c7fdb1d QmlDesigner: Split messaging and process for puppets
This will make it easier to implement custom puppets. The new connection
manager will restucture the code and it add a mechanism to capture data
too.

Task-number: QDS-2529
Change-Id: I5d15c3303ef1c9a3e25ba197d350e0d561ce813a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-08-10 12:53:30 +00:00
Christian Stenger
84e4b3af31 Tests: Do not fail if boost compile fails
Change-Id: Iaa74f0c5911f328ca041a8f8e84c760187f6c38f
Reviewed-by: hjk <hjk@qt.io>
2020-08-10 10:55:16 +00:00
Marco Bubke
b5d59c75a7 QmlDesigner: Fix bool handling in the list model editor
Task-number: QDS-2581
Change-Id: I47a9ed4ca55532bb7199a6c5dd4894b7adb7d05d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-08-10 09:40:34 +00:00
Marco Bubke
b4027b7943 QmlDesigner: Fix crash for list view model
There was a type, so it crashed. The code is now under tests so we cannot
break it anymore.

Task-number: QDS-2563
Change-Id: I81426a9f8a568b217b7bf9c8c261b24be14ff61a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-08-10 09:40:26 +00:00
Christian Stenger
326cf1a982 Tests: Fix compile
Amends 52b2ca55c9.

Change-Id: I82b2ae8a353fc6ebe46e38956100fd3dce53fdf6
Reviewed-by: hjk <hjk@qt.io>
2020-08-10 08:48:24 +00:00
hjk
52b2ca55c9 Replace QT_USE_FAST_{OPERATOR_PLUS,CONCATENTION} by QT_USE_QSTRINGBUILDER
QT_USE_FAST_CONCATENATION doesn't do anything nowadays.

Using QT_USE_QSTRINGBUILDER is the same as QT_USE_FAST_OPERATOR_PLUS
for QStrings and enables more QStringBuilder use for QByteArrays.

Change-Id: Ibd297817c50d86661d47822799f989447249af1b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-08-07 12:45:03 +00:00
Orgad Shaneh
61601899db UnitTest: Fix escaping of LLVM output on Windows
Complements 1929c38a9f.

Change-Id: I95e32baf477e42003f1e97c73fd557b480de33a7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-08-07 05:01:04 +00:00
Alessandro Portale
b031a7c5cd ManhattanStyle: Add a manual test program for style development
Just a small tool for a fast overview. Actual fixes to the Manhattan
style follow later.

Task-number: QTCREATORBUG-23505
Change-Id: Iffd0db42d379c81c4e07e71919723cd6d684b514
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-08-03 17:24:57 +00:00
Alessandro Portale
4c6e5c2ba0 Tests: Introduce theme selection combobox in manual widget tests
Instead of duplicating a couple of code lines and hardcoding the
used theme, create a commonly used QComboBox as theme selector.

The selected theme remains stored in the settings.

Change-Id: I78f0d59a5594e7cc4f899656caaae1bb7caab385
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-08-03 17:24:48 +00:00
Fawzi Mohamed
2ad89747c4 qmljs: qtdeclarative change 9ab1a6759018b78b0f160c5286f8b0235a34ec50
Support required list properties

The corresponding rules were missing so far.

Fixes: QTBUG-85716
Change-Id: Iaf0cbfbb8736929a213bd6bf329bb2ebdde652c4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-08-03 06:59:36 +00:00
Christian Kandeler
3f9427200b CppTools: Fix formatting for lambdas with trailing return type
After the arrow, the state is still the same, as now a type is expected.
Only after the opening brace does the actual function start.

Fixes: QTCREATORBUG-18497
Change-Id: I7bf18fbd6907d36f8869af3a78ad617cf0ee9dbb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-31 08:15:18 +00:00
Christian Kandeler
c24320123b qbs build: Fix spurious re-resolving
The pluginjson module records the VCS state by default, which means qbs
re-resolved the project after every git action. Prevent that.

Change-Id: I24cf1d658ba847b327be018749806856a6e7da1b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-31 08:13:40 +00:00
Christian Stenger
2944b33530 Tests: Fix codemodel check test
Change-Id: I9ca0fec928ac90fd5951fc54963ba5e96d5a53a6
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2020-07-30 13:43:12 +00:00
Christian Stenger
a826267cd4 Tests: Fix nullptr access
Change-Id: I4e2bf36dfa6e16dfd9924c865bd9a997750243a2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-30 13:24:48 +00:00
Christian Stenger
394b3212bb Tests: Fix condition
Amends eb52982c9d.

Change-Id: I47b145b678eafab90f3569e4f6a785f272a87666
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-30 09:13:47 +00:00
Christian Kandeler
cf20d44b4a qbs build: Make unittest work with sanitizers
Change-Id: Ie6153a4505f42a1c9754d6af951c72df0065ec1c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-28 13:33:51 +00:00