QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
Classes | Macros | Functions | Variables
qgsdbquerylog.h File Reference
#include "qgis_core.h"
#include "qgis.h"
#include <QString>
#include <QDateTime>
#include "qgsconfig.h"
Include dependency graph for qgsdbquerylog.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  QgsDatabaseQueryLog
 Handles logging of database queries. More...
 
class  QgsDatabaseQueryLogEntry
 Encapsulates a logged database query. More...
 

Macros

#define QGS_QUERY_LOG_ORIGIN   QString(QString( __FILE__ ).mid( sQueryLoggerFilePrefixLength ) + ':' + QString::number( __LINE__ ) + " (" + __FUNCTION__ + ")")
 
#define QgsSetQueryLogClass(entry, _class)   entry.initiatorClass = _class; entry.origin = QString(QString( __FILE__ ).mid( sQueryLoggerFilePrefixLength ) + ':' + QString::number( __LINE__ ) + " (" + __FUNCTION__ + ")");
 

Functions

 Q_DECLARE_METATYPE (QgsDatabaseQueryLogEntry)
 

Variables

constexpr int sQueryLoggerFilePrefixLength = CMAKE_SOURCE_DIR[sizeof( CMAKE_SOURCE_DIR ) - 1] == '/' ? sizeof( CMAKE_SOURCE_DIR ) + 1 : sizeof( CMAKE_SOURCE_DIR )
 

Macro Definition Documentation

◆ QGS_QUERY_LOG_ORIGIN

#define QGS_QUERY_LOG_ORIGIN   QString(QString( __FILE__ ).mid( sQueryLoggerFilePrefixLength ) + ':' + QString::number( __LINE__ ) + " (" + __FUNCTION__ + ")")

Definition at line 109 of file qgsdbquerylog.h.

◆ QgsSetQueryLogClass

#define QgsSetQueryLogClass (   entry,
  _class 
)    entry.initiatorClass = _class; entry.origin = QString(QString( __FILE__ ).mid( sQueryLoggerFilePrefixLength ) + ':' + QString::number( __LINE__ ) + " (" + __FUNCTION__ + ")");

Definition at line 108 of file qgsdbquerylog.h.

Function Documentation

◆ Q_DECLARE_METATYPE()

Q_DECLARE_METATYPE ( QgsDatabaseQueryLogEntry  )

Variable Documentation

◆ sQueryLoggerFilePrefixLength

constexpr int sQueryLoggerFilePrefixLength = CMAKE_SOURCE_DIR[sizeof( CMAKE_SOURCE_DIR ) - 1] == '/' ? sizeof( CMAKE_SOURCE_DIR ) + 1 : sizeof( CMAKE_SOURCE_DIR )
constexpr

Definition at line 107 of file qgsdbquerylog.h.