Commit Graph

6972 Commits

Author SHA1 Message Date
David Schulz
5f0270ae4a Utils: clean file name before creating fs engine
Change-Id: I9c4c8132ad509820e0388787ab34bf11b3c4465b
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-26 07:36:49 +00:00
Eike Ziller
c6c92ec096 Merge remote-tracking branch 'origin/8.0'
Conflicts:
	src/libs/qmljs/qmljsmodelmanagerinterface.cpp
	src/plugins/clangcodemodel/clangdclient.cpp
	src/plugins/qmldesigner/components/edit3d/edit3dwidget.cpp
	src/plugins/qmldesigner/components/materialbrowser/materialbrowserview.cpp
	src/plugins/qmldesigner/designercore/include/modelnode.h
	src/plugins/qmldesigner/designercore/model/modelnode.cpp
	src/plugins/qmldesigner/designercore/model/rewriterview.cpp

Change-Id: I93c57879b79f27325321bfc045ca618bd835af93
2022-08-26 08:40:23 +02:00
Alessandro Portale
9cb21d2879 tracing/Qbs: Turn crash in tst_flamegraphview into a failure
Don't crash if qml scene instantiation fails (e.g. when built with Qt 6
and Qbs). Just fail the test.

Change-Id: I444a6a68382c5acc9ca9faf9ce7c489a87fa5c98
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-24 15:51:50 +00:00
Marcus Tillmanns
8b143be86c Debugger: Adds boost 1.79 dumpers
Change-Id: I2111b91fe8914afdde54edd6009691dfe32e64a4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-24 06:56:08 +00:00
Christian Stenger
79949d9ae8 Tests: Adapt QVariant dumper test
Disable QVariant holding a typedef'ed QMap for
now (insignificant).
Adapt expectations for QVariant holding a QList.

Change-Id: I188e01b2d53d17057207db06e9e848a5bfb3adb2
Reviewed-by: hjk <hjk@qt.io>
2022-08-24 04:54:50 +00:00
Christian Stenger
275f2a3db8 Tests: Do not use config mode when searching for Eigen3
Change-Id: I144481821267b80404473d821ac1048ff3adeac3
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-08-23 13:54:07 +00:00
Christian Kandeler
ca00b874a7 CPlusPlus: Support structured bindings
While we do recommend clangd for modern code bases, we should still be
able to parse basic language constructs.

Fixes: QTCREATORBUG-27975
Change-Id: I189b991685a5cd5f62f2afce77878b60c895e8f9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-08-23 13:52:11 +00:00
Marco Bubke
84c1d6572b Utils: Remove variant.h
Since we are now requiring macOS 10.14 we can remove our local copy of
std::variant and use for macOS std::variant too.

Change-Id: I589d03b35fc56878b7392ffa7047a439e588fe43
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-23 09:51:43 +00:00
hjk
11648298c8 Utils: Port some FilePath part accessors to QStringView
Change-Id: Ib5cc262e44c73880b6538eed714365e3d685870a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-22 13:27:56 +00:00
Marcus Tillmanns
7e37899565 Dumper-tests: Adds Logging Category for easy debug msg suppression
Change-Id: Ic871558f7ef82489030e574e8997277221e0b63d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-22 11:26:39 +00:00
Marcus Tillmanns
2770f92f53 QDS: Fix unused variable warnings
Change-Id: I3ea21d5883cb75dd2507ad3d0aa6b3e24ed8354e
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-18 13:21:18 +00:00
Marco Bubke
c9d45d1bc0 Utils: Remove null termination from SmallString
We expect mostly a string view which has no null termination. Code which
depends on null termination is broken and it is better break early.

Change-Id: I7c2c41fb114e6aaf3a23053b522b37f7af5e1abf
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-08-16 16:15:51 +00:00
Marco Bubke
735346adb5 Utils: SmallString trades copies for branches
There can be quite some copies with the swap method for the default case
that the string is inside the small string area. Instead now we minimize
copies of the smallstring area at the expense of more branches.

