Commit Graph

72811 Commits

Author SHA1 Message Date
Ali Kianian
fbb8bd89f9 QmlDesigner: Set null value for the empty properties of json objects
Fixes: QDS-12211
Change-Id: I0b85c6fb2f059317ab412f083e2130e8c1cfb6b6
Reviewed-by: Shrief Gabr <shrief.gabr@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-03-13 13:01:04 +00:00
hjk
a7bf5f17c5 CppEditor: Code cosmetics in cppeditoroutline.cpp
Mostly inlining and namepsaces.

Change-Id: Ib5d22d40844d55ae029158d8cf3d694ecf2bc4c4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-03-13 12:47:29 +00:00
hjk
a2ee1043c7 RemoteLinux: Fix crash on running test of an already configured device
I got a crash when clicking "Test" in the configuration of an
already existing ("Local Remote") device that was intentionally
not yet set up with working authorized keys after dismissing the
qtc-askpass dialog. The full reason is unclear, but this here
fixes it for me.

Change-Id: Ie07b89b85576beb59583370191e337fd1219db51
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-03-13 12:47:09 +00:00
Cristian Adam
52c39d007f CMakePM: Do not crash with CMake presets and no CMake tool
If no CMake is found, show an error message (reusing an existing
translated string).

Fixes: QTCREATORBUG-30505
Change-Id: I6e3037ee97dfba21791191483fffab769a451125
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-03-13 12:32:54 +00:00
Alessandro Portale
90f66d63fa Welcome: Enable hover effect on Welcome screen buttons
Some styles (e.g. macOS, KDE) disable the hover effect on
QAbstractButton. Setting the Qt::WA_Hover on our own button enforces the
hover effect.

Change-Id: I9f2f22c7e7c869a70ebb0e9032d162bd29e94166
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-03-13 12:23:06 +00:00
Alessandro Portale
f6727adc10 Use Qt::TextShowMnemonic for text metrics and drawing
Qt installations on KDE systems may insert shortcut ampersands into
widgets texts. For self-painted widgets, we need therefore consider
Qt::TextShowMnemonic when retrieving metrics of a text and when drawing
it.

This change addresses the issue for Utils::DetailsButton and
Core::Button. Most likely, there are more places where this needs to be
fixed.

Task-number: QTCREATORBUG-30534
Change-Id: I98ef9bf8c8502d92d3a3884d1588be190934f5bd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-03-13 12:18:34 +00:00
Jarek Kobus
a8d339271e Axivion: Disconnect from Job's finished signal
Just to be sure we don't re-emit task's done signal.

Change-Id: Ibcd0076c2c14044355e838be2e6ba47d1019b9d1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-03-13 12:01:50 +00:00
Christian Stenger
8a8f26d39a Axivion: Avoid sort indicator overlapping column text
If the column is too narrow we may overlap the text of the
column header. Explicitly clear the area before painting the
icon.

Change-Id: If73c1e2cc66c21dd9ffa41710873faa654bf235e
Reviewed-by: hjk <hjk@qt.io>
2024-03-13 11:32:51 +00:00
David Schulz
b72c3bc8a2 LanguageClient: add a tooltip to deprecated items in the call hierarchy
Change-Id: Ica03cdd06eea755852e6e9e3335ffeb5f8cae499
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-03-13 09:55:14 +00:00
Marcus Tillmanns
3cdc4f5a96 Docker: Allow starting Container from all threads
Limiting starting the container only from main thread is worse than the
potential for data access races. DockerDevice needs a rewrite here.

Change-Id: I485f5253d1f0ba0e7fb40ca7e1ddb37dd615212c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2024-03-13 09:43:02 +00:00
Jarek Kobus
3107633731 TextEditor: Split FormatText into input and output structs
Remove output data from FormatText and rename it into FormatInput.
Use Utils::expected_str<QString> for output data and alias it with
FormatOutput.

