... instead of StringAspect::setDefaultFilePath.
Closer to the intended uniform access.
Task-number: QTCREATORBUG-29167
Change-Id: I87df385ef98873a0955010149a9a9b09a5f29daf
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
`BoolAspect::checkableDecider` was used only in CMakeProjectManager for
askBeforePresetsReload and askBeforeReConfigureInitialParams.
Now the checkbox with "Ask before presets reload" would also match with
the display of the message box.
Change-Id: I45fc7a977dbeb13df051375bd3dac36e7be7bdc4
Reviewed-by: hjk <hjk@qt.io>
Changes FancyLineEdit to accept two types of validation functions:
AsyncValidationFunction, which returns a QFuture and takes the new text,
or SynchronousValidationFunction.
Especially PathChooser is changed to use async validation function to
improve snappyness of settings pages that do heavy validation,
for instance the Debugger page.
Change-Id: I1677e7d8acc29e36c69a867850304b7913e6ae7e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This avoids some repetition and could be a step towards
having type storage in (or rather accessible from) the base,
so we can have aspects for more complex data (treemodels...)
that are not easily converted to QVariant.
Change-Id: I9797b3d5646195705212db1830d2b415291ac651
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Most aspect containers end in a widget at some time. Let them declare
how.
The optionspages don't need a layouter anymore when using their
settings' one. There was only one case where there was none, fix
that one (perforce).
Change-Id: Ibd39bcd4af98c3eae1daafa59f6c1d6e7a571989
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Validation makes only sense if the placeholder is similar to
the actual contents, like a file path, not for explanatory text.
Amends 3dcdbe9.
Change-Id: I81ff7a3cf72f28c0fe49824b574b0997ada2d09b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
After an update of Qt dev the following code in Creator fails to compile with
/data/dev/creator-out/src/libs/utils/aspects.cpp: In member function ‘void Utils::IntegersAspect::setValue(const QList<int>&)
/data/dev/creator-out/src/libs/utils/aspects.cpp:2323:35: error: no matching function for call to ‘transform(const QList<int>&, <unresolved overloaded function type>)’
2323 | BaseAspect::setValue(transform(value, &QVariant::fromValue<int>));
Work around by using a lambda.
Change-Id: Id5a844e7e5fe1846c4904dbad21472743439c4da
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Add the necessary contructor to TriStateAspect, too.
Change-Id: Ieb0f19cdf95f7492380d7c4e5663f455e4da3452
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Currently this luckily conincides with the register/addAspect schism
but that's not necessarily true in the future.
Change-Id: I05a59d74182dbdf81193ebd790d6f9bab2d30439
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This is identical in remaining functionality to AtCheckBox after
the recent layout builder changes (or rather, can be adjusted on
the layouting side by having appropriate empty cells)
Task-number: QTCREATORBUG-29167
Change-Id: Ic357de6fb756acb5926afe1fd361ee4b18b17afd
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The HTML generator adds it automatically and qdoc warns about it.
Change-Id: I3917d7d23b16446e28ce7bfeb8f9195f21efd7fc
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This removes the need to manual 'registerAspect' calls in most cases.
Whether the containers owns the registered aspects or just references
them is still determined by AspectContainer::setOwnsSubAspects()
Change-Id: Iadd17c919287f625bf5eb4964de4149d4da5a0f9
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
..especially when entering a path manually. Fixes some
soft asserts regarding the call guard and re-allows to
type a backslash directly to separate path from sub-path
instead of using wild workarounds like adding a dummy
character and adding the backslash before this.
Change-Id: I8cc8aaccf414d0fd9acc03d7c69e10ddd88dbfd9
Reviewed-by: hjk <hjk@qt.io>
Remove function overloads, thes are hard to read, to use and to extend.
I'd even argue this should be a plain default ctor and a few setters +
exec(), pretty much like Process::start() nowadays.
Move "decider" magic into a structure that can be filled ad-hoc outside
checkablemessagebox.cpp paving the ground for:
...removing aspect dependency from CheckableMessageBox, Instead, add a
convenience function to BoolAspect. Arguably, the latter is not needed
and could be done on the user side.
Use pointers instead of mutable references for in-out parameter.
Makes the "specialness" visible on the user side.
Pass ICore::settings() centrally as done elsewhere to reduce line noise
on the user side.
Change-Id: Ibb366353d1ea35401723fd05ce05672617a0a8fd
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This was based on the wrong assumption that on !autoapply aspects
(i.e. aspects in settings pages the non-applied value would never be
needed by user code. This is, however, not the case when e.g.
temporary checkbox states or values in comboboxes are used to
enable/disable parts of the ui while interacting with the page.
Change-Id: I4fe6a0df8137083a0a0faecc3ba20792caa5a747
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This will be used by the apply machinery and allows more
complex setups than the automatically generated internal
CheckBox button.
Change-Id: I237a9283253f11bcb76e0366a0b6c5a0346fdfd8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
A shallow wrapper around a StringAspect with a suitable operator().
Change-Id: I0a5e121565d03573faa5c3f4085d72db2b9c3774
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
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>
This is not correct either, but the vast majority of Checkboxes
is not added to Forms, so the !form case is a better fallback.
Change-Id: I1375b3e23138fb6d881b2331ecf1d0f3a4f5431b
Reviewed-by: hjk <hjk@qt.io>
LayoutBuilder is meant to be an implementation detail nowadays.
Change-Id: I777ab934d3d405873e819eeddd27428d8c652f9a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Everying is a LayoutItem now, and everything is split into
a proper setup and execution phase.
Execution happens only via LayoutBuilder (directly or via
convenience wrappers in LayoutItem).
No direct access to the widget in creation, funnel out is
via the new bindTo() facility.
Change-Id: I7eb38fd736ae57a68f9a72a6add5c767da82b49f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The whole machinery is now almost only layoutbuilder.{h,cpp},
mostly independent of the rest of Utils. Idea is to finish the
separation to make it stand-alone usable also outside creator.
Change-Id: I958aa667d17ae26b21209f22412309c5307a579c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Make Environment a stack of changes that gets "expanded" to
a full environment before things are actively accessed.
Later this expansion should be done lazily if possible.
Task-number: QTCREATORBUG-28357
Change-Id: If1c7bfdb9f58b81e71c51ed87ee75d6964a47019
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>