mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Address PR comments
This commit is contained in:
parent
3e5be258cb
commit
6d866e3341
@ -381,7 +381,7 @@ class DlgSqlWindow(QWidget, Ui_Dialog):
|
||||
|
||||
def executeSqlCanceled(self):
|
||||
self.btnCancel.setEnabled(False)
|
||||
self.btnCancel.setText(self.tr("Canceling, please wait ..."))
|
||||
self.btnCancel.setText(self.tr("Canceling…"))
|
||||
self.modelAsync.cancel()
|
||||
|
||||
def executeSqlCompleted(self):
|
||||
|
@ -223,10 +223,10 @@ QList<QVariantList> QgsPostgresProviderConnection::executeSqlPrivate( const QStr
|
||||
}
|
||||
|
||||
// This is gross but I tried with both conn and a context QObject without success: the lambda is never called.
|
||||
QMetaObject::Connection moConn;
|
||||
QMetaObject::Connection qtConnection;
|
||||
if ( feedback )
|
||||
{
|
||||
moConn = QObject::connect( feedback, &QgsFeedback::canceled, [ &conn ]
|
||||
qtConnection = QObject::connect( feedback, &QgsFeedback::canceled, [ &conn ]
|
||||
{
|
||||
conn->PQCancel();
|
||||
} );
|
||||
@ -235,7 +235,7 @@ QList<QVariantList> QgsPostgresProviderConnection::executeSqlPrivate( const QStr
|
||||
QgsPostgresResult res( conn->PQexec( sql ) );
|
||||
if ( feedback )
|
||||
{
|
||||
QObject::disconnect( moConn );
|
||||
QObject::disconnect( qtConnection );
|
||||
}
|
||||
|
||||
QString errCause;
|
||||
|
Loading…
x
Reference in New Issue
Block a user