Commit Graph

74059 Commits

Author SHA1 Message Date
Jarek Kobus
3ac6e7aaa3 Remove unneeded SshConnection member
Change-Id: I8c4d3af7c183fa0bcc4d80f7bdb64acc7c745e73
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-01-03 12:33:52 +00:00
hjk
09e4e7ff28 Debugger: Use Book case for start action
Re-using the tooltip gets capitalization wrong...

Change-Id: Id9a5147a5be8e7c20a8b82d108dbec092799a48c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-03 11:29:49 +00:00
Thomas Hartmann
cf5fc98a2c QmlDesigner: Prefer content subfolder for assets
Task-number: QDS-5823
Change-Id: Ic66d85c594a8711b4961e5481bd82bc05b666361
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-01-03 09:02:11 +00:00
Jarek Kobus
b55a42840b Move some static private methods of DeviceManager into cpp file
Change-Id: Ia37ca1e69ecb93d335cc2800d17951ac3f7974a1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-01-03 08:58:59 +00:00
Alessandro Portale
f6c26233c8 QmakePM: Treat QMAKE_CC/CXX as user input when converting to FilePath
qmake may construct QMAKE_CC and QMAKE_CXX by using paths from
environment variables that have native delimiters. That is the case with
Android (see mkspecs/android-clang/qmake.conf).

That leads to QMAKE_CC and QMAKE_CXX having mixed-style path separators,
and that is the reason to treat them as user input.

Change-Id: I1baf180c16710f4cd00ac182fa241b84ae99fa38
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-01-03 08:30:11 +00:00
David Schulz
76921ea170 Editor: skip short lines in block selection
Do not include lines into the block selection that are shorter than the
block selection start column.

Task-number: QTCREATORBUG-26548
Change-Id: I6e4e26e1c498fb02dd0ebc8b78b8907c23f356b8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-03 07:17:30 +00:00
Tim Jenssen
57381ab358 Utils: fix windows compilation
Change-Id: I96eaa8d9141ea966914b881f60746661a4f0ae51
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-12-27 12:03:45 +00:00
Alessandro Portale
a6147a0683 ProjectExplorer: Use a constant for "default" session name
Some duplications of a string may perhaps be fine, but eight occurrences
need a constant. Also, understanding code works better by using the code
model instead of full-text search.

Change-Id: I2944cf9216c825b930dedaae1085491fd10feba5
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-12-25 10:07:35 +00:00
Thomas Hartmann
e35dedcf32 QmlDesigner: Add a plugin for studio wizards
This plugin contains the Qt Design Studio specific wizards.
Beforehand the plugin was part of another private repository.
With this patch, those wizards become open source.

The wizards require a specificly configured Qt kit that
comes with Qt Design Studio.
This is checked by
"featuresRequired": [ "QtStudio" ] in the wizards.

Task-number: QDS-5703
Change-Id: Ic9adcc7ff0cbb3ec6a7dfe51b506b4f86c6f50bc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-12-23 13:57:39 +00:00
Thomas Hartmann
4d1e10e7d4 QmlDesigner: Fix crash
Create an id for nodes if keyframe is added.
Added missing ::executeInTransaction().
Using executeInTransaction() catches exceptions.

Task-number: QDS-5769
Change-Id: I395d98eec6ead091bd8578019ec3f958b4099db8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
2021-12-22 14:58:35 +00:00
Tapani Mattila
41ad55a789 Fix missing const in function signature: generatecmakelists.cpp
Change-Id: I3ceae315513f94cb402ba22a48849138ae3944d3
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-12-21 18:00:38 +00:00
Jarek Kobus
f25300cadf Fix a possible crash in process launcher
It may apparently happen that when calling QProcess::start()
we may receive a synchronous signal QProcess::errorOccurred()
from the process we are trying to start. In this case
the handler of the error signal might have removed the
process from m_processes hash, which invalidated the
"Process *& process" reference inside
LauncherSocketHandler::handleStartPacket(). So, using
process reference after calling start() may be dangerous.

Refactor ProcessStartHandler so that it stores the pointer
to the process it handles. The pointer to the handler
should still be valid after calling start(), since
the process itself is being deleted with a delay.

Make ProcessStartHandler a member of ProcessHelper. In this
way it's being reused in QProcessImpl and ProcessLauncher.