Change-Id: I2cf21d73d2e973eeeb4431ae30b56bb5987986f6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-03-13 08:20:00 +00:00
Jarek Kobus
0b656452dd GenericLinuxDeviceTester: Fix warning about QFutureWatcher connect
Fix the warning:
QFutureWatcher::connect: connecting after calling setFuture()
is likely to produce race.

Amends e8ad29d3af

Change-Id: I834f41bd3b7c51520fb36945d4c09a8eafd2affc
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-03-13 08:07:44 +00:00
Jarek Kobus
5399eff2a9 BaseQtVersion: Get rid of MacroExpanderWrapper
Apparently the reasoning for having it, i.e. make
std::unique_ptr<Utils::MacroExpander> "copyable" is not
valid anymore.

This change also fixes the leak of a MacroExpander
returned by QtVersion::createMacroExpander().

Change-Id: I811ecf2eca8e5ce3a1da267da8290ba89df66db6
Reviewed-by: hjk <hjk@qt.io>
2024-03-13 08:07:36 +00:00
Jarek Kobus
3529f3115d ToolChainOptionsWidget: Don't leak QActions
Change-Id: I2018c10a708c4b4bfa2402620874735da5860fde
Reviewed-by: hjk <hjk@qt.io>
2024-03-13 08:07:09 +00:00
Jarek Kobus
c1015dde15 DeviceSettingsWidget: Don't leak QActions
Amends 662aabd29f

Change-Id: I353a93b3b3752d639f9fc5d45467c843bed6a604
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-03-13 08:06:59 +00:00
Ali Kianian
4b035bd4cb QmlDesigner: Fix the tooltip for integer in Model Editor
Task-number: QDS-11676
Change-Id: I6eb531dae75126ad83e5f744313d801810c56678
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
2024-03-13 08:05:43 +00:00
hjk
7a769c59e7 Debugger: Add missing state transition
DebuggerProcessFinished in EngineSetupRequested means EngineSetupFailed.

Could be triggered with LLDB "Run as Root" plus <Cancel> in the dialog.

Change-Id: Idbfcaebfc302c7646f9b85275d1d57be17cd0922
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-03-13 07:54:57 +00:00
hjk
3322186b0d BaseQtVersion: Drop cache related paramenter QtVersion::fromMap
Not used anymore.

Change-Id: I992bde278af360d9d67fd86fd79bb035cafd2bec
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-03-13 07:54:50 +00:00
Marcus Tillmanns
3f8bc98109 Debugger: Add "Run as root" support for lldb
Fixes: QTCREATORBUG-30516
Change-Id: I2f1e7522dd95847ad548a2390795a91a90c63a17
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-03-13 07:50:31 +00:00
Marcus Tillmanns
41f1bc141d Process: Preserve environment when "runAsRoot" is enabled
Change-Id: I2078925b48d8fc3053e2be9632248e3fff9ea608
Reviewed-by: hjk <hjk@qt.io>
2024-03-13 07:50:16 +00:00
Jarek Kobus
16decfec67 LanguageClientSettingsPageWidget: Don't leak QMenu
Change-Id: Ia1bfc4aa66e6ed2e2b0e87ae89cf92b1bd5fa97a
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-03-13 07:47:24 +00:00
Jarek Kobus
84166b4eaf PyLSConfigureWidget: Don't leak the editor
Change-Id: Idc283b2cfabfcd1120520c5bbb4258b085c410a0
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-03-13 07:47:17 +00:00
Xavier BESSON
2166647682 Add option to display locate results using relative paths to project root
Task-number: QTCREATORBUG-29462
Change-Id: Idc52ec206d73d23b958a60391e8d0be9a6b000b0
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-03-13 07:46:54 +00:00
Christian Stenger
0aff252264 Utils: Fix qbs build
Amends 4e8bdd610b.

Change-Id: I6a187c8cd28320836a12cfc4a778d507193c52a5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-03-13 07:44:08 +00:00
Christian Stenger
fe5f959925 QmlPreview: Fix enabled state of editor action
Kind of amends 42c1b15874.

