Commit Graph

68978 Commits

Author SHA1 Message Date
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
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
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
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
hjk
bc2af18a41 CMake: Simplify CMakeProcess::finished signature
The parameters were never used, and start to look alien in the
presence of QtcProcess::result().

Change-Id: Ie2d6a051b439b5e9161d565b84efb78dbe17487f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-08 12:38:42 +00:00
Tim Jenssen
904b236e58 iostool: fix build against Qt 6.2
Change-Id: I19dce97a61e54804083c149d11fbe193960cf2ae
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2021-06-08 12:33:08 +00:00
David Schulz
79b9a2fea6 TextEditor: filepathify RefactoringChanges
Change-Id: Ie97e484bcdeaa0cb2f5d04b3c79ace55ff2e426c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-08 11:40:10 +00:00
hjk
15e4649fe8 Docker/CMake: Use (device-)local paths for build and source directories
These are used as parameters to the cmake process that is run
on the build device, i.e. they are local relative to that.

Change-Id: I07fdd04c91def8d8d6e3a65fbbb17914abecd585
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-08 11:31:54 +00:00
Christian Kandeler
eba2f2df84 CppEditor: Run test cases for virtual functions also with clangd
This uncovered some bugs, of which we fixed the ones that we could do
something about.

Change-Id: Id8494793bec4d25635bf920133d9f9331bd36228
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-08 09:51:09 +00:00
Cristian Adam
80d18c1e57 CMakePM: Do backup/restore configuration for all cases
When "Auto create build directories" is not checked, then the first
configuration is done in /tmp, which is covered by workDirectory.

Change-Id: Iad65b4776433ce296bd2561195fcf1bb6f8ace1d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
v4.15.1
2021-06-08 09:35:22 +00:00
Cristian Adam
1b3a4e1fc6 CMakePM: Clear and setup file watcher before and after backup configuration
Qt Creator 4.15 will do a backup of the CMake file-api, but the file watcher
that triggers a reparsing was not cleared up before the backup.

This could lead to unnecesary file-api rescans.

Task-number: QTCREATORBUG-25783
Change-Id: Id91379ea85c8a91e03d952c5c66b0371ebff943f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-08 09:34:00 +00:00
Miikka Heikkinen
56555d8b74 QmlDesigner: Fix issues with QtQuick3D versioning
Empty version no longer triggers error about version incompatibility
when the import is set with Model::changeImports().

Adding QtQuick3D via the prompt inside 3D Edit view now correctly sets
empty version instead of 6.x.

Fixes: QDS-4494
Change-Id: I18e62ced6d6df45bc453431f8419bc853bf1e758
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-08 08:27:34 +00:00
Jarek Kobus
7171b0385f Pass QFuture<T> to the ProgressManager::addTask()
Amends 9a8a7a88a6

Change-Id: Ib389a25f2564db5b6cb7711771c296d2ebd1178a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-08 08:27:22 +00:00
David Schulz
6008c5f673 Core: filepathify LocatorFilterEntry
Change-Id: I279af30f6b57e8d1279d96e5cbae4025cf4ef473
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-08 07:46:37 +00:00
Eike Ziller
9a8a7a88a6 BaseFileFind: Centralize waiting for search to finish
Instead of adding a FutureSynchronizer to all backends, we can use a
central one in BaseFileFind.

Amends 269f15df6b

Change-Id: Iad0145317b53a95b686c091017b8197d759dc253
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-06-08 07:46:29 +00:00
David Schulz
4445876013 Editor: directly use the Link overload of openEditorAt
Change-Id: I5e863600159cc54a99fec5a20df8de1fbc3d745f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-08 07:37:42 +00:00
David Schulz
bf79f1ae38 Utils: fix QtcProcess timeout error message
Change-Id: Iccfe7cfe61937872589a708f79dec69afefb9be4
Reviewed-by: hjk <hjk@qt.io>
2021-06-08 07:36:13 +00:00
Tapani Mattila
f087e70e80 AssetExport: Enable setting custom metadata file name for exported components
Task-number: QDS-4384
Change-Id: I5d41ab00f7f90137355289f341defcb87ddf3b44
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2021-06-08 07:32:12 +00:00
hjk
1ce7adce47 Utils: Set the working directory in QtcProcess::start
The m_process member is strictly speaking only needed for processes
handled "fully locally", i.e. without diversion through any device.

Better set it only when needed, even if only to avoid even unused
locally illegal paths like "docker://123/tmp/x" as working directory.

Change-Id: Ia9e686855ff0c213eb3be03def8c4cecc7ee37ae
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-08 07:32:02 +00:00