summaryrefslogtreecommitdiff
path: root/src/plugins/debugger
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-05-28 13:49:26 +0200
committerhjk <hjk@qt.io>2019-05-28 12:23:26 +0000
commit473a741c9fcf09febba312464fab8385e2351181 (patch)
tree2d328a090993cb5c5fd34b43e9468bcbf7e4d4d0 /src/plugins/debugger
parent4704f49fbb1201ebf10ab9dbaed0275ff25faba8 (diff)
downloadqt-creator-473a741c9fcf09febba312464fab8385e2351181.tar.gz
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>
Diffstat (limited to 'src/plugins/debugger')
-rw-r--r--src/plugins/debugger/breakhandler.cpp12
-rw-r--r--src/plugins/debugger/breakhandler.h4
-rw-r--r--src/plugins/debugger/cdb/cdbengine.cpp4
-rw-r--r--src/plugins/debugger/cdb/cdbparsehelpers.cpp2
-rw-r--r--src/plugins/debugger/debuggerdialogs.cpp2
-rw-r--r--src/plugins/debugger/debuggerengine.cpp6
-rw-r--r--src/plugins/debugger/debuggerengine.h10
-rw-r--r--src/plugins/debugger/debuggeritem.cpp6
-rw-r--r--src/plugins/debugger/debuggeritem.h12
-rw-r--r--src/plugins/debugger/debuggeritemmanager.cpp34
-rw-r--r--src/plugins/debugger/debuggeritemmanager.h4
-rw-r--r--src/plugins/debugger/debuggerkitinformation.cpp14
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp4
-rw-r--r--src/plugins/debugger/debuggerruncontrol.cpp4
-rw-r--r--src/plugins/debugger/debuggerruncontrol.h4
-rw-r--r--src/plugins/debugger/debuggersourcepathmappingwidget.cpp4
-rw-r--r--src/plugins/debugger/debuggertooltipmanager.cpp4
-rw-r--r--src/plugins/debugger/disassembleragent.cpp4
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp8
-rw-r--r--src/plugins/debugger/loadcoredialog.cpp4
-rw-r--r--src/plugins/debugger/qml/qmlengine.cpp2
-rw-r--r--src/plugins/debugger/sourceagent.cpp4
-rw-r--r--src/plugins/debugger/stackhandler.cpp2
23 files changed, 77 insertions, 77 deletions
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp
index 481c123046..0e015eda58 100644
--- a/src/plugins/debugger/breakhandler.cpp
+++ b/src/plugins/debugger/breakhandler.cpp
@@ -87,7 +87,7 @@ static BreakpointManager *theBreakpointManager = nullptr;
class BreakpointMarker : public TextEditor::TextMark
{
public:
- BreakpointMarker(const Breakpoint &bp, const FileName &fileName, int lineNumber)
+ BreakpointMarker(const Breakpoint &bp, const FilePath &fileName, int lineNumber)
: TextMark(fileName, lineNumber, Constants::TEXT_MARK_CATEGORY_BREAKPOINT), m_bp(bp)
{
setColor(Theme::Debugger_Breakpoint_TextMarkColor);
@@ -106,7 +106,7 @@ public:
gbp->m_params.lineNumber = lineNumber;
}
- void updateFileName(const FileName &fileName) final
+ void updateFileName(const FilePath &fileName) final
{
TextMark::updateFileName(fileName);
QTC_ASSERT(m_bp, return);
@@ -145,7 +145,7 @@ public:
class GlobalBreakpointMarker : public TextEditor::TextMark
{
public:
- GlobalBreakpointMarker(GlobalBreakpoint gbp, const FileName &fileName, int lineNumber)
+ GlobalBreakpointMarker(GlobalBreakpoint gbp, const FilePath &fileName, int lineNumber)
: TextMark(fileName, lineNumber, Constants::TEXT_MARK_CATEGORY_BREAKPOINT), m_gbp(gbp)
{
setColor(Theme::Debugger_Breakpoint_TextMarkColor);
@@ -174,7 +174,7 @@ public:
m_gbp->update();
}
- void updateFileName(const FileName &fileName) final
+ void updateFileName(const FilePath &fileName) final
{
TextMark::updateFileName(fileName);
QTC_ASSERT(m_gbp, return);
@@ -1877,7 +1877,7 @@ void BreakpointItem::updateMarkerIcon()
void BreakpointItem::updateMarker()
{
- FileName file = FileName::fromString(markerFileName());
+ FilePath file = FilePath::fromString(markerFileName());
int line = markerLineNumber();
if (m_marker && (file != m_marker->fileName() || line != m_marker->lineNumber()))
destroyMarker();
@@ -2298,7 +2298,7 @@ void GlobalBreakpointItem::updateMarker()
return;
}
- const FileName file = FileName::fromString(m_params.fileName);
+ const FilePath file = FilePath::fromString(m_params.fileName);
const int line = m_params.lineNumber;
if (m_marker && (file != m_marker->fileName() || line != m_marker->lineNumber()))
destroyMarker();
diff --git a/src/plugins/debugger/breakhandler.h b/src/plugins/debugger/breakhandler.h
index 544f4a509e..83d934034b 100644
--- a/src/plugins/debugger/breakhandler.h
+++ b/src/plugins/debugger/breakhandler.h
@@ -76,7 +76,7 @@ public:
void removeBreakpointFromModel();
void updateLineNumber(int lineNumber);
- void updateFileName(const Utils::FileName &fileName);
+ void updateFileName(const Utils::FilePath &fileName);
QString displayName() const;
QString markerFileName() const;
@@ -191,7 +191,7 @@ public:
void deleteGlobalOrThisBreakpoint();
void updateLineNumber(int lineNumber);
- void updateFileName(const Utils::FileName &fileName);
+ void updateFileName(const Utils::FilePath &fileName);
const GlobalBreakpoint globalBreakpoint() const;
void gotoState(BreakpointState target, BreakpointState assumedCurrent);
diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp
index dd29477deb..b740520ea0 100644
--- a/src/plugins/debugger/cdb/cdbengine.cpp
+++ b/src/plugins/debugger/cdb/cdbengine.cpp
@@ -526,7 +526,7 @@ void CdbEngine::handleInitialSessionIdle()
if (rp.breakOnMain) {
BreakpointParameters bp(BreakpointAtMain);
if (rp.startMode == StartInternal || rp.startMode == StartExternal) {
- const QString &moduleFileName = Utils::FileName::fromString(rp.inferior.executable)
+ const QString &moduleFileName = Utils::FilePath::fromString(rp.inferior.executable)
.fileName();
bp.module = moduleFileName.left(moduleFileName.indexOf('.'));
}
@@ -2205,7 +2205,7 @@ void CdbEngine::handleExtensionMessage(char t, int token, const QString &what, c
if (!isDebuggerWinException(exception.exceptionCode)) {
const Task::TaskType type =
isFatalWinException(exception.exceptionCode) ? Task::Error : Task::Warning;
- const FileName fileName = FileName::fromUserInput(exception.file);
+ const FilePath fileName = FilePath::fromUserInput(exception.file);
const QString taskEntry = tr("Debugger encountered an exception: %1").arg(
exception.toString(false).trimmed());
TaskHub::addTask(type, taskEntry,
diff --git a/src/plugins/debugger/cdb/cdbparsehelpers.cpp b/src/plugins/debugger/cdb/cdbparsehelpers.cpp
index 577776f8fb..2590a47a09 100644
--- a/src/plugins/debugger/cdb/cdbparsehelpers.cpp
+++ b/src/plugins/debugger/cdb/cdbparsehelpers.cpp
@@ -84,7 +84,7 @@ static inline QString cdbBreakPointFileName(const BreakpointParameters &params,
if (params.fileName.isEmpty())
return params.fileName;
if (params.pathUsage == BreakpointUseShortPath)
- return Utils::FileName::fromString(params.fileName).fileName();
+ return Utils::FilePath::fromString(params.fileName).fileName();
return cdbSourcePathMapping(QDir::toNativeSeparators(params.fileName), sourcePathMapping, SourceToDebugger);
}
diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp
index aa5cd1b1ab..4024ceb8ae 100644
--- a/src/plugins/debugger/debuggerdialogs.cpp
+++ b/src/plugins/debugger/debuggerdialogs.cpp
@@ -172,7 +172,7 @@ QString StartApplicationParameters::displayName() const
{
const int maxLength = 60;
- QString name = FileName::fromString(runnable.executable).fileName()
+ QString name = FilePath::fromString(runnable.executable).fileName()
+ ' ' + runnable.commandLineArguments;
if (name.size() > 60) {
int index = name.lastIndexOf(' ', maxLength);
diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp
index a492b4eaed..6b94e5025d 100644
--- a/src/plugins/debugger/debuggerengine.cpp
+++ b/src/plugins/debugger/debuggerengine.cpp
@@ -173,7 +173,7 @@ Location::Location(const StackFrame &frame, bool marker)
}
-LocationMark::LocationMark(DebuggerEngine *engine, const FileName &file, int line)
+LocationMark::LocationMark(DebuggerEngine *engine, const FilePath &file, int line)
: TextMark(file, line, Constants::TEXT_MARK_CATEGORY_LOCATION), m_engine(engine)
{
setPriority(TextMark::HighPriority);
@@ -1065,7 +1065,7 @@ void DebuggerEngine::gotoLocation(const Location &loc)
editor->document()->setProperty(Constants::OPENED_BY_DEBUGGER, true);
if (loc.needsMarker()) {
- d->m_locationMark.reset(new LocationMark(this, FileName::fromString(file), line));
+ d->m_locationMark.reset(new LocationMark(this, FilePath::fromString(file), line));
d->m_locationMark->setToolTip(tr("Current debugger location of %1").arg(displayName()));
}
}
@@ -2583,7 +2583,7 @@ QString DebuggerEngine::formatStartParameters() const
if (!sp.projectSourceDirectory.isEmpty()) {
str << "Project: " << sp.projectSourceDirectory.toUserOutput() << '\n';
str << "Additional Search Directories:";
- for (const FileName &dir : sp.additionalSearchDirectories)
+ for (const FilePath &dir : sp.additionalSearchDirectories)
str << ' ' << dir;
str << '\n';
}
diff --git a/src/plugins/debugger/debuggerengine.h b/src/plugins/debugger/debuggerengine.h
index 54eb9fa22a..78826dd518 100644
--- a/src/plugins/debugger/debuggerengine.h
+++ b/src/plugins/debugger/debuggerengine.h
@@ -147,13 +147,13 @@ public:
// Used by Android to avoid false positives on warnOnRelease
bool skipExecutableValidation = false;
bool useTargetAsync = false;
- Utils::FileNameList additionalSearchDirectories;
+ Utils::FilePathList additionalSearchDirectories;
// Used by iOS.
QString platform;
QString deviceSymbolsRoot;
bool continueAfterAttach = false;
- Utils::FileName sysRoot;
+ Utils::FilePath sysRoot;
// Used by general core file debugging. Public access requested in QTCREATORBUG-17158.
QString coreFile;
@@ -177,8 +177,8 @@ public:
bool isSnapshot = false; // Set if created internally.
ProjectExplorer::Abi toolChainAbi;
- Utils::FileName projectSourceDirectory;
- Utils::FileNameList projectSourceFiles;
+ Utils::FilePath projectSourceDirectory;
+ Utils::FilePathList projectSourceFiles;
// Used by Script debugging
QString interpreter;
@@ -567,7 +567,7 @@ public:
class LocationMark : public TextEditor::TextMark
{
public:
- LocationMark(DebuggerEngine *engine, const Utils::FileName &file, int line);
+ LocationMark(DebuggerEngine *engine, const Utils::FilePath &file, int line);
void removedFromEditor() override { updateLineNumber(0); }
void updateIcon();
diff --git a/src/plugins/debugger/debuggeritem.cpp b/src/plugins/debugger/debuggeritem.cpp
index 2c073b1d54..c17766361c 100644
--- a/src/plugins/debugger/debuggeritem.cpp
+++ b/src/plugins/debugger/debuggeritem.cpp
@@ -106,8 +106,8 @@ DebuggerItem::DebuggerItem(const QVariant &id)
DebuggerItem::DebuggerItem(const QVariantMap &data)
{
m_id = data.value(DEBUGGER_INFORMATION_ID).toString();
- m_command = FileName::fromUserInput(data.value(DEBUGGER_INFORMATION_COMMAND).toString());
- m_workingDirectory = FileName::fromUserInput(data.value(DEBUGGER_INFORMATION_WORKINGDIRECTORY).toString());
+ m_command = FilePath::fromUserInput(data.value(DEBUGGER_INFORMATION_COMMAND).toString());
+ m_workingDirectory = FilePath::fromUserInput(data.value(DEBUGGER_INFORMATION_WORKINGDIRECTORY).toString());
m_unexpandedDisplayName = data.value(DEBUGGER_INFORMATION_DISPLAYNAME).toString();
m_isAutoDetected = data.value(DEBUGGER_INFORMATION_AUTODETECTED, false).toBool();
m_version = data.value(DEBUGGER_INFORMATION_VERSION).toString();
@@ -323,7 +323,7 @@ void DebuggerItem::setEngineType(const DebuggerEngineType &engineType)
m_engineType = engineType;
}
-void DebuggerItem::setCommand(const FileName &command)
+void DebuggerItem::setCommand(const FilePath &command)
{
m_command = command;
}
diff --git a/src/plugins/debugger/debuggeritem.h b/src/plugins/debugger/debuggeritem.h
index c065700d96..77e18bff46 100644
--- a/src/plugins/debugger/debuggeritem.h
+++ b/src/plugins/debugger/debuggeritem.h
@@ -72,8 +72,8 @@ public:
DebuggerEngineType engineType() const { return m_engineType; }
void setEngineType(const DebuggerEngineType &engineType);
- Utils::FileName command() const { return m_command; }
- void setCommand(const Utils::FileName &command);
+ Utils::FilePath command() const { return m_command; }
+ void setCommand(const Utils::FilePath &command);
bool isAutoDetected() const { return m_isAutoDetected; }
void setAutoDetected(bool isAutoDetected);
@@ -99,8 +99,8 @@ public:
void reinitializeFromFile();
- Utils::FileName workingDirectory() const { return m_workingDirectory; }
- void setWorkingDirectory(const Utils::FileName &workingPath) { m_workingDirectory = workingPath; }
+ Utils::FilePath workingDirectory() const { return m_workingDirectory; }
+ void setWorkingDirectory(const Utils::FilePath &workingPath) { m_workingDirectory = workingPath; }
private:
DebuggerItem(const QVariant &id);
@@ -109,8 +109,8 @@ private:
QVariant m_id;
QString m_unexpandedDisplayName;
DebuggerEngineType m_engineType = NoEngineType;
- Utils::FileName m_command;
- Utils::FileName m_workingDirectory;
+ Utils::FilePath m_command;
+ Utils::FilePath m_workingDirectory;
bool m_isAutoDetected = false;
QString m_version;
ProjectExplorer::Abis m_abis;
diff --git a/src/plugins/debugger/debuggeritemmanager.cpp b/src/plugins/debugger/debuggeritemmanager.cpp
index da5ceae2fe..6d1e14cff8 100644
--- a/src/plugins/debugger/debuggeritemmanager.cpp
+++ b/src/plugins/debugger/debuggeritemmanager.cpp
@@ -89,7 +89,7 @@ public:
void addDebugger(const DebuggerItem &item);
QVariant registerDebugger(const DebuggerItem &item);
- void readDebuggers(const FileName &fileName, bool isSystem);
+ void readDebuggers(const FilePath &fileName, bool isSystem);
void autoDetectCdbDebuggers();
void autoDetectGdbOrLldbDebuggers();
QString uniqueDisplayName(const QString &base);
@@ -624,7 +624,7 @@ void DebuggerOptionsPage::finish()
void DebuggerItemManagerPrivate::autoDetectCdbDebuggers()
{
- FileNameList cdbs;
+ FilePathList cdbs;
const QStringList programDirs = {
QString::fromLocal8Bit(qgetenv("ProgramFiles")),
@@ -653,7 +653,7 @@ void DebuggerItemManagerPrivate::autoDetectCdbDebuggers()
// Pre Windows SDK 8: Check 'Debugging Tools for Windows'
for (const QFileInfo &fi : dir.entryInfoList({"Debugging Tools for Windows*"},
QDir::Dirs | QDir::NoDotAndDotDot)) {
- const FileName filePath = FileName::fromFileInfo(fi).pathAppended("cdb.exe");
+ const FilePath filePath = FilePath::fromFileInfo(fi).pathAppended("cdb.exe");
if (!cdbs.contains(filePath))
cdbs.append(filePath);
}
@@ -676,13 +676,13 @@ void DebuggerItemManagerPrivate::autoDetectCdbDebuggers()
const QString path = kitFolderFi.absoluteFilePath();
const QFileInfo cdb32(path + "/Debuggers/x86/cdb.exe");
if (cdb32.isExecutable())
- cdbs.append(FileName::fromString(cdb32.absoluteFilePath()));
+ cdbs.append(FilePath::fromString(cdb32.absoluteFilePath()));
const QFileInfo cdb64(path + "/Debuggers/x64/cdb.exe");
if (cdb64.isExecutable())
- cdbs.append(FileName::fromString(cdb64.absoluteFilePath()));
+ cdbs.append(FilePath::fromString(cdb64.absoluteFilePath()));
}
- for (const FileName &cdb : qAsConst(cdbs)) {
+ for (const FilePath &cdb : qAsConst(cdbs)) {
if (DebuggerItemManager::findByCommand(cdb))
continue;
DebuggerItem item;
@@ -721,7 +721,7 @@ void DebuggerItemManagerPrivate::autoDetectGdbOrLldbDebuggers()
}
*/
- FileNameList suspects;
+ FilePathList suspects;
if (HostOsInfo::isMacHost()) {
SynchronousProcess lldbInfo;
@@ -733,23 +733,23 @@ void DebuggerItemManagerPrivate::autoDetectGdbOrLldbDebuggers()
if (!lPath.isEmpty()) {
const QFileInfo fi(lPath);
if (fi.exists() && fi.isExecutable() && !fi.isDir())
- suspects.append(FileName::fromString(fi.absoluteFilePath()));
+ suspects.append(FilePath::fromString(fi.absoluteFilePath()));
}
}
}
- Utils::FileNameList path = Environment::systemEnvironment().path();
+ Utils::FilePathList path = Environment::systemEnvironment().path();
path = Utils::filteredUnique(path);
QDir dir;
dir.setNameFilters(filters);
dir.setFilter(QDir::Files | QDir::Executable);
- foreach (const Utils::FileName &base, path) {
+ foreach (const Utils::FilePath &base, path) {
dir.setPath(base.toFileInfo().absoluteFilePath());
foreach (const QString &entry, dir.entryList())
- suspects.append(FileName::fromString(dir.absoluteFilePath(entry)));
+ suspects.append(FilePath::fromString(dir.absoluteFilePath(entry)));
}
- foreach (const FileName &command, suspects) {
+ foreach (const FilePath &command, suspects) {
const auto commandMatches = [command](const DebuggerTreeItem *titem) {
return titem->m_item.command() == command;
};
@@ -772,9 +772,9 @@ void DebuggerItemManagerPrivate::autoDetectGdbOrLldbDebuggers()
}
}
-static FileName userSettingsFileName()
+static FilePath userSettingsFileName()
{
- return FileName::fromString(ICore::userResourcePath() + DEBUGGER_FILENAME);
+ return FilePath::fromString(ICore::userResourcePath() + DEBUGGER_FILENAME);
}
DebuggerItemManagerPrivate::DebuggerItemManagerPrivate()
@@ -825,7 +825,7 @@ QVariant DebuggerItemManagerPrivate::registerDebugger(const DebuggerItem &item)
return di.id();
}
-void DebuggerItemManagerPrivate::readDebuggers(const FileName &fileName, bool isSystem)
+void DebuggerItemManagerPrivate::readDebuggers(const FilePath &fileName, bool isSystem)
{
PersistentSettingsReader reader;
if (!reader.load(fileName))
@@ -870,7 +870,7 @@ void DebuggerItemManagerPrivate::readDebuggers(const FileName &fileName, bool is
void DebuggerItemManagerPrivate::restoreDebuggers()
{
// Read debuggers from SDK
- readDebuggers(FileName::fromString(ICore::installerResourcePath() + DEBUGGER_FILENAME), true);
+ readDebuggers(FilePath::fromString(ICore::installerResourcePath() + DEBUGGER_FILENAME), true);
// Read all debuggers from user file.
readDebuggers(userSettingsFileName(), false);
@@ -926,7 +926,7 @@ const QList<DebuggerItem> DebuggerItemManager::debuggers()
return result;
}
-const DebuggerItem *DebuggerItemManager::findByCommand(const FileName &command)
+const DebuggerItem *DebuggerItemManager::findByCommand(const FilePath &command)
{
return findDebugger([command](const DebuggerItem &item) {
return item.command() == command;
diff --git a/src/plugins/debugger/debuggeritemmanager.h b/src/plugins/debugger/debuggeritemmanager.h
index ec2d74c928..1b2c21e052 100644
--- a/src/plugins/debugger/debuggeritemmanager.h
+++ b/src/plugins/debugger/debuggeritemmanager.h
@@ -33,7 +33,7 @@
#include <QString>
#include <QCoreApplication>
-namespace Utils { class FileName; }
+namespace Utils { class FilePath; }
namespace Debugger {
@@ -52,7 +52,7 @@ public:
static QVariant registerDebugger(const DebuggerItem &item);
static void deregisterDebugger(const QVariant &id);
- static const DebuggerItem *findByCommand(const Utils::FileName &command);
+ static const DebuggerItem *findByCommand(const Utils::FilePath &command);
static const DebuggerItem *findById(const QVariant &id);
static const DebuggerItem *findByEngineType(DebuggerEngineType engineType);
};
diff --git a/src/plugins/debugger/debuggerkitinformation.cpp b/src/plugins/debugger/debuggerkitinformation.cpp
index 39a14097ff..412d54b33c 100644
--- a/src/plugins/debugger/debuggerkitinformation.cpp
+++ b/src/plugins/debugger/debuggerkitinformation.cpp
@@ -218,7 +218,7 @@ void DebuggerKitAspect::setup(Kit *k)
}
} else {
// We have an executable path.
- FileName fileName = FileName::fromUserInput(binary);
+ FilePath fileName = FilePath::fromUserInput(binary);
if (item.command() == fileName) {
// And it's is the path of this item.
level = std::min(item.matchTarget(tcAbi), DebuggerItem::MatchesSomewhat);
@@ -270,7 +270,7 @@ void DebuggerKitAspect::fix(Kit *k)
return;
}
- FileName fileName = FileName::fromUserInput(binary);
+ FilePath fileName = FilePath::fromUserInput(binary);
const DebuggerItem *item = DebuggerItemManager::findByCommand(fileName);
if (!item) {
qWarning("Debugger command %s invalid in kit %s",
@@ -357,25 +357,25 @@ Tasks DebuggerKitAspect::validateDebugger(const Kit *k)
const Core::Id id = ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM;
if (errors & NoDebugger)
- result << Task(Task::Warning, tr("No debugger set up."), FileName(), -1, id);
+ result << Task(Task::Warning, tr("No debugger set up."), FilePath(), -1, id);
if (errors & DebuggerNotFound)
result << Task(Task::Error, tr("Debugger \"%1\" not found.").arg(path),
- FileName(), -1, id);
+ FilePath(), -1, id);
if (errors & DebuggerNotExecutable)
- result << Task(Task::Error, tr("Debugger \"%1\" not executable.").arg(path), FileName(), -1, id);
+ result << Task(Task::Error, tr("Debugger \"%1\" not executable.").arg(path), FilePath(), -1, id);
if (errors & DebuggerNeedsAbsolutePath) {
const QString message =
tr("The debugger location must be given as an "
"absolute path (%1).").arg(path);
- result << Task(Task::Error, message, FileName(), -1, id);
+ result << Task(Task::Error, message, FilePath(), -1, id);
}
if (errors & DebuggerDoesNotMatch) {
const QString message = tr("The ABI of the selected debugger does not "
"match the toolchain ABI.");
- result << Task(Task::Warning, message, FileName(), -1, id);
+ result << Task(Task::Warning, message, FilePath(), -1, id);
}
return result;
}
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index d72b3f1aee..a4f12ee20a 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -674,7 +674,7 @@ public:
message = tr("0x%1 hit").arg(data.address, 0, 16);
} else {
//: Message tracepoint: %1 file, %2 line %3 function hit.
- message = tr("%1:%2 %3() hit").arg(FileName::fromString(data.fileName).fileName()).
+ message = tr("%1:%2 %3() hit").arg(FilePath::fromString(data.fileName).fileName()).
arg(data.lineNumber).
arg(cppFunctionAt(data.fileName, data.lineNumber));
}
@@ -885,7 +885,7 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
}
}
if (!kit)
- kit = guessKitFromAbis(Abi::abisOfBinary(FileName::fromString(executable)));
+ kit = guessKitFromAbis(Abi::abisOfBinary(FilePath::fromString(executable)));
auto runControl = new RunControl(ProjectExplorer::Constants::DEBUG_RUN_MODE);
runControl->setKit(kit);
diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp
index af933ac8c5..8a70795f23 100644
--- a/src/plugins/debugger/debuggerruncontrol.cpp
+++ b/src/plugins/debugger/debuggerruncontrol.cpp
@@ -311,7 +311,7 @@ void DebuggerRunTool::setAttachPid(qint64 pid)
m_runParameters.attachPID = ProcessHandle(pid);
}
-void DebuggerRunTool::setSysRoot(const Utils::FileName &sysRoot)
+void DebuggerRunTool::setSysRoot(const Utils::FilePath &sysRoot)
{
m_runParameters.sysRoot = sysRoot;
}
@@ -517,7 +517,7 @@ void DebuggerRunTool::addExpectedSignal(const QString &signal)
m_runParameters.expectedSignals.append(signal);
}
-void DebuggerRunTool::addSearchDirectory(const Utils::FileName &dir)
+void DebuggerRunTool::addSearchDirectory(const Utils::FilePath &dir)
{
m_runParameters.additionalSearchDirectories.append(dir);
}
diff --git a/src/plugins/debugger/debuggerruncontrol.h b/src/plugins/debugger/debuggerruncontrol.h
index 6315d57a1b..cf2227e7a1 100644
--- a/src/plugins/debugger/debuggerruncontrol.h
+++ b/src/plugins/debugger/debuggerruncontrol.h
@@ -84,7 +84,7 @@ public:
void setCrashParameter(const QString &event);
void addExpectedSignal(const QString &signal);
- void addSearchDirectory(const Utils::FileName &dir);
+ void addSearchDirectory(const Utils::FilePath &dir);
void setStartMode(DebuggerStartMode startMode);
void setCloseMode(DebuggerCloseMode closeMode);
@@ -92,7 +92,7 @@ public:
void setAttachPid(Utils::ProcessHandle pid);
void setAttachPid(qint64 pid);
- void setSysRoot(const Utils::FileName &sysRoot);
+ void setSysRoot(const Utils::FilePath &sysRoot);
void setSymbolFile(const QString &symbolFile);
void setRemoteChannel(const QString &channel);
void setRemoteChannel(const QString &host, int port);
diff --git a/src/plugins/debugger/debuggersourcepathmappingwidget.cpp b/src/plugins/debugger/debuggersourcepathmappingwidget.cpp
index fe1a5f541a..8652ff10f8 100644
--- a/src/plugins/debugger/debuggersourcepathmappingwidget.cpp
+++ b/src/plugins/debugger/debuggersourcepathmappingwidget.cpp
@@ -401,7 +401,7 @@ void DebuggerSourcePathMappingWidget::slotEditTargetFieldChanged()
}
// Find Qt installation by running qmake
-static QString findQtInstallPath(const FileName &qmakePath)
+static QString findQtInstallPath(const FilePath &qmakePath)
{
if (qmakePath.isEmpty())
return QString();
@@ -438,7 +438,7 @@ DebuggerSourcePathMappingWidget::SourcePathMap
DebuggerSourcePathMappingWidget::mergePlatformQtPath(const DebuggerRunParameters &sp,
const SourcePathMap &in)
{
- const FileName qmake = BuildableHelperLibrary::findSystemQt(sp.inferior.environment);
+ const FilePath qmake = BuildableHelperLibrary::findSystemQt(sp.inferior.environment);
// FIXME: Get this from the profile?
// We could query the QtVersion for this information directly, but then we
// will need to add a dependency on QtSupport to the debugger.
diff --git a/src/plugins/debugger/debuggertooltipmanager.cpp b/src/plugins/debugger/debuggertooltipmanager.cpp
index 5821f43a11..2ad12ff682 100644
--- a/src/plugins/debugger/debuggertooltipmanager.cpp
+++ b/src/plugins/debugger/debuggertooltipmanager.cpp
@@ -721,8 +721,8 @@ DebuggerToolTipContext::DebuggerToolTipContext()
static bool filesMatch(const QString &file1, const QString &file2)
{
- return FileName::fromString(QFileInfo(file1).canonicalFilePath())
- == FileName::fromString(QFileInfo(file2).canonicalFilePath());
+ return FilePath::fromString(QFileInfo(file1).canonicalFilePath())
+ == FilePath::fromString(QFileInfo(file2).canonicalFilePath());
}
bool DebuggerToolTipContext::matchesFrame(const StackFrame &frame) const
diff --git a/src/plugins/debugger/disassembleragent.cpp b/src/plugins/debugger/disassembleragent.cpp
index 8e65cec051..d8a083b8d5 100644
--- a/src/plugins/debugger/disassembleragent.cpp
+++ b/src/plugins/debugger/disassembleragent.cpp
@@ -66,7 +66,7 @@ class DisassemblerBreakpointMarker : public TextMark
{
public:
DisassemblerBreakpointMarker(const Breakpoint &bp, int lineNumber)
- : TextMark(Utils::FileName(), lineNumber, Constants::TEXT_MARK_CATEGORY_BREAKPOINT), m_bp(bp)
+ : TextMark(Utils::FilePath(), lineNumber, Constants::TEXT_MARK_CATEGORY_BREAKPOINT), m_bp(bp)
{
setIcon(bp->icon());
setPriority(TextMark::NormalPriority);
@@ -141,7 +141,7 @@ public:
DisassemblerAgentPrivate::DisassemblerAgentPrivate(DebuggerEngine *engine)
: document(nullptr),
engine(engine),
- locationMark(engine, Utils::FileName(), 0),
+ locationMark(engine, Utils::FilePath(), 0),
mimeType("text/x-qtcreator-generic-asm"),
resetLocationScheduled(false)
{}
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index b51dc1f33c..b763d951fd 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -355,7 +355,7 @@ void GdbEngine::handleResponse(const QString &buff)
Task task(Task::Warning,
tr("Missing debug information for %1\nTry: %2")
.arg(m_lastMissingDebugInfo).arg(cmd),
- FileName(), 0, Debugger::Constants::TASK_CATEGORY_DEBUGGER_DEBUGINFO);
+ FilePath(), 0, Debugger::Constants::TASK_CATEGORY_DEBUGGER_DEBUGINFO);
TaskHub::addTask(task);
Internal::addDebugInfoTask(task.taskId, cmd);
@@ -1629,7 +1629,7 @@ QString GdbEngine::cleanupFullName(const QString &fileName)
}
cleanFilePath.clear();
- const QString base = FileName::fromString(fileName).fileName();
+ const QString base = FilePath::fromString(fileName).fileName();
QMap<QString, QString>::const_iterator jt = m_baseNameToFullName.constFind(base);
while (jt != m_baseNameToFullName.constEnd() && jt.key() == base) {
@@ -1700,7 +1700,7 @@ void GdbEngine::setLinuxOsAbi()
const DebuggerRunParameters &rp = runParameters();
bool isElf = (rp.toolChainAbi.binaryFormat() == Abi::ElfFormat);
if (!isElf && !rp.inferior.executable.isEmpty()) {
- isElf = Utils::anyOf(Abi::abisOfBinary(FileName::fromString(rp.inferior.executable)),
+ isElf = Utils::anyOf(Abi::abisOfBinary(FilePath::fromString(rp.inferior.executable)),
[](const Abi &abi) {
return abi.binaryFormat() == Abi::ElfFormat;
});
@@ -2077,7 +2077,7 @@ QString GdbEngine::breakLocation(const QString &file) const
{
QString where = m_fullToShortName.value(file);
if (where.isEmpty())
- return FileName::fromString(file).fileName();
+ return FilePath::fromString(file).fileName();
return where;
}
diff --git a/src/plugins/debugger/loadcoredialog.cpp b/src/plugins/debugger/loadcoredialog.cpp
index 82d26e4ae7..075cefd595 100644
--- a/src/plugins/debugger/loadcoredialog.cpp
+++ b/src/plugins/debugger/loadcoredialog.cpp
@@ -370,9 +370,9 @@ void AttachCoreDialog::coreFileChanged(const QString &core)
Runnable debugger = DebuggerKitAspect::runnable(k);
CoreInfo cinfo = CoreInfo::readExecutableNameFromCore(debugger, core);
if (!cinfo.foundExecutableName.isEmpty())
- d->symbolFileName->setFileName(FileName::fromString(cinfo.foundExecutableName));
+ d->symbolFileName->setFileName(FilePath::fromString(cinfo.foundExecutableName));
else if (!d->symbolFileName->isValid() && !cinfo.rawStringFromCore.isEmpty())
- d->symbolFileName->setFileName(FileName::fromString(cinfo.rawStringFromCore));
+ d->symbolFileName->setFileName(FilePath::fromString(cinfo.rawStringFromCore));
}
changed();
}
diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp
index 7f5971e2be..255052936e 100644
--- a/src/plugins/debugger/qml/qmlengine.cpp
+++ b/src/plugins/debugger/qml/qmlengine.cpp
@@ -1419,7 +1419,7 @@ void QmlEnginePrivate::setBreakpoint(const QString type, const QString target,
cmd.arg(ENABLED, enabled);
if (type == SCRIPTREGEXP)
- cmd.arg(TARGET, Utils::FileName::fromString(target).fileName());
+ cmd.arg(TARGET, Utils::FilePath::fromString(target).fileName());
else
cmd.arg(TARGET, target);
diff --git a/src/plugins/debugger/sourceagent.cpp b/src/plugins/debugger/sourceagent.cpp
index 074806c5bb..565144dac4 100644
--- a/src/plugins/debugger/sourceagent.cpp
+++ b/src/plugins/debugger/sourceagent.cpp
@@ -104,7 +104,7 @@ void SourceAgent::setContent(const QString &filePath, const QString &content)
if (!d->editor) {
QString titlePattern = d->producer + ": "
- + Utils::FileName::fromString(filePath).fileName();
+ + Utils::FilePath::fromString(filePath).fileName();
d->editor = qobject_cast<BaseTextEditor *>(
EditorManager::openEditorWithContents(
CppEditor::Constants::CPPEDITOR_ID,
@@ -137,7 +137,7 @@ void SourceAgent::updateLocationMarker()
if (d->engine->stackHandler()->currentFrame().file == d->path) {
int lineNumber = d->engine->stackHandler()->currentFrame().line;
- d->locationMark = new TextMark(Utils::FileName(), lineNumber,
+ d->locationMark = new TextMark(Utils::FilePath(), lineNumber,
Constants::TEXT_MARK_CATEGORY_LOCATION);
d->locationMark->setIcon(Icons::LOCATION.icon());
d->locationMark->setPriority(TextMark::HighPriority);
diff --git a/src/plugins/debugger/stackhandler.cpp b/src/plugins/debugger/stackhandler.cpp
index 4d134792bd..bd57ea0c6d 100644
--- a/src/plugins/debugger/stackhandler.cpp
+++ b/src/plugins/debugger/stackhandler.cpp
@@ -112,7 +112,7 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const
case StackFunctionNameColumn:
return simplifyType(frame.function);
case StackFileNameColumn:
- return frame.file.isEmpty() ? frame.module : FileName::fromString(frame.file).fileName();
+ return frame.file.isEmpty() ? frame.module : FilePath::fromString(frame.file).fileName();
case StackLineNumberColumn:
return frame.line > 0 ? QVariant(frame.line) : QVariant();
case StackAddressColumn: