Commit Graph

76181 Commits

Author SHA1 Message Date
Marc Mutz 8eb4d52342 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.

Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 13:47:53 +00:00
hjk 90de29d530 RemoteLinux: Re-enable categorized logging for shell access
Task-number: QTCREATORBUG-28242
Change-Id: Iea56465576ade76b92948766c94e458d45e81191
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-07 13:33:52 +00:00
hjk e0d81084a9 Utils: Fix find logic
We are more interested in the files than the error message.

Task-number: QTCREATORBUG-28242
Change-Id: Ifc5724764797d2488c7fa231ff5b1cf2292418ed
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-07 13:25:33 +00:00
Leena Miettinen b1af1502a0 Doc: Describe following symbol under cursor for QRC files
Task-number: QTCREATORBUG-27876
Change-Id: If4fa6235fe450617753e5f4a753ca491a92a0613
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-07 13:13:28 +00:00
Christian Stenger fe63b5a897 Squish: Fix wizard file generator
Remove former dummy entry that is no more needed.
Handle the git integration correctly and provide a
.gitignore as other project wizards do.

Change-Id: I33372293990d3b5d7927acee01a2bb77e12e4b2e
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-07 12:45:43 +00:00
Christian Stenger 435c5848c5 PE: Fix wording on summary page
..if there is only one file to create.

Change-Id: I0bfc84a3fbac2debe7f3491d3b1ae8f4d48b2303
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-10-07 12:02:00 +00:00
hjk cb5815c619 RemoteLinux: Use common FileUtils::iterateUnixDirector function
This now uses 'find' when available.

Change-Id: I5ebf05a808f69559c25cd33eb6d36ab931fb076f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-07 11:40:33 +00:00
Christian Kandeler eb59027920 ClangCodeModel: Save some disk space and unneeded allocations
... when writing out compile_commands.json files.

Change-Id: I8b2298eee87609a90ebb4dbd58b38bd6f36c5a7b
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 11:34:10 +00:00
Jarek Kobus d659ace47f VersionSelector: Avoid potential leaks on early return
Finish setting GUI before early return from c'tor.
Fixes the warnings: Potential leak of memory pointed to by
'buttonBox', etc...

Amends 7e93ab9a27

Change-Id: Ibdf0e2f97eda3494008cedb21d2cdbe2d5b38006
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 11:22:46 +00:00
hjk 714e6f5c8f Utils: Make more unix find code re-usable
Change-Id: I8fe95158ed77c8f9fb8c86a8e813b5c5de425b8a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-07 11:08:52 +00:00
hjk a234443bee Docker: Use new FileFilter::asFindArguments function
Change-Id: I7a4e02740f27cdb72d3a876985b0941ffedc1ff2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-07 10:58:58 +00:00
Alessandro Portale 5c65115271 Android: Convert to using Tr::tr
Change-Id: Ie9110093101b0f49808b4da7b13ac3f47c3bb994
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 10:24:32 +00:00
Jarek Kobus 8741ce6afc QMakeProjectManager: Replace foreach with ranged for loop
Change-Id: Ibdb526ac3e0cfbb0568e17c21a1b73f7749a84ed
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-07 10:11:36 +00:00
hjk 0d13cfe652 CMake: Remove the restriction that the reply file cannot be remote
It would be remote on "real remote" builds.

Task-number: QTCREATORBUG-28242
Change-Id: Ic37e5c6ec30064aec825d2322d25843a526b6ac4
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-10-07 09:49:06 +00:00
Eike Ziller c72a9197a4 build.py: Add option to call cpack
Adds --with-cpack option.

- macOS: does nothing (we already create a better, signed disk image)
- Linux: creates qtcreator.deb in build directory
- Windows: Checks for NSIS and WIX installation,
  creates qtcreator.exe and qtcreator.msi as appropriate

Change-Id: Ie7816d04cb2e01e90795481e1519b0a6645f5cd3
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-10-07 09:15:33 +00:00
Robert Löhning fcb79ee810 Git: VcsBase: Squish: Make tst_git_local run again
Amends 1548eef10b
Amends 69f4cb86dd
Amends 9ad5c4254d
Amends e070d826e5

Change-Id: I584b1b9b662144899d0292b887e8cb3386f80d4b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-07 08:33:12 +00:00
Christian Stenger 88839fa262 Squish: Proliferate FilePath
Change-Id: I27049d4bef26ac8c88c7d0dc760febac994bc19b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-07 08:33:09 +00:00
David Schulz 8dcb22d5e9 Editor: fix go to line start
Do not try to find the first none space character of a block if we
already handled the home key for a line that does not contain the start
of the block.

