Commit Graph

69993 Commits

Author SHA1 Message Date
Miikka Heikkinen
74f65abed0 QmlPuppet: Fix multiselection 3D transformations when nodes have pivot
We simply need to store the scene position of the pivot point of the
node instead of node itself and work with that.

Fixes: QDS-4515
Change-Id: I99155636c52897794bea21b2db7f7d2d00059d91
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-11 07:47:19 +00:00
Miikka Heikkinen
4e1ca8d3c5 QmlPuppet: Reset gizmo orientation after multiselection rotation
Gizmo orientation in multiselection case should always be aligned to
the global axes, so we now reset multiselection on release
handlers of rotation gizmo.

Fixes: QDS-4492
Change-Id: Ic10f26f65df42869e4643f48457bcbcbf970fe9a
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-11 07:47:13 +00:00
Mahmoud Badri
5fdd82c553 QmlDesigner: Fix crash upon versionless Quick3D import removal
Task-number: QDS-4527
Change-Id: If5178d4761c699b0593c96596b6fdfedfef5d31f
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-11 07:32:20 +00:00
Martin Kampas
fc4065bda4 Utils: Fix displaying Unix paths on Windows
This function is used by ExecutableAspect, which processes the path with
FilePath::toUserInput first, so backslash is used as a separator on
input.

Change-Id: I1c69db1bc1ad77697093ef7f7b6cb732f3a1756d
Reviewed-by: hjk <hjk@qt.io>
2021-06-11 07:30:20 +00:00
Alessandro Portale
961d0a4da6 RegistryAccess: Fix deprecation warning
warning C4996: 'QString::fromUtf16': Use char16_t* overload.

Change-Id: I44d2dcb50bf45dc175230fb93e2b704a6b52e5b7
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-11 06:27:50 +00:00
Thomas Hartmann
fc85c52b99 QmlDesigner: Allow removing files from generate resource
User can remove unwanted files when he/she is generating the .qmlrc
resource file using Generate Resource option from the build menu. User can
uncheck the files from the file list in the appeared table widget. Also
unnecessary git-files and temporary files are filtered out.

Task-number: QDS-4430
Change-Id: I45fa0f42bf3a1f7fc7583a9ce29c324c8e7cf9cd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-11 06:25:52 +00:00
Thomas Hartmann
1456dbb2fa QmlDesigner: Use 'place_holder.png' if it does exist
If there is such an image in the project then use it. The image
'place_holder.png' will also show up when running the QML application.

Task-number: QDS-2196
Change-Id: Idf6155fa533a6811f9274971b1a6ea33de50576e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-11 06:23:45 +00:00
Christian Kandeler
27243bcfe3 ClangCodeModel: Do the "Go to Implementation" requests recursively
clangd reports only the first level of overrides.

Change-Id: I4aef7ca548a7a06fc7461994c3b750f9372aa738
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-11 05:35:58 +00:00
Thomas Hartmann
44d48f9faf QmlDesigner: Add QUrl projectUrl() const to Model
This add a dependency to project management. Do not compile for tests.

Change-Id: Idd71d420e5dde1052ddd97f9da5602fbed375c78
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-10 18:29:40 +00:00
Cristian Adam
99396421de CMakePM: Filter test also by BUILD_EXECUTABLES list
This way one can build only one test.

Change-Id: Iebf9686108988793193106ebed312f7e86ee2e61
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-06-10 16:47:44 +00:00
Thomas Hartmann
0bdafc56b0 QmlDesigner: Add DesignDocument::projectFolder()
Change-Id: I00aaac58af0f6ce7a6e6504406745a6416663993
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-10 14:51:58 +00:00
Cristian Adam
7a074608b6 CMakePM: Do not emit error signal in destructor while project is parsed
Do not emit error occurred in the fileapireader destructor
if it's parsing. This will cause the fallback file system view
tree to be generated just before the parsing will be stopped.

This can lead to crashes.

