refactor: use QDir::fromNativeSeperators / toNativeSeperators
This commit is contained in:
parent
b326058ea2
commit
2c5ff4f956
|
@ -2560,7 +2560,7 @@ void MainWindow::debug()
|
||||||
inferior=mProject->options().hostApplication;
|
inferior=mProject->options().hostApplication;
|
||||||
inferiorHasSymbols = false;
|
inferiorHasSymbols = false;
|
||||||
}
|
}
|
||||||
inferior.replace('\\','/');
|
QDir::fromNativeSeparators(inferior);
|
||||||
if (!mDebugger->startClient(
|
if (!mDebugger->startClient(
|
||||||
mProject->options().compilerSet,
|
mProject->options().compilerSet,
|
||||||
inferior,
|
inferior,
|
||||||
|
@ -2657,7 +2657,7 @@ void MainWindow::debug()
|
||||||
}
|
}
|
||||||
|
|
||||||
prepareDebugger();
|
prepareDebugger();
|
||||||
QString newFilePath = debugFile.filePath().replace('\\','/');
|
QString newFilePath =QDir::fromNativeSeparators(debugFile.filePath());
|
||||||
if (!mDebugger->startClient(
|
if (!mDebugger->startClient(
|
||||||
pSettings->compilerSets().defaultIndex(),
|
pSettings->compilerSets().defaultIndex(),
|
||||||
newFilePath,
|
newFilePath,
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QGlobalStatic>
|
#include <QGlobalStatic>
|
||||||
|
#include "../systemconsts.h"
|
||||||
#include "../utils.h"
|
#include "../utils.h"
|
||||||
|
|
||||||
QStringList CppDirectives;
|
QStringList CppDirectives;
|
||||||
|
@ -506,7 +507,7 @@ bool isSystemHeaderFile(const QString &fileName, const QSet<QString> &includePat
|
||||||
QDir dir = info.dir();
|
QDir dir = info.dir();
|
||||||
QString absPath = dir.absolutePath();
|
QString absPath = dir.absolutePath();
|
||||||
foreach (const QString& incPath, includePaths) {
|
foreach (const QString& incPath, includePaths) {
|
||||||
if (absPath.startsWith(incPath))
|
if (absPath.startsWith(incPath, PATH_SENSITIVITY))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue