Skip to content
Permalink
Browse files

Address PR comments

  • Loading branch information
elpaso committed Sep 21, 2020
1 parent 3e5be25 commit 6d866e3341e2ca1708751645b694eacda7e7a60b
@@ -381,7 +381,7 @@ def updateUiWhileSqlExecution(self, status):

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;

0 comments on commit 6d866e3

Please sign in to comment.
You can’t perform that action at this time.