forked from qt-creator/qt-creator
CompilerExplorer: Fix assert
The default value was not correctly converted to a QVariant. When a LibraryAspect was de-serialized from the default variant value, it would create q QVariant<QMap<QString, QString>> which cannot be converted to a Store by Utils::storeFromVariant and would end in an assert therefore. Change-Id: I6f7b14d78793a07f027a6b375bc554941ffb83de Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -78,6 +78,11 @@ QVariant LibrarySelectionAspect::volatileVariantValue() const
|
||||
return toVariantMap(m_buffer);
|
||||
}
|
||||
|
||||
QVariant LibrarySelectionAspect::defaultVariantValue() const
|
||||
{
|
||||
return toVariantMap(defaultValue());
|
||||
}
|
||||
|
||||
void LibrarySelectionAspect::setVariantValue(const QVariant &value, Announcement howToAnnounce)
|
||||
{
|
||||
QMap<QString, QString> map;
|
||||
|
||||
@@ -80,6 +80,7 @@ public:
|
||||
|
||||
QVariant variantValue() const override;
|
||||
QVariant volatileVariantValue() const override;
|
||||
QVariant defaultVariantValue() const override;
|
||||
|
||||
void setVariantValue(const QVariant &value, Announcement howToAnnounce = DoEmit) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user