forked from qt-creator/qt-creator
CppEditor: Fix restoring per-project cpp file name settings
Another victim of Utils::Store. Also add missing initialization of "is global" state. Change-Id: I3d20e1403795366044d3b2df552f2a5947ba8c98 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -489,7 +489,7 @@ void CppFileSettingsForProject::loadSettings()
|
|||||||
if (!entry.isValid())
|
if (!entry.isValid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const QVariantMap data = entry.toMap();
|
const QVariantMap data = mapEntryFromStoreEntry(entry).toMap();
|
||||||
m_useGlobalSettings = data.value(useGlobalKeyC, true).toBool();
|
m_useGlobalSettings = data.value(useGlobalKeyC, true).toBool();
|
||||||
m_customSettings.headerPrefixes = data.value(headerPrefixesKeyC,
|
m_customSettings.headerPrefixes = data.value(headerPrefixesKeyC,
|
||||||
m_customSettings.headerPrefixes).toStringList();
|
m_customSettings.headerPrefixes).toStringList();
|
||||||
@@ -553,6 +553,8 @@ CppFileSettingsForProjectWidget::CppFileSettingsForProjectWidget(
|
|||||||
const CppFileSettingsForProject &settings) : d(new Private(settings))
|
const CppFileSettingsForProject &settings) : d(new Private(settings))
|
||||||
{
|
{
|
||||||
setGlobalSettingsId(Constants::CPP_FILE_SETTINGS_ID);
|
setGlobalSettingsId(Constants::CPP_FILE_SETTINGS_ID);
|
||||||
|
setUseGlobalSettings(settings.useGlobalSettings());
|
||||||
|
|
||||||
const auto layout = new QVBoxLayout(this);
|
const auto layout = new QVBoxLayout(this);
|
||||||
layout->setContentsMargins(0, 0, 0, 0);
|
layout->setContentsMargins(0, 0, 0, 0);
|
||||||
layout->addWidget(&d->widget);
|
layout->addWidget(&d->widget);
|
||||||
|
Reference in New Issue
Block a user