26QAtomicInt QgsDatabaseQueryLogEntry::sQueryId = 0;
29 : queryId( ++sQueryId )
31 , startedTime( QDateTime::currentMSecsSinceEpoch() )
39bool QgsDatabaseQueryLog::sEnabled =
false;
62 finishedQuery.
finishedTime = QDateTime::currentMSecsSinceEpoch();
static QgsDatabaseQueryLog * databaseQueryLog()
Returns the database query log.
Encapsulates a logged database query.
quint64 finishedTime
Time when the query finished (in milliseconds since epoch), if available.
QString query
The logged database query (e.g. the SQL query)
QgsDatabaseQueryLogEntry(const QString &query=QString())
Constructor for QgsDatabaseQueryLogEntry.
static void log(const QgsDatabaseQueryLogEntry &query)
Logs a database query as starting.
void queryFinished(const QgsDatabaseQueryLogEntry &query)
Emitted whenever a database query has finished executing.
static void finished(const QgsDatabaseQueryLogEntry &query)
Records that the database query has finished.
void queryStarted(const QgsDatabaseQueryLogEntry &query)
Emitted whenever a database query is started.
void queryFinishedPrivate(const QgsDatabaseQueryLogEntry &query)
Internal slot for logging queries as finished.
void queryStartedPrivate(const QgsDatabaseQueryLogEntry &query)
Internal slot for logging queries as start.
QgsDatabaseQueryLog(QObject *parent=nullptr)
Creates a new query log.
#define QgsDebugMsgLevel(str, level)