Commit Graph

62421 Commits

Author SHA1 Message Date
hjk
1fc83d2a56 Utils: Wrap various file system iteration flags and filters
... into a single class.

This makes passing them around as a whole easier, and opens a path
to have "generic" filters in form of a lambda or such.

Change-Id: Ibf644b2fedcf0f1a35258030710afff8f5873f88
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-26 13:13:41 +00:00
Thomas Hartmann
3e1095076e QmlDesigner: Split image category only for dialog
If we split the categories on the action level, then
a separate dialog is opened for every image suffix/type.


Task-number: QDS-6076
Change-Id: Ie80203cebca41e8dee4cb5c091b1163a9fde6e26
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-01-26 13:13:30 +00:00
Eike Ziller
c6fdb66b2b Collect Qt Creator debug menu items into common submenu
instead of spreading them over the place.

- rename "Logger..." to "Show Logs..."
- create "Tools > Debug Qt Creator" menu and put "Show Logs", "Inspect
Language Clients" and "Inspect C++ Code Model" there
- add missing ellipsis

That gets rid of the otherwise not useful "Language Client" submenu, and
creates a nicer place for the "Show Logs" item.

Change-Id: I2588b4c93327669579979dfbfce37005ada29dab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-26 12:59:21 +00:00
Alessandro Portale
77749e6e28 QtSupport: Resurrect the "screenshot cropper" tool
After many Years, it is time to refresh "images_areaofinterest.xml".
That is best done with the "screenshot cropper" tool.

Change-Id: Icd07e1c1697e236855d3a03ae8977044d21d78f7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-01-26 12:47:35 +00:00
Christian Kandeler
5207374d5d ProjectExplorer: Allow multi-selection in issues pane
Users should be able to copy or remove several issues at once.

Fixes: QTCREATORBUG-25547
Fixes: QTCREATORBUG-26720
Change-Id: I1ac75a3445c37200b6a01dd8c5d79d2b69c54a3c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-26 12:23:58 +00:00
Jarek Kobus
2c96ee2ee4 Get rid of ConsoleProcess
Use QtcProcess in Terminal mode instead.

Change-Id: Iba237f3ee3e5802eed494e4ea9caf7c4ad1bc61a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-26 11:47:33 +00:00
Cristian Adam
795d7364df CMakePM: auto-setup.cmake do not fail if QtCreator.ini doesn't exist
There are Qt Creator installations that do not provide
"QtProject/QtCreator.ini" file, and without it the auto-setup.cmake
code would fail.

Task-number: QTBUG-99273
Change-Id: I7674f68bc89375d8065d820b89650a358a7226b2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-01-26 11:25:19 +00:00
The Qt Project
b840e891d5 Merge "Merge remote-tracking branch 'origin/6.0' into 7.0" into 7.0 2022-01-26 09:00:01 +00:00
Orgad Shaneh
f932cef15a Git: Adapt grep to new default coloring in Git 2.35
Change-Id: Id830d3341974f70e4ce6b419152d3558bba2a95f
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2022-01-26 08:35:47 +00:00
Eike Ziller
be5fb98f1f Merge remote-tracking branch 'origin/6.0' into 7.0
Change-Id: I72684fe4b0857e52a15ee83721f9d7975582a8d2
2022-01-26 09:25:13 +01:00
Christian Kandeler
9def720ef6 Fix qbs build
Change-Id: I14251eae0bba2849c2049cf9a2020168c26cb24e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-26 05:39:40 +00:00
Alessandro Portale
43a9423a9b Wizards: Make wizard icons a bit lighter
Changing the Wizard icons into themed ones turned them quite dark (in
non-dark themes). This change mitigates the issue by making the dark
lines thinner and shaded areas smaller and brighter (vice-versa for dark
themes).

Amends: 05e89384e2

Fixes: QTCREATORBUG-26565
Change-Id: Ie1d251d6443576c4e5db26a2b1485b4f4ab63f82
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-25 17:44:21 +00:00
Jarek Kobus
addb8e97ba SshDeviceProcess: Use QtcProcess in terminal mode instead of ConsoleProcess
Change-Id: Icf4dac4be19878e6f46547d198a85291db80e02a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-25 17:23:35 +00:00
Jarek Kobus
c216e883b2 QtcProcess: Forward declare QTextCodec
No need to include it in the QtcProcess header.

