forked from qt-creator/qt-creator
Utils: Rename FilePath::normalizePathName to normalizedPathName
Change-Id: Idf5faab1cf55d6f7cca493c8ad451825310f5d66 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -334,7 +334,7 @@ bool FileUtils::makeWritable(const FilePath &path)
|
||||
|
||||
// makes sure that capitalization of directories is canonical on Windows and OS X.
|
||||
// This mimics the logic in QDeclarative_isFileCaseCorrect
|
||||
QString FileUtils::normalizePathName(const QString &name)
|
||||
QString FileUtils::normalizedPathName(const QString &name)
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
const QString nativeSeparatorName(QDir::toNativeSeparators(name));
|
||||
@@ -826,7 +826,7 @@ FilePath FilePath::normalizePathName() const
|
||||
{
|
||||
FilePath result = *this;
|
||||
if (!needsDevice()) // FIXME: Assumes no remote Windows and Mac for now.
|
||||
result.m_data = FileUtils::normalizePathName(result.m_data);
|
||||
result.m_data = FileUtils::normalizedPathName(result.m_data);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@@ -125,7 +125,7 @@ public:
|
||||
static int indexOfQmakeUnfriendly(const QString &name, int startpos = 0);
|
||||
static QString qmakeFriendlyName(const QString &name);
|
||||
static bool makeWritable(const FilePath &path);
|
||||
static QString normalizePathName(const QString &name);
|
||||
static QString normalizedPathName(const QString &name);
|
||||
|
||||
static bool isRelativePath(const QString &fileName);
|
||||
static bool isAbsolutePath(const QString &fileName) { return !isRelativePath(fileName); }
|
||||
|
@@ -445,7 +445,7 @@ QString correspondingHeaderOrSource(const QString &fileName, bool *wasHeader, Ca
|
||||
for (const QString &candidateDir : qAsConst(candidateDirs)) {
|
||||
for (const QString &candidateFileName : qAsConst(candidateFileNames)) {
|
||||
const QString candidateFilePath = candidateDir + QLatin1Char('/') + candidateFileName;
|
||||
const QString normalized = FileUtils::normalizePathName(candidateFilePath);
|
||||
const QString normalized = FileUtils::normalizedPathName(candidateFilePath);
|
||||
const QFileInfo candidateFi(normalized);
|
||||
if (candidateFi.isFile()) {
|
||||
if (cacheUsage == CacheUsage::ReadWrite) {
|
||||
|
@@ -2578,7 +2578,7 @@ CdbEngine::NormalizedSourceFileName CdbEngine::sourceMapNormalizeFileNameFromDeb
|
||||
const QString fileName = cdbSourcePathMapping(QDir::toNativeSeparators(f), m_sourcePathMappings,
|
||||
DebuggerToSource);
|
||||
// Up/lower case normalization according to Windows.
|
||||
const QString normalized = FileUtils::normalizePathName(fileName);
|
||||
const QString normalized = FileUtils::normalizedPathName(fileName);
|
||||
if (debugSourceMapping)
|
||||
qDebug(" sourceMapNormalizeFileNameFromDebugger %s->%s", qPrintable(fileName), qPrintable(normalized));
|
||||
// Check if it really exists, that is normalize worked and QFileInfo confirms it.
|
||||
@@ -2615,7 +2615,7 @@ static StackFrames parseFrames(const GdbMi &gdbmi, bool *incomplete = nullptr)
|
||||
frame.level = QString::number(i);
|
||||
const GdbMi fullName = frameMi["fullname"];
|
||||
if (fullName.isValid()) {
|
||||
frame.file = Utils::FileUtils::normalizePathName(fullName.data());
|
||||
frame.file = Utils::FileUtils::normalizedPathName(fullName.data());
|
||||
frame.line = frameMi["line"].data().toInt();
|
||||
frame.usable = false; // To be decided after source path mapping.
|
||||
const GdbMi languageMi = frameMi["language"];
|
||||
|
@@ -251,7 +251,7 @@ void parseBreakPoint(const GdbMi &gdbmi, BreakpointParameters *r,
|
||||
const GdbMi sourceFileName = gdbmi["srcfile"];
|
||||
if (sourceFileName.isValid()) {
|
||||
r->fileName = Utils::FilePath::fromUserInput(
|
||||
Utils::FileUtils::normalizePathName(sourceFileName.data()));
|
||||
Utils::FileUtils::normalizedPathName(sourceFileName.data()));
|
||||
const GdbMi lineNumber = gdbmi["srcline"];
|
||||
if (lineNumber.isValid())
|
||||
r->lineNumber = lineNumber.data().toULongLong(nullptr, 0);
|
||||
|
@@ -258,7 +258,7 @@ void UnstartedAppWatcherDialog::findProcess()
|
||||
const QString &appName = m_pathChooser->filePath().normalizePathName().toString();
|
||||
DeviceProcessItem fallback;
|
||||
foreach (const DeviceProcessItem &p, DeviceProcessList::localProcesses()) {
|
||||
if (Utils::FileUtils::normalizePathName(p.exe) == appName) {
|
||||
if (Utils::FileUtils::normalizedPathName(p.exe) == appName) {
|
||||
pidFound(p);
|
||||
return;
|
||||
}
|
||||
|
@@ -60,7 +60,7 @@ static QPair<FilePath, int> parseFileName(const QString &input)
|
||||
}
|
||||
}
|
||||
}
|
||||
const QString normalized = FileUtils::normalizePathName(fileName);
|
||||
const QString normalized = FileUtils::normalizedPathName(fileName);
|
||||
return qMakePair(FilePath::fromUserInput(normalized), linenumber);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user