From 8384fe477a52a1a1c959b96163c530f1c8cf73c7 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Mon, 18 Jun 2012 14:51:49 +0200 Subject: [PATCH] Simplified LogBrowser --- src/mirall/logbrowser.cpp | 22 +--------------------- src/mirall/logbrowser.h | 4 ---- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/src/mirall/logbrowser.cpp b/src/mirall/logbrowser.cpp index effc8364c..bc6f863f1 100644 --- a/src/mirall/logbrowser.cpp +++ b/src/mirall/logbrowser.cpp @@ -37,8 +37,7 @@ Logger* Logger::_instance=0; Logger::Logger( QObject* parent) : QObject(parent), - _showTime(true), - _doLogging(false) + _showTime(true) { } @@ -59,8 +58,6 @@ void Logger::destroy() void Logger::log(Log log) { - if( ! _doLogging ) return; - QString msg; if( _showTime ) { msg = log.timeStamp.toString("MM-dd hh:mm:ss:zzz") + " "; @@ -97,11 +94,6 @@ void Logger::mirallLog( const QString& message ) Logger::instance()->log( log_ ); } -void Logger::setEnabled( bool state ) -{ - _doLogging = state; -} - // ============================================================================== LogWidget::LogWidget(QWidget *parent) @@ -186,18 +178,6 @@ LogBrowser::~LogBrowser() } } -void LogBrowser::show() -{ - QDialog::show(); - Logger::instance()->setEnabled(true); -} - -void LogBrowser::close() -{ - Logger::instance()->setEnabled(false); - QDialog::close(); -} - void LogBrowser::slotNewLog( const QString& msg ) { if( _logWidget->isVisible() ) { diff --git a/src/mirall/logbrowser.h b/src/mirall/logbrowser.h index 1ef890236..a545564e9 100644 --- a/src/mirall/logbrowser.h +++ b/src/mirall/logbrowser.h @@ -53,8 +53,6 @@ public: static Logger* instance(); static void destroy(); - void setEnabled( bool ); - signals: void newLog(const QString&); @@ -89,8 +87,6 @@ public: signals: public slots: - void show(); - void close(); protected slots: void slotNewLog( const QString &msg );