diff options
author | Tim Jenssen <tim.jenssen@nokia.com> | 2011-08-29 18:09:21 +0200 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@nokia.com> | 2011-08-29 18:29:41 +0200 |
commit | b47128b6775f846fad33f599802d70563580f902 (patch) | |
tree | 2edc25265743324ed46d0eb1cdb4ef4d57a38583 /installerbuilder | |
parent | f51c7b17b5522a25ba7a625e0ae8ca2c0dbb0dba (diff) |
improve gdb registration
Change-Id: Icc72f9c5b3f8b8d9086e6f492c752ccd343c5b5a
Reviewed-on: http://codereview.qt.nokia.com/3822
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
Diffstat (limited to 'installerbuilder')
3 files changed, 19 insertions, 4 deletions
diff --git a/installerbuilder/libinstaller/qtcreatorpersistentsettings.cpp b/installerbuilder/libinstaller/qtcreatorpersistentsettings.cpp index 0b5edafbd..f6ab8418f 100644 --- a/installerbuilder/libinstaller/qtcreatorpersistentsettings.cpp +++ b/installerbuilder/libinstaller/qtcreatorpersistentsettings.cpp @@ -172,15 +172,16 @@ bool QtCreatorPersistentSettings::save() //if we added a new debugger we need to adjust the tool chains QString abiString; + //find the abiString foreach (const QString &key, toolChainMap.keys()) { if (key.contains(QLatin1String(".TargetAbi"))) { abiString = toolChainMap.value(key).toString(); break; } } + //adjust debugger path foreach (const QString &key, toolChainMap.keys()) { - if (key.contains(QLatin1String(".Debugger")) - && toolChainMap.value(key).toString().isEmpty()) { + if (key.contains(QLatin1String(".Debugger"))) { toolChainMap.insert(key, m_abiToDebuggerHash.value(abiString)); break; } diff --git a/installerbuilder/libinstaller/registerdefaultdebuggeroperation.cpp b/installerbuilder/libinstaller/registerdefaultdebuggeroperation.cpp index fce7f2ef0..c974fc888 100644 --- a/installerbuilder/libinstaller/registerdefaultdebuggeroperation.cpp +++ b/installerbuilder/libinstaller/registerdefaultdebuggeroperation.cpp @@ -48,6 +48,19 @@ using namespace QInstaller; using namespace ProjectExplorer; +namespace { +//TODO move this to a general location it is used on some classes +QString fromNativeSeparatorsAllOS(const QString &pathName) +{ + QString n(pathName); + for (int i = 0; i < (int)n.length(); ++i) { + if (n[i] == QLatin1Char('\\')) + n[i] = QLatin1Char('/'); + } + return n; +} +} + RegisterDefaultDebuggerOperation::RegisterDefaultDebuggerOperation() { setName(QLatin1String("RegisterDefaultDebugger")); @@ -93,7 +106,7 @@ bool RegisterDefaultDebuggerOperation::performOperation() int argCounter = 0; const QString &abiString = args.at(argCounter++); //for example x86-windows-msys-pe-32bit - const QString &debuggerPath = QDir::toNativeSeparators(args.at(argCounter++)); + const QString &debuggerPath = fromNativeSeparatorsAllOS(args.at(argCounter++)); QtCreatorPersistentSettings creatorToolChainSettings; @@ -133,7 +146,7 @@ bool RegisterDefaultDebuggerOperation::undoOperation() int argCounter = 0; const QString &abiString = args.at(argCounter++); //for example x86-windows-msys-pe-32bit - const QString &debuggerPath = QDir::toNativeSeparators(args.at(argCounter++)); + const QString &debuggerPath = fromNativeSeparatorsAllOS(args.at(argCounter++)); Q_UNUSED(debuggerPath) QtCreatorPersistentSettings creatorToolChainSettings; diff --git a/installerbuilder/libinstaller/registerqtv23operation.cpp b/installerbuilder/libinstaller/registerqtv23operation.cpp index e6be547f8..3b8170ef4 100644 --- a/installerbuilder/libinstaller/registerqtv23operation.cpp +++ b/installerbuilder/libinstaller/registerqtv23operation.cpp @@ -47,6 +47,7 @@ using namespace QInstaller; namespace { +//TODO move this to a general location it is used on some classes QString fromNativeSeparatorsAllOS(const QString &pathName) { QString n(pathName); |