QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
qgsdbquerylog_p.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsdbquerylog_p.h
3 ------------
4 Date : February 2024
5 Copyright : (C) 2024 by Matthias Kuhn
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSDBQUERYLOG_P_H
17#define QGSDBQUERYLOG_P_H
18
19#include "qgsconfig.h"
20constexpr int sQueryLoggerFilePrefixLength = CMAKE_SOURCE_DIR[sizeof( CMAKE_SOURCE_DIR ) - 1] == '/' ? sizeof( CMAKE_SOURCE_DIR ) + 1 : sizeof( CMAKE_SOURCE_DIR );
21#define QgsSetQueryLogClass(entry, _class) ( entry ).initiatorClass = _class; ( entry ).origin = QString(QString( __FILE__ ).mid( sQueryLoggerFilePrefixLength ) + ':' + QString::number( __LINE__ ) + " (" + __FUNCTION__ + ")");
22#define QGS_QUERY_LOG_ORIGIN QString(QString( __FILE__ ).mid( sQueryLoggerFilePrefixLength ) + ':' + QString::number( __LINE__ ) + " (" + ( __FUNCTION__ ) + ")")
23
24#endif // QGSDBQUERYLOG_P_H
constexpr int sQueryLoggerFilePrefixLength