Fixes: QTCREATORBUG-28198
Change-Id: Ia2966baeae8f068cd21d716e097782ae3b5a1d86
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-07 08:05:52 +00:00
Jarek Kobus 0b04a83ce3 ResourceEditor: Replace foreach with ranged for loop
Change-Id: I49f59b6cb42b331613092b0aac82dd9bc4197cfe
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 08:00:45 +00:00
Jarek Kobus e1cc52bb80 QbsProjectManager: Replace foreach with ranged for loop
Change-Id: I7d11424d5ef6ffa62671eff597845b8b5c39f443
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-07 08:00:31 +00:00
Jarek Kobus 43bc23557f ResourceFile: Don't derive from QList
Add a static helper instead.

Change-Id: Id9711355e3dacacd2764249080b608dbbe124565
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 07:44:24 +00:00
Jarek Kobus 9feeb81847 Various plugins: Replace foreach with ranged for loop
Change-Id: If212c5e277de671b3ddd67d26ad1bdbc69213174
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-07 07:42:34 +00:00
Jarek Kobus bc4c1faf73 Fix logical XOR
The '^' is the bitwise XOR, we should use logical XOR in
these contexts. The operator!=() should serve for it.

More info and reasoning:
https://stackoverflow.com/questions/24542

Change-Id: I1bd70bdcab25455f409594f0f14c209d1de11d18
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-07 07:42:22 +00:00
Jarek Kobus 0c39484b60 Todo plugin: Replace foreach with ranged for loop
Change-Id: Iff18b1dbc556fe48df6ba086774662e8b9231491
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-07 07:42:09 +00:00
Eike Ziller 5bc5274a5b Take "Toggle Progress Details" immediately into effect
When the progress details are visible, and the user clicks the button,
the details should immediately vanish. Before this patch, the progress
details stay visible until the user moves the mouse away from the
button, so clicking the button doesn't have an immediate effect, which
is pretty confusing.

Task-number: QTCREATORBUG-28078
Change-Id: Ia80ab48fc0a012e8ae17dea454f83747e5717e72
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-10-07 07:40:16 +00:00
Cristian Adam 807dd17f75 Utils: Fix compilation on Windows Arm64
Amends 6b6358178e

Change-Id: Ia94afaa833c4cfebb1b6792ccff289cdf76d1529
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-07 06:05:00 +00:00
Christian Kandeler 708b119473 Git: Fix include directive
Change-Id: I35aff37fff00f020044c84ef288234146ebd5ade
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-10-07 04:29:29 +00:00
Cristian Adam d267db91ea Android: Fix compilation with clang-cl and Qt 6.4.0
Fixes the following error:

  C:\Projects\QtCreator\repo\src\plugins\android\androidrunnerworker.cpp(74,54): error: call to member function 'remove' is ambiguous
      const QStringList parts = tuple.simplified().remove('\0').split(':');
                                    ~~~~~~~~~~~~~~~~~~~^~~~~~
  C:\Qt\6.4.0\clang-cl_arm64\include\QtCore/qstring.h(704,14): note: candidate function
      QString &remove(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive);
             ^
  C:\Qt\6.4.0\clang-cl_arm64\include\QtCore/qstring.h(705,14): note: candidate function
      QString &remove(QLatin1StringView s, Qt::CaseSensitivity cs = Qt::CaseSensitive);

Amends 2846bef563

Change-Id: I03bf54e5a6c8d2cbc0c2842399c84bf12ffece56
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-06 18:44:40 +00:00
hjk 0ba06e1b18 ProjectExplorer: Use more generous first approximation for isReachable()
There's a correlation between files that a device wishes to handle
and files it considers reachable.

Change-Id: I485ce59c09d9155d5d4db41ddc52f675d6c5d225
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2022-10-06 16:30:38 +00:00
hjk 7a1696a0ac Utils: Add a convienience function FileFilter::asFindArguments
Re-usable in a variety of unix-based devices.

Change-Id: I480ad9b128336059752b99dc1f1ae3b4899a4077
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-06 16:00:15 +00:00
Jarek Kobus b2ee86ba03 QtcProcess: Small cleanup
Change-Id: Ib3c913185b01ad3f81e883bd3013ccb95a863485
Reviewed-by: hjk <hjk@qt.io>
2022-10-06 15:39:03 +00:00
Jarek Kobus fa63c68fd9 QtcProcess: Remove virtual leftover
Change-Id: Ib4fa1a115353bf35b0ac310ea9ce4f775d2d1b0c
Reviewed-by: hjk <hjk@qt.io>
2022-10-06 15:38:57 +00:00
Jarek Kobus 512edfc60d QtcProcess: Consolidate the log debug code
Reuse starting() signal for doing initial debug printout.
Keep dynamic properties in QtcProcessPrivate only, so
no need for passing it.

Change-Id: I170ea96c37e1b9904037851799316de629bfb86e
Reviewed-by: hjk <hjk@qt.io>
2022-10-06 15:38:52 +00:00
Jarek Kobus 239788c121 QtcProcess: Simplify emitting guarded signals
Avoid code repetition.