Change-Id: Ie1acfeaad332bbd2205f3457ad313d9fabed69b7
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>
2022-01-25 17:20:53 +00:00
Jarek Kobus
18fdad280a ApplicationLauncher: Use QtcProcess in terminal mode instead of ConsoleProcess
Change-Id: Ie1f8385fe151d65acc584456cb2328aca12b15cc
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-25 17:20:43 +00:00
Jarek Kobus
e28d2a88b2 PythonUtils: Use QtcProcess in terminal mode instead of ConsoleProcess
Change-Id: Icd8a481a03a2a13f5556327ce5caf661a5d19321
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-25 15:07:50 +00:00
Jarek Kobus
a09630d50e TerminalRunner: Use QtcProcess in terminal mode instead of ConsoleProcess
Change-Id: I5ddc521ed62947a6bd09eb048408fc9573069615
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-01-25 14:56:28 +00:00
Henning Gruendl
30a3e8364d QmlDesigner: Suppress warning in text model merger
Suppress warning "Found an unknown QML value." by accepting
UiSourceElement.

Change-Id: I7d33c50744f339b9cec30967071366bc85a9fb3e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-25 14:53:20 +00:00
Jarek Kobus
5e74b809cc FileUtils::openTerminal(): Hide startTerminalEmulator()
Make it a private method as it's not used outside.

Change-Id: Ib9cf3ad3a16169ad220e6474825e6cf846623c1a
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>
2022-01-25 14:52:29 +00:00
Knud Dollereder
ebac821e9e Replace minitrace with nanotrace
Minitrace is a library to produce json traces suitable for chromes
built-in trace viewer. Unfortunately it lacks the ability to add
custom arguments to the json files which is needed in our case
in order to examine Design Studios state from within the evaluating
python script. Nanotrace is a rewrite of minitrace that adds this
ability. Additional benefits are higher precision and the fact that
it is written in c++.

Change-Id: Id2610b93188483d88547369c3fa8dacbe4dee9f7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-25 14:25:04 +00:00
Jere Tuliniemi
a03a50a262 QmlDesigner: Add camera alignment buttons
Add a button to 3D edit view that aligns the selected cameras to the
view camera. Add another button that aligns the view camera to a
selected camera.

Task-number: QDS-4482
Change-Id: Ibe6ceaf498db10f45c8c351e3a108419d8d7a59b
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-25 14:15:54 +00:00
Marco Bubke
f6a26fb13e QmlDesigner: Improve ownership for registerFormEditorTool
Change-Id: I1831c7ccd3682461d9f26cf3ec405a87c2248747
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-25 13:51:15 +00:00
Eike Ziller
5a3648c895 macOS: Fix Delete with Google Japanese IME
Do not eat all ShortcutOverride events. Let the rest of the class &
widget hierarchy know about them too.

Fixes: QTCREATORBUG-26764
Change-Id: I7e2f42183bc9cb3931aca3669a6703c83e39b4bc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-25 13:46:20 +00:00
hjk
3624ab1c3d WebAssembly: Compile fix with Qt 5
Change-Id: I4bec9d7362869420105c185a68b08918cb89a233
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-01-25 13:17:27 +00:00
Eike Ziller
2fab827782 Support external editors for locator, projects and file system tree
When setting an external editor as the default editor in the MIME type
settings.

Other operations like File > Open, or when using navigation shortcuts
like Follow Symbol, and stepping with the debugger will still always
open the file within Qt Creator. The Open with... menu can still be used
to explicitly open a file in an external editor afterwards.

One of the use cases is to be able to open some files that would
otherwise unhelpfully be opened in Qt Creator's binary editor in the
systems default editor.

Fixes: QTCREATORBUG-13880
Change-Id: I852f097da8badd10de78b74e7078987447eebe98
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-25 12:35:55 +00:00
Alessandro Portale
0bbc465f61 WebAssembly: Improve browser selection combobox of run configuation
This adds a "Default Browser" entry to the browser selection combobox in
WebAssembly' run configuration. Choosing that omits the "--browser"
parameter and let's emrun determine which browser to launch (should by
the system default browser).

In order to implement that, the combobox items now got user data in
addition to have display data. The parsing of emrun's output was
extended to retrieve the long form of a browser name as display data:
"Mozilla Firefox 96.0.0.8041" instead of just "firefox".
The parsing of emrun's outout received a dedicated plugin test.

Turning the result in parseEmrunOutput() non-static fixed
QTCREATORBUG-26562

Fixes: QTCREATORBUG-25028
Fixes: QTCREATORBUG-26559
Change-Id: I18891b88b063903d1a9eeb88a6c906e596e561c1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-01-25 11:49:22 +00:00
Morten Johan Sørvig
4d9245b001 wasm: update install documentation for Qt 6
Link to both Qt 5 and Qt 6 documentation.

