Commit Graph

8250 Commits

Author SHA1 Message Date
hjk
3f528de7db ProjectExplorer: Fix compilation with Qt 6.6
appoutputpane.cpp:272:12: error: cannot convert ‘const QList<ProjectExplorer::Internal::AppOutputPane::RunControlTab>::iterator’ to ‘ProjectExplorer::Internal::AppOutputPane::RunControlTab*’ in return

Caused by "QList: deprecate iterator<->pointer implicit conversions"
0220484329029fc7598dfe11ba35ea10c3126477
b6cbd9c43afc7e005c1f78e1d0f700524930ed71

Change-Id: I596ead9deafca1154b5a79495e707137b61a14d5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
(cherry picked from commit 8ee6b14f00)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-12 11:06:25 +00:00
Christian Kandeler
d0046ec435 ProjectExplorer: Consider the form "-D key=value"
... when filtering compiler options for MSVC macro extractions.
Otherwise we end up with a stray command line argument, breaking the
call to cl.exe.

Fixes: QTCREATORBUG-28016
Change-Id: I29979a4b968d2056a0feba61fee01d5ddc9aa28f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-14 15:46:43 +00:00
Artem Sokolovskii
8addb599a9 ProjectExplorer: Fix Add button alignment on Compilers tab
Fixes: QTCREATORBUG-28367
Change-Id: I468729fc2fd46f7f55081a696ff9d8913f5823d0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-12-12 13:15:21 +00:00
Jarek Kobus
218b19fe14 SshProcessInterface: Limit waiting for kill to finish
This is just a workaround for 9.0 and not a proper fix!

It looks like sometimes kill command may freeze. Don't blocking
wait for it for 30 seconds - limit this time to 2 seconds.

Do the same inside SimpleTargetRunner. Pretend the process
finished after 2 seconds, otherwise the SimpleTargetRunner
object gets leaked and we start receiving asserts from
ProcessLauncher about destructing it when still some processes
are being run.

Task-number: QTCREATORBUG-28072
Change-Id: I9766e7ff6f0c2abf2010686027702d30d32c4318
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-12-12 10:36:08 +00:00
Cristian Adam
6bef53a818 PE: Add ability to skip vcvarsall.bat /clean_env
By defining QTC_NO_MSVC_CLEAN_ENV one can skip the vcvarsall.bat /
clean_env functionality.

Task-number: QTCREATORBUG-28561
Change-Id: I6392b2278008607042a43a38a2c38669b4b52183
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-12-08 12:21:26 +00:00
Cristian Adam
e0a563b236 CMakePM: Migrate build environment settings also to configure step
This allows a project to be properly configured with Qt Creator 9 when
the build environment had user defined changes.

Qt Creator version prior to 9 had one setting for both configure and
build steps.

Fixes: QTCREATORBUG-28372
Change-Id: I0da8065085bd6628ba75923c17b46648eb031801
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-12-01 23:52:10 +00:00
Eike Ziller
e24ad7ac55 JSON wizards: Print parsing issues only with -customwizard-verbose
Some wizards will miss required components when corresponding plugins
are disabled. That is fine, and not an error per se. When actually
developing a wizard, these kind of errors should of course be posted,
but that is what -customwizard-verbose is for.

Fixes: QTCREATORBUG-28502
Change-Id: I3647d37ef7ca4dace7592c5443bdd13720290016
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-25 15:04:52 +00:00
Eike Ziller
cb8742ccab Make it possible to select default session from menu
when we are in the limbo state where no session has been loaded, and the
default session has not been explicitly created or loaded yet.

Fixes: QTCREATORBUG-28393
Change-Id: I66d69561e18b5073a477d90c1926074e3cd97cee
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-25 12:37:40 +00:00
Eike Ziller
7a2901d502 JSON wizards: Read additional paths from settings
Opens possibilities like the installers writings some.

Change-Id: Ie8c87731fb6bb9c7129032f64878e42e9bcf4cf0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-11-24 14:03:33 +00:00
Eike Ziller
f5efd9acc0 JSON wizards: Don't add paths from environment over and over
It would add the paths from the environment variable again, each time
the searchPaths are requested

Change-Id: I2650ba832e23b5fcd6bfd363389e1eaf3beddb9d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-18 16:08:40 +00:00
Marcus Tillmanns
d7869967ce ProjectExplorer: Remove duplicate devices
In rare cases it can happen that the installer creates a device that happens
to have the same rootPath as a user created device. We need to filter
these out since otherwise it can be random which of the two devices
is selected.

