C++ (Qt)#include <QDebug> #define OUT_MESSAGE "\"%s\": in file \"%s\", func \"%s\", line %i"#define WARNING( msg ) qWarning( OUT_MESSAGE, qPrintable( msg ), __FILE__, __FUNCTION__, __LINE__ );#define CRITICAL( msg ) qCritical( OUT_MESSAGE, qPrintable( msg ), __FILE__, __FUNCTION__, __LINE__ );#define FATAL( msg ) qFatal( OUT_MESSAGE, qPrintable( msg ), __FILE__, __FUNCTION__, __LINE__ );
C++ (Qt)void FileListModel::itemChanged() { FileItem * item = qobject_cast<FileItem *> (sender()); if (!item) { WARNING("null pointer!"); return; }...
C++ (Qt)qCDebug(category) << "null pointer!";qCDebug(category, "null pointer!");qCDebug(category) << "my pointer:" << mypointer;qCDebug(category, "my pointer: %p", mypointer);
#define MY_WARN qWarning() << __FILE__ << __FUNCTION__MY_WARN << "lolo" << 1 << 2 << 3;