Change-Id: Ifd340d0f9bb206c48fd82cecf4e735cca0d70a7d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-03-13 07:00:12 +00:00
Alessandro Portale
0817f7ae5e Utils: Replace imageFileWithResolution with qt_findAtNxFile
qt_findAtNxFile does a better job at returing a suited @Nx-image for
"exotic" device pixel ratios. This change fixes for example the active
mode icon when running Qt Creator at 250% ui scaling.

Task-number: QTCREATORBUG-30464
Change-Id: Ia90ba3573fcd4af7941322d7dbc8905fe140192b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-03-13 06:49:55 +00:00
Alessandro Portale
c6ed1d42c3 Welcome: Fix application icon size for > 200% ui scaling
Use the actual image dpr for arithmetics rather than the application
dpr.

Fixes: QTCREATORBUG-30464
Change-Id: I52083bcca067282a677a9d0e1b7c62e9c7270c64
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-03-12 21:50:58 +00:00
Cristian Adam
8713919f31 CMakePM: Fix dll path addition for MinGW
Amends 0d8a542b4f

Fixes: QTCREATORBUG-30529
Change-Id: Ic786f1e7075ef68cf9d590d27ef90b9d1e8631b0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-03-12 21:37:48 +00:00
Thomas Hartmann
170aefb0dd QmlDesigner: Crash fix
We have to check if the semantic info is actually valid.

Task-number: QDS-12203
Change-Id: Ia4fa411708f0235de4754ced057fb86dd9a4aa7a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-03-12 15:21:13 +00:00
Thiago Macieira
1ac1095d4d QmlDesigner: fix build with Qt 6.8 w/ the spaceship operator changes
There are new operator== overloads that are causing this to now be
ambiguous.

qlist.h: In instantiation of ‘qsizetype QtPrivate::indexOf(const QList<T>&, const U&, qsizetype) [with V = QByteArray; U = Utils::SmallStringView; qsizetype = long long int]’:
qlist.h:935:20: error: ambiguous overload for ‘operator==’ (operand types are ‘const QByteArray’ and ‘const Utils::SmallStringView’)
qbytearray.h:520:5: note: candidate: ‘bool operator==(const QByteArray&, const QByteArrayView&)’
smallstringview.h:117:16: note: candidate: ‘constexpr bool Utils::operator==(SmallStringView, SmallStringView)’

Change-Id: I6818d78a57394e37857bfffd17b9ffb5101cdc5c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2024-03-12 15:06:29 +00:00
Ahmad Samir
1ddc71fcda FileIteratorWrapper: simplify the code
Setting m_status to BaseIteratorEnd should only be done in hasNext(),
because the latter is always called first, before any other member
function.

Change-Id: Ie55518a850655730fb760226d58c4fb171a7f2e1
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-03-12 14:27:25 +00:00
Ahmad Samir
ad446d5689 FileIteratorWrapper: refactor setPath()
Only call setPath() in hasNext(), the latter is called before any other
member method, and setPath() is guarded by a bool to only run a single
time.

Split some code to a helper function, which will be reused when porting
to new QAFEngine API.

Change-Id: Ibda0ede18593a3a20729b31e03e994ad2de126de
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-03-12 14:27:05 +00:00
Marcus Tillmanns
4e8bdd610b Utils: Remove PresistentStoreCache
It turns out caching the information is unreliable due to a variety of reasons.
We remove the cache for now as its less dangerous than trying to fix each
use case.

Change-Id: I8238166486a2fb29c101f700af1c8d7e4ad7a172
Reviewed-by: hjk <hjk@qt.io>
2024-03-12 14:24:05 +00:00
Ali Kianian
8f33db6bf1 QmlDesigner: Fix the bug for regexp and encoding of csv in ModelEditor
Fixes: QDS-11667
Change-Id: I2399f1a8689634f92595624f4da781f27290fb57
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2024-03-12 14:16:09 +00:00
Marcus Tillmanns
07399dfb0c Utils: Fix compile on windows
Change-Id: I296e4a75984689a4cdbcea69519c4a27d5d5e90a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2024-03-12 14:15:33 +00:00
Jarek Kobus
6956771e0d ProjectExplorerSettingsWidget: Don't leak QButtonGroup
Change-Id: I64896287dda3df96078f7fabec4cd4437396f3f3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-03-12 13:40:46 +00:00
Eike Ziller
dd43b59ede MCU: Fix translated string
It tried to use an existing string, but missed the full stop

