forked from qt-creator/qt-creator
UI text: add punctuation to QML Profiler messages
Change-Id: I6571dc0b950f719b4ec0641254f2fa7bcd646f49 Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
This commit is contained in:
@@ -307,7 +307,7 @@ void QmlProfilerDataModel::addRangedEvent(int type, int bindingType, qint64 star
|
|||||||
|
|
||||||
// generate details string
|
// generate details string
|
||||||
if (data.isEmpty())
|
if (data.isEmpty())
|
||||||
details = tr("Source code not available");
|
details = tr("Source code not available.");
|
||||||
else {
|
else {
|
||||||
details = data.join(QLatin1String(" ")).replace(QLatin1Char('\n'),QLatin1Char(' ')).simplified();
|
details = data.join(QLatin1String(" ")).replace(QLatin1Char('\n'),QLatin1Char(' ')).simplified();
|
||||||
QRegExp rewrite(QLatin1String("\\(function \\$(\\w+)\\(\\) \\{ (return |)(.+) \\}\\)"));
|
QRegExp rewrite(QLatin1String("\\(function \\$(\\w+)\\(\\) \\{ (return |)(.+) \\}\\)"));
|
||||||
@@ -685,7 +685,7 @@ QString QmlProfilerDataModel::getDetails(int index) const
|
|||||||
// special: animations
|
// special: animations
|
||||||
if (d->startInstanceList[index].statsInfo->eventType == QmlDebug::Painting &&
|
if (d->startInstanceList[index].statsInfo->eventType == QmlDebug::Painting &&
|
||||||
d->startInstanceList[index].animationCount >= 0)
|
d->startInstanceList[index].animationCount >= 0)
|
||||||
return tr("%1 animations at %2 FPS").arg(
|
return tr("%1 animations at %2 FPS.").arg(
|
||||||
QString::number(d->startInstanceList[index].animationCount),
|
QString::number(d->startInstanceList[index].animationCount),
|
||||||
QString::number(d->startInstanceList[index].frameRate));
|
QString::number(d->startInstanceList[index].frameRate));
|
||||||
return d->startInstanceList[index].statsInfo->details;
|
return d->startInstanceList[index].statsInfo->details;
|
||||||
@@ -804,7 +804,7 @@ void QmlProfilerDataModel::complete()
|
|||||||
compileStatistics(traceStartTime(), traceEndTime());
|
compileStatistics(traceStartTime(), traceEndTime());
|
||||||
setState(Done);
|
setState(Done);
|
||||||
} else {
|
} else {
|
||||||
emit error(tr("Unexpected complete signal in data model"));
|
emit error(tr("Unexpected complete signal in data model."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1344,13 +1344,13 @@ void QmlProfilerDataModel::finishedRewritingDetails()
|
|||||||
bool QmlProfilerDataModel::save(const QString &filename)
|
bool QmlProfilerDataModel::save(const QString &filename)
|
||||||
{
|
{
|
||||||
if (isEmpty()) {
|
if (isEmpty()) {
|
||||||
emit error(tr("No data to save"));
|
emit error(tr("No data to save."));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QFile file(filename);
|
QFile file(filename);
|
||||||
if (!file.open(QIODevice::WriteOnly)) {
|
if (!file.open(QIODevice::WriteOnly)) {
|
||||||
emit error(tr("Could not open %1 for writing").arg(filename));
|
emit error(tr("Could not open %1 for writing.").arg(filename));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1427,7 +1427,7 @@ void QmlProfilerDataModel::load()
|
|||||||
QFile file(filename);
|
QFile file(filename);
|
||||||
|
|
||||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||||
emit error(tr("Could not open %1 for reading").arg(filename));
|
emit error(tr("Could not open %1 for reading.").arg(filename));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1589,7 +1589,7 @@ void QmlProfilerDataModel::load()
|
|||||||
file.close();
|
file.close();
|
||||||
|
|
||||||
if (stream.hasError()) {
|
if (stream.hasError()) {
|
||||||
emit error(tr("Error while parsing %1").arg(filename));
|
emit error(tr("Error while parsing %1.").arg(filename));
|
||||||
clear();
|
clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1660,7 +1660,7 @@ void QmlProfilerDataModel::setState(QmlProfilerDataModel::State state)
|
|||||||
QTC_ASSERT(d->listState == ProcessingData || d->listState == Empty, return);
|
QTC_ASSERT(d->listState == ProcessingData || d->listState == Empty, return);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
emit error(tr("Trying to set unknown state in events list"));
|
emit error(tr("Trying to set unknown state in events list."));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user