Debugger: Cleanup

Change-Id: Iaf7a3d69d920f8096763e2d8033df2d6371683a7
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Orgad Shaneh
2014-09-11 22:22:51 +03:00
committed by hjk
parent 50ad2a4d99
commit ad957282c8
4 changed files with 17 additions and 20 deletions

View File

@@ -394,11 +394,10 @@ void CdbEngine::init()
// Create local list of mappings in native separators
m_sourcePathMappings.clear();
const QSharedPointer<GlobalDebuggerOptions> globalOptions = debuggerCore()->globalDebuggerOptions();
if (!globalOptions->sourcePathMap.isEmpty()) {
typedef GlobalDebuggerOptions::SourcePathMap::const_iterator SourcePathMapIterator;
m_sourcePathMappings.reserve(globalOptions->sourcePathMap.size());
const SourcePathMapIterator cend = globalOptions->sourcePathMap.constEnd();
for (SourcePathMapIterator it = globalOptions->sourcePathMap.constBegin(); it != cend; ++it) {
SourcePathMap sourcePathMap = globalOptions->sourcePathMap;
if (!sourcePathMap.isEmpty()) {
m_sourcePathMappings.reserve(sourcePathMap.size());
for (auto it = sourcePathMap.constBegin(), cend = sourcePathMap.constEnd(); it != cend; ++it) {
m_sourcePathMappings.push_back(SourcePathMapping(QDir::toNativeSeparators(it.key()),
QDir::toNativeSeparators(it.value())));
}