Change-Id: I259cb3e9396c0c84dbc63e7929f949580070c382
Reviewed-by: hjk <hjk@qt.io>
2022-10-06 15:12:40 +00:00
hjk 0e3d1064e6 CMake: avoid running into some code path that breaks later
When trying to configure a CMake project on a remote linux device,
there's currently PATH=/some/local/dir/for/ninja added on the ssh
command line, which won't work with the remote cmake.

Change-Id: I97adb58e4c8b33f74edcc37a7b2cfb00c764b829
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-10-06 14:59:10 +00:00
hjk 47e5997e57 Mercurial: Convert to Tr::tr
Change-Id: I2a6ecd17091ffa0100f982848afbf941c6997db7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-10-06 14:28:09 +00:00
Jarek Kobus db5e3555ac QtcProcess: Add starting() signal
Will be useful for VcsCommand controlling.

Change-Id: I6e0199c7a45948526cfd916907b098472b78219c
Reviewed-by: hjk <hjk@qt.io>
2022-10-06 13:39:46 +00:00
Jarek Kobus 363731a8c8 RunFlags: Add ProgressiveOutput flag
It replaces VcsCommand::setProgressiveOutput() property.

Change-Id: Icebd2205a5b489f60ded1eeee21e2deacbfde1fe
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-10-06 13:35:48 +00:00
Jarek Kobus 98c4e342f8 RunFlags: Group flags into QtcProcess related
Some flags directly relate to QtcProcess setup.
Group them together. Reorder other flags to keep
related next to each other. Modify some descriptions.

Change-Id: I8694fb5ca0edd7e770a084d7d1d890d48a13a347
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-10-06 13:35:41 +00:00
hjk fc72461b3d Meson: Inline toolssettingswidget.ui
Change-Id: Iaacc703195fe66200fe64a95f704ba90b7e66504
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-10-06 13:33:05 +00:00
Alessandro Portale 928a7d2087 Git: Convert to Tr::tr
Change-Id: I7fb1753109a9263c70c01713f5f4895db6b73662
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-10-06 12:32:58 +00:00
Jarek Kobus b8efc2f14d VcsBase: Use FilePath in editorTag()
Change-Id: I4093fa46a51767afd00a8de2f94986c708dc1efa
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-10-06 12:06:03 +00:00
Jarek Kobus 9d4017400e Cvs: Reuse CommandResult
Get rid of CvsResponse.

Change-Id: I4f1bf6dfad56f730140a0841769b7246a22aa757
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-06 12:01:08 +00:00
Jarek Kobus 520e7b3b69 Svn: Reuse CommandResult
Get rid of SubversionResponse.

Change-Id: I171c421d1128b3f98ecfc446a16a9793d90c1be2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-10-06 12:01:01 +00:00
Jarek Kobus 1b2fecd5a5 Svn: Move timeoutMultiplier arg as the last one
Make the API similar to runCleartool() and runCvs().

Change-Id: Ib6e93daab4a98537e62802e0689f6516086191d0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-06 12:00:54 +00:00
Jarek Kobus 87a32429fe Cvs: Replace timeout with timeout multiplier
Give it default value of 1. Move this arg as the last one.
This is similar change to 4bcdfa6b19.

Change-Id: Idb83d47d2412c495ac227f5663d3256b1870d437
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-06 12:00:46 +00:00
Jarek Kobus eec0679234 VcsBase: Move RunFlags into separate header
It is going to be used outside of VcsCommand, too.
Use RunFlags enum as an argument to several functions
instead of unsigned.

Change-Id: I355c80a845a9b5982108fbde3412754392dce702
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-10-06 12:00:35 +00:00
Eike Ziller 3811236903 macOS: Fix opening terminal
The scripts executable flag went missing

Amends a7956df3ca

Fixes: QTCREATORBUG-28251
Change-Id: I9773dee3967edc2ebb0eb49c539b37796a48cf5a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-06 11:44:24 +00:00
Christian Kandeler 7dc2c6b3b3 ClangCodeModel: Rename via LSP facilities
Contrary to our original expectation, clangd's textDocument/rename does
not necessarily yield the same locations as /references. Instead, it can
find fewer or more occurrences, depending on server-side logic about what
constitutes a reference vs what should be renamed. Therefore, we need to
use /rename for proper behavior.

Fixes: QTCREATORBUG-27978
Fixes: QTCREATORBUG-28109
Change-Id: I27d092e807a4aa59dc0674111429c77ca13010e9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-06 11:09:57 +00:00
Christian Stenger 96d60713bf Squish: Fix up wizard resource
Change-Id: Ie923744ef44d3588abb0930c241dbb26d7589de1
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-06 10:56:46 +00:00