Commit Graph

62421 Commits

Author SHA1 Message Date
Samuel Ghinet
2c8c7707c5 Enable disabled test in QDS's wizard factories
The test was disabled because it required a method to be virtual, in
order to be mocked; and where it was integrated in (branch 6.0), it was
a patch release, and we couldn't break binary compatibility.

Task-number: QDS-5691
Change-Id: If8d3101be7b92942b32ffff1d88ab0823f26e08b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-19 09:52:39 +00:00
Eike Ziller
8acd2b15a9 Disable QmlDesigner plugin for Qt 5 based builds
Design Studio is Qt 6 based only, and since QmlDesigner development is
mostly done for that and by that team, don't restrict it to stay
compatible.

Change-Id: I9252a2a34f7395d9dc6800f59a37fc23d9f30052
Reviewed-by: hjk <hjk@qt.io>
2022-01-19 09:48:27 +00:00
Thomas Hartmann
478fa56021 StudioWelcome: Add setting for splash screen timeout
Change-Id: I9e9a1b1a190a2cf04ffae5d3ac943621e5b3f9f7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-18 22:58:15 +00:00
Thomas Hartmann
81dd1ba294 StudioWelcome: Show text for correct version
Task-number: QDS-5725
Change-Id: I040d9f1f0817fc719da060dd31ee6a04981199e3
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-18 22:57:47 +00:00
Jarek Kobus
d6f56254d1 Get rid of QtcProcess::workingDirectory() overload
Adapt all callers' code so that it passes the FilePath
instead of QString. As a consequence introduce
TemporaryDirectory::masterDirectoryFilePath() and use
it where easily possible.

Change-Id: I14564949b3b916921e32a2957c84c03d1da43af2
Reviewed-by: hjk <hjk@qt.io>
2022-01-18 17:18:34 +00:00
Eike Ziller
2499b88966 macOS: Use "open -R" for showing files in Finder
Instead of using AppleScript. Available since at least macOS 10.13.

Change-Id: I088efc211189aab75480b3ea02f90cc235724bef
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-18 15:03:09 +00:00
Christian Kandeler
57666c2a49 ProjectExplorer: Fix spurious GCC execution on start-up
The mingw and gcc factories share some file name candidates.
Make sure we don't test a known gcc executable again for mingw (and vice
versa).

Change-Id: Iddbf1a0c435f6515ff07fca695cb55211faab28e
Reviewed-by: hjk <hjk@qt.io>
2022-01-18 14:50:14 +00:00
Jarek Kobus
31807ab917 ConsoleProcess: limit code repetition
Change-Id: I3b07e61105b3c2a37658df438ef39bb65968aeea
Reviewed-by: hjk <hjk@qt.io>
2022-01-18 14:33:36 +00:00
David Schulz
7f4342b687 Python: add python specific language client settings
Change-Id: I1b9a194f32f3f13381954539229b02e03e3af058
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-18 13:21:53 +00:00
hjk
f9c97d23c7 Utils: Add optional recursion for file system iteration
Change-Id: Icded897b129aebd7132376cff55717e16dffc040
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-18 11:52:29 +00:00
hjk
5cfe69b049 ProjectExplorer: Use a struct for toolchain autodetection parameters
Also, make some functions const and use an alias for QList<ToolChain *>.

Change-Id: I6a1cbcb79bfaa9d252c4b69e00aa93e5d0dabe2f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-18 11:25:34 +00:00
Tapani Mattila
c57573708a Move qrc, rcc and CMakeLists.txt generating menu option to file menu
Task-number: QDS-5903
Change-Id: I42cba21eaecaf5580c40dab8ce32bbf12c37f13f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-18 10:32:25 +00:00
Eike Ziller
3749cfc896 InfoBar: Make adding more buttons possible
Change-Id: Ic0c946cf3f87fe46cd06391f38e0bc71374ad340
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-01-18 09:33:20 +00:00
Eike Ziller
f884ff2160 Revert "Avoid starting threads from the wrong hosting thread"
This reverts commit 1421694d17.

The commit broke e.g. Utils::mapReduce(....).results() in the main
thread. Since the main thread blocks, it cannot start a new thread.

Change-Id: I63abd07bcf002546740d0a7627f1fd2007c8b70c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-01-18 09:06:50 +00:00
David Schulz
49ac087955 Python: move language client functionality out of utils
There will be more lsp specific functionality so moving it into its own
space is reasonable.

Change-Id: Ic87d437182d68673b53f662c804707138fef5b6c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-18 08:14:57 +00:00
Jarek Kobus
1ba6faeea0 Disable showing/hiding magnifier by pressing Alt modifier
The Alt modifier doesn't work well with mouse wheel
as it causes the horizontal wheel to be triggered.
Disable the Alt modifier as a shortcut for activating
the Magnifier. When Magnifier is shown by activating
the toolbar action, the magnification works by simple
mouse wheel without any modifier.

Fixes: QTCREATORBUG-25612
Change-Id: Idb7c40dbf92ed135a796c9623cc46b6b1e80e9e6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-01-18 08:12:07 +00:00
David Schulz
8f98ac4120 LanguageClient: remove obsolete "New" in add menu
nobody wants to add an old server...

Change-Id: I06d1d6eba7340181fad876753f888393dab3187f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-18 06:03:13 +00:00
David Schulz
62c36f516b TextEditor: Fix skipping short lines
Fixes: QTCREATORBUG-26878
Change-Id: I2d801e3c7e91bad928b203bbca32fdc7b1cdca6e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-18 05:45:43 +00:00
Eike Ziller
6914deb0da Merge remote-tracking branch 'origin/6.0'
Change-Id: Ie8406c1854738cabcc85ef6ddaee7559d5227bec
2022-01-17 16:52:31 +01:00
Cristian Adam
a0836a29c7 CMakePM: Refactor "Initial Parameters" as a tab bar item
Now we have "Initial Configuration" and "Current Configuration"
as tab bar buttons.

This way the UI can be shared between the two configuration states.

Task-number: QTCREATORBUG-26869
Change-Id: I8206032a2a5ac076629865057816edb99706f2ff
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-17 15:23:19 +00:00
Thomas Hartmann
a87a500c77 QmlDesigner: Remove Goto implementation from Design Studio
Task-number: QDS-5951
Change-Id: I5503f27508ec0e0f76506083baad3969730c651d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-17 15:13:02 +00:00
Thomas Hartmann
dab8caf6d9 StudioWelcome: Enable integrating download progress
Change-Id: Iad18c1a0bc49f87a98dcdff46542cf4c373de875
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-17 15:09:43 +00:00
Mahmoud Badri
e4bf7ce3a1 QmlDesigner: Remove docking widgets top right controls
Fixes: QDS-5983
Change-Id: I3d7b7c33816de69351134c3ad3e4b65d89f6c0cf
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-01-17 13:26:10 +00:00
David Schulz
22f4e9497d CMake: Fix build dir scan filter
Fixes: QTCREATORBUG-26846
Change-Id: I54f0249410cf0dd5cc6703767cea187a2d843868
Reviewed-by: hjk <hjk@qt.io>
2022-01-17 12:25:52 +00:00
The Qt Project
6ece15f587 Merge "Merge remote-tracking branch 'origin/6.0'" 2022-01-17 12:19:29 +00:00
Christian Stenger
9be03a826d PE: Fix compile
Amends c1c147a9dc.

Change-Id: I2f4e6e724f3226541c5de683d0ac6403538622be
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-01-17 11:36:28 +00:00
Cristian Adam
5effbc836f CMakePM: Do not sort kit CMake parameters
As a user when I add CMake parameters in the Kit's CMake section
I expect the order of parameters not to change.

If I add something at the end, I expect to find the value at
the end.

Change-Id: I4f0e2d9b845dddb7c9d6b012945ab61b0135267c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-17 11:29:16 +00:00
David Schulz
fa53849b4a Editor: prevent using function hint widget while it is deleted
Task-number: QTCREATORBUG-26872
Change-Id: I634b488073670476ee3d5b53296e77b6779e5715
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-01-17 10:45:17 +00:00
Jarek Kobus
e1f45507c5 LanguageClient: fix possible crash on shutdown
Iterate on a copy of managerInstance->m_clients
when calling shutdownClient() or deleteClient(),
since both methods may potentially modify m_clients
list and thus invalidate outer iterators.

Surprisingly, this patch also fixes the leak
of RunControl and RunWorker instances on shutdown.

Task-number: QTCREATORBUG-25709
Fixes: QTCREATORBUG-26847
Change-Id: Ib34d913a6ae0b235631d3d619bddaf4e08b4aec2
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-01-17 10:31:59 +00:00
Thomas Hartmann
f9c21253c0 QmlDesigner: Use wildcard for all files and split image formats
Having a large filter makes the dialog unresponsive, so all files
filter is changed to *.* and image formats are split according to
mime type.
For unsuported suffixes we show an error message.

