Debugger: Strip QLatin1* where possible

Change-Id: Idcab23875b5dc2ecf55e3303f417b995e2252720
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Orgad Shaneh
2018-10-07 22:38:47 +03:00
committed by Orgad Shaneh
parent d0d6f99491
commit 147a3c27c4
55 changed files with 491 additions and 494 deletions

View File

@@ -296,29 +296,29 @@ int DebuggerRunConfigurationAspect::portsUsedByDebugger() const
void DebuggerRunConfigurationAspect::toMap(QVariantMap &map) const
{
map.insert(QLatin1String(USE_CPP_DEBUGGER_KEY), d.useCppDebugger == EnabledLanguage);
map.insert(QLatin1String(USE_CPP_DEBUGGER_AUTO_KEY), d.useCppDebugger == AutoEnabledLanguage);
map.insert(QLatin1String(USE_QML_DEBUGGER_KEY), d.useQmlDebugger == EnabledLanguage);
map.insert(QLatin1String(USE_QML_DEBUGGER_AUTO_KEY), d.useQmlDebugger == AutoEnabledLanguage);
map.insert(QLatin1String(QML_DEBUG_SERVER_PORT_KEY), d.qmlDebugServerPort);
map.insert(QLatin1String(USE_MULTIPROCESS_KEY), d.useMultiProcess);
map.insert(USE_CPP_DEBUGGER_KEY, d.useCppDebugger == EnabledLanguage);
map.insert(USE_CPP_DEBUGGER_AUTO_KEY, d.useCppDebugger == AutoEnabledLanguage);
map.insert(USE_QML_DEBUGGER_KEY, d.useQmlDebugger == EnabledLanguage);
map.insert(USE_QML_DEBUGGER_AUTO_KEY, d.useQmlDebugger == AutoEnabledLanguage);
map.insert(QML_DEBUG_SERVER_PORT_KEY, d.qmlDebugServerPort);
map.insert(USE_MULTIPROCESS_KEY, d.useMultiProcess);
}
void DebuggerRunConfigurationAspect::fromMap(const QVariantMap &map)
{
if (map.value(QLatin1String(USE_CPP_DEBUGGER_AUTO_KEY), false).toBool()) {
if (map.value(USE_CPP_DEBUGGER_AUTO_KEY, false).toBool()) {
d.useCppDebugger = AutoEnabledLanguage;
} else {
bool useCpp = map.value(QLatin1String(USE_CPP_DEBUGGER_KEY), false).toBool();
bool useCpp = map.value(USE_CPP_DEBUGGER_KEY, false).toBool();
d.useCppDebugger = useCpp ? EnabledLanguage : DisabledLanguage;
}
if (map.value(QLatin1String(USE_QML_DEBUGGER_AUTO_KEY), false).toBool()) {
if (map.value(USE_QML_DEBUGGER_AUTO_KEY, false).toBool()) {
d.useQmlDebugger = AutoEnabledLanguage;
} else {
bool useQml = map.value(QLatin1String(USE_QML_DEBUGGER_KEY), false).toBool();
bool useQml = map.value(USE_QML_DEBUGGER_KEY, false).toBool();
d.useQmlDebugger = useQml ? EnabledLanguage : DisabledLanguage;
}
d.useMultiProcess = map.value(QLatin1String(USE_MULTIPROCESS_KEY), false).toBool();
d.useMultiProcess = map.value(USE_MULTIPROCESS_KEY, false).toBool();
}
} // namespace Debugger