The swap approch needs no self tests and it uses the destructor to
remove allocated resources but it can copy three times more often. And
the destructor still has an additional branch in the copy case. Only in
the move case we can use the destructor of the other instance. This can
be surprising for some users which expect that the instance is empty
after a move(actually assuming that a instance is empty after a move is
undefined behavior).

Because SmallString is designed to hold the string in almost all cases
inside the small string area that case should be optimized.

Change-Id: I22cb62aa99b9713a221f103971f149c05e9ff6fa
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-16 16:15:26 +00:00
Marco Bubke
fa32b652c8 Utils: Optimze SmallString copies for larger sizes
So far the whole class was always copied. For a large SmallString
classes this were often many zeros if it was empty. Now only the non
zero area is copied in that case.

Change-Id: Ic0ea2d6f763513858a993bba3e829c9fc947e1a6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-16 16:15:00 +00:00
Marco Bubke
8a0f7db8eb Utils: Make take of SmallString explicit
Using a value after the move is undefined. For example, if you move an
integer, it is not set to zero after the move. So you have to initialize
it again. Adding the take method to SmallString makes this explicit.
So if there is a case that you want to use the string again after
a move, use take or initialize it yourself.

Change-Id: I174116df9639d6a3f63c6f2c2a3bd184852927ce
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-08-16 16:14:51 +00:00
Marcus Tillmanns
4f0ac5678f FilePath: Fix operator+ to use stringAppend instead of pathAppended
Change-Id: I643a2e9eed22fafc793bbc75cba0344c4005b3f3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-16 11:35:12 +00:00
Marcus Tillmanns
50bedd5544 FilePath: Fix UNC root/path parsing
* Fixed UNC path parsing to correctly split between root and path
* Fixed tst_fileutils to correspond to windows path handling.

Change-Id: I2849738696a39e8282068ab164514f806f2c5fcf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-08-11 13:54:14 +00:00
Christian Kandeler
1844788a0c qbs build: Fix QtcProcess test helper executable
We need to set the rpath, otherwise libUtils won't be found when using
the AutotestRunner.

Change-Id: I5644a5b52441482f48b461a28d57c17b2371d66f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-11 12:48:16 +00:00
Christian Kandeler
551cd3f65b Tests: Make the memcheck model test exit
Otherwise, it will block "make check".
This test is a manual test and does not belong into the autotest
category at all, but as long as it's there, make at least sure it
doesn't break things.

Change-Id: Ib4c2c5b8e840b3f1ac1f4cca2ec4869385484e77
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-11 10:59:23 +00:00
Marcus Tillmanns
cd919e6f61 FilePath: Fix for operator+(QString)
Change-Id: I3b9889c8b2cdc8a9d1bf94c3e7a8627e2ff2ac35
Reviewed-by: hjk <hjk@qt.io>
2022-08-11 09:31:26 +00:00
Marcus Tillmanns
aeb33310cb FilePath: Fix parsing of qrc paths
Change-Id: I50d404bafb8d1cb4f0663cd424e1034ae26bb903
Reviewed-by: hjk <hjk@qt.io>
2022-08-11 07:57:51 +00:00
hjk
4c16c221a1 Tests: Add a manual test for layoutbuilder demonstration
Change-Id: If59265c429a67e5627d41d242fb8fc828f469e93
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-11 07:32:21 +00:00
Cristian Adam
288dfa480a tests: add README.md for manual/vcpkg
The information was present in the commit adding the test, but that's
not visible when browsing the checkout.

Amends f9ce879b61

Change-Id: If648e37ca8e3e8b84841f5e84b3ea054aa0c5b90
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-08-10 17:35:05 +00:00
Cristian Adam
f9ce879b61 tests: Add vcpkg manual test
This way one could easily test the CMake auto-setup package
manager with a vcpkg setup.

Setting vcpkg is as easy as:

> git clone https://github.com/microsoft/vcpkg
> .\vcpkg\bootstrap-vcpkg.bat

Then you need to have vcpkg in the PATH environment variable.
(PATH=${PATH};c:\projects\vcpkg in Preferences -> Environment)

Change-Id: I0bdc268121c7488c5d2442fd4b40c9ea3b182501
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-08-10 14:43:29 +00:00
Marco Bubke
c13e2b89f5 QmlDesigner: Add type enumeration to auxiliary data
Auxiliary data so far used naming conventions to declare the kind of the
data. Now an enumeration is used. The auxiliaryData(...) is returning an
optional too so that it is known if a value exists. There is now
auxiliaryDataWithDefault(...) which is returning an invalid
QVariant instead.

The instance cache is now disabled because there is not notification for
information changes. So if we get the real data from the node instances
there will be no information changes because nothing changed. So the
form editor is a strange state of being reset but not all data
arrived. Before this patch there were still changes happen because of
some side effects that auxiliary properties were sent which were never
intended to be sent. If we re-enable the cache we need to send
information changes or every view must expect that the information is
already there.

Task-number: QDS-7338
Change-Id: I0cafd149c53df552c7c8442f1e8ba87f5451dbd1
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-09 17:52:03 +00:00
Marco Bubke
fb7c814a3b QmlDesigner: Fix flacky tests
Change-Id: If6de687acc678d925c62d73d631ed081bfcaa8fa
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-09 12:03:25 +00:00
Christian Stenger
100f51ff50 Tests: Fix android autotest
While at it add qbs build files.

Change-Id: I2a57f7addda9e980a9e429a3d69e0994dac6d120
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-08-08 11:18:09 +00:00
hjk
ed8c775def Merge remote-tracking branch 'origin/8.0'
Change-Id: Icbb87ac8bcee5fb86042d3863a973573510651b4
2022-08-05 08:50:27 +02:00
Marcus Tillmanns
e1b0b47efc filepath: Adds m_root to store root part of path
Change-Id: I9e32a2806e9ecd231886749357404b4bf94bef10
Reviewed-by: hjk <hjk@qt.io>
2022-08-04 11:34:34 +00:00
hjk
8945b3832c Utils: Make DeviceFileHooks access a bit more self-contained
Change-Id: Ib13035820021e9eda0585f98885bef9cbd2317a6
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-08-04 09:43:04 +00:00
Christian Stenger
67903cec2f Tests: Fix flamegraphview test for Qt6
Change-Id: I38271f05c615290cddb4dba5579193a68fd32370
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-08-04 08:19:23 +00:00
Marcus Tillmanns
783f0e1205 filepath: Move FileUtils:: function out of FilePath.cpp
Change-Id: If78c349b0145b86a76cd033e4dbc30b237ad917b
Reviewed-by: hjk <hjk@qt.io>
2022-08-04 08:01:59 +00:00
Christian Stenger
9a0cadd06a Tests: Fix dumper expectation
Amends c1d75d8df7.

Change-Id: Ib69c095a9f94fa618f5c9791d4c908fbefa5ecb3
Reviewed-by: hjk <hjk@qt.io>
2022-08-04 05:53:41 +00:00
Christian Stenger
175867e54e Tests: Fix define for Qbs build
Avoid the need to always specify this value by an
environment variable.

Change-Id: I2f08b5f15c9dc818826305fbd1d96e52ebdc89bf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-03 12:18:56 +00:00
hjk
8a44294821 Merge remote-tracking branch 'origin/8.0'
Change-Id: Iea4fd2949f5d5345802e2e7d9283d72c6c55f69f
2022-08-03 10:52:13 +02:00
hjk
f14634a651 Debugger: Fix bitfield dumping with Python 3
Change-Id: I2959a2e14c6f25e29460de74ea95a16a5226d48e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-03 08:18:39 +00:00
Marcus Tillmanns
b2f0f78bdc filepath: Fix windows driver letter handling in fromString()
Change-Id: Ic66e468ed2161bc10136ab31dc29a7358e6d7397
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-08-02 13:59:29 +00:00
hjk
2361353289 CPlusPlus: Remove Rreprocessor::run overload for QStrings
The preprocessor operates on QByteArray, making it less
convenient to use strings helps preventing accidental
conversion roundtrips.