Task-number: QTCREATORBUG-25837
Change-Id: Ic7a2dfc394ed8e259da3366727a3c5fa65d98776
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-06-10 14:29:09 +00:00
hjk
eed82176b2 CMake: Listen to BuildSystem::parsingFinished, not Target::parsingFinished
There's a 1:1 relationship between CMakeBuildConfigurations and
CMakeBuildSystem objects. No need to react in one
CMakeBuildConfiguration to the signals of someone elses buddy.

Change-Id: I53f7d02d8852a85b9530bd55d8e059916a22579c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-10 14:03:49 +00:00
Cristian Adam
d542c81f81 CMakePM: Only build unittests if clang package is found
If the clangTooling target is present then QTC_CLANG_BUILDMODE_MATCH
will be set to ON.

If QTC_CLANG_BUILDMODE_MATCH is OFF then unittest will not be build.

Change-Id: Ifacbec82734efa58cc8d7c680bd1ac957cac2dc6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-06-10 13:57:05 +00:00
Cristian Adam
26e856254c CMakePM: Allow copy / editing of build directory
This reverts 69b0a2cafc

The build directory is preset and by having the ability to edit, you can
easily do a new build by appending a number.

When you have a new build directory a dialog will warn you that you'll
start from scratch. This is enough of a hinderniss to the user to start
typing and get lots of build directories. No need to have it read only.

Fixes: QTCREATORBUG-24451
Change-Id: Id1bc77d0fbcb071608f5ac83ddd6b8af943fdac5
Reviewed-by: hjk <hjk@qt.io>
2021-06-10 13:42:29 +00:00
Cristian Adam
0e613918b6 CMakePM: Always create build directories
Having two configurations for a project, one in /tmp and one in the
right build directory is confusing and for big projects can take some
time.

Fixes: QTCREATORBUG-25532
Change-Id: Ib0dad267117b3c025d668646ef076b0f77bff166
Reviewed-by: hjk <hjk@qt.io>
2021-06-10 13:42:14 +00:00
David Schulz
4465fd06ae Utils: add home FilePath convenience function
Change-Id: I5d0d695dc127090be4323fac6ff4ef2b1729cb92
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-10 11:47:14 +00:00
David Schulz
62cf127376 LanguageClient: highlight methods as functions
...like our internal or clang code model.

Change-Id: Ibe817611276999815fd28a22a73e07671a696479
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-06-10 11:46:58 +00:00
David Schulz
2d31ae0480 LanguageClient: Fix semantic token highlight
Ignore unknown modifiers when building up and accessing the text char
format hash.

Change-Id: I7e11e3fb6f4240083045368daec54e417416efa9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-06-10 11:46:52 +00:00
David Schulz
d729835c24 LanguageClient: add snippet parsing
Task-number: QTCREATORBUG-22406
Change-Id: I5b3a65984f1b4a9198bcbfec24aaa920dcb6dbf1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-10 11:46:37 +00:00
hjk
a80546593d Docker: Add another example Dockerfile for a run environment
Without build tools, for demonstration purposes.

Change-Id: I5940770aa0a5eb83d618ebdeb12436b38d3b21fa
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-10 09:25:35 +00:00
David Schulz
9decfcb151 Python: fix opening repl for project files
The python interpreter aspect relyed on having a combo box setup when
looking up the current interpreter. This combo box is just initialized
when the widget is shown since recently. Using the current id that is
valid all the time instead to get the correct interpreter.

Change-Id: I0a6bde46864c44c9408d0d7331164b49da65c7df
Reviewed-by: hjk <hjk@qt.io>
2021-06-10 08:59:05 +00:00
David Schulz
cb1b86645a Autotest: some FilePath::toFileInfo cleanup
Change-Id: I45395c5e83bc01d98d0bec20c992424d4150c844
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-10 08:05:44 +00:00
Eike Ziller
b423523852 Bump version to 4.15.2
Change-Id: Ida5406673616350ad6656533de179342ab320171
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-10 07:07:43 +00:00
hjk
09ead204ea Utils: Improve FilePath::parentDir() for the remote case
QDir::cleanPath() should not be used on FilePath::toString'ed
object, it removed the second slash in the :// separator.

