Commit Graph

80509 Commits

Author SHA1 Message Date
hjk
e71f9b9c87 Uitls: Make BaseAspect::isDirty() virtual
It's sometimes not so easy to trigger the volatileValue() != value()
branch, so create a way to be explicit when needed.

Change-Id: I322508a33c935077038d730fd09c819419901353
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-15 08:47:26 +00:00
Jarek Kobus
6b600798a4 LanguageClient: Remove the old matchesFor() implementation
Rename some workspace filter classes to conform to
the names for cpp filters.

Remove some unneeded intermediate classes now.

Change-Id: I1ec0dbb7ed91944e9dd8b1b0f4878b826191a020
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-15 08:00:30 +00:00
Jarek Kobus
4d2710bae2 UrlLocatorFilter: Remove the old matchesFor() implementation
Change-Id: I2d04f4bf66ec12c8c641cbfb39a4c2b0049ecdc4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-15 07:50:28 +00:00
Jarek Kobus
091f3f71f8 SpotlightLocatorFilter: Remove the old matchesFor() implementation
Change-Id: If1ecc94b4246a279c3688c7c8320ccbd18b3533c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-15 07:49:13 +00:00
Jarek Kobus
681627cac3 CurrentProjectFilter: Remove the old matchesFor() implementation
Change-Id: I2bd960c14056907e6735002120900b6252ea3989
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-15 07:46:53 +00:00
Christian Stenger
9c2fa5c975 Perforce: Fix testing settings
Changed settings had been taken into account only after
an explicit Apply and this may be rather confusing.

Change-Id: I344ddf18a3cb15b0bc2d2b41a38587395b592e46
Reviewed-by: hjk <hjk@qt.io>
2023-05-15 04:52:55 +00:00
Christian Stenger
985c1ee3e9 Perforce: Do not wait for process if not set up
The process could be not set up correctly or at all if
we exit the start function early.
Avoids a soft assert.

Change-Id: I9f0d71acc4a440b85dbb26fa656e0b551ae685f4
Reviewed-by: hjk <hjk@qt.io>
2023-05-15 04:52:19 +00:00
Orgad Shaneh
64d1f49078 Autotest: Fix struct/class misalignment
Amends 30af7a9503.

Change-Id: Ie8ca92c427fc3446727d78a76aee492eb789b7ed
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-15 04:50:18 +00:00
Björn Schäpers
7327a3bbc2 Registryaccess: Fix defined but not used warning
In file included from .../src/plugins/debugger/registerpostmortemaction.cpp:6:
.../src/shared/registryaccess/registryaccess.h:26:21: warning: 'RegistryAccess::autoRegistryValueNameC' defined but not used [-Wunused-variable]
   26 | static const WCHAR *autoRegistryValueNameC = L"Auto";

I don't think using static in a header is a nice thing, inline would
work, but we have constexpr which implies inline.

Change-Id: I7b872e65a554a9a9feb39845717c5dba7ba6777c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-12 19:45:44 +00:00
hjk
ab8f3d78ae Utils: Use QAbstractButton instead of QCheckBox in BoolAspect
Opens the path to use e.g. QRadioButton.

Change-Id: Idb1591c0a1486181b8aeb51edb93bc4bfecef834
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-12 16:17:49 +00:00
hjk
c85b72000f All: Use the shorter access to aspect values in a few places
Change-Id: Ie0ff0e4e1cf4c2750897ea733dfccb743f44fa93
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-12 16:04:38 +00:00
hjk
30af7a9503 AutoTests: Aspectify parts of main settings
Change-Id: I407b5102e1f2a6647f6fdca01a61dfa422c5d3ee
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-12 14:54:24 +00:00
hjk
4c1a161abd Utils: Fix some IntegerAspect value display issue
... when a display scale factor was set.

Change-Id: I764db99e444f9cc70871c3dbec101d0b65542c4a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-12 14:54:01 +00:00
Jarek Kobus
2b54ef80d1 LocatorFilters: Use ILocatorFilter::createRegExp() consistently
Use it consistently inside ILocatorFilter subclasses, instead
of FuzzyMatcher.
Drop repeated default arguments from the caller.

Change-Id: I53762f27216a30ed0281f3d0ddc5e50c7452559a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-12 14:32:49 +00:00
hjk
5cf5b1ae3f Utils: Add an AspectContainer::changed() signal
In contrast to applied() only emitted if anything was dirty before.

Ideally, applied() would not be needed, but I am not sure about
downstream uses.

Change-Id: Ie0c293b8730c503fc4409884a33207ee9ca5f129
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-12 14:29:11 +00:00
hjk
ddee1c92a4 Utils: Add operator() as a way to access .value() for some aspects
This can make the user code look a bit nicer.

Change-Id: I98867114810ede2f04342144f600682ff3c261b4
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-12 14:28:18 +00:00
hjk
cfbdee3a3b Beautifier: Base AbstractSettings on Utils::AspectContainer
Plan is to eliminate AbstractSettings as much as possible and
use Aspect functionality instead.

