forked from qt-creator/qt-creator
Debugger: Strip QLatin1* where possible
Change-Id: Idcab23875b5dc2ecf55e3303f417b995e2252720 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
d0d6f99491
commit
147a3c27c4
@@ -98,8 +98,8 @@ StackFrame StackFrame::parseFrame(const GdbMi &frameMi, const DebuggerRunParamet
|
||||
frame.address = frameMi["address"].toAddress();
|
||||
frame.context = frameMi["context"].data();
|
||||
if (frameMi["language"].data() == "js"
|
||||
|| frame.file.endsWith(QLatin1String(".js"))
|
||||
|| frame.file.endsWith(QLatin1String(".qml"))) {
|
||||
|| frame.file.endsWith(".js")
|
||||
|| frame.file.endsWith(".qml")) {
|
||||
frame.language = QmlLanguage;
|
||||
frame.fixQrcFrame(rp);
|
||||
}
|
||||
@@ -151,9 +151,8 @@ QString StackFrame::toToolTip() const
|
||||
showDistributionNote = true;
|
||||
}
|
||||
if (!Utils::HostOsInfo::isWindowsHost() && showDistributionNote) {
|
||||
str << QLatin1Char(' ') <<
|
||||
tr("Note that most distributions ship debug information "
|
||||
"in separate packages.");
|
||||
str << ' ' << tr("Note that most distributions ship debug information "
|
||||
"in separate packages.");
|
||||
}
|
||||
|
||||
str << "</body></html>";
|
||||
@@ -185,11 +184,11 @@ void StackFrame::fixQrcFrame(const DebuggerRunParameters &rp)
|
||||
usable = aFi.isFile();
|
||||
return;
|
||||
}
|
||||
if (!file.startsWith(QLatin1String("qrc:/")))
|
||||
if (!file.startsWith("qrc:/"))
|
||||
return;
|
||||
|
||||
QString relativeFile = file.right(file.size() - 5);
|
||||
while (relativeFile.startsWith(QLatin1Char('/')))
|
||||
while (relativeFile.startsWith('/'))
|
||||
relativeFile = relativeFile.mid(1);
|
||||
|
||||
QString absFile = findFile(rp.projectSourceDirectory.toString(), relativeFile);
|
||||
|
||||
Reference in New Issue
Block a user