Change-Id: I0168d52f6d7caa99f5ccc5d1d93ae2bd783332c5
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-10 05:59:31 +00:00
hjk
18245dcf10 Utils/ProjectExplorer: Add IDevice::searchInPath
Change-Id: Ibc7cc7bd6bf3a7776681f7cd2fff051525b19f60
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-10 05:05:58 +00:00
Knud Dollereder
0a49728727 Fix a crash-on-close in the dockmanager
The destructor of DockManager deletes floatingwidgets in a for loop.
The destructor of these floatingWidgets calls back to the DockManager
and alters the list it is currently iterating over.
This is now quick-fixed by deferring the deletion by using a temporal
vector.

Change-Id: I40b77ea505a5fc7506117dc16476e2e498ce4aef
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-09 20:02:44 +00:00
Aleksei German
16a8a08484 QmlDesigner: Fix for Annotation Preview
Change-Id: I81d5d3bd85f1835759804ea7ebdd5448d58686c2
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-09 18:27:05 +00:00
Alessandro Portale
43c5944571 Tracing/QmlProfiler/CtfVisualizer/PerfProfiler: Compile with Qt 6
This makes the tracing lib, its tests and the three plugins which depend
on the lib compile with Qt 6.

The rectangles are not yet shown most likely because some OpenGL
specific code was #ifdef-ed for Qt 6. That code needs to be
reimplemented on top of the new Scenegraph API, using the RHI instead of
direct OpenGL in a follow-up patch.
An assertion failure in QQuickWidget::createFramebufferObject() needs to
be fixed as-well.

The code still builds and runs assertion free (and the autotests pass)
when built against Qt 5.

Task-number: QTCREATORBUG-20575
Change-Id: I47ebb477823de2f0d27329dac7c292a466cea1d7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-06-09 15:30:21 +00:00
Cristian Adam
4c699d5181 CMakePM: Enable extra compilers only for files in the project
Qt Creator 4.15 added the "<File System>" project node containing all
the files in the source directory.

Qt Creator for its "find extra compilers" step needs only the files
from the project and not all the files in the system.

Task-number: QTCREATORBUG-25783
Change-Id: I5d33d5296f67ab3f321c232e5071f32e56d29101
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-09 15:03:42 +00:00
Cristian Adam
370410aca0 CMake: use a robuster way to check for WebEngineWidgets
By using find_package(Qt5 COMPONENTS WebEngineWidgets) we make
sure that the WebEngineWidgetsConfig.cmake from the same Qt5
package would be marked as found.

Otherwise CMake would look around after a Qt5WebEngineWidgets
package, which on Windows if you have a MSVC Qt Creator trying
to build a MinGW Qt Creator could end up in a failed build.

Change-Id: Ibd30c36231577ef111d9163cc1c87a09443d3cb9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-09 13:28:35 +00:00
David Schulz
38bbd6eb8c Editor: remove FilePath::toFileInfo in syntax highlighter
Change-Id: I205c16d227368f13baef8c8db3e1c9f4de2a4d69
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-09 12:26:05 +00:00
David Schulz
43b6ada0db Core: filepathify FileIconProvider
Change-Id: Id6fcc05317f3f5144c662fb4826438407f8d9d21
Reviewed-by: hjk <hjk@qt.io>
2021-06-09 12:25:19 +00:00
Christian Stenger
093f3479ce Fix execution of scenario
There are different ways of having a settingspath for QC. If the
settingspath is not provided for starting QC we may use the global
settings or a temporarily created settings folder.
To correctly run the test scenario from inside a plugin unit test
we need to have the same environment and settings.

Change-Id: I5dcc61e162258a0af8d3c8df2e63255d0e35f464
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-06-09 12:24:39 +00:00
hjk
fed5a44be1 QtcProcess: Remove unused QtcProcess::rawStdErr()
Change-Id: Ie52a05ba7738e6150bdf2da0b1412c081e53bdbf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-09 12:23:30 +00:00
Jarek Kobus
6ee33dfd40 Fix a copy-paste typo
Amends 4aee38e04c

