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:
@@ -202,10 +202,9 @@ bool Console::canNavigate() const
|
||||
|
||||
void Console::readSettings()
|
||||
{
|
||||
QSettings *settings = Core::ICore::settings();
|
||||
m_showDebug.readSettings(settings);
|
||||
m_showWarning.readSettings(settings);
|
||||
m_showError.readSettings(settings);
|
||||
m_showDebug.readSettings();
|
||||
m_showWarning.readSettings();
|
||||
m_showError.readSettings();
|
||||
}
|
||||
|
||||
void Console::setContext(const QString &context)
|
||||
@@ -215,10 +214,9 @@ void Console::setContext(const QString &context)
|
||||
|
||||
void Console::writeSettings() const
|
||||
{
|
||||
QSettings *settings = Core::ICore::settings();
|
||||
m_showDebug.writeSettings(settings);
|
||||
m_showWarning.writeSettings(settings);
|
||||
m_showError.writeSettings(settings);
|
||||
m_showDebug.writeSettings();
|
||||
m_showWarning.writeSettings();
|
||||
m_showError.writeSettings();
|
||||
}
|
||||
|
||||
void Console::setScriptEvaluator(const ScriptEvaluator &evaluator)
|
||||
|
||||
Reference in New Issue
Block a user