Change-Id: Idb71fb4df0893ffa4713b0182c21725f0c71089e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-12 13:50:53 +00:00
hjk
7dd27301ab Beautifier: Base Beautifier::GeneralSettings on Core::PagedSettings
This also uses the "Enable auto format on file save" bool directly
for the now-checked group box.

Change-Id: I7f3f392828f6ccfda99fa1d757f49cb9e3b6bc1b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-12 13:12:10 +00:00
Jarek Kobus
0672314844 DirectoryFilter: Remove the old matchesFor() implementation
Change-Id: Iae8a2e3adda7fdaec69873bf4b171da98eee4874
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-12 13:11:25 +00:00
Cristian Adam
0dbc208a07 CMake: Add -fPIC also for OBJECT libraries
add_qtc_library would have set the POSITION_INDEPENDENT_CODE property
for STATIC libraries on UNIX based systems.

The OBJECT libraries need the same treatment.

Change-Id: Ia333a36ea0f35d7db3ed876cdde5b895b47644c7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-12 12:49:05 +00:00
Eike Ziller
c06d291b11 Merge remote-tracking branch 'origin/9.0' into 10.0
Change-Id: I4264592dbf3a8bf105ad507cb4496777cd0e92b3
2023-05-12 14:42:24 +02:00
Patrik Teivonen
8cd00ad279 Coin: Switch to the new packaging tools scripts location
Script location is changed from qtsdk.git to tqtc-qtsdk.git.
Adjust the coin instructions to use the new location.
This change should be picked to all the branches in use.

Task-number: QTQAINFRA-5506
Change-Id: I78abb36781cfaaff72870c297ba152066ac5f385
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-12 12:41:49 +00:00
Cristian Adam
62e9a0bec1 CMakePM: Stretch the CMake parameters column on resize
Makes sure that the CMake parameters columns are properly stretched when
Qt Creator window is being resized or maximized / restored from
maximized state.

Fixes: QTCREATORBUG-27257
Change-Id: Ifb4d439fb758dcc5b2593be917ba35e9c79f2840
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-12 12:07:31 +00:00
hjk
fc8ae0e2dc VcsBase: Remove unused settings member
Change-Id: I3247a639d9607a4acbf5477302e1f2860325a0e6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-05-12 11:59:56 +00:00
Marcus Tillmanns
69fbe72752 Utils: Use FilePath hash in operator==
Change-Id: Ibbea420a5a5353da221d285b70272cdf9b09d0d0
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-12 11:47:08 +00:00
Marcus Tillmanns
6149fd8bfa Utils: Cache FilePath::qHash
Calling toCaseFolded is expensive if the same filepath is hashed
often, so we calculate the hash value once and cache the result.

One such case was found to happen when parsing tests,
as the cpp parser is queried a lot and it uses hash maps / sets
with filepaths.

Change-Id: Ic3ca7f09e8f108f5a89b3fdb17743ae7c3258001
Reviewed-by: hjk <hjk@qt.io>
2023-05-12 11:34:18 +00:00
hjk
ed6f5e3486 Layouting: Add a plain 'Widget' item
Change-Id: Id419b1efd56f51fb282b11c4b241b96eb7d7d0ae
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-12 11:21:15 +00:00
David Schulz
1a98dda5c4 Utils: fix Text::Range length and remove mid
Those functions are based on the assumption that the passed text starts
at the begin position, which was good enough for search results, but if
used in other parts of the codebase it might give unwanted results.
Calculate the length of the range now as expected and subtract the
beginning lines.
In order to still got the correct results for the text result texts
modify the result range to always start at the first line before
calculating the length of the range.
Also add tests for the modified functionality

Change-Id: I7ccd75b642dda6dd4f738877cbe3543d46c03652
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-12 11:03:33 +00:00
The Qt Project
70609cdec6 Merge "Merge remote-tracking branch 'origin/10.0'" 2023-05-12 10:42:27 +00:00
Eike Ziller
51df19270b Merge remote-tracking branch 'origin/10.0'
Change-Id: I7cfdfc13097d5037fea597ecba98ae902a0c5afb
2023-05-12 12:24:39 +02:00
Cristian Adam
dc18d4b9ee CMakePM: Display presets as part of the project outline
Fixes: QTCREATORBUG-28966
Change-Id: Iae0f77956bf6f4682ea8a25e08d05de3331c7420
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-12 10:21:53 +00:00
Marcus Tillmanns
aca8e5906b AutoTest: Output time taken when parsing tests
Makes debugging easier as you don't have to calculate
end - start yourself.

Change-Id: Ib75a36bbf52633e188a6c4bbd488eb439cb52984
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-12 10:17:05 +00:00
Marcus Tillmanns
161cac0a85 Terminal: Fix Shellintegration for bash
bash needs long options to be before short options.

