QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
Handles logging of database queries. More...
#include <qgsdbquerylog.h>
Public Slots | |
void | queryFinishedPrivate (const QgsDatabaseQueryLogEntry &query) |
Internal slot for logging queries as finished. | |
void | queryStartedPrivate (const QgsDatabaseQueryLogEntry &query) |
Internal slot for logging queries as start. | |
Signals | |
void | queryFinished (const QgsDatabaseQueryLogEntry &query) |
Emitted whenever a database query has finished executing. | |
void | queryStarted (const QgsDatabaseQueryLogEntry &query) |
Emitted whenever a database query is started. | |
Public Member Functions | |
QgsDatabaseQueryLog (QObject *parent=nullptr) | |
Creates a new query log. | |
Static Public Member Functions | |
static bool | enabled () |
Returns true if logging is enabled. | |
static void | finished (const QgsDatabaseQueryLogEntry &query) |
Records that the database query has finished. | |
static void | log (const QgsDatabaseQueryLogEntry &query) |
Logs a database query as starting. | |
static void | setEnabled (bool enabled) |
Enables query logging. | |
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 124 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 42 of file qgsdbquerylog.cpp.
|
inlinestatic |
Returns true
if logging is enabled.
Definition at line 154 of file qgsdbquerylog.h.
|
static |
Records that the database query has finished.
This method can be safely called from any thread.
Definition at line 56 of file qgsdbquerylog.cpp.
|
static |
Logs a database query as starting.
This method can be safely called from any thread.
Definition at line 48 of file qgsdbquerylog.cpp.
|
signal |
Emitted whenever a database query has finished executing.
|
slot |
Internal slot for logging queries as finished.
Definition at line 74 of file qgsdbquerylog.cpp.
|
signal |
Emitted whenever a database query is started.
|
slot |
Internal slot for logging queries as start.
Definition at line 68 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 147 of file qgsdbquerylog.h.