Amends 124c62a5a0

Change-Id: Idf66621b714da86be700d4ac18c6df2c7a83a468
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-03-12 13:34:39 +00:00
Christian Kandeler
3f457c158f TextEditor: Add type hierarchy infrastructure
We want to support more than one back-end in the future.

Task-number: QTCREATORBUG-28116
Change-Id: I72020c94b36072a297e13f44130e5e2482922cd4
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-03-12 13:22:51 +00:00
David Schulz
f5de774d77 LanguageClient: improve callhierarchy direction items
Do not use the icon of the root function for the artificial "Incoming"
and "Outgoing" items in the call hierarchy. In the case of deprecated
functions this can be a warning icon.

Change-Id: Ib75a66296210d4da24208e98efb527b9af37b793
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-03-12 11:59:12 +00:00
Alessandro Portale
7c6c08a8ba Welcome: Draw stroke for hovered items
As specified by design.

Change-Id: Ia766ca16e3ce233aa73ac75d48d70b1379c39c37
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-03-12 11:27:21 +00:00
Jarek Kobus
79573f2c76 CppEditor: Don't leak CppCodeStylePreferences
Change-Id: I4414c69cebaeb429c5b6dfea6e6fa97b118e353e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-03-12 11:15:00 +00:00
Christian Kandeler
e01909a8a1 LSP: Implement SymbolTag support
Change-Id: I6e57d315a5ecd7402c0082df68e083e33dfeab7e
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-03-12 11:08:22 +00:00
Ali Kianian
1e92dd4fe4 QmlDesigner: Add tooltips as data type descriptors to Model Editor
Task-number: QDS-11676
Change-Id: I14132ca8f2285de85532b26d3374b5e442f8c746
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2024-03-12 10:33:53 +00:00
Jarek Kobus
31e97d5069 ClangFormat: Don't leak editor
Amends e1f7469afb

Change-Id: I862bca5a57d818e8b813d557fa7c3a4e3690dcd2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-03-12 10:27:56 +00:00
Shrief Gabr
7bdf43e8e1 EffectComposer: Hide effects from Components view
Task-number: QDS-12147
Change-Id: I9df43dc41aebe7d526c2f75d120ec512f2c1172e
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-03-12 09:50:13 +00:00
Christian Kandeler
1de045f687 CppEditor: Move some convenience functions to CppCodeModelSettings class
Change-Id: I0af8560c23374ce4f6c46f98d498d44f7cb50db3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-03-12 08:55:11 +00:00
Marcus Tillmanns
d5750f8cb7 Utils: Export TypedAspect
Without the export, when compiled on macOS (with clang), the call
"runControl()->aspect<RunAsRootAspect>()" in runcontrol.cpp would
return a nullptr, since ProjectExplorer and libUtils had different
vtables for TypedAspect<bool>.

Task-number: QTCREATORBUG-30516
Change-Id: Ic3cef6545e97f59af2a1138f13762c07d9402e4a
Reviewed-by: hjk <hjk@qt.io>
2024-03-12 08:54:14 +00:00
Marcus Tillmanns
da3bc4e86e Terminal: Rename "Close" action
Fixes: QTCREATORBUG-30520
Change-Id: I0fc2eaba533e6260763c0c02657cf3a7de7c9dce
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-03-12 08:34:50 +00:00
Marcus Tillmanns
726b023c78 Terminal: Remove Close action
A remnant of a wrong refactoring.

Fixes: QTCREATORBUG-30519
Change-Id: I2fadb353b83762d4d821444a58f7631dcfd22b0d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-03-12 08:33:48 +00:00
The Qt Project
db4aa77237 Merge "Merge remote-tracking branch 'origin/13.0'" 2024-03-12 08:28:18 +00:00