22#ifndef JKQTPDEBUGGINGTOOLS_H_INCLUDED
23#define JKQTPDEBUGGINGTOOLS_H_INCLUDED
24#include "jkqtcommon/jkqtcommon_imexport.h"
26#include <QElapsedTimer>
31# if defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32)
42#undef JKTOOLS_TIMER_USE_TIME
43#if defined(__WINDOWS__)
45#elif defined(__LINUX__)
48 #define JKTOOLS_TIMER_USE_TIME
61 void write(
const QString& message)
const;
73#define JKQTPASSERT_M(condition, message) { if (!(condition)) throw std::runtime_error(std::string(message)+" (expression: "+std::string(#condition)+", function: "+std::string(__FUNCTION__)+", file: "+std::string(__FILE__)+":"+std::to_string(__LINE__)+")"); }
77#define JKQTPASSERT(condition) { if (!(condition)) throw std::runtime_error("assertion failed (expression: "+std::string(#condition)+", function: "+std::string(__FUNCTION__)+", file: "+std::string(__FILE__)+":"+std::to_string(__LINE__)+")"); }
RAII construct that times its lifetime, outputting properly indented qDebug()-message.
Definition jkqtpdebuggingtools.h:57
QString indent
Definition jkqtpdebuggingtools.h:64
QString message
Definition jkqtpdebuggingtools.h:63
void write(const QString &message) const
JKQTPAutoOutputTimer(const QString &message)