Utils: Rename FileName to FilePath

More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-05-28 13:49:26 +02:00
parent 4704f49fbb
commit 473a741c9f
688 changed files with 3487 additions and 3484 deletions

View File

@@ -42,7 +42,7 @@ using namespace Valgrind::Callgrind;
namespace Constants { const char CALLGRIND_TEXT_MARK_CATEGORY[] = "Callgrind.Textmark"; }
CallgrindTextMark::CallgrindTextMark(const QPersistentModelIndex &index,
const FileName &fileName, int lineNumber)
const FilePath &fileName, int lineNumber)
: TextEditor::TextMark(fileName, lineNumber, Constants::CALLGRIND_TEXT_MARK_CATEGORY, 4.0)
, m_modelIndex(index)
{

View File

@@ -45,7 +45,7 @@ public:
* \note The index parameter must refer to one of the DataModel cost columns
*/
explicit CallgrindTextMark(const QPersistentModelIndex &index,
const Utils::FileName &fileName, int lineNumber);
const Utils::FilePath &fileName, int lineNumber);
const Valgrind::Callgrind::Function *function() const;

View File

@@ -982,7 +982,7 @@ void CallgrindToolPrivate::createTextMarks()
continue;
locations << location;
m_textMarks.append(new CallgrindTextMark(index, FileName::fromString(fileName), lineNumber));
m_textMarks.append(new CallgrindTextMark(index, FilePath::fromString(fileName), lineNumber));
}
}

View File

@@ -946,7 +946,7 @@ void MemcheckToolPrivate::setupRunner(MemcheckToolRunner *runTool)
{
RunControl *runControl = runTool->runControl();
m_errorModel.setRelevantFrameFinder(makeFrameFinder(transform(runControl->project()->files(Project::AllFiles),
&FileName::toString)));
&FilePath::toString)));
connect(runTool, &MemcheckToolRunner::parserError,
this, &MemcheckToolPrivate::parserError);
@@ -966,12 +966,12 @@ void MemcheckToolPrivate::setupRunner(MemcheckToolRunner *runTool)
m_loadExternalLogFile->setDisabled(true);
QString dir = runControl->project()->projectDirectory().toString() + '/';
const QString name = FileName::fromString(runTool->executable()).fileName();
const QString name = FilePath::fromString(runTool->executable()).fileName();
m_errorView->setDefaultSuppressionFile(dir + name + ".supp");
foreach (const QString &file, runTool->suppressionFiles()) {
QAction *action = m_filterMenu->addAction(FileName::fromString(file).fileName());
QAction *action = m_filterMenu->addAction(FilePath::fromString(file).fileName());
action->setToolTip(file);
connect(action, &QAction::triggered, this, [file] {
EditorManager::openEditorAt(file, 0);

View File

@@ -208,7 +208,7 @@ void SuppressionDialog::accept()
return;
// Add file to project if there is a project containing this file on the file system.
if (!ProjectExplorer::SessionManager::projectForFile(Utils::FileName::fromString(path))) {
if (!ProjectExplorer::SessionManager::projectForFile(Utils::FilePath::fromString(path))) {
for (ProjectExplorer::Project *p : ProjectExplorer::SessionManager::projects()) {
if (path.startsWith(p->projectDirectory().toString())) {
p->rootProjectNode()->addFiles(QStringList() << path);

View File

@@ -164,7 +164,7 @@ void ValgrindRunner::Private::remoteProcessStarted()
// we pick the last one, first would be "bash -c ..."
" | awk '{print $1;}'" // get pid
"\""
).arg(proc, Utils::FileName::fromString(m_debuggee.executable).fileName());
).arg(proc, Utils::FilePath::fromString(m_debuggee.executable).fileName());
// m_remote.m_findPID = m_remote.m_connection->createRemoteProcess(cmd.toUtf8());
connect(&m_findPID, &ApplicationLauncher::remoteStderr,