Change-Id: I8d5be6c3329a43dbca417eb257544258c827b241
Reviewed-by: hjk <hjk@qt.io>
2021-06-09 12:19:01 +00:00
hjk
d254cf5845 CMake: Use Utils::FilePath in fileapi parser and reader
It still relies on local host execution in some places.

Change-Id: I36adfeb93ea26b285bbf6da2aee7e0fac64a7d94
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-09 12:15:02 +00:00
hjk
18a9df8b4a Docker: De-register some auto-detected items on device removal
Kit and QtVersion for now, ToolChains seem to lack easy access.

Change-Id: I657cb075dd3b4f6fd8ebfd3d6d20b1cdd4dce831
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-06-09 12:00:22 +00:00
hjk
84b8930c27 Debugger: Display elision for long Utils::FilePath instances
Change-Id: Ifb89ad1af1a41dff87d9debbb72423288c59d632
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-09 12:00:05 +00:00
Jarek Kobus
150cc88db1 Don't leave m_rootProjectNode in moved-out state
After calling FileApiReader::generateProjectTree(), the
m_rootProjectNode was left in a moved-out state, meaning
that it was in a corrupted state. However, it was still
possible, that later FileApiReader::resetData() was called
for the same instance of FileApiReader, so a call to
m_rootProjectNode.reset() was executed on an invalid object.
This might lead to a crash.

The fix is to use std::exchange instead and we are leaving
the m_rootProjectNode in a valid, default-constructed state.

We do the same for other members, for consistency.

Task-number: QTCREATORBUG-25837
Change-Id: I5812e410d11c8a3fd5a7c9db002d2ef244ae89cd
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-09 11:38:08 +00:00
The Qt Project
ef9ba20704 Merge "Merge remote-tracking branch 'origin/4.15'" 2021-06-09 08:36:25 +00:00
Eike Ziller
8650e42be8 Merge remote-tracking branch 'origin/4.15'
Change-Id: I07ac7113947cae2e7c3e51b8fa95563fe02b3dc8
2021-06-09 09:03:41 +02:00
David Schulz
0cfe27a53d Debugger: filepathify DiagnosticLocation
Change-Id: Ibbbf137231b313ec10e3d57c0230217b0c1e0a6c
Reviewed-by: hjk <hjk@qt.io>
2021-06-09 06:57:42 +00:00
Alessandro Portale
27f8e2dbce Utils: Fix splitting in ChannelBuffer::takeFirstLine()
Escape the '\r'

Change-Id: I8cee40dc4a65f893f1a11c7cf066777498c37339
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-09 06:40:11 +00:00
hjk
b820a832b2 Utils: Add a FilePath::lastModified() interface
And a local implementation.

Change-Id: I26400d960890c1cfb3daf82e6bfdeffa68455471
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-09 06:38:11 +00:00
Christian Stenger
d97335c4ea Android: Use line-based output callback
Change-Id: I5d2ede450ee3e36cc16d7f1566083125204ce552
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-06-09 06:38:02 +00:00
Marco Bubke
d3a91cd3a7 QmlDesigner: Use import in exported types
We can remove the version from exported types because the are
implicit by the import.

Task-number: QDS-4458
Change-Id: I4a259dff5e59537b72a57d7df95256a38d036e7b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-08 14:25:28 +00:00
Marco Bubke
f32207c930 QmlDesigner: Add importId to types
If we now try to synchrize to an inconsistent type model we get an
exception.

Task-number: QDS-4458
Change-Id: I86f7ce90d14b18227a66314fb341f5b528bdfb95
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-08 14:25:23 +00:00
Marco Bubke
fc0668882d QmlDesigner: Add Import Synchronization
Task-number: QDS-4460
Change-Id: Icd419baa7881fe882539f10d335ab6b3d36bc7b5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-08 14:25:19 +00:00
Marco Bubke
029aecef1e QmlDesigner: Synchronize type
A type should not removed but all it's fields should be reseted. This
has the advantage that if you remove a file and add it again later the
id is stable.

Change-Id: I3a1f51e14195cff2fc39681acdf7072d1a2e4616
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-08 14:25:09 +00:00