Commit Graph

76686 Commits

Author SHA1 Message Date
Robert Löhning
67f907f295 Squish: Fix MSVC2017 toolchain
Without this, Creator cannot set up CMake properly
in the kit so configuring projects fails.

MSVC2015 also needs a fix.

Change-Id: I19c065eb087d098174c84301aa52cc3888ec42b7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-18 08:56:43 +00:00
Christian Stenger
5fe7b3ad6a QmlProjectManager: Do not establish connecttions when using Qt5
Amends 8bb1a862a0.

Change-Id: I4186dda881f06295788e1fe4d6165c999fdbe574
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-05-18 08:52:27 +00:00
Christian Stenger
8180535ccc QmlProjectManager: Fix build with Qbs
Amends 8bb1a862a0.

Change-Id: I6fedc5f5dd1d505790bf0a27319250f274a3d895
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-05-18 08:52:20 +00:00
Jarek Kobus
d6ee5cb163 Remove algorithm.h from jsonfieldpage.h
Change-Id: I15dfae3568030c169785c33e7957ecba3e975b65
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-18 08:38:11 +00:00
Jarek Kobus
6cd736fe6c Remove algorithm.h from buildtargetinfo.h
Change-Id: I777212fb94d46c1c71f017288b7e38dd5db62a91
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-18 08:38:05 +00:00
Henning Gruendl
259759b5c9 QmlDesigner: Fix typo
Change-Id: If6860fe3094124dcac381f72ae88722759167354
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-05-18 07:37:50 +00:00
Eike Ziller
2334041338 Update qlitehtml to latest master
Includes suppressing compiler warnings from litehtml itself

Change-Id: Ib603c133e60599b2f9d70ffdd20a73710d8aa4fe
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-18 06:45:06 +00:00
Thomas Hartmann
de7a7b6ac8 QmlProject: Allow setting main qml file and main ui.qml file
The .qmlproject file already has the "mainFile" setting which indicates
which qml file is run. This patch adds a main ui.qml file that indicates
which ui.qml file is opened in the design mode if the .qmlproject is opened.

The patch also adds two context menu actions that allow setting the main qml
and main.ui.qml files without having to edit the .qmlproject file by hand.

Changing the main ui.qml file also checks if the current ui.qml file is
used as in the main qml file and if it is, then we switch the component there.

For now the actions are only available in QDS.

Task-number: QDS-6882
Change-Id: I1c6e19c039036dc635161fa6e06173356dc509aa
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-17 15:17:12 +00:00
Thomas Hartmann
5e31fae6d9 Hide Debug/Build side bar action if menu is disabled
Change-Id: I8c7a2e5f0bb76e74692c6b4463aa1feb806d6e49
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-05-17 15:11:33 +00:00
Henning Gruendl
414fb08bc6 QmlDesigner: Input lose focus after pressing enter
* Add losing focus after pressing Return/Enter for all TextInputs
* Add losing focus and reverting values after pressing Escape for all
  TextInputs
* FontComboBox fix initial value selection
* Code cleanup

Task-number: QDS-5972
Task-number: QDS-6028
Change-Id: Ice7449e89088f6e7da76eb7c2edefab647b109de
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-05-17 14:10:01 +00:00
Henning Gruendl
e865b03448 QmlDesigner: Fix bound properties change behavior
Changing a bound property was triggering a value change twice. Once with
the previous value and another time with the newly set value. This was
solved by locking the binding property change emit with a scope lock.

