Commit Graph

62421 Commits

Author SHA1 Message Date
hjk
20d19aa5bf RemoteLinux: Implement some of the remote file API
Implementation of remote file API for correct FilePath
work with RemoteLinux.
Added tests for this functionality

Run ssh shell in separate thread.
The linux device instance keeps its own thread for running
SshRemoteProcess. In this way all calls to filepath
interface of linux device coming from different threads
are executed in one thread (SshRemoteProcess is reentrant,
but not thread safe). The redirection to the device thread
is done by invoking SshRemoteProcess' methods through
BlockingQueuedConnection.

Done-by: Artem Sokolovskii
Change-Id: Id8756738d3a4597f175c8ef000c148d0c8536eeb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-01-04 11:16:14 +00:00
Eike Ziller
5a135ba442 Modeling: Fix queued connections for Qt 6
The argument must be registered as a meta type for queued connections.
This also depends on a consistent naming of the type in the signal
arguments (which best is fully qualified).

Fixes: QTCREATORBUG-26760
Task-number: QTCREATORBUG-24098
Change-Id: I83991326f051d592a1665ae8cdb472d8376e74bc
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-04 11:03:08 +00:00
Orgad Shaneh
be9922c357 QmlJS: Add a missing include
Amends 125d7c0cce.

Change-Id: Ibfd6bb7da52547f743534105bf759387b674c2c1
Reviewed-by: hjk <hjk@qt.io>
2022-01-04 07:00:14 +00:00
hjk
f2dea561ba Debugger: Introduce a Ctrl-F9 shortcut to enable/disable breakpoints
Since "toggle" now becomes ambiguous, change "Toggle Breakpoint"
to "Set or Remove Breakpoint" and add a new "Enable or Disable
Breakpoint"

Fixes: QTCREATORBUG-26788
Change-Id: I7902308298570360af202fced90bf44fc1a59adb
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-01-04 06:14:16 +00:00
Petar Perisin
32ed2df2f9 Autotools: setup configure command if it did not exist
since 'configure' file does not exist before 'autoreconf' is
executed first time, it is possible that initially 'configure'
does not exist. Therefore command need to be recalculated again
when step is about to be executed

Change-Id: I7eeeaefd6d41adb2bcb247e35a3de5862899c8db
Reviewed-by: hjk <hjk@qt.io>
2022-01-03 15:41:30 +00:00
Eike Ziller
7d92375b2f Merge remote-tracking branch 'origin/6.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/clangcodemodel/clangdclient.cpp

Change-Id: I75c954d2e573d65089205d2542747bba3276be2a
2022-01-03 14:14:12 +01:00
hjk
bf00252a34 Ssh: Simplify SshRemoteProcess interface a bit
Change-Id: I6871b16c05172d6b705f666c7962dd82320c6e8f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-03 12:48:23 +00:00
hjk
a68f2b48ac Ssh: Drop unneeded #include in sshprocess.cpp
Change-Id: Ibea173e81dc515e55d2a15be3c794016b6a49b99
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-01-03 12:45:57 +00:00
hjk
e8ae475fcf Debugger: Add a "Char Code Integer"
Fixes: QTCREATORBUG-22849
Change-Id: Id601eb5cbe1211cff595f04b5910a21f1ba33128
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-03 12:45:39 +00:00
Jarek Kobus
035ba1c10e Use ranged for loop in DeviceManager
Change-Id: Ic3017de13be1cdff63d800bfe94af46055d93b54
Reviewed-by: hjk <hjk@qt.io>
2022-01-03 12:45:37 +00:00
hjk
42abef3434 Utils: Make FileSystemModel more flexible wrt to case sensitivity
We need to handle more than a host file system.

Change-Id: Ia5940f35437f9953df007616bb998698740db9ad
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-01-03 12:45:20 +00:00
Jarek Kobus
34ada7c1ff SshConnection: Remove unneeded includes
Change-Id: I03bc01ca1f9143bc0aa1574957bc30112d07a8dd
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-01-03 12:34:33 +00:00
Jarek Kobus
ee2960989e Remove unused SshConnection::dataAvailable() signal
Change-Id: I1e12965931a7623ed03d0e703b275eb02ddaf6c7
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-03 12:34:24 +00:00
Jarek Kobus
04362afed2 Make connParams a const member
Change-Id: I1dc75414766b9ec6c16a1c7080878da51310863c
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:34:03 +00:00
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
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
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
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
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
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
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
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>
2021-12-14 16:50:10 +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
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