Commit Graph

74059 Commits

Author SHA1 Message Date
Eike Ziller
a760d5ad81 CMake: Make QML debugging state reflect build system state
After parsing the CMake response, we make the configuration variables
table reflect the actual configuration in the build directory. It is one
of our "promises" that we do not break an existing build configuration,
to avoid unexpected rebuilds.

This was not quite true for the "QML debugging and profiling" setting.
When that setting and the actual build directory disagreed, the user
would get a dialog asking for running CMake with additional parameters,
and when running CMake via the button in projects mode or the menu, it
would just change these configuration parameters, potentially leading to
an unexpected complete rebuild of the application.

So, after parsing check if the actual CMake configuration matches our
QML debugging setting, and if not, change the setting to "Leave at
Default", to ensure that we don't mess with the build.

Fix the "Run CMake" button state (in the "Current Configuration") when
changing the QML debugging option, which should become bold, if the
CMake parameters change.

Amends 2577ce8ba1 and fixes the drawback
mentioned there, i.e. setting the build directory of a "Debug" build
configuration to an existing build directory with QML debugging
disabled, will now simply set the QML debugging option to "Leave at
Default" instead of forcing it to "Enabled".

Change-Id: Ie6d4875d59319687d94e44e459ca76038e5813c0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-06-13 10:03:38 +00:00
Eike Ziller
948f0070fa macOS: Fix importing command line builds with CMake
When configuring a CMake project on the command line, CMake will
(correctly) find and use the compiler from the current developer
directory, usually somewhere in
/Applications/Xcode.app/Contents/Developer

But Qt Creator auto-detects and sets up the compiler /usr/bin/clang(++)
for desktop kits. This leads to a compiler mismatch between kits and the
imported build, and to new kits registered in Qt Creator for the import.

Since /usr/bin/clang(++) is just a thin wrapper that resolves to the
compiler in the current developer directory, resolve that in Qt Creator
with "xcrun -f <command>" too (caching the result), and include that
when comparing toolchains for importing builds.

Fixes: QTCREATORBUG-27591
Change-Id: I301e2a4e267450b488b49d0c32d4ce89001bb5ec
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-06-13 10:03:16 +00:00
David Schulz
4612a052f4 TextEditor: fix typo
Change-Id: Ibad6729f5281a1b7036af7483a82eae7e22649a5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-13 08:26:38 +00:00
Christian Kandeler
e128c8cbde CppEditor: Fix looking up containing function for search result
- Move look-up to CplusPlus::FindUsages, where we are guaranteed that
  we actually have the document source.
- Use the same straightforward algorithm as with clangd.
- Undo the changes to CppDocument::functionAt(), which broke
  the autotest.
Amends 6f7e7980d2.

Change-Id: I008d05ba41a3b63b71e3131d7021e0d4e7d0641f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-13 06:54:58 +00:00
Eike Ziller
737877984d Use QTEST_GUILESS_MAIN where applicable
instead of QTEST_MAIN. Reduces the initialization that is done by the Qt
test applications, and can also reduce interference with normal OS
operations like the current window loosing focus.

Change-Id: If88f289281aa1c8703ac7d4dbe0799d067c16588
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-06-13 06:06:44 +00:00
hjk
e2e5d67bc3 ProjectExplorer: Use FilePath in installRoot machinery
Helps to get path delimiters right.

Change-Id: Ifaab593a530c667488b7b5e6546041d8c212ece8
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-10 14:03:09 +00:00
hjk
eb886ad40b ProjectExplorer: Use CommandLine in MakeInstallCommand
Instead a FilePath/QStringList pair.

Change-Id: I55340795266699e448ec1e17681a5e788eaae37a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-10 14:02:50 +00:00
Eike Ziller
fc636755af Fix crash of tst_ImportCheck
We don't have a PluginManager instance when running the autotests.

Change-Id: Ib36ea2bb58e500a2ad4b601cedfb8d426fda7e4e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-10 13:21:28 +00:00
Christian Stenger
d06d6ebeba GitLab: Fix reflecting port data inside ui
Set values did not show up inside the ui. Likely a redo of
the options page would be more appropriate, but for now the
quick fix should be good as well.