Change-Id: I8269795a2e4f439fb2f02d819272723a504c6703
Reviewed-by: hjk <hjk@qt.io>
2022-11-17 14:10:11 +00:00
David Schulz
895f88f63a ProjectExplorer: create a root path without scheme for host device
Change-Id: I966db6378dca533c73635803fb177d31b2c625ac
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-11-17 09:39:35 +00:00
David Schulz
c1edc1e9df ProjectExplorer: Fix starting a docker project on windows
... by mapping the executable and working directory to the target
device.

Change-Id: I0a220fe9bae980cb279fae776962f23335eac248
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-11-16 14:01:55 +00:00
Alessandro Portale
993815cb06 ProjectExplorer: Fix build device retrieval in BuildDirectoryAspect
Change-Id: I40aeb4a775a99df7395f4c23476bae7f98201b69
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-11-14 12:46:35 +00:00
Christian Kandeler
c89bef9dcd ProjectExplorer: Do not pop up the issues pane while not building
Otherwise, the issues pane can pop up due to a key press, as code models
refresh their diagnostic entries.
Amends 04a23c38f0.

Fixes: QTCREATORBUG-28330
Change-Id: Ic7e63a1bbbf3e4c37383849cfad05529bac23e9b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-09 15:07:28 +00:00
Tim Jenssen
63d3a6bd3d Merge remote-tracking branch 'origin/8.0' into 9.0
Conflicts:
  src/plugins/qmldesigner/components/assetslibrary/assetslibrarywidget.cpp
  src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp
  src/plugins/qmldesigner/qmldesignerplugin.cpp

Change-Id: I24216ae3f83cdde3493b4a6274e24a72f75820fc
2022-11-09 11:45:25 +01:00
Marcus Tillmanns
06838e3e5e ProjectExplorer: Fix potential race condition
When using BuildStep::runImpl() it was possible for the async part
to still be running while the BuildStep is already deleted.

This change returns the Future so that users can wait for it to finish.

Change-Id: I27c0fc8741c59851c5ab8f5cb858fbcda923c14d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-09 08:33:37 +00:00
Marcus Tillmanns
129448d61d QmlJS: Fix Follow under cursor
When trying to jump to a symbol in a qml file the Qml Model may find
the location in a generated .qml file in the build folder.
QtCreator searches in all generated .qrc files to try and find
the source file so it can jump to it instead.

Previously not all auto-generated ".rcc" folders would be found
as only the folders of targets (executables) were searched.
Plugins or Static Libraries were not searched.

With this fix, all projects nodes are searched for the ".rcc" folder
and therefore also finds them for Dynamic / Static libraries and
plugins.

Fixes: QTCREATORBUG-27173
Change-Id: Ic51ac8fbc82c15785cbefd76787942a512ecf3db
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-11-08 09:54:10 +00:00
Thomas Hartmann
7b9303007a QmlDesigner: Avoid error messages when adding effect
* Removing the summary page
* Adding DoNotOpenFile option

By default, the wizard expects to open a file.
Setting DoNotOpenFile to true does suppress this.

Task-number: QDS-8151
Change-Id: I62264733788dbbe1b017beaa428356548a1a3692
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-11-03 10:53:50 +00:00
Jarek Kobus
2c04c644d0 TreeScanner: Pass a copy of filter and factory into async call
Otherwise, m_filter and m_factory may be used from 2 threads
at the same time, what is not thread safe (setFilter() /
setTypeFactory() from caller thread, and copy of m_filter and m_factory
inside async call body).

Change-Id: Ic322870f9c27de10c5c51082cfbb85c729326993
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-02 10:40:28 +00:00
Orgad Shaneh
3533392d95 ProjectExplorer: Remove redundant return in CustomToolChain
Amends c15e09e0fe.

Change-Id: Ic1aabcada892413f454c3800c925aa7527a09965
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-31 13:46:04 +00:00
Marcus Tillmanns
38c8e20071 QMake: Remove unnecessary build dir changed
Previously every time a qmake project was built, the
"buildDirectoryChanged()" was emitted, leading to a complete
reparse of the project file, tests, qml files and qml imports.

To keep "QmakeBuildConfiguration::updateProblemLabel" be called,
we re-introduce the "buildDirectoryInitialized" signal.

Task-number: QTCREATORBUG-27785
Change-Id: I32d881eacb8cf26050c33da643c74c2cab4dc22d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-26 11:47:49 +00:00
Christian Stenger
6cc47de5b1 PE: Do not use setVisible() before having a parent
Fixes shortly popping up floating widget on the Build & Run
settings page.

Change-Id: I8bcc887ae73b9cb27f690548d0e98038fb757674
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-25 06:43:24 +00:00
Robert Löhning
86f87605f9 SessionDialog: SquishTests: Update tst_session_handling
Change-Id: I6fcdb6173c39715e85f4cf37d12e7707b2e5d066
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-24 10:03:22 +00:00
Cristian Adam
534c312d27 PE: Use original vcvarsall.bat to do environment cleanup
Amends ae07c31976

