Commit f739c85c authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

QmlProfiler: Compile with QT_NO_CAST_FROM_ASCII

Change-Id: I99c96e723e80ec318acd9300b4f44e7c3ce37485
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: default avatarChristiaan Janssen <christiaan.janssen@digia.com>
parent dba973c9
......@@ -67,7 +67,7 @@ public:
public Q_SLOTS:
Context2D *getContext(const QString & = QString("2d"));
Context2D *getContext(const QString & = QLatin1String("2d"));
void requestPaint();
FillMode fillMode() const;
......
......@@ -66,22 +66,22 @@ static QList<qreal> parseNumbersList(QString::const_iterator &itr)
while ((*itr).isSpace())
++itr;
while ((*itr).isNumber() ||
(*itr) == '-' || (*itr) == '+' || (*itr) == '.') {
(*itr) == QLatin1Char('-') || (*itr) == QLatin1Char('+') || (*itr) == QLatin1Char('.')) {
temp.clear();
if ((*itr) == '-')
if ((*itr) == QLatin1Char('-'))
temp += *itr++;
else if ((*itr) == '+')
else if ((*itr) == QLatin1Char('+'))
temp += *itr++;
while ((*itr).isDigit())
temp += *itr++;
if ((*itr) == '.')
if ((*itr) == QLatin1Char('.'))
temp += *itr++;
while ((*itr).isDigit())
temp += *itr++;
while ((*itr).isSpace())
++itr;
if ((*itr) == ',')
if ((*itr) == QLatin1Char(','))
++itr;
points.append(temp.toDouble());
//eat spaces
......@@ -96,7 +96,7 @@ QColor colorFromString(const QString &name)
{
QString::const_iterator itr = name.constBegin();
QList<qreal> compo;
if (name.startsWith("rgba(")) {
if (name.startsWith(QLatin1String("rgba("))) {
++itr; ++itr; ++itr; ++itr; ++itr;
compo = parseNumbersList(itr);
if (compo.size() != 4) {
......@@ -106,7 +106,7 @@ QColor colorFromString(const QString &name)
compo[3] *= 255;
return QColor((int)compo[0], (int)compo[1],
(int)compo[2], (int)compo[3]);
} else if (name.startsWith("rgb(")) {
} else if (name.startsWith(QLatin1String("rgb("))) {
++itr; ++itr; ++itr; ++itr;
compo = parseNumbersList(itr);
if (compo.size() != 3) {
......@@ -115,7 +115,7 @@ QColor colorFromString(const QString &name)
return QColor((int)qClamp(compo[0], qreal(0), qreal(255)),
(int)qClamp(compo[1], qreal(0), qreal(255)),
(int)qClamp(compo[2], qreal(0), qreal(255)));
} else if (name.startsWith("hsla(")){
} else if (name.startsWith(QLatin1String("hsla("))) {
++itr; ++itr; ++itr; ++itr; ++itr;
compo = parseNumbersList(itr);
if (compo.size() != 4) {
......@@ -123,7 +123,7 @@ QColor colorFromString(const QString &name)
}
return QColor::fromHslF(compo[0], compo[1],
compo[2], compo[3]);
} else if (name.startsWith("hsl(")){
} else if (name.startsWith(QLatin1String("hsl("))) {
++itr; ++itr; ++itr; ++itr; ++itr;
compo = parseNumbersList(itr);
if (compo.size() != 3) {
......@@ -174,53 +174,53 @@ static QString compositeOperatorToString(QPainter::CompositionMode op)
{
switch (op) {
case QPainter::CompositionMode_SourceOver:
return "source-over";
return QLatin1String("source-over");
case QPainter::CompositionMode_DestinationOver:
return "destination-over";
return QLatin1String("destination-over");
case QPainter::CompositionMode_Clear:
return "clear";
return QLatin1String("clear");
case QPainter::CompositionMode_Source:
return "source";
return QLatin1String("source");
case QPainter::CompositionMode_Destination:
return "destination";
return QLatin1String("destination");
case QPainter::CompositionMode_SourceIn:
return "source-in";
return QLatin1String("source-in");
case QPainter::CompositionMode_DestinationIn:
return "destination-in";
return QLatin1String("destination-in");
case QPainter::CompositionMode_SourceOut:
return "source-out";
return QLatin1String("source-out");
case QPainter::CompositionMode_DestinationOut:
return "destination-out";
return QLatin1String("destination-out");
case QPainter::CompositionMode_SourceAtop:
return "source-atop";
return QLatin1String("source-atop");
case QPainter::CompositionMode_DestinationAtop:
return "destination-atop";
return QLatin1String("destination-atop");
case QPainter::CompositionMode_Xor:
return "xor";
return QLatin1String("xor");
case QPainter::CompositionMode_Plus:
return "plus";
return QLatin1String("plus");
case QPainter::CompositionMode_Multiply:
return "multiply";
return QLatin1String("multiply");
case QPainter::CompositionMode_Screen:
return "screen";
return QLatin1String("screen");
case QPainter::CompositionMode_Overlay:
return "overlay";
return QLatin1String("overlay");
case QPainter::CompositionMode_Darken:
return "darken";
return QLatin1String("darken");
case QPainter::CompositionMode_Lighten:
return "lighten";
return QLatin1String("lighten");
case QPainter::CompositionMode_ColorDodge:
return "color-dodge";
return QLatin1String("color-dodge");
case QPainter::CompositionMode_ColorBurn:
return "color-burn";
return QLatin1String("color-burn");
case QPainter::CompositionMode_HardLight:
return "hard-light";
return QLatin1String("hard-light");
case QPainter::CompositionMode_SoftLight:
return "soft-light";
return QLatin1String("soft-light");
case QPainter::CompositionMode_Difference:
return "difference";
return QLatin1String("difference");
case QPainter::CompositionMode_Exclusion:
return "exclusion";
return QLatin1String("exclusion");
default:
break;
}
......@@ -379,11 +379,11 @@ QString Context2D::lineCap() const
{
switch (m_state.lineCap) {
case Qt::FlatCap:
return "butt";
return QLatin1String("butt");
case Qt::SquareCap:
return "square";
return QLatin1String("square");
case Qt::RoundCap:
return "round";
return QLatin1String("round");
default: ;
}
return QString();
......@@ -396,7 +396,7 @@ void Context2D::setLineCap(const QString &capString)
style = Qt::RoundCap;
else if (capString == QLatin1String("square"))
style = Qt::SquareCap;
else //if (capString == "butt")
else //if (capString == QLatin1String("butt"))
style = Qt::FlatCap;
m_state.lineCap = style;
m_state.flags |= DirtyLineCap;
......@@ -528,7 +528,7 @@ void Context2D::setTextBaseline(const QString &baseline)
m_state.textBaseline = Context2D::Middle;
else {
m_state.textBaseline = Context2D::Alphabetic;
qWarning() << ("Context2D: invalid baseline:" + baseline);
qWarning() << (QLatin1String("Context2D: invalid baseline:") + baseline);
}
m_state.flags |= DirtyTextBaseline;
}
......@@ -577,7 +577,7 @@ void Context2D::setFont(const QString &fontString)
{
QFont font;
// ### this is simplified and incomplete
QStringList tokens = fontString.split(QLatin1Char(' '));
QStringList tokens = fontString.split(QLatin1Char(QLatin1Char(' ')));
foreach (const QString &token, tokens) {
if (token == QLatin1String("italic"))
font.setItalic(true);
......@@ -585,7 +585,7 @@ void Context2D::setFont(const QString &fontString)
font.setBold(true);
else if (token.endsWith(QLatin1String("px"))) {
QString number = token;
number.remove("px");
number.remove(QLatin1String("px"));
#ifdef Q_OS_MACX
// compensating the extra antialias space with bigger fonts
// this class is only used by the QML Profiler
......
......@@ -43,11 +43,10 @@ LocalQmlProfilerRunner::LocalQmlProfilerRunner(const Configuration &configuratio
void LocalQmlProfilerRunner::start()
{
QString arguments = QString("-qmljsdebugger=port:%1,block").arg(
QString::number(m_configuration.port));
QString arguments = QString::fromLatin1("-qmljsdebugger=port:%1,block").arg(m_configuration.port);
if (!m_configuration.executableArguments.isEmpty())
arguments += QChar(' ') + m_configuration.executableArguments;
arguments += QLatin1Char(' ') + m_configuration.executableArguments;
if (QmlProfilerPlugin::debugOutput)
qWarning("QmlProfiler: Launching %s:%d", qPrintable(m_configuration.executable),
......
TEMPLATE = lib
TARGET = QmlProfiler
DEFINES += QMLPROFILER_LIBRARY
DEFINES += QMLPROFILER_LIBRARY QT_NO_CAST_FROM_ASCII
QT += network script declarative
......
......@@ -21,6 +21,7 @@ QtcPlugin {
Depends { name: "cpp" }
cpp.includePaths: base.concat("canvas")
cpp.defines: base.concat(["QT_NO_CAST_FROM_ASCII"])
files: [
"abstractqmlprofilerrunner.h",
......
......@@ -75,7 +75,7 @@ public:
QmlProfilerClientManager::QmlProfilerClientManager(QObject *parent) :
QObject(parent), d(new QmlProfilerClientManagerPrivate(this))
{
setObjectName("QML Profiler Connections");
setObjectName(QLatin1String("QML Profiler Connections"));
d->profilerState = 0;
......@@ -224,7 +224,8 @@ void QmlProfilerClientManager::connectToClient()
if (!d->connection || d->connection->state() != QAbstractSocket::UnconnectedState)
return;
QmlProfilerTool::logStatus(QString("QML Profiler: Connecting to %1:%2 ...").arg(d->tcpHost, QString::number(d->tcpPort)));
QmlProfilerTool::logStatus(QString::fromLatin1("QML Profiler: Connecting to %1:%2 ...")
.arg(d->tcpHost, QString::number(d->tcpPort)));
d->connection->connectToHost(d->tcpHost, d->tcpPort);
}
......@@ -321,14 +322,14 @@ void QmlProfilerClientManager::retryMessageBoxFinished(int result)
break;
}
case QMessageBox::Help: {
QmlProfilerTool::handleHelpRequest(QString("qthelp://com.nokia.qtcreator/doc/creator-debugging-qml.html"));
QmlProfilerTool::handleHelpRequest(QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-debugging-qml.html"));
// fall through
}
default: {
if (d->connection) {
QmlProfilerTool::logStatus("QML Profiler: Failed to connect! " + d->connection->errorString());
QmlProfilerTool::logStatus(QLatin1String("QML Profiler: Failed to connect! ") + d->connection->errorString());
} else {
QmlProfilerTool::logStatus("QML Profiler: Failed to connect!");
QmlProfilerTool::logStatus(QLatin1String("QML Profiler: Failed to connect!"));
}
emit connectionFailed();
......
......@@ -215,7 +215,7 @@ public:
QmlProfilerDataModel::QmlProfilerDataModel(QObject *parent) :
QObject(parent), d(new QmlProfilerDataModelPrivate(this))
{
setObjectName("QmlProfilerDataModel");
setObjectName(QLatin1String("QmlProfilerDataModel"));
d->listState = Empty;
......@@ -309,14 +309,14 @@ void QmlProfilerDataModel::addRangedEvent(int type, int bindingType, qint64 star
if (data.isEmpty())
details = tr("Source code not available");
else {
details = data.join(" ").replace('\n'," ").simplified();
QRegExp rewrite("\\(function \\$(\\w+)\\(\\) \\{ (return |)(.+) \\}\\)");
details = data.join(QLatin1String(" ")).replace(QLatin1Char('\n'),QLatin1Char(' ')).simplified();
QRegExp rewrite(QLatin1String("\\(function \\$(\\w+)\\(\\) \\{ (return |)(.+) \\}\\)"));
bool match = rewrite.exactMatch(details);
if (match) {
details = rewrite.cap(1) + ": " + rewrite.cap(3);
details = rewrite.cap(1) + QLatin1String(": ") + rewrite.cap(3);
}
if (details.startsWith(QString("file://")))
details = details.mid(details.lastIndexOf(QChar('/')) + 1);
if (details.startsWith(QLatin1String("file://")))
details = details.mid(details.lastIndexOf(QLatin1Char('/')) + 1);
}
// backwards compatibility: "compiling" events don't have a proper location in older
......@@ -333,7 +333,7 @@ void QmlProfilerDataModel::addRangedEvent(int type, int bindingType, qint64 star
eventHashStr = getHashStringForQmlEvent(eventLocation, type);
} else {
const QString filePath = QUrl(eventLocation.filename).path();
displayName = filePath.mid(filePath.lastIndexOf(QChar('/')) + 1) + colon +
displayName = filePath.mid(filePath.lastIndexOf(QLatin1Char('/')) + 1) + colon +
QString::number(eventLocation.line);
eventHashStr = getHashStringForQmlEvent(eventLocation, type);
}
......@@ -450,7 +450,7 @@ void QmlProfilerDataModel::setTraceStartTime(qint64 time)
QString QmlProfilerDataModel::getHashStringForQmlEvent(
const QmlDebug::QmlEventLocation &location, int eventType)
{
return QString("%1:%2:%3:%4").arg(location.filename,
return QString::fromLatin1("%1:%2:%3:%4").arg(location.filename,
QString::number(location.line),
QString::number(location.column),
QString::number(eventType));
......@@ -459,7 +459,7 @@ QString QmlProfilerDataModel::getHashStringForQmlEvent(
QString QmlProfilerDataModel::getHashStringForV8Event(const QString &displayName,
const QString &function)
{
return QString("%1:%2").arg(displayName, function);
return QString::fromLatin1("%1:%2").arg(displayName, function);
}
QString QmlProfilerDataModel::rootEventName()
......@@ -806,7 +806,7 @@ void QmlProfilerDataModel::complete()
compileStatistics(traceStartTime(), traceEndTime());
setState(Done);
} else {
emit error("Unexpected complete signal in data model");
emit error(tr("Unexpected complete signal in data model"));
}
}
......@@ -1363,42 +1363,42 @@ bool QmlProfilerDataModel::save(const QString &filename)
stream.setAutoFormatting(true);
stream.writeStartDocument();
stream.writeStartElement("trace");
stream.writeAttribute("version", Constants::PROFILER_FILE_VERSION);
stream.writeStartElement(QLatin1String("trace"));
stream.writeAttribute(QLatin1String("version"), QLatin1String(Constants::PROFILER_FILE_VERSION));
stream.writeAttribute("traceStart", QString::number(traceStartTime()));
stream.writeAttribute("traceEnd", QString::number(traceEndTime()));
stream.writeAttribute(QLatin1String("traceStart"), QString::number(traceStartTime()));
stream.writeAttribute(QLatin1String("traceEnd"), QString::number(traceEndTime()));
stream.writeStartElement("eventData");
stream.writeAttribute("totalTime", QString::number(d->qmlMeasuredTime));
stream.writeStartElement(QLatin1String("eventData"));
stream.writeAttribute(QLatin1String("totalTime"), QString::number(d->qmlMeasuredTime));
foreach (const QmlRangeEventData *eventData, d->rangeEventDictionary.values()) {
stream.writeStartElement("event");
stream.writeAttribute("index", QString::number(d->rangeEventDictionary.keys().indexOf(eventData->eventHashStr)));
stream.writeTextElement("displayname", eventData->displayName);
stream.writeTextElement("type", qmlEventTypeAsString(eventData->eventType));
stream.writeStartElement(QLatin1String("event"));
stream.writeAttribute(QLatin1String("index"), QString::number(d->rangeEventDictionary.keys().indexOf(eventData->eventHashStr)));
stream.writeTextElement(QLatin1String("displayname"), eventData->displayName);
stream.writeTextElement(QLatin1String("type"), qmlEventTypeAsString(eventData->eventType));
if (!eventData->location.filename.isEmpty()) {
stream.writeTextElement("filename", eventData->location.filename);
stream.writeTextElement("line", QString::number(eventData->location.line));
stream.writeTextElement("column", QString::number(eventData->location.column));
stream.writeTextElement(QLatin1String("filename"), eventData->location.filename);
stream.writeTextElement(QLatin1String("line"), QString::number(eventData->location.line));
stream.writeTextElement(QLatin1String("column"), QString::number(eventData->location.column));
}
stream.writeTextElement("details", eventData->details);
stream.writeTextElement(QLatin1String("details"), eventData->details);
if (eventData->eventType == Binding)
stream.writeTextElement("bindingType", QString::number((int)eventData->bindingType));
stream.writeTextElement(QLatin1String("bindingType"), QString::number((int)eventData->bindingType));
stream.writeEndElement();
}
stream.writeEndElement(); // eventData
stream.writeStartElement("profilerDataModel");
stream.writeStartElement(QLatin1String("profilerDataModel"));
foreach (const QmlRangeEventStartInstance &rangedEvent, d->startInstanceList) {
stream.writeStartElement("range");
stream.writeAttribute("startTime", QString::number(rangedEvent.startTime));
stream.writeAttribute("duration", QString::number(rangedEvent.duration));
stream.writeAttribute("eventIndex", QString::number(d->rangeEventDictionary.keys().indexOf(rangedEvent.statsInfo->eventHashStr)));
stream.writeStartElement(QLatin1String("range"));
stream.writeAttribute(QLatin1String("startTime"), QString::number(rangedEvent.startTime));
stream.writeAttribute(QLatin1String("duration"), QString::number(rangedEvent.duration));
stream.writeAttribute(QLatin1String("eventIndex"), QString::number(d->rangeEventDictionary.keys().indexOf(rangedEvent.statsInfo->eventHashStr)));
if (rangedEvent.statsInfo->eventType == QmlDebug::Painting && rangedEvent.animationCount >= 0) {
// animation frame
stream.writeAttribute("framerate", QString::number(rangedEvent.frameRate));
stream.writeAttribute("animationcount", QString::number(rangedEvent.animationCount));
stream.writeAttribute(QLatin1String("framerate"), QString::number(rangedEvent.frameRate));
stream.writeAttribute(QLatin1String("animationcount"), QString::number(rangedEvent.animationCount));
}
stream.writeEndElement();
}
......@@ -1458,52 +1458,52 @@ void QmlProfilerDataModel::load()
switch (token) {
case QXmlStreamReader::StartDocument : continue;
case QXmlStreamReader::StartElement : {
if (elementName == "trace") {
if (elementName == QLatin1String("trace")) {
QXmlStreamAttributes attributes = stream.attributes();
if (attributes.hasAttribute("version"))
validVersion = attributes.value("version").toString() == Constants::PROFILER_FILE_VERSION;
if (attributes.hasAttribute(QLatin1String("version")))
validVersion = attributes.value(QLatin1String("version")).toString() == QLatin1String(Constants::PROFILER_FILE_VERSION);
else
validVersion = false;
if (attributes.hasAttribute("traceStart"))
setTraceStartTime(attributes.value("traceStart").toString().toLongLong());
if (attributes.hasAttribute("traceEnd"))
setTraceEndTime(attributes.value("traceEnd").toString().toLongLong());
if (attributes.hasAttribute(QLatin1String("traceStart")))
setTraceStartTime(attributes.value(QLatin1String("traceStart")).toString().toLongLong());
if (attributes.hasAttribute(QLatin1String("traceEnd")))
setTraceEndTime(attributes.value(QLatin1String("traceEnd")).toString().toLongLong());
}
if (elementName == "eventData") {
if (elementName == QLatin1String("eventData")) {
readingQmlEvents = true;
QXmlStreamAttributes attributes = stream.attributes();
if (attributes.hasAttribute("totalTime"))
d->qmlMeasuredTime = attributes.value("totalTime").toString().toDouble();
if (attributes.hasAttribute(QLatin1String("totalTime")))
d->qmlMeasuredTime = attributes.value(QLatin1String("totalTime")).toString().toDouble();
break;
}
if (elementName == "v8profile" && !readingQmlEvents) {
if (elementName == QLatin1String("v8profile") && !readingQmlEvents) {
d->v8DataModel->load(stream);
break;
}
if (elementName == "trace") {
if (elementName == QLatin1String("trace")) {
QXmlStreamAttributes attributes = stream.attributes();
if (attributes.hasAttribute("traceStart"))
setTraceStartTime(attributes.value("traceStart").toString().toLongLong());
if (attributes.hasAttribute("traceEnd"))
setTraceEndTime(attributes.value("traceEnd").toString().toLongLong());
if (attributes.hasAttribute(QLatin1String("traceStart")))
setTraceStartTime(attributes.value(QLatin1String("traceStart")).toString().toLongLong());
if (attributes.hasAttribute(QLatin1String("traceEnd")))
setTraceEndTime(attributes.value(QLatin1String("traceEnd")).toString().toLongLong());
}
if (elementName == "range") {
if (elementName == QLatin1String("range")) {
QmlRangeEventStartInstance rangedEvent;
QXmlStreamAttributes attributes = stream.attributes();
if (attributes.hasAttribute("startTime"))
rangedEvent.startTime = attributes.value("startTime").toString().toLongLong();
if (attributes.hasAttribute("duration"))
rangedEvent.duration = attributes.value("duration").toString().toLongLong();
if (attributes.hasAttribute("framerate"))
rangedEvent.frameRate = attributes.value("framerate").toString().toInt();
if (attributes.hasAttribute("animationcount"))
rangedEvent.animationCount = attributes.value("animationcount").toString().toInt();
if (attributes.hasAttribute(QLatin1String("startTime")))
rangedEvent.startTime = attributes.value(QLatin1String("startTime")).toString().toLongLong();
if (attributes.hasAttribute(QLatin1String("duration")))
rangedEvent.duration = attributes.value(QLatin1String("duration")).toString().toLongLong();
if (attributes.hasAttribute(QLatin1String("framerate")))
rangedEvent.frameRate = attributes.value(QLatin1String("framerate")).toString().toInt();
if (attributes.hasAttribute(QLatin1String("animationcount")))
rangedEvent.animationCount = attributes.value(QLatin1String("animationcount")).toString().toInt();
else
rangedEvent.animationCount = -1;
if (attributes.hasAttribute("eventIndex")) {
int ndx = attributes.value("eventIndex").toString().toInt();
if (attributes.hasAttribute(QLatin1String("eventIndex"))) {
int ndx = attributes.value(QLatin1String("eventIndex")).toString().toInt();
if (!descriptionBuffer.value(ndx))
descriptionBuffer[ndx] = new QmlRangeEventData;
rangedEvent.statsInfo = descriptionBuffer.value(ndx);
......@@ -1524,10 +1524,10 @@ void QmlProfilerDataModel::load()
}
if (readingQmlEvents) {
if (elementName == "event") {
if (elementName == QLatin1String("event")) {
QXmlStreamAttributes attributes = stream.attributes();
if (attributes.hasAttribute("index")) {
int ndx = attributes.value("index").toString().toInt();
if (attributes.hasAttribute(QLatin1String("index"))) {
int ndx = attributes.value(QLatin1String("index")).toString().toInt();
if (!descriptionBuffer.value(ndx))
descriptionBuffer[ndx] = new QmlRangeEventData;
currentEvent = descriptionBuffer[ndx];
......@@ -1548,30 +1548,30 @@ void QmlProfilerDataModel::load()
break;
QString readData = stream.text().toString();
if (elementName == "displayname") {
if (elementName == QLatin1String("displayname")) {
currentEvent->displayName = readData;
break;
}
if (elementName == "type") {
if (elementName == QLatin1String("type")) {
currentEvent->eventType = qmlEventTypeAsEnum(readData);
break;
}
if (elementName == "filename") {
if (elementName == QLatin1String("filename")) {
currentEvent->location.filename = readData;
break;
}
if (elementName == "line") {
if (elementName == QLatin1String("line")) {
currentEvent->location.line = readData.toInt();
break;
}
if (elementName == "column") {
if (elementName == QLatin1String("column")) {
currentEvent->location.column = readData.toInt();
}
if (elementName == "details") {
if (elementName == QLatin1String("details")) {
currentEvent->details = readData;
break;
}
if (elementName == "bindingType") {
if (elementName == QLatin1String("bindingType")) {
currentEvent->bindingType = readData.toInt();
break;
}
......@@ -1579,11 +1579,11 @@ void QmlProfilerDataModel::load()
break;
}
case QXmlStreamReader::EndElement : {
if (elementName == "event") {
if (elementName == QLatin1String("event")) {
currentEvent = 0;
break;
}
if (elementName == "eventData") {
if (elementName == QLatin1String("eventData")) {
readingQmlEvents = false;
break;
}
......@@ -1666,7 +1666,7 @@ void QmlProfilerDataModel::setState(QmlProfilerDataModel::State state)
QTC_ASSERT(d->listState == ProcessingData || d->listState == Empty, return);
break;
default:
emit error("Trying to set unknown state in events list");
emit error(tr("Trying to set unknown state in events list"));
break;
}
......
......@@ -167,7 +167,7 @@ void QmlProfilerDetailsRewriter::rewriteDetailsForLocation(QTextStream &textDoc,
qint64 len = node->lastSourceLocation().end() - startPos;
textDoc.seek(startPos);
QString details = textDoc.read(len).replace('\n'," ").simplified();
QString details = textDoc.read(len).replace(QLatin1Char('\n'), QLatin1Char(' ')).simplified();
emit rewriteDetailsString(type, location, details);
}
......
......@@ -304,8 +304,8 @@ void QmlProfilerEngine::wrongSetupMessageBoxFinished(int button)
{
if (button == QMessageBox::Help) {
Core::HelpManager *helpManager = Core::HelpManager::instance();
helpManager->handleHelpRequest("qthelp://com.nokia.qtcreator/doc/creator-debugging-qml.html"
"#setting-up-qml-debugging");