Fixes: QTCREATORBUG-26726
Change-Id: I8e3f39953035d76c83bbbb13bd78e3042ba2a14e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-21 12:47:05 +00:00
Tapani Mattila
8a14a14aae CMake generator: Include qt control configuration file in executable
Task-number: QDS-5815
Change-Id: I8ea049c60ce2f0217e3598e2a2a92dad7a776449
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-12-21 10:31:50 +00:00
hjk
d76fab2685 Debugger: Add dumper for quint{16,32,64}_{be,le}
Change-Id: Ieaa27a98b829455b69de0f8051fee8cbc3fa78f0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-12-21 08:52:30 +00:00
Petar Perisin
8bc1559dc6 Fix SUBDIRS parsing in autotools
Make this example work:

  SUBDIRS =
  SUBDIRS += \
             src
  SUBDIRS += \
             src2

Change-Id: I9beb8e6b22d2a8bf647590f872e8fe0b2c677eba
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2021-12-21 08:48:03 +00:00
Tapani Mattila
9b3575f9cf CMake generator: Generate environment header
Task-number: QDS-5706
Change-Id: I650a70ec3dc821458332d86effe872ffe19f2a60
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-12-20 13:00:48 +00:00
Christiaan Janssen
fc25c76a4f McuSupport: provide RunConfigurations for multiple CMake targets
Task-number: QTCREATORBUG-26656
Change-Id: I2177044580f9137a5c530cc0a862d69d389fe447
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-12-20 08:10:36 +00:00
Christian Kandeler
32de9edfae ClangSupport: Fix build with MSVC 2022
Change-Id: I0d37548c48081caee4dd3e470799353fc56b1b3a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-12-17 19:03:57 +00:00
Christian Kandeler
3cf51b0cc7 ClangCodeModel: Fix build with MSVC 2022
Change-Id: Ifd0e1e67057e57e4c978784e9634f987edb9dfe4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-12-17 19:03:28 +00:00
Alessandro Portale
b1db3d2506 WebAssembly: Proper fix for targetname != projectname
Insipred by a similar fix in McuSupport, it became now clear to me how
to get the target name (aka buildkey) for a runconfiguration.

The hack of searching for .html files can be removed.

At the same time, remove the very detailed update connections, and just
update on Target::buildSystemUpdated.

Amends: dd1882b817

Task-number: QTCREATORBUG-26562
Change-Id: Ic07b36a1e618d6cc2b6f2ee50b4170170f707632
Reviewed-by: hjk <hjk@qt.io>
2021-12-17 17:14:36 +00:00
Jarek Kobus
44e839ac0f Reuse shared ssh connection in LocalAddressFinder
This reduces the time spent on making a new connection
from about 100 ms to 0.

Change-Id: I56508d1d0031b166a8f28604dde0b80375c438f0
Reviewed-by: hjk <hjk@qt.io>
2021-12-17 16:20:23 +00:00
Jarek Kobus
46db545a90 Install LocalAddressFinder also as stop dependency
The LocalAddressFinder was installed as a start dependency
for MemcheckToolRunner. However, it wasn't registered as
stop dependency for it. This means that when
MemcheckToolRunner was finished, its RunControl couldn't
finish as one of its RunWorkers wasn't finished yet.

Install LocalAddressFinder as a stop dependency and
implement a stop() method which disconnects the conneciton.

This also prevents the ApplicationOutput pane to open
a new tab on successive run of Memcheck for the same
application.

Fixes: QTCREATORBUG-26758
Change-Id: Ib71ddbe787e5c1bcc7b96687ebf15c9b63b714dc
Reviewed-by: hjk <hjk@qt.io>
2021-12-17 16:20:15 +00:00
Eike Ziller
303f958ee0 Bump version to 6.0.2
Change-Id: I4e6fcbded04028bf20433984f0679fafa54da310
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-12-17 13:24:30 +00:00
Allan Sandfeld Jensen
2b0a4a1245 Do not pick up KF5 libraries when building against Qt6
Fixes: QTCREATORBUG-26742
Change-Id: I535c4b3f0718104136ed1b498166083c6eba5688
(cherry picked from commit 4ccbbc2f24)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-12-17 13:16:17 +00:00
Eike Ziller
7630965c7a Wizards: Fix some properties for Qt GUI applications
Make them GUI applications on Windows and bundles on macOS.
Add some bundle properties for 6.2+ Qt Quick applications.

Change-Id: Icc4650a8c486c6b6cefed7f479185a5babf80b14
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-12-17 13:15:41 +00:00
Tony Leinonen
13789ce2f9 QmlDesigner: Edit drag and drop binding and add navigator item highlight
When a new component is drag and dropped only check current or super class
instead of going trough all prototype classes. This will limit the
possible bindings to a more reasonable level.

