forked from qt-creator/qt-creator
Aspects: Update of combo box when changing TriState value
Call SelectionAspect::setValue instead of skipping it and calling
BaseAspect::setValue directly. That takes care of updating the combo box
state.
Amends c8829ff5b3
Change-Id: I55e90459c2b54da09883f746b61b19d46acfdf92
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1994,7 +1994,7 @@ TriState TriStateAspect::value() const
|
|||||||
|
|
||||||
void TriStateAspect::setValue(TriState value)
|
void TriStateAspect::setValue(TriState value)
|
||||||
{
|
{
|
||||||
BaseAspect::setValue(value.toVariant());
|
SelectionAspect::setValue(value.toInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
void TriStateAspect::setDefaultValue(TriState value)
|
void TriStateAspect::setDefaultValue(TriState value)
|
||||||
|
@@ -487,6 +487,7 @@ class QTCREATOR_UTILS_EXPORT TriState
|
|||||||
public:
|
public:
|
||||||
TriState() = default;
|
TriState() = default;
|
||||||
|
|
||||||
|
int toInt() const { return int(m_value); }
|
||||||
QVariant toVariant() const { return int(m_value); }
|
QVariant toVariant() const { return int(m_value); }
|
||||||
static TriState fromVariant(const QVariant &variant);
|
static TriState fromVariant(const QVariant &variant);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user