forked from qt-creator/qt-creator
Utils: Make aspect settings access implicit
Generally, aspects should use fromMap/toMap, but some older pages
use {from,to}Settings with always the same ICore::settings().
To make that less intrusive on the user code side, make that globally
implicit.
Task-number: QTCREATORBUG-29167
Change-Id: I29a8e23a31eb8061bb143e93931a07c6741eb7f9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -6,8 +6,6 @@
|
||||
|
||||
#include "ioptionspage.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/aspects.h>
|
||||
#include <utils/layoutbuilder.h>
|
||||
@@ -167,7 +165,7 @@ void IOptionsPage::apply()
|
||||
AspectContainer *container = m_settingsProvider();
|
||||
if (container->isDirty()) {
|
||||
container->apply();
|
||||
container->writeSettings(ICore::settings());
|
||||
container->writeSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -323,9 +321,4 @@ PagedSettings::PagedSettings()
|
||||
setAutoApply(false);
|
||||
}
|
||||
|
||||
void PagedSettings::readSettings()
|
||||
{
|
||||
return AspectContainer::readSettings(Core::ICore::settings());
|
||||
}
|
||||
|
||||
} // Core
|
||||
|
||||
Reference in New Issue
Block a user