From eceb67c38f1cfa3f6bc16b87586b6306bdb2bb25 Mon Sep 17 00:00:00 2001 From: Mathew Sutcliffe Date: Thu, 25 Sep 2014 22:06:03 +0100 Subject: [PATCH] refs #316 Application context: removed old message handler. --- src/blackcore/context_application.cpp | 15 --------------- src/blackcore/context_application.h | 6 ------ 2 files changed, 21 deletions(-) diff --git a/src/blackcore/context_application.cpp b/src/blackcore/context_application.cpp index 3caf030e3..34a4ab145 100644 --- a/src/blackcore/context_application.cpp +++ b/src/blackcore/context_application.cpp @@ -13,8 +13,6 @@ using namespace BlackMisc::Settings; namespace BlackCore { - QtMessageHandler IContextApplication::s_oldHandler = nullptr; - IContextApplication *IContextApplication::create(CRuntime *parent, CRuntimeConfig::ContextMode mode, CDBusServer *server, QDBusConnection &conn) { switch (mode) @@ -36,12 +34,6 @@ namespace BlackCore IContextApplication::IContextApplication(CRuntimeConfig::ContextMode mode, CRuntime *runtime) : CContext(mode, runtime) { - if (IContextApplication::s_contexts.isEmpty()) - { - IContextApplication::s_oldHandler = qInstallMessageHandler(IContextApplication::messageHandlerDispatch); - } - IContextApplication::s_contexts.append(this); - changeSettings(IContextSettings::SettingsHotKeys); } @@ -61,11 +53,4 @@ namespace BlackCore } } - /* - * Dispatch message - */ - void IContextApplication::messageHandlerDispatch(QtMsgType type, const QMessageLogContext &messageContext, const QString &message) - { - } - } // namespace diff --git a/src/blackcore/context_application.h b/src/blackcore/context_application.h index e4b1aaf7d..3345bb011 100644 --- a/src/blackcore/context_application.h +++ b/src/blackcore/context_application.h @@ -113,12 +113,6 @@ namespace BlackCore void changeSettings(uint typeValue); private: - //! Previous message handler - static QtMessageHandler s_oldHandler; - - //! Handle output dispatch, handles all contexts - //! \threadsafe - static void messageHandlerDispatch(QtMsgType type, const QMessageLogContext &messageContext, const QString &message); mutable QReadWriteLock m_lock; //!< thread safety }; }