mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-19 10:20:17 -06:00
SqlExecutionArea: Replace UTF8 paragraph separator by newline char
When the user selects multiple lines of SQL code and hits F5 to execute them the execution stops after the first line because we use the selectedText() method of the QTextCursor class to get the selected text and this method returns Unicode U+2029 paragraph separator characters instead of newline \n characters. (see http://qt-project.org/doc/qt-4.8/qtextcursor.html#selectedText) Fix this by replacing these by regular newline characters to.
This commit is contained in:
@@ -51,7 +51,7 @@ QString SqlExecutionArea::getSql() const
|
||||
|
||||
QString SqlExecutionArea::getSelectedSql() const
|
||||
{
|
||||
return ui->editEditor->textCursor().selectedText().trimmed();
|
||||
return ui->editEditor->textCursor().selectedText().trimmed().replace(QChar(0x2029), '\n');
|
||||
}
|
||||
|
||||
void SqlExecutionArea::finishExecution(const QString& result)
|
||||
|
||||
Reference in New Issue
Block a user