forked from qt-creator/qt-creator
L10n: tr()-Fixes.
This commit is contained in:
@@ -34,13 +34,13 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "modelhelpers.h"
|
||||
|
||||
#include <QString>
|
||||
#include <QDir>
|
||||
#include <QPair>
|
||||
|
||||
#include "frame.h"
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QPair>
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
||||
namespace Valgrind {
|
||||
namespace XmlProtocol {
|
||||
|
||||
@@ -57,26 +57,33 @@ QString toolTipForFrame(const Frame &frame)
|
||||
QList<StringPair> lines;
|
||||
|
||||
if (!frame.functionName().isEmpty())
|
||||
lines << qMakePair(QObject::tr("Function:"), frame.functionName());
|
||||
lines << qMakePair(QCoreApplication::translate("Valgrind::XmlProtocol", "Function:"),
|
||||
frame.functionName());
|
||||
if (!location.isEmpty())
|
||||
lines << qMakePair(QObject::tr("Location:"), location);
|
||||
lines << qMakePair(QCoreApplication::translate("Valgrind::XmlProtocol", "Location:"),
|
||||
location);
|
||||
if (frame.instructionPointer())
|
||||
lines << qMakePair(QObject::tr("Instruction pointer:"),
|
||||
QString("0x%1").arg(frame.instructionPointer(), 0, 16));
|
||||
lines << qMakePair(QCoreApplication::translate("Valgrind::XmlProtocol",
|
||||
"Instruction pointer:"),
|
||||
QString::fromAscii("0x%1").arg(frame.instructionPointer(), 0, 16));
|
||||
if (!frame.object().isEmpty())
|
||||
lines << qMakePair(QObject::tr("Object:"), frame.object());
|
||||
lines << qMakePair(QCoreApplication::translate("Valgrind::XmlProtocol", "Object:"), frame.object());
|
||||
|
||||
QString html = "<html>"
|
||||
"<head>"
|
||||
"<style>dt { font-weight:bold; } dd { font-family: monospace; }</style>\n"
|
||||
"<body><dl>";
|
||||
|
||||
foreach(const StringPair &pair, lines)
|
||||
html += "<dt>" + pair.first + "</dt><dd>" + pair.second + "</dd>\n";
|
||||
|
||||
foreach (const StringPair &pair, lines) {
|
||||
html += QLatin1String("<dt>");
|
||||
html += pair.first;
|
||||
html += QLatin1String("</dt><dd>");
|
||||
html += pair.second;
|
||||
html += QLatin1String("</dd>\n");
|
||||
}
|
||||
html += "</dl></body></html>";
|
||||
return html;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user