Change-Id: Id782ba48ea4dee08b2c6720cdf9e78350f1e9a47
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-10 12:57:44 +00:00
David Schulz
99acc9a153 Python: Fix python detection for non project files
Do not return an empty file path if we cannot find a python venv for a
file path, but also consider the configured interpreters.

Change-Id: I5a7f06e394fb925f9a00143fc5f0797e8754534b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-10 12:47:29 +00:00
David Schulz
4c20a880e6 Python: remove python specific language client settings
Change-Id: Ic993d525f29c1925f7e64dfc6f5e053234fb4904
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-10 12:47:23 +00:00
David Schulz
ed22ef7854 Python: globalize Python language server settings
Change-Id: I84fcee6462064f0c788492fcfa12a77379af2bd7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-10 12:40:43 +00:00
Christian Stenger
e42ff3f14e GitLab: Allow localhost for server
Change-Id: I026f6a72c9eb0b377319fca847062885c666ed4a
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-10 12:27:56 +00:00
Christian Stenger
0cfd264279 GitLab: Handle certificate issues
Allow to bypass certificate verifications.
Currently the bypassing is not stored into the settings,
so this is not permanent.

Change-Id: Ieb564464a28cf2d4973c6b1baa696d6c22b07177
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-10 12:27:45 +00:00
Christian Stenger
fdb413c9a7 GitLab: Support unsecure http as well
Change-Id: Idfb4faf1cbfbfd6c2914b057e6c76461de0ceeff
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-10 12:27:30 +00:00
hjk
6674e5f267 Docker: Remove DockerBuildStep
That was part of the initial Proof of Concept and is not needed anymore,
the normal build steps can nowadays be remote.

Change-Id: Ic69ff89ebdcf8e6aef73d71954a48501c68c60ff
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-10 12:25:28 +00:00
Piotr Mućko
1c4abbf069 McuSupport: Auto manage memory of McuPackage's version detector
Use smart pointer for member of McuPackage.

Change-Id: I2474fc791b91c489be77aee3aab86401aaef76e8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-10 11:19:49 +00:00
hjk
8b6aeb9d16 Utils: Use case folding instead of toUpper for hashing file paths
Change-Id: I680db342b6b0b2433951064bb236ef7efadabf3f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-10 11:02:41 +00:00
Christian Stenger
6e57bedf69 QmlProjectManager: Fix compile
Amends 82911d2ec3.

Change-Id: I31bb8d88911837fca117ea76f8c474c555f9e59e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-10 10:06:38 +00:00
Eike Ziller
f1024bd5b1 EditorManager: Limit number of splits
To something large, but limit it. Having many editors open for the same
document can be a strain on slower machines.

Fixes: QTCREATORBUG-27568
Change-Id: I7074fc2c8eae1f4ccaa14a9a48b01afede454b0a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-10 09:33:55 +00:00
Christian Kandeler
9ee60ecd87 ClangCodeModel: Derive displayed search term from adjusted cursor
Otherwise, we can have discrepancies between displayed and actual search
term.

Change-Id: Iadd2ec54db4cef4b103c3c0ef98eb47828ea544b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-10 08:57:04 +00:00
Christian Kandeler
428a2c3c14 ClangCodeModel: Another cursor adjustment
Change-Id: Ie4859a52b12b3e87a65bd8c04e0123e6f34a9e73
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-10 08:56:44 +00:00
Christian Stenger
146c277837 AutoTest: Unify framework and tool naming
Use the same name for the test framework or tool across
Qt Creator.

Change-Id: I3116644ab03cc46c2e9d7e8aa3b8af8a5386dba4
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-10 08:47:12 +00:00
hjk
e3bb14d0d2 Docker/RemoteLinux Fix file size and permission retrieval
When a file path is a link, give the result of the dereferenced
link. This is what QFileInfo does locally.

Change-Id: I26ca1fb70d3391da77f2a5845e5f0a2c0fb73d53
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2022-06-10 08:18:06 +00:00
Tapani Mattila
82911d2ec3 QmlProjectManager: Add .qmlproject file generator
Task-number: QDS-6993
Change-Id: I033b0efeea87e8eab3238d3ce8d5f25752822e36
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-10 08:06:59 +00:00
Jarek Kobus
dec3fb7503 DeviceProcessesDialog: Fix a leak of DeviceProcessList
Fixes the following printout on Creator shutdown when
LinuxDeviceProcessList was used:

[launcher] "qtc.utils.launcher: \"Shutting down while process
/usr/bin/ssh is running\"\n"
SOFT ASSERT: "m_handles.isEmpty()" in file
/home/jarek/dev/creator-8/src/libs/utils/launchersocket.cpp, line 533
Destroying process launcher while 1 processes are still alive.
The following processes are still alive:
   "/usr/bin/ssh" QList("-M", "-N", "-o", "ControlPersist=no", "-o",
   "PermitLocalCommand=yes", "-o", "LocalCommand=echo", "-o",
   "StrictHostKeyChecking=no", "-o", "Port=22", "-o", "User=jarek",
   "-o", "IdentitiesOnly=yes", "-i", "/home/jarek/my_test_key/test_key",
   "-o", "BatchMode=yes", "-o", "ConnectTimeout=10", "-o",
   "ControlPath=/tmp/QtCreator-EACYSH/cs", "127.0.0.1") in thread 0x1d62b98

Change-Id: Ib64de5d4651b78fb313d7affa88f3f796953382e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-10 07:42:47 +00:00
Jarek Kobus
198aa551b2 MakeInstallStep: Fix error messages
Change-Id: Icc63b7765c421324ca6173f2d628653d361c3d85
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-06-09 15:28:01 +00:00
Jarek Kobus
97ec19a4f5 CheckForFreeDiskSpaceService: Fix error message
The message is shown e.g. when trying to run an app on remote
device when ssh service is not running.

Change-Id: I2db06cf8e999d55e7c822c14168185d07e0c3286
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-06-09 15:27:52 +00:00
Christian Stenger
a63d27dc52 Utils: Fix qbs build with Qt6 on Win
Change-Id: Ib42b0e1a70399430bc84f62ca32c6c05efced176
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-09 12:53:36 +00:00
Leena Miettinen
90fba1a184 Doc: Update Clang Format options
Some settings were changed.

Task-number: QTCREATORBUG-26948
Change-Id: I4f3453907351cd30b1e0170be626889f429b33c8
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-09 11:57:18 +00:00
Leena Miettinen
a0e0d51a35 Doc: Describe advanced editing options for selected lines
Move "Multi-Cursor Editing" to "Working in Edit Mode" from
"Refactoring".

Task-number: QTCREATORBUG-27560
Change-Id: I177fd0ca56a4e7f05e70f67247348c531b045d98
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-09 11:17:38 +00:00
Marcus Tillmanns
16c10cc913 DeviceShell: Don't use 'command' to test for base64
On (debian based) linux the "command -v base64" did fail to find
the base64 exectuable. Instead we now use "which".

Change-Id: I9b57527d93952b08bcb9abc7484a7e6891aa664c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-09 08:17:16 +00:00
Assam Boudjelthia
1cf9d06675 Android: update NDK version for latest Qt version (Qt 6.4)
Since Qt 6.4 is built with NDK r23b, use that by default for
user apps as well. This is also needed to account for QTBUG-102972.

Task-number: QTBUG-102972
Change-Id: Id8485e0477b5e36c4d895582f5700c1f16b5a0c5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-08 21:07:43 +00:00
Christian Stenger
d291008322 GitLab: Display link to global settings in project settings
Change-Id: I18208c44f9538c31fae4df61f2e0d93c1efcc319
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-08 12:39:33 +00:00
Orgad Shaneh
dd7dd3462a Utils: Fix MSVC warning
incompatibility between int and quint64

Change-Id: If85eb13e4c6ff68a9b02dc036a971f03bab73d1b
Reviewed-by: hjk <hjk@qt.io>
2022-06-08 12:19:11 +00:00
Jarek Kobus
de6fd1b1b1 QtcProcess: Refactor killTimer
Before we were installing the timer inside the process
interface handler. The issue was that when the handler was
moved into another thread, the timer was restarted (that's
what happens with all timers when they are moved into another
thread).

The fix is to keep the timer inside the caller thread and
detect inside waitForSignal() whether a timer was started.
In case the remaining time for kill timer is less than
a timeout for waitForSignal, we split the waiting into two
parts and execute kill() in meantime.

Change-Id: I2c18805593fe2f73d816cce40dbb45bf58a50715
Reviewed-by: hjk <hjk@qt.io>
2022-06-08 12:13:13 +00:00
Jarek Kobus
224f580924 Move SignalType into processinterface.h
Rename it into ProcessSignalType. It's going to be
used in new interface.

Change-Id: Ifbab8bbb601f14ecbf65d940e524c558d5f1d7a1
Reviewed-by: hjk <hjk@qt.io>
2022-06-08 12:03:29 +00:00
Jarek Kobus
cf47ad361d QtcProcess: Get rid of NoSignal synthetic value
Refactor flushing methods.

Change-Id: I1b98de58e8ddacfa5ff7e1627c5011c0bd207a8b
Reviewed-by: hjk <hjk@qt.io>
2022-06-08 12:03:22 +00:00
Artem Sokolovskii
674f62d481 ProjectExplorer: Add possibility to keep link visible
Added possibility to keep link to global settings visible when
checkbox is invisible.

Change-Id: I724f1c1997b640b2277c4004acd24d5f6cca9faa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-08 11:43:20 +00:00
Jarek Kobus
493573b879 QtcProcess: Make reaper timeout customizable
Add a setter and getter for reaper timeout. This makes it
possible to customize the timeout for the reaper after which it
should call kill() when previous terminate() was unsuccessful.

This setting is also used for QtcProcess::stop().

Change-Id: I653a3ad107ae4173bb8254c85cfc07886bf6a9c6
Reviewed-by: hjk <hjk@qt.io>
2022-06-08 11:21:42 +00:00
hjk
b6db9d8152 Gitlab: Some layout code cosmetics
Take advantage of the aspects' setLabelText.

Change-Id: I00060a02393fb90557f0f4dd01411fd3928c4c19
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-08 10:43:15 +00:00
hjk
6aa94e1e17 Qmake: Show more error if qmake runs but without output
At the same time, use the more descriptive FilePath::displayName()
instead toUserOutput().

Change-Id: I9bcca84b1f0be025c511b6fbf58c7308c9ffd60f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-08 10:42:39 +00:00
hjk
08952180a1 Boot2Qt: Fix creation of full command line
Task-number: QTCREATORBUG-27673
Change-Id: Idd1bf676ef7ec0821da938274b03d7529100b2e8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-08 10:42:15 +00:00
Evgeny Shtanov
3b373eecd4 reformatCharacter: int to QChar conversion segfault
Debugger, watchhandler: incorrect type conversion:
Converting from `int` to `unsigned int` can lead to a situation where
the result is too large to be represented as a `QChar`.

Task-number: QTCREATORBUG-27107
Change-Id: I7873635f7a1ef29f62339ffe23b4dd84cb089e2b
Reviewed-by: hjk <hjk@qt.io>
2022-06-08 09:56:12 +00:00
Christian Kandeler
49bb40f19e ClangCodeModel: Move "follow symbol" into its own class
Change-Id: Ic64c7275debaa59c524f349fd38460f47f826ecd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-08 09:48:17 +00:00
Jarek Kobus
457fe4eb87 DiffEditor: Drop Utils:: prefix when using namespace Utils
Change-Id: I640447bcd90bba4281b2b945f53c54040060d3bc
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-06-08 09:16:42 +00:00
Eike Ziller
9ab0510eaf Aspects: Update of combo box when changing TriState value
Call SelectionAspect::setValue instead of skipping it and calling
BaseAspect::setValue directly. That takes care of updating the combo box
state.

Amends c8829ff5b3

Change-Id: I55e90459c2b54da09883f746b61b19d46acfdf92
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>
Reviewed-by: hjk <hjk@qt.io>
2022-06-08 07:52:22 +00:00
Tapani Mattila
0b404c9c7a QmlProjectManager: Load QDS landing page content when it is needed
Task-number: QTCREATORBUG-27583
Change-Id: Ib329816f7282b0c6f88d78d62a0c9f34c961e509
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-08 07:43:52 +00:00
Eike Ziller
1445e4180f TextEditor: Fix action text
It adds the next match to the selection (as a multi-cursor selection),
not the selection to the next match.

Change-Id: I7520cb3b765562fac2dd45fce5d3b0e4ee7c22c7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-06-08 07:41:35 +00:00
Xavier BESSON
bcf43e56b4 Label error for line length setting in QML editor
Change-Id: I637ef8b5aebfb05ebe9c132b3c6a60f170337c57
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-08 07:31:13 +00:00