Add escape for Qt4 and leave toHtmlEscaped for Qt5

This would ease out Qt5 only migration by searching for `QT_VERSION < 0x050000` and removing those lines.
This commit is contained in:
Iulian Onofrei
2016-09-27 17:42:35 +03:00
committed by GitHub
parent 482502f4f4
commit 18dccd162e

View File

@@ -949,7 +949,11 @@ void MainWindow::executeQuery()
{
// The query takes the last placeholder as it may itself contain the sequence '%' + number
statusMessage = tr("%1 rows returned in %2ms from: %3").arg(
#if QT_VERSION < 0x050000
sqlWidget->getModel()->totalRowCount()).arg(timer.elapsed()).arg(Qt::escape(queryPart.trimmed()));
#else
sqlWidget->getModel()->totalRowCount()).arg(timer.elapsed()).arg(queryPart.trimmed().toHtmlEscaped());
#endif
sqlWidget->enableSaveButton(true);
sql3status = SQLITE_OK;
}