QmlProfiler: Compile with QT_NO_CAST_FROM_ASCII

Change-Id: I99c96e723e80ec318acd9300b4f44e7c3ce37485
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
This commit is contained in:
Orgad Shaneh
2012-11-26 21:18:13 +02:00
committed by Orgad Shaneh
parent dba973c933
commit f739c85c72
16 changed files with 208 additions and 205 deletions

View File

@@ -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;

View File

@@ -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

View File

@@ -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),

View File

@@ -1,7 +1,7 @@
TEMPLATE = lib
TARGET = QmlProfiler
DEFINES += QMLPROFILER_LIBRARY
DEFINES += QMLPROFILER_LIBRARY QT_NO_CAST_FROM_ASCII
QT += network script declarative

View File

@@ -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",

View File

@@ -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();

View File

@@ -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;
}

View File

@@ -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);
}

View File

@@ -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");
helpManager->handleHelpRequest(QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-debugging-qml.html"
"#setting-up-qml-debugging"));
}
}

View File

@@ -117,7 +117,7 @@ QmlProfilerEventsWidget::QmlProfilerEventsWidget(QWidget *parent,
QmlProfilerDataModel *profilerDataModel )
: QWidget(parent), d(new QmlProfilerEventsWidgetPrivate(this))
{
setObjectName("QmlProfilerEventsView");
setObjectName(QLatin1String("QmlProfilerEventsView"));
d->m_profilerDataModel = profilerDataModel;
connect(d->m_profilerDataModel, SIGNAL(stateChanged()),
@@ -179,7 +179,7 @@ void QmlProfilerEventsWidget::profilerDataModelStateChanged()
void QmlProfilerEventsWidget::switchToV8View()
{
setObjectName("QmlProfilerV8ProfileView");
setObjectName(QLatin1String("QmlProfilerV8ProfileView"));
d->m_eventTree->setViewType(QmlProfilerEventsMainView::V8ProfileView);
d->m_eventParents->setViewType(QmlProfilerEventsParentsAndChildrenView::V8ParentsView);
d->m_eventChildren->setViewType(QmlProfilerEventsParentsAndChildrenView::V8ChildrenView);
@@ -368,7 +368,7 @@ QmlProfilerEventsMainView::QmlProfilerEventsMainView(ViewTypes viewType,
QmlProfilerDataModel *dataModel)
: QTreeView(parent), d(new QmlProfilerEventsMainViewPrivate(this))
{
setObjectName("QmlProfilerEventsTable");
setObjectName(QLatin1String("QmlProfilerEventsTable"));
header()->setResizeMode(QHeaderView::Interactive);
header()->setDefaultSectionSize(100);
header()->setMinimumSectionSize(50);
@@ -430,7 +430,7 @@ void QmlProfilerEventsMainView::setViewType(ViewTypes type)
d->m_viewType = type;
switch (type) {
case EventsView: {
setObjectName("QmlProfilerEventsTable");
setObjectName(QLatin1String("QmlProfilerEventsTable"));
setFieldViewable(Name, true);
setFieldViewable(Type, true);
setFieldViewable(Percent, true);
@@ -446,7 +446,7 @@ void QmlProfilerEventsMainView::setViewType(ViewTypes type)
break;
}
case V8ProfileView: {
setObjectName("QmlProfilerV8ProfileTable");
setObjectName(QLatin1String("QmlProfilerV8ProfileTable"));
setFieldViewable(Name, true);
setFieldViewable(Type, false);
setFieldViewable(Percent, true);
@@ -730,7 +730,7 @@ void QmlProfilerEventsMainView::QmlProfilerEventsMainViewPrivate::buildV8ModelFr
item->setEditable(false);
// metadata
newRow.at(0)->setData(QString("%1:%2").arg(v8event->filename, QString::number(v8event->line)), EventHashStrRole);
newRow.at(0)->setData(QString::fromLatin1("%1:%2").arg(v8event->filename, QString::number(v8event->line)), EventHashStrRole);
newRow.at(0)->setData(QVariant(v8event->filename), FilenameRole);
newRow.at(0)->setData(QVariant(v8event->line), LineRole);
newRow.at(0)->setData(QVariant(0),ColumnRole); // v8 events have no column info
@@ -880,7 +880,7 @@ QString QmlProfilerEventsMainView::QmlProfilerEventsMainViewPrivate::textForItem
// indentation
QStandardItem *itemParent = item->parent();
while (itemParent) {
str += " ";
str += QLatin1String(" ");
itemParent = itemParent->parent();
}
}
@@ -890,9 +890,9 @@ QString QmlProfilerEventsMainView::QmlProfilerEventsMainViewPrivate::textForItem
for (int j = 0; j < colCount; ++j) {
QStandardItem *colItem = item->parent() ? item->parent()->child(item->row(),j) : m_model->item(item->row(),j);
str += colItem->data(Qt::DisplayRole).toString();
if (j < colCount-1) str += '\t';
if (j < colCount-1) str += QLatin1Char('\t');
}
str += '\n';
str += QLatin1Char('\n');
// recursively print children
if (recursive && item->child(0))
@@ -910,9 +910,9 @@ void QmlProfilerEventsMainView::copyTableToClipboard() const
for (int i = 0; i < columnCount; ++i) {
str += d->m_model->headerData(i, Qt::Horizontal, Qt::DisplayRole).toString();
if (i < columnCount - 1)
str += '\t';
str += QLatin1Char('\t');
else
str += '\n';
str += QLatin1Char('\n');
}
// data
int rowCount = d->m_model->rowCount();

View File

@@ -40,14 +40,14 @@ namespace Internal {
inline QString stringForState(int state) {
switch (state) {
case QmlProfilerStateManager::Idle: return QString("Idle");
case QmlProfilerStateManager::AppStarting: return QString("AppStarting");
case QmlProfilerStateManager::AppRunning: return QString("AppRunning");
case QmlProfilerStateManager::AppStopRequested: return QString("AppStopRequested");
case QmlProfilerStateManager::AppReadyToStop: return QString("AppReadyToStop");
case QmlProfilerStateManager::AppStopped: return QString("AppStopped");
case QmlProfilerStateManager::AppDying: return QString("AppDying");
case QmlProfilerStateManager::AppKilled: return QString("AppKilled");
case QmlProfilerStateManager::Idle: return QLatin1String("Idle");
case QmlProfilerStateManager::AppStarting: return QLatin1String("AppStarting");
case QmlProfilerStateManager::AppRunning: return QLatin1String("AppRunning");
case QmlProfilerStateManager::AppStopRequested: return QLatin1String("AppStopRequested");
case QmlProfilerStateManager::AppReadyToStop: return QLatin1String("AppReadyToStop");
case QmlProfilerStateManager::AppStopped: return QLatin1String("AppStopped");
case QmlProfilerStateManager::AppDying: return QLatin1String("AppDying");
case QmlProfilerStateManager::AppKilled: return QLatin1String("AppKilled");
default: break;
}
return QString();

View File

@@ -66,7 +66,7 @@ QmlProfilerStateWidget::QmlProfilerStateWidget(QmlProfilerStateManager *stateMan
QmlProfilerDataModel *dataModel, QWidget *parent) :
QWidget(parent), d(new QmlProfilerStateWidgetPrivate(this))
{
setObjectName("QML Profiler State Display");
setObjectName(QLatin1String("QML Profiler State Display"));
// UI elements
QVBoxLayout *layout = new QVBoxLayout(this);

View File

@@ -123,7 +123,7 @@ public:
QmlProfilerTool::QmlProfilerTool(QObject *parent)
: IAnalyzerTool(parent), d(new QmlProfilerToolPrivate(this))
{
setObjectName("QmlProfilerTool");
setObjectName(QLatin1String("QmlProfilerTool"));
d->m_profilerState = 0;
d->m_viewContainer = 0;
@@ -589,7 +589,8 @@ void QmlProfilerTool::showSaveOption()
void QmlProfilerTool::showSaveDialog()
{
QString filename = QFileDialog::getSaveFileName(Core::ICore::mainWindow(), tr("Save QML Trace"), QString(), tr("QML traces (*%1)").arg(TraceFileExtension));
QString filename = QFileDialog::getSaveFileName(Core::ICore::mainWindow(), tr("Save QML Trace"), QString(),
tr("QML traces (*%1)").arg(QLatin1String(TraceFileExtension)));
if (!filename.isEmpty()) {
if (!filename.endsWith(QLatin1String(TraceFileExtension)))
filename += QLatin1String(TraceFileExtension);
@@ -605,7 +606,8 @@ void QmlProfilerTool::showLoadDialog()
if (AnalyzerManager::currentSelectedTool() != this)
AnalyzerManager::selectTool(this, StartRemote);
QString filename = QFileDialog::getOpenFileName(Core::ICore::mainWindow(), tr("Load QML Trace"), QString(), tr("QML traces (*%1)").arg(TraceFileExtension));
QString filename = QFileDialog::getOpenFileName(Core::ICore::mainWindow(), tr("Load QML Trace"), QString(),
tr("QML traces (*%1)").arg(QLatin1String(TraceFileExtension)));
if (!filename.isEmpty()) {
// delayed load (prevent graphical artifacts due to long load time)

View File

@@ -132,7 +132,7 @@ public:
QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, Analyzer::IAnalyzerTool *profilerTool, QmlProfilerViewManager *container, QmlProfilerDataModel *model, QmlProfilerStateManager *profilerState)
: QWidget(parent), d(new QmlProfilerTraceViewPrivate(this))
{
setObjectName("QML Profiler");
setObjectName(QLatin1String("QML Profiler"));
d->m_zoomControl = new ZoomControl(this);
connect(d->m_zoomControl, SIGNAL(rangeChanged()), this, SLOT(updateRange()));
@@ -183,9 +183,9 @@ QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, Analyzer::IAnalyzerT
d->m_profilerDataModel = model;
connect(d->m_profilerDataModel, SIGNAL(stateChanged()),
this, SLOT(profilerDataModelStateChanged()));
d->m_mainView->rootContext()->setContextProperty("qmlProfilerDataModel",
d->m_mainView->rootContext()->setContextProperty(QLatin1String("qmlProfilerDataModel"),
d->m_profilerDataModel);
d->m_overview->rootContext()->setContextProperty("qmlProfilerDataModel",
d->m_overview->rootContext()->setContextProperty(QLatin1String("qmlProfilerDataModel"),
d->m_profilerDataModel);
d->m_profilerState = profilerState;
@@ -210,14 +210,14 @@ QmlProfilerTraceView::~QmlProfilerTraceView()
// Initialize widgets
void QmlProfilerTraceView::reset()
{
d->m_mainView->rootContext()->setContextProperty("zoomControl", d->m_zoomControl);
d->m_timebar->rootContext()->setContextProperty("zoomControl", d->m_zoomControl);
d->m_overview->rootContext()->setContextProperty("zoomControl", d->m_zoomControl);
d->m_mainView->rootContext()->setContextProperty(QLatin1String("zoomControl"), d->m_zoomControl);
d->m_timebar->rootContext()->setContextProperty(QLatin1String("zoomControl"), d->m_zoomControl);
d->m_overview->rootContext()->setContextProperty(QLatin1String("zoomControl"), d->m_zoomControl);
d->m_timebar->setSource(QUrl("qrc:/qmlprofiler/TimeDisplay.qml"));
d->m_overview->setSource(QUrl("qrc:/qmlprofiler/Overview.qml"));
d->m_timebar->setSource(QUrl(QLatin1String("qrc:/qmlprofiler/TimeDisplay.qml")));
d->m_overview->setSource(QUrl(QLatin1String("qrc:/qmlprofiler/Overview.qml")));
d->m_mainView->setSource(QUrl("qrc:/qmlprofiler/MainView.qml"));
d->m_mainView->setSource(QUrl(QLatin1String("qrc:/qmlprofiler/MainView.qml")));
d->m_mainView->rootObject()->setProperty("width", QVariant(width()));
d->m_mainView->rootObject()->setProperty("candidateHeight", QVariant(height() - d->m_timebar->height() - d->m_overview->height()));
@@ -244,19 +244,19 @@ QWidget *QmlProfilerTraceView::createToolbar()
toolBarLayout->setSpacing(0);
QToolButton *buttonPrev= new QToolButton;
buttonPrev->setIcon(QIcon(":/qmlprofiler/ico_prev.png"));
buttonPrev->setIcon(QIcon(QLatin1String(":/qmlprofiler/ico_prev.png")));
buttonPrev->setToolTip(tr("Jump to previous event"));
connect(buttonPrev, SIGNAL(clicked()), this, SIGNAL(jumpToPrev()));
connect(this, SIGNAL(enableToolbar(bool)), buttonPrev, SLOT(setEnabled(bool)));
QToolButton *buttonNext= new QToolButton;
buttonNext->setIcon(QIcon(":/qmlprofiler/ico_next.png"));
buttonNext->setIcon(QIcon(QLatin1String(":/qmlprofiler/ico_next.png")));
buttonNext->setToolTip(tr("Jump to next event"));
connect(buttonNext, SIGNAL(clicked()), this, SIGNAL(jumpToNext()));
connect(this, SIGNAL(enableToolbar(bool)), buttonNext, SLOT(setEnabled(bool)));
QToolButton *buttonZoomControls = new QToolButton;
buttonZoomControls->setIcon(QIcon(":/qmlprofiler/ico_zoom.png"));
buttonZoomControls->setIcon(QIcon(QLatin1String(":/qmlprofiler/ico_zoom.png")));
buttonZoomControls->setToolTip(tr("Show zoom slider"));
buttonZoomControls->setCheckable(true);
buttonZoomControls->setChecked(false);
@@ -264,7 +264,7 @@ QWidget *QmlProfilerTraceView::createToolbar()
connect(this, SIGNAL(enableToolbar(bool)), buttonZoomControls, SLOT(setEnabled(bool)));
d->m_buttonRange = new QToolButton;
d->m_buttonRange->setIcon(QIcon(":/qmlprofiler/ico_rangeselection.png"));
d->m_buttonRange->setIcon(QIcon(QLatin1String(":/qmlprofiler/ico_rangeselection.png")));
d->m_buttonRange->setToolTip(tr("Select range"));
d->m_buttonRange->setCheckable(true);
d->m_buttonRange->setChecked(false);
@@ -273,7 +273,7 @@ QWidget *QmlProfilerTraceView::createToolbar()
connect(this, SIGNAL(rangeModeChanged(bool)), d->m_buttonRange, SLOT(setChecked(bool)));
d->m_buttonLock = new QToolButton;
d->m_buttonLock->setIcon(QIcon(":/qmlprofiler/ico_selectionmode.png"));
d->m_buttonLock->setIcon(QIcon(QLatin1String(":/qmlprofiler/ico_selectionmode.png")));
d->m_buttonLock->setToolTip(tr("View event information on mouseover"));
d->m_buttonLock->setCheckable(true);
d->m_buttonLock->setChecked(false);
@@ -313,7 +313,7 @@ QWidget *QmlProfilerTraceView::createZoomToolbar()
connect(this, SIGNAL(enableToolbar(bool)), zoomSlider, SLOT(setEnabled(bool)));
connect(zoomSlider, SIGNAL(valueChanged(int)), this, SLOT(setZoomLevel(int)));
connect(this, SIGNAL(zoomLevelChanged(int)), zoomSlider, SLOT(setValue(int)));
zoomSlider->setStyleSheet("\
zoomSlider->setStyleSheet(QLatin1String("\
QSlider:horizontal {\
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #444444, stop: 1 #5a5a5a);\
border: 1px #313131;\
@@ -328,7 +328,7 @@ QWidget *QmlProfilerTraceView::createZoomToolbar()
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #5a5a5a, stop: 1 #444444);\
border: 1px #313131;\
}\
");
"));
toolBarLayout->addWidget(zoomSlider);
@@ -394,9 +394,9 @@ void QmlProfilerTraceView::toggleRangeMode(bool active)
bool rangeMode = d->m_mainView->rootObject()->property("selectionRangeMode").toBool();
if (active != rangeMode) {
if (active)
d->m_buttonRange->setIcon(QIcon(":/qmlprofiler/ico_rangeselected.png"));
d->m_buttonRange->setIcon(QIcon(QLatin1String(":/qmlprofiler/ico_rangeselected.png")));
else
d->m_buttonRange->setIcon(QIcon(":/qmlprofiler/ico_rangeselection.png"));
d->m_buttonRange->setIcon(QIcon(QLatin1String(":/qmlprofiler/ico_rangeselection.png")));
d->m_mainView->rootObject()->setProperty("selectionRangeMode", QVariant(active));
}
}
@@ -405,9 +405,9 @@ void QmlProfilerTraceView::updateRangeButton()
{
bool rangeMode = d->m_mainView->rootObject()->property("selectionRangeMode").toBool();
if (rangeMode)
d->m_buttonRange->setIcon(QIcon(":/qmlprofiler/ico_rangeselected.png"));
d->m_buttonRange->setIcon(QIcon(QLatin1String(":/qmlprofiler/ico_rangeselected.png")));
else
d->m_buttonRange->setIcon(QIcon(":/qmlprofiler/ico_rangeselection.png"));
d->m_buttonRange->setIcon(QIcon(QLatin1String(":/qmlprofiler/ico_rangeselection.png")));
emit rangeModeChanged(rangeMode);
}

View File

@@ -65,7 +65,7 @@ QmlProfilerViewManager::QmlProfilerViewManager(QObject *parent,
QmlProfilerStateManager *profilerState)
: QObject(parent), d(new QmlProfilerViewManagerPrivate(this))
{
setObjectName("QML Profiler View Manager");
setObjectName(QLatin1String("QML Profiler View Manager"));
d->traceView = 0;
d->eventsView = 0;
d->v8profilerView = 0;

View File

@@ -298,24 +298,24 @@ void QV8ProfilerDataModel::QV8ProfilerDataModelPrivate::clearV8RootEvent()
void QV8ProfilerDataModel::save(QXmlStreamWriter &stream)
{
stream.writeStartElement("v8profile"); // v8 profiler output
stream.writeAttribute("totalTime", QString::number(d->v8MeasuredTime));
stream.writeStartElement(QLatin1String("v8profile")); // v8 profiler output
stream.writeAttribute(QLatin1String("totalTime"), QString::number(d->v8MeasuredTime));
foreach (QV8EventData *v8event, d->v8EventHash.values()) {
stream.writeStartElement("event");
stream.writeAttribute("index",
stream.writeStartElement(QLatin1String("event"));
stream.writeAttribute(QLatin1String("index"),
QString::number(
d->v8EventHash.keys().indexOf(
v8event->eventHashStr)));
stream.writeTextElement("displayname", v8event->displayName);
stream.writeTextElement("functionname", v8event->functionName);
stream.writeTextElement(QLatin1String("displayname"), v8event->displayName);
stream.writeTextElement(QLatin1String("functionname"), v8event->functionName);
if (!v8event->filename.isEmpty()) {
stream.writeTextElement("filename", v8event->filename);
stream.writeTextElement("line", QString::number(v8event->line));
stream.writeTextElement(QLatin1String("filename"), v8event->filename);
stream.writeTextElement(QLatin1String("line"), QString::number(v8event->line));
}
stream.writeTextElement("totalTime", QString::number(v8event->totalTime));
stream.writeTextElement("selfTime", QString::number(v8event->selfTime));
stream.writeTextElement(QLatin1String("totalTime"), QString::number(v8event->totalTime));
stream.writeTextElement(QLatin1String("selfTime"), QString::number(v8event->selfTime));
if (!v8event->childrenHash.isEmpty()) {
stream.writeStartElement("childrenEvents");
stream.writeStartElement(QLatin1String("childrenEvents"));
QStringList childrenIndexes;
QStringList childrenTimes;
QStringList parentTimes;
@@ -325,9 +325,9 @@ void QV8ProfilerDataModel::save(QXmlStreamWriter &stream)
parentTimes << QString::number(v8child->totalTime);
}
stream.writeAttribute("list", childrenIndexes.join(QString(", ")));
stream.writeAttribute("childrenTimes", childrenTimes.join(QString(", ")));
stream.writeAttribute("parentTimes", parentTimes.join(QString(", ")));
stream.writeAttribute(QLatin1String("list"), childrenIndexes.join(QLatin1String(", ")));
stream.writeAttribute(QLatin1String("childrenTimes"), childrenTimes.join(QLatin1String(", ")));
stream.writeAttribute(QLatin1String("parentTimes"), parentTimes.join(QLatin1String(", ")));
stream.writeEndElement();
}
stream.writeEndElement();
@@ -349,8 +349,8 @@ void QV8ProfilerDataModel::load(QXmlStreamReader &stream)
// get the v8 time
QXmlStreamAttributes attributes = stream.attributes();
if (attributes.hasAttribute("totalTime"))
d->v8MeasuredTime = attributes.value("totalTime").toString().toDouble();
if (attributes.hasAttribute(QLatin1String("totalTime")))
d->v8MeasuredTime = attributes.value(QLatin1String("totalTime")).toString().toDouble();
while (!stream.atEnd() && !stream.hasError()) {
QXmlStreamReader::TokenType token = stream.readNext();
@@ -358,10 +358,10 @@ void QV8ProfilerDataModel::load(QXmlStreamReader &stream)
switch (token) {
case QXmlStreamReader::StartDocument : continue;
case QXmlStreamReader::StartElement : {
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 (!v8eventBuffer.value(ndx))
v8eventBuffer[ndx] = new QV8EventData;
v8event = v8eventBuffer[ndx];
@@ -374,19 +374,19 @@ void QV8ProfilerDataModel::load(QXmlStreamReader &stream)
if (!v8event)
break;
if (elementName == "childrenEvents") {
if (elementName == QLatin1String("childrenEvents")) {
QXmlStreamAttributes attributes = stream.attributes();
int eventIndex = v8eventBuffer.key(v8event);
if (attributes.hasAttribute("list")) {
if (attributes.hasAttribute(QLatin1String("list"))) {
// store for later parsing (we haven't read all the events yet)
childrenIndexes[eventIndex] = attributes.value("list").toString();
childrenIndexes[eventIndex] = attributes.value(QLatin1String("list")).toString();
}
if (attributes.hasAttribute("childrenTimes")) {
if (attributes.hasAttribute(QLatin1String("childrenTimes"))) {
childrenTimes[eventIndex] =
attributes.value("childrenTimes").toString();
attributes.value(QLatin1String("childrenTimes")).toString();
}
if (attributes.hasAttribute("parentTimes")) {
parentTimes[eventIndex] = attributes.value("parentTimes").toString();
if (attributes.hasAttribute(QLatin1String("parentTimes"))) {
parentTimes[eventIndex] = attributes.value(QLatin1String("parentTimes")).toString();
}
}
@@ -395,40 +395,40 @@ void QV8ProfilerDataModel::load(QXmlStreamReader &stream)
break;
QString readData = stream.text().toString();
if (elementName == "displayname") {
if (elementName == QLatin1String("displayname")) {
v8event->displayName = readData;
break;
}
if (elementName == "functionname") {
if (elementName == QLatin1String("functionname")) {
v8event->functionName = readData;
break;
}
if (elementName == "filename") {
if (elementName == QLatin1String("filename")) {
v8event->filename = readData;
break;
}
if (elementName == "line") {
if (elementName == QLatin1String("line")) {
v8event->line = readData.toInt();
break;
}
if (elementName == "totalTime") {
if (elementName == QLatin1String("totalTime")) {
v8event->totalTime = readData.toDouble();
cumulatedV8Time += v8event->totalTime;
break;
}
if (elementName == "selfTime") {
if (elementName == QLatin1String("selfTime")) {
v8event->selfTime = readData.toDouble();
break;
}
break;
}
case QXmlStreamReader::EndElement : {
if (elementName == "v8profile") {
if (elementName == QLatin1String("v8profile")) {
// done reading the v8 profile data
break;
}
@@ -443,9 +443,9 @@ void QV8ProfilerDataModel::load(QXmlStreamReader &stream)
// find v8events' children and parents
foreach (int parentIndex, childrenIndexes.keys()) {
QStringList childrenStrings = childrenIndexes.value(parentIndex).split(",");
QStringList childrenTimesStrings = childrenTimes.value(parentIndex).split(", ");
QStringList parentTimesStrings = parentTimes.value(parentIndex).split(", ");
QStringList childrenStrings = childrenIndexes.value(parentIndex).split(QLatin1String(","));
QStringList childrenTimesStrings = childrenTimes.value(parentIndex).split(QLatin1String(", "));
QStringList parentTimesStrings = parentTimes.value(parentIndex).split(QLatin1String(", "));
for (int ndx = 0; ndx < childrenStrings.count(); ndx++) {
int childIndex = childrenStrings[ndx].toInt();
if (v8eventBuffer.value(childIndex)) {