forked from qt-creator/qt-creator
Debugger UI: Don't write QML settings if QML debugging is disabled
This commit is contained in:
@@ -651,7 +651,7 @@ void DebuggerUISwitcher::writeSettings() const
|
|||||||
}
|
}
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
}
|
}
|
||||||
{
|
if (d->m_qmlEnabled) {
|
||||||
settings->beginGroup(QLatin1String("DebugMode.CppQmlMode"));
|
settings->beginGroup(QLatin1String("DebugMode.CppQmlMode"));
|
||||||
QHashIterator<QString, QVariant> it(d->m_dockWidgetActiveStateQmlCpp);
|
QHashIterator<QString, QVariant> it(d->m_dockWidgetActiveStateQmlCpp);
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
@@ -674,21 +674,25 @@ void DebuggerUISwitcher::readSettings()
|
|||||||
}
|
}
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
|
|
||||||
|
if (d->m_qmlEnabled) {
|
||||||
settings->beginGroup(QLatin1String("DebugMode.CppQmlMode"));
|
settings->beginGroup(QLatin1String("DebugMode.CppQmlMode"));
|
||||||
foreach (const QString &key, settings->childKeys()) {
|
foreach (const QString &key, settings->childKeys()) {
|
||||||
d->m_dockWidgetActiveStateQmlCpp.insert(key, settings->value(key));
|
d->m_dockWidgetActiveStateQmlCpp.insert(key, settings->value(key));
|
||||||
}
|
}
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
|
}
|
||||||
|
|
||||||
// reset initial settings when there are none yet
|
// reset initial settings when there are none yet
|
||||||
if (d->m_dockWidgetActiveStateCpp.isEmpty() || d->m_dockWidgetActiveStateQmlCpp.isEmpty()) {
|
|
||||||
DebuggerLanguages langs = d->m_activeDebugLanguages;
|
DebuggerLanguages langs = d->m_activeDebugLanguages;
|
||||||
d->m_activeDebugLanguages = QmlLanguage;
|
if (d->m_dockWidgetActiveStateCpp.isEmpty()) {
|
||||||
resetDebuggerLayout();
|
|
||||||
d->m_activeDebugLanguages = CppLanguage;
|
d->m_activeDebugLanguages = CppLanguage;
|
||||||
resetDebuggerLayout();
|
resetDebuggerLayout();
|
||||||
d->m_activeDebugLanguages = langs;
|
|
||||||
}
|
}
|
||||||
|
if (d->m_qmlEnabled && d->m_dockWidgetActiveStateQmlCpp.isEmpty()) {
|
||||||
|
d->m_activeDebugLanguages = QmlLanguage;
|
||||||
|
resetDebuggerLayout();
|
||||||
|
}
|
||||||
|
d->m_activeDebugLanguages = langs;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerUISwitcher::initialize()
|
void DebuggerUISwitcher::initialize()
|
||||||
|
Reference in New Issue
Block a user