Simplified LogBrowser

This commit is contained in:
Klaas Freitag 2012-06-18 14:51:49 +02:00
parent 60f966e9c2
commit 8384fe477a
2 changed files with 1 additions and 25 deletions

View file

@ -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() ) {

View file

@ -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 );