Change-Id: I9605269e911f0468b2d52d74ad8a2a43f907a18c
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2022-05-17 14:09:46 +00:00
Henning Gruendl
87a7d94629 QmlDesigner: Disable style name ComboBox if empty
Change-Id: I7c2a997f97cc1c45b6700885f3dd5a8e7f6c4155
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-17 14:09:33 +00:00
Artem Sokolovskii
d73d5fe0b1 ProjectExplorer: Remove foreach / Q_FOREACH usage part 3
Task-number: QTCREATORBUG-27464
Change-Id: Iab4740dd2f475febf7532f0a02407b0088d54068
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-17 13:08:53 +00:00
Jarek Kobus
dcc93253c8 FileTransfer: Add some static helpers
Change-Id: Ie22e7ecce52b308df32316ff85d4744bd26060b0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-17 12:55:20 +00:00
Eike Ziller
3967bbc22f Macros: Fix shortcut display on macOS
Some "NativeText" parameters were missing.

Change-Id: Id08b8281d1458c05ff302011e32d8babbaf7b2bc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-17 11:56:52 +00:00
Eike Ziller
c311b8e0fa ClangFormat: Ignore compiler warnings in clang-format headers
By making the include paths "system" includes.

Change-Id: Idf417195b921c2cd861efc24b814a30f5739eef5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-17 11:55:26 +00:00
Tapani Mattila
d35b9547f8 QmlJsEditor: Change "always open with QDS" setting type to combo box
Task-number: QDS-6807
Change-Id: I7e98781ee423be25a13fac5eee84caae5b11562f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-05-17 11:19:55 +00:00
Tapani Mattila
8bb1a862a0 QmlProjectManager: Integrate QDS landing page
Task-number: QDS-6564
Change-Id: Ia1a4188ba1bb561bbfeadf5fb29bcba75d05b5ce
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-05-17 11:19:49 +00:00
Jarek Kobus
515845b815 RsyncDeployStep: Use FileTransfer for rsync
Instead of constructing custom ssh command.
Create the mkdir process on stack.

Change-Id: I3944ec4e2979b820a40971a8836e36084a44902a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-17 10:19:29 +00:00
Jarek Kobus
80ae9c357d FileTransfer: Add test() method
The test() method doesn't try to transfer anything,
it just tests if the transfer itself work.
In contrast to start() method, the FilesToTransfer
list may be empty and test() method will not issue
an assert.

Change-Id: I719cfbaddc5e33d6a7cc660ef6aa0bbcb61c5bce
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-17 10:19:10 +00:00
Alessandro Portale
13bfb06581 ProjectExplorer: Avoid line breaks in ABI tooltip
By wrapping the html into a div with style="white-space:pre".

Task-number: QTCREATORBUG-27553
Change-Id: I108faa8e4c509d06f8a9a4892604d0aa4c33a042
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-17 10:13:31 +00:00
Vikas Pachdha
cf5588924c Doc: Update the 2d asset import documentation
Task-number: QDS-6754
Change-Id: Ied5026a12f08fcf672e1d7563514c5b1054f6532
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-05-17 09:16:01 +00:00
Christian Kandeler
affa2cda9e CppEditor: Tell users about clangd configuration files
It's not feasible to map every possible setting into our UI, so instead
teach people how to use the clangd configuration mechanism.

Change-Id: Id11e81e25b687a4f49af4e090203faca3a75722d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-17 08:56:32 +00:00
Christian Kandeler
a5dc6f8434 ClangCodeModel: Switch on clangd's Include Cleaner
Task-number: QTCREATORBUG-147
Task-number: QTCREATORBUG-14040
Change-Id: Ib215ed3bbb6f42d25752c747693371239222e67a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-17 08:51:26 +00:00
Alessandro Portale
55615e83f5 Utils: Avoid line breaks in variable chooser tooltip
By wrapping the html into a div with style="white-space:pre".

Task-number: QTCREATORBUG-27553
Change-Id: Ie8c4dcbe48d714fe72949afb841e5b4844e12cd1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-17 07:17:26 +00:00
Leena Miettinen
6537f1cadc Doc: Remove obsolete instructions for registering QML types
QML types are now registered automatically in most cases.

