QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
|
Handles logging of database queries. More...
#include <qgsdbquerylog.h>
Public Slots | |
void | queryFinishedPrivate (const QgsDatabaseQueryLogEntry &query) |
Internal slot for logging queries as finished. More... | |
void | queryStartedPrivate (const QgsDatabaseQueryLogEntry &query) |
Internal slot for logging queries as start. More... | |
Signals | |
void | queryFinished (const QgsDatabaseQueryLogEntry &query) |
Emitted whenever a database query has finished executing. More... | |
void | queryStarted (const QgsDatabaseQueryLogEntry &query) |
Emitted whenever a database query is started. More... | |
Public Member Functions | |
QgsDatabaseQueryLog (QObject *parent=nullptr) | |
Creates a new query log. More... | |
Static Public Member Functions | |
static bool | enabled () |
Returns true if logging is enabled. More... | |
static void | finished (const QgsDatabaseQueryLogEntry &query) |
Records that the database query has finished. More... | |
static void | log (const QgsDatabaseQueryLogEntry &query) |
Logs a database query as starting. More... | |
static void | setEnabled (bool enabled) |
Enables query logging. More... | |
Handles logging of database queries.
QgsDatabaseQueryLog is not usually directly created, but rather accessed through QgsApplication::databaseQueryLog(). Generally, clients should only access the static log() method to register their queries.
Definition at line 131 of file qgsdbquerylog.h.
QgsDatabaseQueryLog::QgsDatabaseQueryLog | ( | QObject * | parent = nullptr | ) |
Creates a new query log.
QgsDatabaseQueryLog is not usually directly created, but rather accessed through QgsApplication::databaseQueryLog().
Definition at line 41 of file qgsdbquerylog.cpp.
|
inlinestatic |
Returns true
if logging is enabled.
Definition at line 161 of file qgsdbquerylog.h.
|
static |
Records that the database query has finished.
This method can be safely called from any thread.
Definition at line 55 of file qgsdbquerylog.cpp.
|
static |
Logs a database query as starting.
This method can be safely called from any thread.
Definition at line 47 of file qgsdbquerylog.cpp.
|
signal |
Emitted whenever a database query has finished executing.
|
slot |
Internal slot for logging queries as finished.
Definition at line 73 of file qgsdbquerylog.cpp.
|
signal |
Emitted whenever a database query is started.
|
slot |
Internal slot for logging queries as start.
Definition at line 67 of file qgsdbquerylog.cpp.
|
inlinestatic |
Enables query logging.
If disabled, no signals will be emitted by the log. By default the log is disabled, and clients must manually enable it.
Definition at line 154 of file qgsdbquerylog.h.