Skip to content

Commit

Permalink
Query result widget: trim trailing semicolon from query. Statements w…
Browse files Browse the repository at this point in the history
…ith trailing semicolons are evaluated successfully, but cannot be create successfully
  • Loading branch information
jef-n authored and nyalldawson committed Nov 29, 2024
1 parent d9299e6 commit ee17e9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/qgsqueryresultwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ void QgsQueryResultWidget::copyResults( int fromRow, int toRow, int fromColumn,

QgsAbstractDatabaseProviderConnection::SqlVectorLayerOptions QgsQueryResultWidget::sqlVectorLayerOptions() const
{
mSqlVectorLayerOptions.sql = mSqlEditor->text();
mSqlVectorLayerOptions.sql = mSqlEditor->text().replace( QRegularExpression( ";\\s*$" ), QString() );
mSqlVectorLayerOptions.filter = mFilterLineEdit->text();
mSqlVectorLayerOptions.primaryKeyColumns = mPkColumnsComboBox->checkedItems();
mSqlVectorLayerOptions.geometryColumn = mGeometryColumnComboBox->currentText();
Expand Down

0 comments on commit ee17e9a

Please sign in to comment.