Add navigator highlight for components that has properties where the
new component can be bound to.

Task-number: QDS-4969
Change-Id: Ib7091154a4c3c62ce995ad1b3f55830b8bca858b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-12-17 09:57:28 +00:00
hjk
7677dc4ba0 Utils: Use callbacks when iterating remote file systems
This will make recursion easier and has the potential to avoid creating
big intermediate lists.

Change-Id: I44d42925dae9c0048338c7d0a6aa26606f314c28
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-17 06:57:46 +00:00
Maximilian Goldstein
9a28edfd87 qmljs: Scan application directories for QML libraries
We need to search application directories as well since the new
QML Module API will generate modules there.

Task-number: QTCREATORBUG-24987
Change-Id: Ie67233ffece692c62921db13c49ae8cc2184422f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2021-12-16 15:34:23 +00:00
Allan Sandfeld Jensen
4ccbbc2f24 Do not pick up KF5 libraries when building against Qt6
Pick-to: 6.0
Fixes: QTCREATORBUG-26742
Change-Id: I535c4b3f0718104136ed1b498166083c6eba5688
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-12-16 12:31:09 +00:00
Eike Ziller
85b60d9608 Merge remote-tracking branch 'origin/6.0'
Conflicts:
	src/plugins/coreplugin/editormanager/editormanager.cpp

Change-Id: I80fe565749ad5c06dfe99436f2dc6ab4b66a2537
2021-12-16 10:50:33 +01:00
Jarek Kobus
7c674e0a5b Ignore expected assert messages in tst_ssh test
Ignore the:
"state() == Connected" in file [PATH]/sshconnection.cpp, line [LINE]
message when running pristineConnectionObject() test function
of tst_ssh test.

Change-Id: I28e19165d9e540b47252d44b198fd07b15c89cc8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-12-16 08:31:54 +00:00
Fawzi Mohamed
125d7c0cce Updating qmljs parser to latest qtdeclarative parser
improves support for string templates, required properties,
and other smaller improvements

Task-number: QTCREATORBUG-21869
Change-Id: Ia2359e1f75d4bd7b9ea4f27a920acd2251e36108
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-12-16 08:27:55 +00:00
Alessandro Portale
16ced8a7d6 Debugger: Describe right SBError for failed remote-android connection
It is the result of the previously attempted SBPlatform.ConnectRemote()
which we want to see in the logs if the connection fails.

Change-Id: Iec2760257eb8bb8c6b1df8aa3a5c010302966c8f
Reviewed-by: hjk <hjk@qt.io>
2021-12-16 07:23:36 +00:00
Alessandro Portale
44407e404b Android: Fix lldb connection for devices with uppercase "serial number"
The host name in the remote channel url needs to match the Android
device serial number case-sensitively. Otherwise, the lldb connection
fails.

When constructing a remote channel url via QUrl, the host name gets
forced to be lowercase. The url for serialnumber "MYPHONE12346" would
become "adb://myphone12346:<port>" and the lldb connection fails.

Use the DebuggerRunTool::setRemoteChannel(const QString &host, int port)
overload for lldb to avoid the issue.

Task-number: QTCREATORBUG-26709
Change-Id: I0e61d981c4b80a9d251ba1f7626fc2be9625a831
Reviewed-by: hjk <hjk@qt.io>
2021-12-16 07:20:50 +00:00
Jarek Kobus
464e12f5e1 Get rid of Utils::FileSystemWatcher from SshConnection
When we are starting master process for ssh (-M option specified)
we don't know whether everything went fine, since the process
just starts and doesn't print anything to the output in case
all went fine. It may also happen that when there are issues
the master process finishes soon after it was started.
When everything went fine the master process should create
a socket (specified by ControlPath option). But when we
receive a started() signal from the process, the socket
isn't yet ready. So, in order to detect that connection was
established properly, the old implementation created a
FileSystemWatcher on the expected socket file to appear.

There are 2 issues with the approach above:
1. There might be a race condition inside the started()
   handler of the master process. After checking that
   the expected socket isn't created yet and before setting
   up the file system watcher, the socket file could have
   been created in meantime what wouldn't be noticed.
2. The use of Utils::FileSystemWatcher excludes the usage
   in non-main threads. Thus in general: usage of SshConnection
   outside of main thread is dangerous.

This patch implements it in a different way. Instead of
installing a file system watcher we make use of local command
of ssh master process. We enable it by "PermitLocalCommand=yes"
and specify a local command by "LocalCommand=echo". This means
that local command will be executed after successfully connecting
to the server. Our command is very simple - just empty echo,
which means that we should expect the "\n" on master process
output after successful run. So, instead of connecting to
started() signal we are connected to readyReadStandardOutput()
and detect successful connection after receiving newline char.

