# HG changeset patch
# User Wuzzy " + PageGameStats::tr("The best shot award was won by %1 with %2 pts.", "", num).arg(info.mid(i + 1), info.left(i)) + " " + PageGameStats::tr("The best shot award was won by %1 with %2 pts.", "", num).arg(info.mid(i + 1).toHtmlEscaped(), info.left(i)) + " " + PageGameStats::tr("The best killer is %1 with %2 kills in a turn.", "", num).arg(info.mid(i + 1), info.left(i)) + " " + PageGameStats::tr("The best killer is %1 with %2 kills in a turn.", "", num).arg(info.mid(i + 1).toHtmlEscaped(), info.left(i)) + " " + PageGameStats::tr("Details") + "
");
+ l->setText(" " + PageGameStats::tr("Details").toHtmlEscaped() + "
");
l->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
labelGameStats->setTextFormat(Qt::RichText);
labelGameStats->setAlignment(Qt::AlignTop);
@@ -73,7 +73,7 @@
graphic->setObjectName("gameStatsView");
labelGraphTitle = new QLabel(this);
labelGraphTitle->setTextFormat(Qt::RichText);
- labelGraphTitle->setText(" " + PageGameStats::tr("Health graph") + "
");
+ labelGraphTitle->setText(" " + PageGameStats::tr("Health graph").toHtmlEscaped() + "
");
labelGraphTitle->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
gbl->addWidget(labelGraphTitle);
gbl->addWidget(graphic);
@@ -91,7 +91,7 @@
labelGameRank = new QLabel(gb);
l = new QLabel(this);
l->setTextFormat(Qt::RichText);
- l->setText(" " + PageGameStats::tr("Ranking") + "
");
+ l->setText(" " + PageGameStats::tr("Ranking").toHtmlEscaped() + "
");
l->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
gbl->addWidget(l);
gbl->addWidget(labelGameRank);
@@ -164,7 +164,7 @@
void PageGameStats::renderStats()
{
if(defaultGraphTitle) {
- labelGraphTitle->setText(" " + PageGameStats::tr("Health graph") + "
");
+ labelGraphTitle->setText(" " + PageGameStats::tr("Health graph").toHtmlEscaped() + "
");
} else {
defaultGraphTitle = true;
}
@@ -271,14 +271,14 @@
{
case 'r' :
{
- labelGameWin->setText(QString("%1
").arg(info));
+ labelGameWin->setText(QString("%1
").arg(info.toHtmlEscaped()));
break;
}
case 'D' :
{
int i = info.indexOf(' ');
int num = info.left(i).toInt();
- QString message = " " + info + "
");
+ labelGraphTitle->setText(" " + info.toHtmlEscaped() + "
");
break;
}
case 'T': // local team stats
@@ -391,7 +391,7 @@
}
kindOfPoints = QString("");
- message = QString("%1 %2. %3 ").arg(image, QString::number(realPlayerPosition), playername, clanColor.name()) + killstring + "
" + PageGameStats::tr("%1 thought it's good to shoot their own hedgehogs for %2 pts.", "", num).arg(info.mid(i + 1)).arg(num) + "
"; + QString message = "" + PageGameStats::tr("%1 thought it's good to shoot their own hedgehogs for %2 pts.", "", num).arg(info.mid(i + 1).toHtmlEscaped()).arg(num) + "
"; AddStatText(message); break; } @@ -409,7 +409,7 @@ { int i = info.indexOf(' '); int num = info.left(i).toInt(); - QString message = "" + PageGameStats::tr("%1 killed %2 of their own hedgehogs.", "", num).arg(info.mid(i + 1)).arg(num) + "
"; + QString message = "" + PageGameStats::tr("%1 killed %2 of their own hedgehogs.", "", num).arg(info.mid(i + 1).toHtmlEscaped()).arg(num) + "
"; AddStatText(message); break; } @@ -417,13 +417,13 @@ { int i = info.indexOf(' '); int num = info.left(i).toInt(); - QString message = "" + PageGameStats::tr("%1 was scared and skipped turn %2 times.", "", num).arg(info.mid(i + 1)).arg(num) + "
"; + QString message = "" + PageGameStats::tr("%1 was scared and skipped turn %2 times.", "", num).arg(info.mid(i + 1).toHtmlEscaped()).arg(num) + "
"; AddStatText(message); break; } case 'c' : { - QString message = ""+info+"
"; + QString message = ""+info.toHtmlEscaped()+"
"; AddStatText(message); break; } @@ -434,7 +434,7 @@ } case 'h' : { - QString message = "" + PageGameStats::tr("With everyone having the same clan color, there was no reason to fight. And so the hedgehogs happily lived in peace ever after.") + "
"; + QString message = "" + PageGameStats::tr("With everyone having the same clan color, there was no reason to fight. And so the hedgehogs happily lived in peace ever after.").toHtmlEscaped() + "
"; AddStatText(message); break; }