When our window loses focus the editingFinished signal is triggered.
This can happen multiple times (QTBUG-121983) if the result of the edit
is a modal dialog and the user clicks outside our application.
This would call editingFinished again, resulting in multiple message
boxes being opened. (Easiest to reproduce is changing the build
directory of a project which displays a message box confirming the
change)
This patch checks, via a recursion Guard, that the slot is not already
in the process of being called.
Change-Id: I5e61e1b57680f0b1f2483a81682e791bfb5c0867
Reviewed-by: hjk <hjk@qt.io>
Previously returning std::nullopt from a StringAspect::ValueAcceptor
would not cancel the change.
Change-Id: I7a329f9fe32f6d798c10102a0b68dcd638fb2398
Reviewed-by: hjk <hjk@qt.io>
When needed. Take a short cut on empty strings which can't have macros.
Change-Id: Icc2fb8f001da6be7a9dfec73951d9ac14d2f356f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... as a convenience function for .setDefaultValue(filePath.toUserOutput());
The case that someone already has FilePaths should not look (much)
uglier on the user side than the QString "raw" case.
Direct overloading setDefaultValue(FilePath) causes resolution
conflicts, which are solvable, but I'd rather keep it explicit now.
Change-Id: I03d71e4f99005a1d1f76ebf23080bebe46a9351d
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This name corresponds better to e.g. SH_ComboBox_AllowWheelScrolling,
SH_TabBar_AllowWheelScrolling or wheelScrollLines.
Change-Id: I244774584e293ca45cc4be4d4526f925c2da9598
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
- Introduced an Utils::attachWheelBlocker() to disable mouse wheel events on the "Parallel Jobs" field.
- This prevents unintentional modifications when users inadvertently scroll over the input.
Change-Id: Iccb93305fbcf399cae683412078782b5ea9f4ad6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Adds a function to add a "default" constructed new item to the list.
Change-Id: I3d826b6f3e3705ae431efa5d778219f431509ea8
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This reverts commit 4c5e3aa6ba.
Not needed anymore. The action likely ends up in a menu or such
where it is effectively 'autoapply'.
Change-Id: Ib02cba871028fa1422e10622d263218089226c56
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Remove the unnecessary re-setting of the text edit
content due to the undo => edit => undo => edit
connection.
Fixes: QTCREATORBUG-29688
Change-Id: I7838ed594ae3741df757fa5eb3cdd90506428be3
Reviewed-by: hjk <hjk@qt.io>
The Key encapsulates now a QByteArray.
Plan is to use QByteArray::fromRawData on literals, but that's not
active yet due to an unclear ASAN report, see the gerrit discussion.
For now we also paddle back when interfacing QSettings, instead of mimicing
writing a QVariantMap (and fail in some corners), always convert
the Store. This is meant to go away in the future when code paths
are better controled.
Change-Id: Id1206a434d511f8003903d5322c7c9bd5f5fb859
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Previously the undo state was not updated when the value
was set from the outside before the gui model was setup.
Change-Id: I380916f888edd120f512089bdb94762977c11978
Reviewed-by: hjk <hjk@qt.io>
QLineEdit::textEdited is only called when the user types.
It is not triggered if the text changes due to undo/redo.
QLineEdit::textChanged is triggered for all changes.
We also have to make sure that we don't call
QLineEdit::setTextKeepingActiveCursor unnecessarily
as that would clear the undo/redo stack of the QLineEdit.
Change-Id: I19562d0804e6a34b11f19e86abd256a807e147d6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This reverts commit cd8bc98e52.
Reason for revert: Breaks compilation
Change-Id: I27ef9b718adf8cd4b8ac72e77161515ff637bd6e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Added a new, clean IconButton that mimiks the ToolButton
with the compact/relaxed background.
Change-Id: I582c6aac404724af5459bab2ca9023aa63171f93
Reviewed-by: hjk <hjk@qt.io>
Removes duplicate m_autoApply from AspectContainerPrivate.
Fixes issue when calling BaseAspect::setAutoApply()
on an AspectContainer.
Change-Id: I5f56d8d3c6d52d32c9365faf3d0e22facb757f03
Reviewed-by: hjk <hjk@qt.io>
Changes a few remaining QSettings members that popped
up when trying to build with "apt-get" Qt 6.2.4.
Change-Id: I3caa8545cf02d6453b802559c2f65279e1fb63fd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>