This eliminates both issues with the old approach and makes a
step towards thread safe shared ssh connections.

Change-Id: I2e20c82aeff09b297e3cad5644d4d2c956db82d0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-12-15 20:03:14 +00:00
Christian Kandeler
21c1d8fd60 QmlDesigner: Fix build with MSVC 2022
Change-Id: I74328d1197eb1980ea9bffc6ff43657fc20e9f81
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-12-15 16:41:17 +00:00
Christian Kandeler
f72ea01c65 ClangCodeModel: Properly display clangd auxiliary diagnostic messages
... in text marks.
The main message can be followed by additional messages, separated by
pairs of newlines. Properly parse their contents and also display them
as clickable links, if applicable.

Change-Id: I341ce0a6bf0e628dfabdb3806fb8ef1b8ca019c6
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-15 16:40:57 +00:00
Christian Kandeler
03499bd619 Fix some compiler warnings
Change-Id: I1ac0cbba1b47c429a752c545b1475c8d7d23c5dd
Reviewed-by: hjk <hjk@qt.io>
2021-12-15 16:10:08 +00:00
Christiaan Janssen
b9b9075300 Docs: update requirements for Qt for MCUs
Task-number: UL-5063
Change-Id: I3e92e29c636f4dee649fb1107ea58d6eac0768d4
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-12-15 15:26:33 +00:00
Eike Ziller
13db647329 build_plugin.py: Add --add-module-path option
Like we have for build.py

Change-Id: I8450b81edcdf10300985762153cd5750d9ddcd59
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-15 13:51:01 +00:00
Christian Kandeler
5978960482 Core: Fix build
Amends 104ea4accc.

Change-Id: I2688962c5b5c99c31324fa6eb94aa9ae28665266
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-12-15 12:56:44 +00:00
hjk
a910724969 Docker: Add a way to build boot2qt images
Change-Id: I4087d3a24dd928aff39f748909b0add14916329f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-14 17:58:42 +00:00
Marco Bubke
ad505aad59 Sqlite: Strict table support
With Sqlite 3.37 strict tables are introduced:
https://www.sqlite.org/stricttables.html

The introduce strict column types. So you can not add a text to an
integer column anymore. Additionally they introduce the "any" column
which is a dynamic type.

Change-Id: I43c0410821aa154e7de83e24bd221a232f98e910
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
v6.0.1
2021-12-14 16:50:10 +00:00
Marco Bubke
90bb92f327 QmlDesigner: Fix broken test ListModelEditor.AddBooleanProperties
Task-number: QDS-5708
Change-Id: I9961838149da19e3ab8670652e9e246f92b67012
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-12-14 16:29:38 +00:00
Marco Bubke
94e91ccc25 Sqlite: Remove virtual interface dependency
With C++ 17 it is possible to deduce the template argument from the
contructor parameter(CTAD). We then do not call anymore a virtual
function but a normal function.

Change-Id: I61c3ce22322c66b256afab278e768014401b08cc
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-12-14 16:29:30 +00:00
Marco Bubke
e391ef7d3f Sqlite: Remove flacky test
Because we don't use the function we can remove it.

Change-Id: I273a9b56589257b17499f41df02d5e40345f2d4b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-14 16:29:18 +00:00
Miikka Heikkinen
d73be23c69 QmlDesigner: Make model used for instancing unpickable in 3D editor
The base model used for instancing is hidden at render time, so it
should not be pickable in 3D editor.

Fixes: QDS-5100
Change-Id: I7c58bd8e7e5c9bfbe75dbaff67c0fd99793ad610
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
2021-12-14 15:27:01 +00:00
Eike Ziller
97a00e21e9 Add change log for 6.0.1
Change-Id: Iad77c18758e466a231ed2f54119eb50365aa7d9a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-12-14 15:11:55 +00:00
David Schulz
df46c478dc LanguageClient: simplify diagnostic mark creation
Change-Id: I7d6cb17e6e1f41ab007884bb1c32f92086d3067a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-12-14 13:26:32 +00:00
Miikka Heikkinen
4751e9a771 QmlDesigner: Change 3D editor selection box appearance
The selection box in 3D editor no longer includes selection boxes of
immediate children for clarity. The box itself also now only shows the
corners of the box.

Fixes: QDS-3656
Change-Id: Iae3e884276f26385d6a362809b79a74e09c093a3
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-12-14 13:03:32 +00:00