Calling a VS2022 vcvarsall.bat /clean_env in a VS2019 environment causes
failures. Using the original vcvarsall.bat does the proper cleanup.

Change-Id: I12426e9eb97baecae5357e6bb419333464ea1ded
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-24 08:51:55 +00:00
Marcus Tillmanns
604f542b20 ProjectExplorer: Allow selection of remote build directories
Change-Id: Ieaf0b01bde6d043782d6d9d4bb745c090c6087c1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-24 07:22:05 +00:00
Cristian Adam
d643ad80cb ProjectExplorer: Allow "cc" for MinGW imported compiler
Amends 152c01bd86 which added "c++"
as a C++ compiler.

Change-Id: I8ad77a488b74dce6170ebf824b7f372083847a2c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-20 12:04:07 +00:00
Christian Kandeler
5c313b706f ProjectExplorer: Show missing warning text in MakeStep widget
The tooltip didn't show up at all, and even if it had, it would be weird
to have a warning icon all by itself.

Task-number: QTCREATORBUG-25089
Change-Id: I517c762b050f93aa2f2c4aa89f208e4ccb7515c5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-19 14:00:20 +00:00
Cristian Adam
ae07c31976 PE: Clean environment before compiler environment detection
By calling vcvarsall.bat with "/clean_env" before the actual
vcvarsall.bat call we make sure that the correct environment settings
are picked up by Qt Creator.

For example calling Visual Studio Community/vcvarsall from an
environment where Visual Studio BuildTools/vcvarscall was already
called, will not return a Visual Studio Community environment, but a
Visual Studio BuildTools environment.

The above scenario can happen when developing Qt Creator itself with a
different Visual Studio setup.

Fixes: QTCREATORBUG-28315
Change-Id: Ib99cbba2a5c6299953728e92cf0283c10f7837f3
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-19 09:11:20 +00:00
Marcus Tillmanns
6dd15ef3f3 ProjectExplorer: Ensure working dir is reachable
Previously the working directory might not be reachable by
the executable.

This change fixes that by calling "ensureReachable", and
changing the path to an on-device path of the exectuable.

This also fixes the path when the Host is Windows, and
the build device is a unix type system by changing the paths
from e.g. "c:/..." to "/c/..."

Change-Id: I6c86e16c867bb654b6c2a4951d9f62fdb879298e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-10-19 08:56:35 +00:00
Orgad Shaneh
0dd8d64060 Revert "ProjectExplorer: Simplify node creation"
It breaks the project tree, at least for Qt Creator CMake project.

This reverts commit d1284570d6.

Change-Id: Ic5fe14cd4da476ca421551968e67fb8688433bbf
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-10-19 05:39:15 +00:00
Marcus Tillmanns
5c7c3a410d ProjectExplorer: Use device env when inspecting gcc
Previously the host environment would be used while inspecting
a gcc / g++ compiler. When doing so on a Windows Host
against a Docker target, this would fail.

Change-Id: I0e7b392101cee23e17813fa07f6c04bb9d3999c9
Reviewed-by: hjk <hjk@qt.io>
2022-10-18 16:18:07 +00:00
hjk
4266f612e6 Utils: Rename FilePath::relativePath() to relativePathFrom()
Hopefully less confusion about the direction.

Change-Id: I61727d6c4d19e0dfe46f24ff24f5d90f9835d05c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-18 13:41:24 +00:00
Orgad Shaneh
1478a36530 ProjectExplorer: Fix prepending executable path for custom toolchain
Amends c60c642fe5.

Change-Id: I214c3d83ef5f1642d581e84f9219e929d765c471
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-18 12:56:58 +00:00
hjk
b323303518 RemoteLinux: Fix deployment when building remotely
By using a generic file transfer method based of FilePath::copyFile()
that doesn't require either of the transfer end point to be the
local host.

Change-Id: Ia2e4273df52f5ce6533046d96be3f6b521b7f0a5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-18 12:21:44 +00:00
Alessandro Portale
93dd15855e ProjectExplorer: Fix JsonWizardScannerGenerator
Both calls of FilePath::relativePath() were "reversed".

Amends: 389b1eceb9

Fixes: QTCREATORBUG-28312
Change-Id: Iecff3adeee8f8ce198c12289e51487a51178759e
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-18 10:27:06 +00:00
Marcus Tillmanns
d1284570d6 ProjectExplorer: Simplify node creation
Simplifies node creation by not trying to manually split / concatenate
paths.

Change-Id: I5cb4e9391eb8aef6e6942b8b424ac6ef451d1aff
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-18 09:54:15 +00:00
David Schulz
2e8d2e361c ProjectExplorer: skip cmd autorun for msvc detection
3rd party application like clink can slow down the execution of msvc env
script drasticly. And especially the vcvars script that collects the
msvc environment modifications should be checked without any additional
user modifications.

