From 10c47cea645539a15992991f781cb4ae831eaf5c Mon Sep 17 00:00:00 2001 From: sfb Date: Thu, 4 Aug 2011 09:21:38 -0500 Subject: [PATCH] reverting log plugin to rev 1660 --- .../src/plugins/log/log_plugin.cpp | 10 +++--- .../src/plugins/log/log_settings_page.cpp | 31 +++++++------------ 2 files changed, 16 insertions(+), 25 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp index 41ce39632..f31a63924 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp @@ -103,7 +103,7 @@ namespace Plugin QString CLogPlugin::name() const { - return "LogPlugin"; + return "NeL Log"; } QString CLogPlugin::version() const @@ -139,10 +139,10 @@ namespace Plugin QSettings *settings = Core::ICore::instance()->settings(); settings->beginGroup(Core::Constants::LOG_SECTION); - bool error = settings->value(Core::Constants::LOG_ERROR, true).toBool(); - bool warning = settings->value(Core::Constants::LOG_WARNING, true).toBool(); - bool debug = settings->value(Core::Constants::LOG_DEBUG, true).toBool(); - bool assert = settings->value(Core::Constants::LOG_ASSERT, true).toBool(); + bool error = settings->value(Core::Constants::LOG_ERROR, true).toBool(); + bool warning = settings->value(Core::Constants::LOG_WARNING, true).toBool(); + bool debug = settings->value(Core::Constants::LOG_DEBUG, true).toBool(); + bool assert = settings->value(Core::Constants::LOG_ASSERT, true).toBool(); bool info = settings->value(Core::Constants::LOG_INFO, true).toBool(); settings->endGroup(); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.cpp index d1e3d65fc..3aba359a5 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.cpp @@ -28,8 +28,8 @@ #include #include -namespace ExtensionSystem -{ +namespace ExtensionSystem +{ class IPluginManager; } @@ -42,10 +42,10 @@ namespace Plugin : IOptionsPage(parent), m_logPlugin(logPlugin), m_currentPage(NULL), - m_error(true), - m_warning(true), - m_debug(true), - m_assert(true), + m_error(true), + m_warning(true), + m_debug(true), + m_assert(true), m_info(true) { } @@ -99,16 +99,7 @@ namespace Plugin m_info = m_ui.infoCheck->isChecked(); writeSettings(); - ExtensionSystem::IPluginManager *p = Core::ICore::instance()->pluginManager(); - ExtensionSystem::IPluginSpec *spec = p->pluginByName("LogPlugin"); - - if(spec) - { - ExtensionSystem::IPlugin *plugin = spec->plugin(); - CLogPlugin* lp = dynamic_cast(plugin); - if (lp) - lp->setDisplayers(); - } + m_logPlugin->setDisplayers(); } void CLogSettingsPage::readSettings() @@ -116,10 +107,10 @@ namespace Plugin QSettings *settings = Core::ICore::instance()->settings(); settings->beginGroup(Core::Constants::LOG_SECTION); - m_error = settings->value(Core::Constants::LOG_ERROR, true).toBool(); - m_warning = settings->value(Core::Constants::LOG_WARNING, true).toBool(); - m_debug = settings->value(Core::Constants::LOG_DEBUG, true).toBool(); - m_assert = settings->value(Core::Constants::LOG_ASSERT, true).toBool(); + m_error = settings->value(Core::Constants::LOG_ERROR, true).toBool(); + m_warning = settings->value(Core::Constants::LOG_WARNING, true).toBool(); + m_debug = settings->value(Core::Constants::LOG_DEBUG, true).toBool(); + m_assert = settings->value(Core::Constants::LOG_ASSERT, true).toBool(); m_info = settings->value(Core::Constants::LOG_INFO, true).toBool(); settings->endGroup(); }