Skip to content

Commit

Permalink
Add interrupt method
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Mar 2, 2018
1 parent cf53a4c commit 86d66c7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/providers/virtual/qgsvirtuallayersqlitehelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ QgsScopedSqlite::~QgsScopedSqlite()

sqlite3 *QgsScopedSqlite::get() const { return db_; }

bool QgsScopedSqlite::interrupt()
{
bool rc = false;
if ( db_ )
{
sqlite3_interrupt( db_ );
rc = true;
}
return rc;
}

sqlite3 *QgsScopedSqlite::release()
{
sqlite3 *pp = db_;
Expand Down
1 change: 1 addition & 0 deletions src/providers/virtual/qgsvirtuallayersqlitehelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class QgsScopedSqlite
QgsScopedSqlite &operator=( QgsScopedSqlite &other );
~QgsScopedSqlite();

bool interrupt();
sqlite3 *get() const;
sqlite3 *release();
void reset( sqlite3 *db );
Expand Down

0 comments on commit 86d66c7

Please sign in to comment.