Krita Source Code Documentation
Loading...
Searching...
No Matches
LogDockerDock.cpp File Reference
#include "LogDockerDock.h"
#include <QHBoxLayout>
#include <QScrollBar>
#include <QStandardPaths>
#include <QDateTime>
#include <QCheckBox>
#include <QMessageBox>
#include <klocalizedstring.h>
#include <ksharedconfig.h>
#include <kconfiggroup.h>
#include <KisPart.h>
#include <KoDialog.h>
#include <KoCanvasBase.h>
#include <KoIcon.h>
#include <KoFileDialog.h>
#include "kis_canvas2.h"
#include "KisViewManager.h"
#include "KisMainWindow.h"
#include "kis_config.h"
#include <QThread>
#include <QMutex>
#include <QWaitCondition>
#include <QGlobalStatic>
#include <KisStaticInitializer.h>
#include <LogDockerDock.moc>

Go to the source code of this file.

Classes

class  MessageForwarderThread
 
class  MessageHandler
 

Functions

QString cfgToString (const char *category, bool cfg)
 
void kritaLoggerMessageHandler (QtMsgType type, const QMessageLogContext &context, const QString &msg)
 

Variables

 KIS_DECLARE_STATIC_INITIALIZER
 

Function Documentation

◆ cfgToString()

QString cfgToString ( const char * category,
bool cfg )

Definition at line 349 of file LogDockerDock.cpp.

350{
351 if (cfg) {
352 return QStringLiteral("%0=true").arg(QLatin1String(category));
353 }
354 return QStringLiteral("%0.debug=false").arg(QLatin1String(category));
355}

◆ kritaLoggerMessageHandler()

void kritaLoggerMessageHandler ( QtMsgType type,
const QMessageLogContext & context,
const QString & msg )

A forward declaration of the handler that will be passed to Qt as a message handler. The handler will use MessageHandler object below to post the actual messages.

Definition at line 152 of file LogDockerDock.cpp.

153{
154 KIS_SAFE_ASSERT_RECOVER_RETURN(s_messageHandlerObject->m_forwarderThread);
155 KIS_SAFE_ASSERT_RECOVER_RETURN(s_messageHandlerObject->m_originalMessageHandler);
156
157 s_messageHandlerObject->m_forwarderThread->pushMessage(type, message);
158 s_messageHandlerObject->m_originalMessageHandler(type, context, message);
159}
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:128

References KIS_SAFE_ASSERT_RECOVER_RETURN.

Variable Documentation

◆ KIS_DECLARE_STATIC_INITIALIZER

KIS_DECLARE_STATIC_INITIALIZER
Initial value:
{
qRegisterMetaType<QtMsgType>("QtMsgType")

Definition at line 44 of file LogDockerDock.cpp.