Change-Id: Ifb2068a8fed137c52b05f2979b99cbce3462151e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-01 12:18:06 +00:00
Alessandro Portale
ce7a761075 Utils: Improve FileUtils::commonPath
Make it a worthy FilePath-based counterpart of Utils::commonPath.
With tests.

Change-Id: I68bae129c5d9d9dd3e46dfa6093e229f8ca0aee1
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2022-07-29 20:20:22 +00:00
Marco Bubke
acefc64561 QmlDesigner: Integrate ProjectStorage into Model
By the way model is now using std::unique_ptr to make the model memory
management more robust.

Change-Id: Ie68508b1d99cea173f3b3171bbc6dedad4e871c3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-07-28 11:18:17 +00:00
Jarek Kobus
ebd0dd6ebc Drop Qt5: Manual tests: Remove code below Qt 6.0.0
Change-Id: I87e267415ec84001ff594b3900ce8be4f0cadd73
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-07-26 16:52:02 +00:00
Jarek Kobus
db3cd00232 Drop Qt5: Remove porting.h
Checked also plugins in tqtc-qtc-super and in qtc-super.

Change-Id: I3e5b114a49e26ae52b71c11ef6a1f90264dd5a38
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-07-26 11:18:58 +00:00
Cristian Adam
efb8812e71 tests: Add conan manual test
This way one could easily test the CMake auto-setup package
manager with a conan setup.

Change-Id: I4d8e7ab0b5cf84caf95d454358e1409658bd689a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-07-25 14:04:25 +00:00
Eike Ziller
9328aaa835 Merge remote-tracking branch 'origin/8.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp

Change-Id: I1ed3dd86fe5b4b87e3015c41652f5d0fa16d7070
2022-07-25 09:25:00 +02:00
Cristian Adam
ba01ae974c setup_android: Update to JDK 11 and NDK 22.1
Tested with Qt 6.3.1 and Qt Creator 8.

JDK 11 was needed for gradle, which requires at least version 11.

Change-Id: I9010de1e89efb59a2ec485ff2cff783d5832b680
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-07-21 20:54:20 +00:00
Marco Bubke
c56c3ea024 QmlDesigner: Provide TypeTraits for type getter
The type traits contains already information like if the file is a file
component etc..

Task-number: QDS-7327
Change-Id: I7713840fd1107046e8a6710c0ca493dc54edf823
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-07-21 15:54:57 +00:00
Marco Bubke
ab30e8fe06 QmlDesigner: Rename TypeAccessSemantics into TypeTraits
We can save more data into that enumeration but the name should reflect
that.

Task-number: QDS-7327
Change-Id: I35a4e1460a6bbc63b32934828b766733a92c5ba7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-07-21 15:54:52 +00:00
Marco Bubke
5fb450fd02 Sqlite: Fix strict table
Change-Id: I1650e99ef24c236b2d630649f1a728de9d020190
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-21 14:03:52 +00:00
Marco Bubke
981ebfe488 Sqlite: Cleanup id handling
Because ids are now handled directly by the sqlite statement the
shortcut to take the "address" of the id is deactivated and you have to
use some special functions.

Change-Id: I869f5d1688ab4b6794fb9ed3ffcaa3978a0fc516
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-07-21 14:03:40 +00:00
Marcus Tillmanns
556bc48839 fsengine: Fix toLower / compare test
Fixed test on windows

Change-Id: I1652af82499e6820eb9850a3d79d3d1c5bc18614
Reviewed-by: hjk <hjk@qt.io>
2022-07-21 13:28:07 +00:00