Task-number: QDS-5921
Change-Id: Ia2dc912c7e7004da97da48753562173ed163436f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-17 10:28:14 +00:00
David Schulz
c926db336b LanguageClient: always delay document highlight request
The request for highlights of the symbol under the cursor takes a
considerable amount of time on some servers (at least python). Postpone
those requests a bit so that more important requests can be handled
before.

Change-Id: I35776076a4ee9c0c9b7646e960d3d965506154d3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-17 10:23:03 +00:00
Eike Ziller
491e5c4176 Merge remote-tracking branch 'origin/6.0'
Change-Id: Ic1790446cb453e3d8a24467a31e3c8df33bc68bb
2022-01-17 11:22:11 +01:00
Christian Stenger
64b6aca212 Core: improve logger performance
Messages can be rather huge. Limit the length to avoid costly
background painting of what is not visible at all.
Full message can still be seen in tool tips or when copying
or saving the logs.

Also postpone scrolling to bottom of the view since it triggers
layouting the text.

Change-Id: I13bf136a32f0f51f636c89cea85a5be23cd4fe9a
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-17 10:15:32 +00:00
Jarek Kobus
479c393009 Fix closing remote linux applications
When the remote application was run in terminal it
was still marked as running in application output pane
after it has finished (the red square button was enabled).
This patch fixes it.

Stop the terminate timeout when stop was executed by user
(application output -> Stop running program) after
successful termination (so that instead of:
"Timeout waiting for remote process to finish."
we see now: "The process was ended forcefully.").

Fixes: QTCREATORBUG-26848
Change-Id: I2dfeccc60fb12388cb9dcfd56bd2aa2c5383209b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-17 10:06:24 +00:00
Samuel Ghinet
c1c147a9dc QDS-5691 Create a tab for Recent choices
The Recents should store presets, rather than normal project items,
while the rest of tabs are to store normal project (i.e. wizard) items
but with the default screen size written under the wizard name.

In this patch I also did a few renames: e.g. the Presets view now uses a
PresetModel rather than ProjectModel, because we now store presets. A
Preset is a higher level concept than Project / Wizard item: it can be a
project/wizard item with pre-defined configurations; and now we can have
multiple presets using the same Wizard factory. Renamed struct
ProjectCategory to WizardCategory, because the items are grouped by the
category of the wizard (i.e. the "category" property of IWizardFactory)

I extracted a class, PresetData, to hold the data that is being shared
by the PresetModel (items in the view) and the PresetCategoryModel
(header/tab items). It stored both information on normal presets and on
recent presets.

Made changes to JsonWizardFactory so that I could extract the list of
screen sizes without requiring to build a wizard object first. This is
important, because multiple JsonWizard objects cannot be created at the
same time and I need to show the screen sizes of multiple presets /
wizards as the Presets view is opened. This also required class
WizardFactories to use JsonWizardFactory instead of Core::IWizardFactory
-- since "screen sizes" are a particularity of the json wizards, not of
all kinds of wizards.

Also, fixed a TODO in WizardHandler::reset() method.

Also, added a few utilities I had need of, in algorithm.h.

Change-Id: Ifd986e2def19b2e112f0aa1ab3db63d522736321
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-17 08:59:09 +00:00
Christian Stenger
5eafa345ed Core: Add LoggingView support
Add a way to inspect QC internal loggings. This is basically
useful for inspecting issues while running QC and facing them
without the need to restart and set appropriate logging rules.

Change-Id: Ic647ba1abfb2611c4e4e99a375413d399c71886d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-01-17 06:08:58 +00:00
Alessandro Portale
9c7b1d39d3 Android: Fix compatibility check in AndroidDevice::canSupportAbis
A typo prevented to check whether a non-armeabi device supports running
armeabi applications.

Change-Id: Ibfdf76f69c1bdf5f4dc1ba73147328a8f7f6ae3f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-01-15 12:08:18 +00:00
Thomas Hartmann
fc605c8c6f StudioWelcome: Slight adjustements to Splash Screen
Anchoring the text to the checkbox and use
configure instead of enable/disable, because there already is
the checkbox.

Change-Id: Ied6f231cec54d1fbf924b34bf0a8850cefc8bffb
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Jarko Vihriala <jarko.vihriala@qt.io>
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
2022-01-14 14:23:04 +00:00
David Schulz
9fea2af1e9 LanguageClient: keep semantic tokens after receiving error
A usual error we receive for semantic request is that the request got
canceled. This can be due to external changes. But a server might still
be able to calculate a diff against a previous token set. So just keep
the previously reported tokens and rerequest a new highlight. If the
server is not able to calculate a diff it also might send a full
token set as a result for the delta request according to the protocol.