Task-number: QTBUG-100055
Change-Id: Id77ba24d3b9d2e93a2b87b291130e1a0e2a6bb21
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-01-25 10:55:42 +00:00
Alessandro Portale
09daa5ddfd WebAssembly: Fix launching of target.html with qmake-based projects
A recent fix for launching CMake-based projects (where target name
differs from project name) broke launching of any qmake-based project.

The reason for the failure is that the code uses to the buildKey in
order to determine the html file name. CMakeProjectManager holds a
buildKey that corresponts to the target name (which is the right base
name for the html file), but qmake holds the project file path as
buildKey.

This change causes the targetFilePath to be used to determine the html
filee name. It works with CMake and qmake.

Amends: b1db3d2506

Fixes: QTCREATORBUG-26849
Change-Id: Ifaa8a279317d7fdb54ceea8198a374a317d9c2d7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-01-25 09:37:36 +00:00
Marco Bubke
b3e9f24ed1 QmlDesigner: Fix 32 bit
Because std::ptrdiff_t and int are the same under 32 bit the constructor
is changed to a template. The class is private so it is very unlikely
that it leads to errors.

Task-number: QTCREATORBUG-26910
Change-Id: I94c987b9b6d2f04876740ff283a339c0db056cfd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christophe Giboudeaux <christophe@krop.fr>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-25 09:22:00 +00:00
Eike Ziller
a0e7b41ec5 UpdateInfo: (Optionally) Inform user about new Qt versions
New Qt patch or minor releases are not considered "updates" by the
installer framework. The Qt packages are set up this way, to allow
installations of multiple patch versions of the same minor Qt versions.

Explicitly check if a newer Qt version than the latest installed one was
released since we last checked for updates, and inform the user with a
link to the Qt blog, and a button to start the package manager. We don't
show anything when checking for updates the very first time, since at
that point we must assume that the user installed the newest Qt version
they want.

Fixes: QTCREATORBUG-26708
Change-Id: I68374b3242b64d392a16de1abaac1292e0d534cf
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-01-25 08:48:59 +00:00
Jarek Kobus
5127d155d2 QtcProcess: Get rid of setProcessUserEventWhileRunning()
Introduce EventLoopMode enum and pass it to the
QtcProcess::runBlocking() instead. There is no need to
store this setting. By default this value is NoEventLoop.

Change-Id: Icad98b77bec5280b79039b7e5aa4ec408261521c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-25 08:44:11 +00:00
Jarek Kobus
8260074c67 Integrate ConsoleProcess into QtcProcess
Change-Id: I8e2b43ef27af6ff279b575a8d43f1ff918562951
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-25 08:36:09 +00:00
Alessandro Portale
14eb2ce0a5 Android: Make a couple of AndroidConfig's functions static
They do not access non-static members. This way, the functions can be
called (e.g. by auto tests) without having an AndroidConfig instance.

Change-Id: I2551bddc2f4745ee7486b490f1abf935204c7763
Reviewed-by: hjk <hjk@qt.io>
2022-01-25 07:06:28 +00:00
Thomas Hartmann
8d327c1cf7 QmlProject: Add option to always open ui.qml files in qds
This patch adds an option to always open ui.qml files in
Qt Design Studio. If that option is enabled an info bar is used
to propose the option.

Change-Id: Ia80ecd87de7fcf4c5824e7a8bb806c3d4d77b935
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-01-24 16:01:19 +00:00
Christian Kandeler
96083103d1 ProjectExplorer: Dissolve gcctoolchainfactories.h
The implementation of these functions being in a source file
corresponding to a different header made code navigation attempts super
annoying.

Change-Id: I10b33b31735021e92dd3775f4e88cbbe79cfde3d
Reviewed-by: hjk <hjk@qt.io>
2022-01-24 15:58:52 +00:00
Christian Kandeler
8a70f66c9c ProjectExplorer: Move GCC config widgets out of header file
They are only used in one source file.

Change-Id: I9a267be83156fb50c98da63fab165ef6123e7e59
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-24 15:58:30 +00:00
Christian Kandeler
35e908d835 Fix build
Change-Id: Ie23c6c8b131507e9ae2579ef361002654f55e282
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-24 15:58:01 +00:00
Christian Stenger
01d199ea82 Docker: Register only matching toolchains
Change-Id: I0d5b0f9686b4a8256167fc4f1b2b464885590e20
Reviewed-by: hjk <hjk@qt.io>
2022-01-24 15:09:28 +00:00
Christian Stenger
a08a7dda46 PE: Do not disable gcc detection on macOS completely
Otherwise we may miss the gcc toolchains on docker devices.
So, keep the detection disabled for desktop devices, but
allow to detect gcc in general.