Task-number: QTCREATORBUG-27906
Change-Id: I7393a3e7e367a26408e52a419ccba75ed8e3cad0
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-18 06:50:31 +00:00
hjk
5b287c9210 ProjectExplorer: Avoid prefixing schemes with slash
Without that I get folder nodes named  "/ssh://user@12.23.45.67/..."

Change-Id: I03f87c650478781fe934e8a647a8883f024b7a2b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-17 13:19:19 +00:00
David Schulz
c7cef250b3 Docker: fix device path mapping
Amends 1fa3255242

Change-Id: Idd2e0916769cd822b97e1fc851d8f706316cca83
Reviewed-by: hjk <hjk@qt.io>
2022-10-17 10:06:52 +00:00
Eike Ziller
8db0d3b0ff Fix lupdate issues
- missing Q_DECLARE_TR_FUNCTIONS
- some full qualifications needed for confused lupdate
- avoid breaking some translations from former TaskListPlugin,
  VcsCommand and highlighter settings refactoring

Change-Id: Ia3b34095512a7bad6903f0aff6095313ee39e3e4
Reviewed-by: hjk <hjk@qt.io>
2022-10-14 13:26:45 +00:00
Christian Kandeler
679a726330 C++ support: Consider project-specific target triple
... before creating project parts.
Otherwise we can get wrong includes and defines from the compiler.
Amends 9c86e6746f.
Also do not add -m32 or -m64 for non-x86 targets.

Task-number: QTCREATORBUG-25615
Change-Id: I02da9251c77d45fc8827990a2d59c3ae2c262591
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-10-14 12:30:14 +00:00
Marcus Tillmanns
2fd4be4603 ProjectExplorer: Use FilePath in gcc toolchain
Change-Id: I2cd659dc94e0c9ee1a5f198098a3886146c3e03b
Reviewed-by: hjk <hjk@qt.io>
2022-10-14 08:27:35 +00:00
Cristian Adam
6fc313013e ProjectExplorer: Skip clink autorun for msvc detection
Clink checks the CLINK_NOAUTORUN environment variable, and if it's set
it does a quick exit and the msvc detection is faster.

See https://github.com/chrisant996/clink/issues/361

Task-number: QTCREATORBUG-27906
Change-Id: Ib2cbc29a6135e5a1eb7411e4353cc1df8ef59004
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-14 07:39:19 +00:00
Christian Kandeler
a34125ae11 CMake/qmake: Fix target triple for iOS targets
Neither cmake nor qmake know the full iOS compiler command line, so we
have to construct the target triple for the code model ourselves.

Fixes: QTCREATORBUG-28278
Change-Id: I6cac06f340e9388de5c86509a8df4ac00eef87cd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-10-13 13:28:52 +00:00
hjk
1fa3255242 Utils: Split off file access interface from IDevice
The file accessing functions form now a class hierarchy by themselves,
the devices return a suitable point.

The previous implementation was mildly confusing by the special handling
of the DesktopDevice, fallbacks and remote cases in the same function
leading to unnecessary boilerplate when adding new functions and
codepaths that sometimes passed the FilePath API twice.

Implemented are a "DesktopDeviceFileAccess" taking care of the
previous !needsDevice() branches and a "UnixDeviceFileAccess"
covering the current docker and RL uses.

As a side-effect this unifies to a large degree the current docker
and RL code paths with were occasionally deviating from each other
while they shouldn't.

Change-Id: I4ff59d4be2a07d13e2ca5e9ace26a84160a87c9d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-10-13 10:38:35 +00:00
David Schulz
e5d6f5ce82 ProjectExplorer: measure toolchain auto detection time
Change-Id: I1c0be35b6119c126f1554475f0a96c34ef14c43c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-10-13 05:18:29 +00:00
hjk
b1471fe61f Utils: Combine some of the iterateWithFind overloads
Change-Id: I668447d0049f2e35cd0c76d2c5708779196167ec
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2022-10-12 08:59:32 +00:00
Orgad Shaneh
b81e295f58 Toolchain: Support also concatenated syntax for MSVC included file
For example: /FIC:/Projects/test/config.h

Change-Id: I18dcda6593effa58ece019ce40bca7860cebfc8c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-11 11:32:46 +00:00
Tasuku Suzuki
52672b5f6c SessionDialog: rename Switch To to Open and reorder buttons
To be consistent with the SessionNameInputDialog that has the button
"... and Open" to switch to a session.
Buttons should be ordered by like a typical file menu
- new
- open(ex- switch to)
- save(rename/clone)
- close(delete)

Change-Id: I875446352100500eaae4b0ecef4faa6442aef539
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-10-11 10:53:29 +00:00