Fixes: QTCREATORBUG-26624
Change-Id: Ia91e599706519dbbf4cd22050484e4f36cecdab8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-14 13:57:08 +00:00
David Schulz
b01be64963 Editor: fix crash in function hint widget
Fixes: QTCREATORBUG-26872
Change-Id: I0c79af2a74af96bfba350b62b5072b874e6efcd2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-14 13:56:40 +00:00
David Schulz
dc4b9e48dc Clangd: clean up text marks after deleting client
This is a blindshot and more a workaround than a fix.
Assert and try to cleanup dangling text marks after a client got
deleted. In theory those marks should get deleted by the
DiagnosticManager but somehow, they are still alive and happy after the
client was deleted.

Task-number: QTCREATORBUG-26585
Change-Id: I9d5d708db3fbbe30a09d322400d97184fe40a518
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-14 13:19:35 +00:00
hjk
1abe76549e Debugger: Add support for two more floating point display formats
1. The `std::hexfloat` representation produced by `std::sstream`.
2. Breaking the number into a normalized value and a integral power of 2,
   as does the `std::frexp()` function.

M_PI looks like "0x1.921fb54442d18p+1" and "0.785398163397 * 2^2"
respectively.

Fixes: QTCREATORBUG-26793
Change-Id: Ib08ea9408f79201434eb75ec328b94ab933259a4
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-14 12:45:42 +00:00
Alessandro Portale
03d4fdc602 ProjectExplorer: Remove Icon from main panel
Only a few panels come with an icon, and then the icon is unthemed and
only for standard dpi (original design file is unavailable).

The gained space benefits the vertical output pane on the right.

Fixes: QTCREATORBUG-21917
Change-Id: Ie717ee7a08cbd21292a8e051c41406df58cad6d6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-01-14 12:44:29 +00:00
Thomas Hartmann
17deadf5c3 StudioWelcome: Show combobox for crash reporter
This highlights to the user if the crash reporter is enabled.
The patch also includes some adjustments for the design.

Change-Id: I1a0be0d2b98df937dbeeb6bf8063f1aaa78793f5
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-01-14 12:29:48 +00:00
Alessandro Portale
196aee97b1 Welcome: Unify design with Qt Design Studio
This applies the design of the new Welcome Screen for the Qt Design
Studio to the Welcome Screen of Qt Creator.

Change-Id: Id63283da1db43ac1036d371694cc2ea4a6de8d8c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-14 12:12:21 +00:00
The Qt Project
03e4548d24 Merge "Merge remote-tracking branch 'origin/6.0'" 2022-01-14 11:47:06 +00:00
Miikka Heikkinen
97a6d37ef3 QmlDesigner: Support moving 3D edit camera with arrow keys
3D edit camera can now be moved up/down/left/right with arrow keys.

Task-number: QDS-5790
Change-Id: I3b4a095b96bdaa9d00bf6b29b750af1f783b485e
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-01-14 09:40:16 +00:00
Eike Ziller
7a94cca007 Merge remote-tracking branch 'origin/6.0'
Change-Id: Ia208fc746333e3d36868c580aa7794da9627c3e0
2022-01-14 10:24:10 +01:00
Jarek Kobus
7c91900cfb LinuxDevice: Run test echo command after successful start
After we have started the shell it can happen that
it will finish silently soon due to e.g. ssh server not running.
Before we try to execute any command in the shell we
schedule a test echo command just after successful start
in order to confirm that the shell is running fine.
If waiting for ready read returned false (i.e. the shell
process finished) or if we don't receive the expected
newline character we report a start failure.

Fixes: QTCREATORBUG-26861
Change-Id: I7387b3a366f8e6f4a58745582bb803f5060cfc36
Reviewed-by: hjk <hjk@qt.io>
2022-01-13 14:08:59 +00:00
Jarek Kobus
e7d125ffec ProcessLauncher: stop awaiting for ready read when finished
In case the user called waitForReadyRead() and we have
received the finished signal instead (without receiving
readyRead signals in meantime), we should interrupt
the wait and return false, since there is no point to
wait for future readyRead signals from not running process.

Change-Id: Ib4a770aea6ed562a5bef197eaa51b20c146842f0
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-13 14:08:55 +00:00