Change-Id: If8feb33a7dd46451e6c16fc543b6799b7dcdd663
Reviewed-by: hjk <hjk@qt.io>
2022-01-24 15:09:19 +00:00
hjk
a48a96e05c QtSupport: Introduce a type alias for QList<BaseQtVersion *>
Change-Id: I96b0eccc04da2f4a1a4e5ea9bdceb91b3fa3d724
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-24 14:38:20 +00:00
Cristian Adam
761e1fb13f CMakePM: Add additional CMake parameters to the Kit's CMake config
This way one could pass --warn-uninitialized in the kit's configuration,
which will be transferred to the "Initial Configuration" and so on.

Fixes: QTCREATORBUG-26826
Task-number: QTCREATORBUG-26869
Change-Id: I6d9833a065ea790fc298a75b1120dfa360f885e8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-24 13:29:40 +00:00
Christian Stenger
22dd26bc76 Docker: Improve iterateWithFind
Handle critical file pattern after we got the results from find
to avoid finding to many false positives.
File patterns like "lldb-[1-9]*" end up using "lldb-?*" inside
find and will basically find anything starting with "lldb-"
which includes lots of additional lldb tools that cannot be
used as debugger at all and slows down the detection unnecessarily.

Change-Id: I0c816ae6b6e472b710ffede532c97c55a9d698fa
Reviewed-by: hjk <hjk@qt.io>
2022-01-24 13:10:45 +00:00
Christian Kandeler
cfae24a6e5 ClangCodeModel: Enable clangd's new "dirty headers" flag, if possible
This feature will be availabe with LLVM 14,
see https://reviews.llvm.org/D95046.

Task-number: QTCREATORBUG-26810
Change-Id: I0a6797a836c56f5b72cca34be8f2d3edf8ac7359
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-24 12:46:29 +00:00
Alessandro Portale
13af635b5e Android: Use native paths format when setting an environment
ANDROID_HOME, ANDROID_SDK_ROOT and JAVA_HOME should be set as native
paths in an environment to follow common practice.

Change-Id: I073d125c93e27a02cc2b909e8c641ea61b3e9f8e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-01-24 12:40:44 +00:00
hjk
25f5771aa4 Rename QtSupport::BaseQtVersion to QtVersion
... and the Utils::QtVersion enum to Utils::QtMajorVersion to avoid
conflicts.

Change-Id: Ib688c67388272b7204a91444155f60b8c18a56bd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-24 12:13:19 +00:00
Christian Kandeler
6cec0e2033 ProjectExplorer: Allow users to override the gcc target triple
... for the clang code model. Otherwise, it won't work with GCC
compilers for architectures clang does not know about.

Fixes: QTCREATORBUG-26913
Change-Id: I90115f2f562eae9922b90c500630ccf988542ca3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-01-24 12:10:56 +00:00
Leena Miettinen
2ac3704e76 Doc: Update links to video tutorials and talks
- Remove links to videos that describe using the Qt Quick Designer
  plugin that is disabled by default since Qt Creator 6.0 or Qt Design
  Studio.
- Replace links to old video tutorials with those to newer ones
  created by Qt support.
- Add the production year as a tag to help estimate the usefullness of
  the video.
- Remove link to the discontinued Qt for Automotive video.

Fixes: QTCREATORBUG-26868
Change-Id: I27f32f8b240747abca380d79119be9ce0862d4f9
Reviewed-by: Tero Pelkonen <tero.pelkonen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2022-01-24 12:03:07 +00:00
Thomas Hartmann
533b2d3655 QmlDesigner: Remove check for QtQuick3D 5.15
The check can create false positives if multiple projects are opened.
By now not many old projects should be around anymore and therefore
we can remove this.

Change-Id: Iec46e584a5e806bb29374d92b8f1afb1e6393c86
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-24 11:44:08 +00:00
Christian Kandeler
b85e2bc17b ProjectExplorer: Do not set GCC install dir during auto-detection
The accessor has lazy evaluation built in, so no need to set the value
prematurely.
This reduces the amount of calls to the gcc binary at initial start-up
by a third, which corresponds to ~500 ms on my machine.

Change-Id: I35fb290c5f3e7572a129e4fdb1e4c8b12e766ad1
Reviewed-by: hjk <hjk@qt.io>
2022-01-24 10:27:40 +00:00
Christian Kandeler
1ed92cf926 ProjectExplorer: Do not run Qt Creator's own clang on every start-up
Change-Id: Id3f783113f44b4296de41c22099b2086cd4a14c8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-01-24 10:02:27 +00:00