mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
Usability improvements for Extended Table Widget and SQL
results pane Copy for multi-line text data surrounds the text with the <pre> tag in the HTML version for avoiding line white-space adjustments in the pasted text. See #1058 Do not use binary data in the "Use as Filter" option. Indicate the existence of an error in the background of the SQL results frame. The error-indicators is reused for disabling this functionality. When nothing is shown, a placeholder text hints the objective of the results pane. The preference label for the font size of this pane is modified for consistency (SQL Log is another widget).
This commit is contained in:
@@ -55,10 +55,17 @@ QString SqlExecutionArea::getSelectedSql() const
|
||||
return ui->editEditor->selectedText().trimmed().replace(QChar(0x2029), '\n');
|
||||
}
|
||||
|
||||
void SqlExecutionArea::finishExecution(const QString& result)
|
||||
void SqlExecutionArea::finishExecution(const QString& result, const bool ok)
|
||||
{
|
||||
m_columnsResized = false;
|
||||
ui->editErrors->setPlainText(result);
|
||||
// Set reddish background when not ok
|
||||
if (showErrorIndicators)
|
||||
if (ok)
|
||||
ui->editErrors->setStyleSheet("");
|
||||
else
|
||||
ui->editErrors->setStyleSheet("color: white; background-color: rgb(255, 102, 102)");
|
||||
|
||||
}
|
||||
|
||||
void SqlExecutionArea::fetchedData()
|
||||
@@ -135,6 +142,12 @@ void SqlExecutionArea::reloadSettings()
|
||||
|
||||
// Set prefetch settings
|
||||
model->setChunkSize(Settings::getValue("db", "prefetchsize").toInt());
|
||||
|
||||
// Check if error indicators are enabled for the not-ok background clue
|
||||
showErrorIndicators = Settings::getValue("editor", "error_indicators").toBool();
|
||||
if (!showErrorIndicators)
|
||||
ui->editErrors->setStyleSheet("");
|
||||
|
||||
}
|
||||
|
||||
void SqlExecutionArea::find(QString expr, bool forward)
|
||||
|
||||
Reference in New Issue
Block a user