Skip to content

Commit 18dccd1

Browse files
authored
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.
1 parent 482502f commit 18dccd1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/MainWindow.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,11 @@ void MainWindow::executeQuery()
949949
{
950950
// The query takes the last placeholder as it may itself contain the sequence '%' + number
951951
statusMessage = tr("%1 rows returned in %2ms from: %3").arg(
952+
#if QT_VERSION < 0x050000
952953
sqlWidget->getModel()->totalRowCount()).arg(timer.elapsed()).arg(Qt::escape(queryPart.trimmed()));
954+
#else
955+
sqlWidget->getModel()->totalRowCount()).arg(timer.elapsed()).arg(queryPart.trimmed().toHtmlEscaped());
956+
#endif
953957
sqlWidget->enableSaveButton(true);
954958
sql3status = SQLITE_OK;
955959
}

0 commit comments

Comments
 (0)