Change-Id: I277a9283253f11bcb76e0366a0b6c5a0346fdfd8
Reviewed-by: hjk <hjk@qt.io>
2023-05-12 09:35:43 +00:00
Jarek Kobus
3e3a202e75 OpenDocumentsFilter: Remove the old matchesFor() implementation
Change-Id: I1166dbd17125aa3c6bab4dae4c416063c4b6f7ba
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-12 08:59:27 +00:00
Cristian Adam
af5e50edf7 CMakePM: Cancel current build before locator "cm <target>"
In case the current project is building and the user starts a "cm
<target>" in Locator, now the build is canceled before starting a a
"cmake --build --target <target>".

Fixes: QTCREATORBUG-26699
Change-Id: I27ed9ba5b8d917dce94835a5462e4e64e7515bd9
Reviewed-by: hjk <hjk@qt.io>
2023-05-12 08:17:17 +00:00
Jarek Kobus
62c309eeda AllProjectsFilter: Remove the old matchesFor() implementation
Change-Id: I9b5a0a1483e1dcd55d845ca2a5645ad9a4d05b52
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-12 08:13:42 +00:00
Jarek Kobus
a1792c653e TaskTree: Prepare for de-utils-ization - part 4
Add internal implementation for qtcassert.{c,h}.

Change-Id: I646b302be2f86e32e91c8c6fafa7b799e48773c2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-05-12 08:09:30 +00:00
Jarek Kobus
fe470d60a2 TaskTree: Prepare for de-utils-ization - part 3
Rename QTC_* macros into TASKING_*.

Change-Id: I809ebf678f20df612a3211c38ebbfe6d4bf6492d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-12 08:09:24 +00:00
Jarek Kobus
97a66067bb TaskTree: Prepare for de-utils-ization - part 2
Move TaskTree into Tasking namespace.
Move Tasking namespace out of Utils namespace.

Change-Id: Ib4c1d7f54f1808517e54768dfa27209c33517b61
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-05-12 08:09:19 +00:00
Jarek Kobus
5a73d07c72 TaskTree: Prepare for de-utils-ization - part 1
Add internal implementation for Guard/GuardLocker.

Change-Id: I9bcedee937221c0796143be2f943650a1bb56f38
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-05-12 08:09:13 +00:00
Cristian Adam
430f07cf38 GitHub Actions: Use universal for macOS only for releases
For the regular checks we should be as fast as possible.

Change-Id: If5b14f6ac48aebdefced137f74fc8ecdd72f741b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-12 08:06:52 +00:00
Artem Sokolovskii
b28df28660 ClangFormat: Remove redundant KeepLineBreaks property
Change-Id: I74250bde4a224d89b078f127da4e7b63454b03a6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-12 07:49:40 +00:00
Artem Sokolovskii
ef06d89255 ClangFormat: Improve conversion from and to ClangFormat style
Improved conversion from ClangFormat style settings to
CppCode style settings and the other way around.

Task-number: QTCREATORBUG-29069
Change-Id: If4f75259f7fe77397fc144a83370749a49d25297
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-05-12 07:49:35 +00:00
Jarek Kobus
b1d520c6b1 CppLocatorFilters: Remove the old matchesFor() implementation
Move the implementation of CppCurrentDocumentFilter into
cpplocatorfilter.h/cpp.

Rename CppLocatorFilter into CppAllSymbolsFilter to
conform to the other names.

Remove some unneeded intermediate classes now.

Change-Id: Ia911dc826b83ba11894757fc353ff72211910ff7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-05-12 06:45:27 +00:00
Marcus Tillmanns
0c8ae843c6 Terminal: Switch Mode to ensure visible
Change-Id: I6d92ac07b7f6e7d5ed3fa4d27531d1cb8ec1a36f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-05-12 06:41:13 +00:00
Jarek Kobus
946da55f6e MacroLocatorFilter: Remove the old matchesFor() implementation
Change-Id: I44869742c590125805eab277464ffde3df3a2bc2
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-12 06:40:57 +00:00
Jarek Kobus
c559bcc4b1 BookmarkFilter: Remove the old matchesFor() implementation
Change-Id: I85b02fcaf73686146fe4da9d8582dd0c677ba101
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-12 06:40:49 +00:00
Alessandro Portale
f2213db913 Terminal: Fix warning
warning: dereferencing type-punned pointer will break strict-aliasing
rules [-Wstrict-aliasing]

Change-Id: Ib66cbde9ff48f31d1a5ca97c8bafb0efd419dc2e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-12 06:34:49 +00:00
Christian Stenger
979f938aa5 AutoTest: Fix handling of multiple fails of tests
Broke with d05c5b7d07.

Fixes: QTCREATORBUG-29146
Change-Id: If7cc7f943c16113785a21b661a545e00331f1dcd
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-05-12 06:34:09 +00:00
Christian Stenger
1a86c7bed4 Utils: Remove empty item after option
Triggers a soft assert.

Change-Id: I9ad863ceb7e1f377e4f9fbae62cca1d0932a76d6
Reviewed-by: hjk <hjk@qt.io>
2023-05-12 06:22:17 +00:00