forked from qt-creator/qt-creator
Utils: Rename FilePath::normalizePathName to normalizedPathName
Change-Id: Ib7bcc9968749649f762a396d3861f7b67711e926 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -822,7 +822,7 @@ FilePath FilePath::absoluteFilePath(const FilePath &tail) const
|
|||||||
return tail;
|
return tail;
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePath FilePath::normalizePathName() const
|
FilePath FilePath::normalizedPathName() const
|
||||||
{
|
{
|
||||||
FilePath result = *this;
|
FilePath result = *this;
|
||||||
if (!needsDevice()) // FIXME: Assumes no remote Windows and Mac for now.
|
if (!needsDevice()) // FIXME: Assumes no remote Windows and Mac for now.
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ public:
|
|||||||
|
|
||||||
// makes sure that capitalization of directories is canonical
|
// makes sure that capitalization of directories is canonical
|
||||||
// on Windows and macOS. This is rarely needed.
|
// on Windows and macOS. This is rarely needed.
|
||||||
FilePath normalizePathName() const;
|
FilePath normalizedPathName() const;
|
||||||
|
|
||||||
bool operator==(const FilePath &other) const;
|
bool operator==(const FilePath &other) const;
|
||||||
bool operator!=(const FilePath &other) const;
|
bool operator!=(const FilePath &other) const;
|
||||||
|
|||||||
@@ -914,7 +914,7 @@ DebuggerRunTool::DebuggerRunTool(RunControl *runControl, AllowTerminal allowTerm
|
|||||||
|
|
||||||
m_runParameters.inferior = runnable();
|
m_runParameters.inferior = runnable();
|
||||||
// Normalize to work around QTBUG-17529 (QtDeclarative fails with 'File name case mismatch'...)
|
// Normalize to work around QTBUG-17529 (QtDeclarative fails with 'File name case mismatch'...)
|
||||||
m_runParameters.inferior.workingDirectory = m_runParameters.inferior.workingDirectory.normalizePathName();
|
m_runParameters.inferior.workingDirectory = m_runParameters.inferior.workingDirectory.normalizedPathName();
|
||||||
setUseTerminal(allowTerminal == DoAllowTerminal && m_runParameters.useTerminal);
|
setUseTerminal(allowTerminal == DoAllowTerminal && m_runParameters.useTerminal);
|
||||||
|
|
||||||
const QByteArray envBinary = qgetenv("QTC_DEBUGGER_PATH");
|
const QByteArray envBinary = qgetenv("QTC_DEBUGGER_PATH");
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ void UnstartedAppWatcherDialog::startStopTimer(bool start)
|
|||||||
|
|
||||||
void UnstartedAppWatcherDialog::findProcess()
|
void UnstartedAppWatcherDialog::findProcess()
|
||||||
{
|
{
|
||||||
const QString &appName = m_pathChooser->filePath().normalizePathName().toString();
|
const QString &appName = m_pathChooser->filePath().normalizedPathName().toString();
|
||||||
DeviceProcessItem fallback;
|
DeviceProcessItem fallback;
|
||||||
foreach (const DeviceProcessItem &p, DeviceProcessList::localProcesses()) {
|
foreach (const DeviceProcessItem &p, DeviceProcessList::localProcesses()) {
|
||||||
if (Utils::FileUtils::normalizedPathName(p.exe) == appName) {
|
if (Utils::FileUtils::normalizedPathName(p.exe) == appName) {
|
||||||
|
|||||||
@@ -373,7 +373,7 @@ void ApplicationLauncherPrivate::start(const Runnable &runnable, const IDevice::
|
|||||||
|
|
||||||
if (m_isLocal) {
|
if (m_isLocal) {
|
||||||
// Work around QTBUG-17529 (QtDeclarative fails with 'File name case mismatch' ...)
|
// Work around QTBUG-17529 (QtDeclarative fails with 'File name case mismatch' ...)
|
||||||
const FilePath fixedPath = runnable.workingDirectory.normalizePathName();
|
const FilePath fixedPath = runnable.workingDirectory.normalizedPathName();
|
||||||
m_guiProcess.setWorkingDirectory(fixedPath);
|
m_guiProcess.setWorkingDirectory(fixedPath);
|
||||||
m_consoleProcess.setWorkingDirectory(fixedPath);
|
m_consoleProcess.setWorkingDirectory(fixedPath);
|
||||||
|
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ QmlBuildSystem::QmlBuildSystem(Target *target)
|
|||||||
: BuildSystem(target)
|
: BuildSystem(target)
|
||||||
{
|
{
|
||||||
m_canonicalProjectDir =
|
m_canonicalProjectDir =
|
||||||
target->project()->projectFilePath().canonicalPath().normalizePathName().parentDir();
|
target->project()->projectFilePath().canonicalPath().normalizedPathName().parentDir();
|
||||||
|
|
||||||
connect(target->project(), &Project::projectFileIsDirty,
|
connect(target->project(), &Project::projectFileIsDirty,
|
||||||
this, &QmlBuildSystem::refreshProjectFile);
|
this, &QmlBuildSystem::refreshProjectFile);
|
||||||
|
|||||||
@@ -449,7 +449,7 @@ void ExamplesListModel::parseTutorials(QXmlStreamReader *reader, const QString &
|
|||||||
static QString resourcePath()
|
static QString resourcePath()
|
||||||
{
|
{
|
||||||
// normalize paths so QML doesn't freak out if it's wrongly capitalized on Windows
|
// normalize paths so QML doesn't freak out if it's wrongly capitalized on Windows
|
||||||
return Core::ICore::resourcePath().normalizePathName().toString();
|
return Core::ICore::resourcePath().normalizedPathName().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExamplesListModel::updateExamples()
|
void ExamplesListModel::updateExamples()
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ void runSilverSeacher(FutureInterfaceType &fi, FileFindParameters parameters)
|
|||||||
if (!params.searchOptions.isEmpty())
|
if (!params.searchOptions.isEmpty())
|
||||||
arguments << params.searchOptions.split(' ');
|
arguments << params.searchOptions.split(' ');
|
||||||
|
|
||||||
arguments << "--" << parameters.text << directory.normalizePathName().toString();
|
arguments << "--" << parameters.text << directory.normalizedPathName().toString();
|
||||||
|
|
||||||
QtcProcess process;
|
QtcProcess process;
|
||||||
process.setCommand({"ag", arguments});
|
process.setCommand({"ag", arguments});
|
||||||
|
|||||||
@@ -752,7 +752,7 @@ void MemcheckToolPrivate::heobAction()
|
|||||||
}
|
}
|
||||||
|
|
||||||
FilePath executable = sr.command.executable();
|
FilePath executable = sr.command.executable();
|
||||||
const QString workingDirectory = sr.workingDirectory.normalizePathName().toString();
|
const QString workingDirectory = sr.workingDirectory.normalizedPathName().toString();
|
||||||
const QString commandLineArguments = sr.command.arguments();
|
const QString commandLineArguments = sr.command.arguments();
|
||||||
const QStringList envStrings = sr.environment.toStringList();
|
const QStringList envStrings = sr.environment.toStringList();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user