Task-number: QTCREATORBUG-26617
Change-Id: I4f1e2a731893081cbb0c399e7742b3656f201a1d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-05-17 07:14:06 +00:00
Eike Ziller
0d9fc1fe11 Add change log for 7.0.2
Change-Id: I0a3dc8ef5a4bcb56be30cc16537a221368228780
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-05-17 07:07:57 +00:00
David Schulz
0b6bc0d187 LanguageClient: Move the BaseMessage to JsonRpcMessage conversion
... to the client interface. JsonRpcMessages are the only messages used
so far and no other types of messages are currently used by any of the
supported Language Servers. If a client is going to need special message
parsing it can still implement a specialized client interface and
overwrite parseCurrentMessage. This is the preparation to move receiving
and parsing data passed to and from the language server out of the GUI
thread.

Change-Id: Ibd4cd95daab7efff947273ca9e7d457de0286f47
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-17 04:31:06 +00:00
Jarek Kobus
819d6ad753 Implement RsyncTransfer
Change-Id: I07a9139bc5280a4f4b16181121ce7ab907493e72
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-16 17:27:42 +00:00
Jarek Kobus
7cca6cd718 FileTransfer: Make the usage more convenient
Prepare the API for rsync implementation.

Change-Id: I13b7def31c2e2b1460d18340f6bd7cbd8e0e9434
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-16 17:27:29 +00:00
Christian Kandeler
15665680df CppEditor: Use "auto" in AssignToLocalVariableOperation
Fixes: QTCREATORBUG-9577
Fixes: QTCREATORBUG-18412
Change-Id: I46a925611939a3dade142eaf76e20090ae203856
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-16 14:35:10 +00:00
hjk
6d1ec54679 Debugger: Make manual test easier compile with Qt 6
Change-Id: I2623a45fea4ac3ddad2790cbd34852891a9d73b4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-16 14:14:28 +00:00
Mahmoud Badri
bf49d143e8 QmlDesigner: Fix warning in AbstractView::dragStarted()
Change-Id: I3fc0bede9fd58b7c63cf6c28a982e4662766f375
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-05-16 13:26:58 +00:00
Eike Ziller
3db3b441db FileSearch: Some micro-optimization
Fixes: QTCREATORBUG-27552
Change-Id: I1b4677af59f335df676d32c2bb0e1dbd5a9dd14b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-16 13:23:20 +00:00
Eike Ziller
486ec4239a CMake build: List debugger resources explicitly
Developing these files can lead to .swp files from other editors,
and .pyc files when running python files. When these are later removed,
CMake complains about removed dependencies.
List the files to copy & install explicitly to workaround this.

Change-Id: Ie971abad8e9be0d2d7de94caf8836664396885b0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-05-16 13:23:04 +00:00
Jarek Kobus
9a4164a4de CMakeProcess: Don't use QTimer for checking the canceled state
Create a QFutureWatcher instead and connect to its canceled()
signal.

Replace some includes with forward declarations.

Change-Id: Ie82bf8902ef8c8d87011809bd14b7db3d4f52179
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-05-16 12:37:18 +00:00
David Schulz
52770b746e LSP: fix hover request result
According to the protocol a hover request can also return a Null as a
result. Reflect this in the protocol implementation and adapt usages.

Change-Id: I14ce71639c64b6de00e9c1198617083c1a3de9eb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-16 12:36:44 +00:00
David Schulz
2b8d96465a Coco: fix warning overriding virtual functions
Change-Id: I8c7d6619a9f277fa14a5e0e4d28175155fd0dd95
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-16 11:36:55 +00:00
Christian Kandeler
8c8e9e55b1 CppEditor: Refactor "assign to local" quickfix
Mostly to separate type and name deduction. No functional changes.

Change-Id: I87858f06bec73fbc59a0359769bd37038176b3ad
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-16 11:29:56 +00:00
hjk
0d733e68b5 ProjectExplorer: Create Runnables with full device paths in RunConfig
... instead of fixing them later in the ApplicationLauncher as used
by all SimpleTargetRunners.

The mapping to device paths happens now in the default commandline
getter on paths from the ExecutableAspect. This is (only) wrong in the
case of (local) custom runconfig with a device present, so this needs
a custom commmandline getter not doing the transformation.

Change-Id: I525bc0ea59b5e7caf7a445a1a723d6f5b152162d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-16 10:57:43 +00:00
Jarek Kobus
ef2c551121 GenericLinuxDeviceTester: Make some order in implementation
Change-Id: I83a3c2880b055d0d74af402df876748975a7450e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-16 10:34:54 +00:00
Jarek Kobus
4634b058fa AbstractUploadAndInstallPackageService: Use FileTransfer
Use LinuxDevice::transferFiles() instead of SftpTransfer.
Get rid of unused now PackageUploader.

Change-Id: Ibea4557c3e003cd9d7d3692db5bec6b82dcad71a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-16 10:34:44 +00:00
Jarek Kobus
8eb12ea614 CMakeProcess: Fix stopping the CMake process
Calling QtcProcess::terminate() doesn't guarantee that
process will be terminated, especially on Windows we may
ofter wait for it forever. Replace the call to terminate()
with close(). After calling close(), the process will sooner
or later be terminated (or finally killed) - that's the job
for ProcessReaper.

Since the current code relies on receiving the finished() signal
after calling a stopping method, we need to call the expected
handler (handleProcessDone()) after calling the QtcProcess::close(),
as afterwards we can't expect receiving any signal for the possibly
running process anymore.

Refactor the code so that we connect do QtcProcess::done() signal
instead of connecting to QtcProcess::finished() signal. This
guarantees that the handler will also be called when process
failed to start. Handle this case in done() handler, too.

Rename CMakeProcess::terminate() into CMakeProcess::stop()
in order to avoid confusion on what method we have chosen to
stop the process in fact. That's the implementation detail.

Get rid of some QFuture related handlings from public API.
Use them directly from inside CMakeProcess d'tor.

Get rid of public state() method, as it seems it's unused.

Increase the responsiveness of small [x] icon of the running
cmake task (reduce the timeout of 500 ms into 50 ms).

Fixes: QTCREATORBUG-27518
Change-Id: I15cac3990079ad1cae0bbe22ac2a6e64cfb659a0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-05-16 10:30:48 +00:00
Artem Sokolovskii
e30652ae55 ClangFormat: Build fix Qt 5
Change-Id: I5afec32314263dfa9db6f36b8871b43fde47f698
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-16 09:51:38 +00:00
Jarek Kobus
92f20c5711 GenericDirectUploadService: Use FileTransfer
Instead of using SftpTransfer.

Change-Id: I0732e1472efe3db10291078319b23211973c86d2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-16 09:33:04 +00:00
Christian Stenger
4076f6c385 QmlProjectManager: Fix compile with Qt5.15
Amends 92c93c388a.

Change-Id: Iff025dbf7feb6c84dd7eb88ccea14e8e12e69a2f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-05-16 09:20:17 +00:00
hjk
6ea8a76e44 Utils: Consolidate port parsing methods
Change-Id: I137e9faa2c5f18e9ade0e2c59d73811d682abf13
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-16 08:43:16 +00:00
Jarek Kobus
f8d637dc71 LinuxDevice: Add createFileTransfer() method
The method returns FileTransfer object. This should substitue
SftpTransfer. It is going to handle rsync transfer, too.

Change-Id: I082cf21581ac387e42bb3594604facafe32d7492
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-16 08:40:52 +00:00
Christian Stenger
d9005be8a2 Utils: Use new mimetypes implementation when using qbs
It is default for the cmake build, so switch for qbs as well.

Change-Id: Icb325c58e587ecee2c621bf68c191869520e963a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-16 08:24:44 +00:00
Tapani Mattila
5019513efc QmlDesigner: Implement first iteration of QDS landing page
Task-number: QDS-6564
Change-Id: I7f92024f9ec521ff9ebe2637146b56c9b30edd59
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-05-16 08:21:48 +00:00