Fix escaping of Execute SQL results

Fix the HTML escaping of the success/error messages at the bottom of the
Execute SQL tab. This also simplifies the code a bit.

See issue #823.
This commit is contained in:
Martin Kleusberg
2016-10-13 12:39:10 +02:00
parent da7f472864
commit 8f77634a0a
2 changed files with 2 additions and 6 deletions

View File

@@ -975,11 +975,7 @@ 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->getModel()->totalRowCount()).arg(timer.elapsed()).arg(queryPart.trimmed());
sqlWidget->enableSaveButton(true);
sql3status = SQLITE_OK;
}

View File

@@ -50,7 +50,7 @@ QString SqlExecutionArea::getSelectedSql() const
void SqlExecutionArea::finishExecution(const QString& result)
{
ui->editErrors->setText(result);
ui->editErrors->setPlainText(result);
// Set column widths according to their contents but make sure they don't exceed a certain size
ui->tableResult->resizeColumnsToContents();