diff options
| author | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2010-03-09 09:35:00 +0000 |
|---|---|---|
| committer | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2010-03-09 09:35:00 +0000 |
| commit | 4632e605d911fe937cedc00dde519b9bd409229b (patch) | |
| tree | dfafcb1ae08fcd1ce0f3a49e205e2ca4855dac0d /source/QXmppLogger.cpp | |
| parent | 001fc90d826890922f8d3c75c65bb0f7ba473c6d (diff) | |
| download | qxmpp-4632e605d911fe937cedc00dde519b9bd409229b.tar.gz | |
don't emit signal when there is no logging
Diffstat (limited to 'source/QXmppLogger.cpp')
| -rw-r--r-- | source/QXmppLogger.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/QXmppLogger.cpp b/source/QXmppLogger.cpp index 4509ea0e..34d91676 100644 --- a/source/QXmppLogger.cpp +++ b/source/QXmppLogger.cpp @@ -78,6 +78,7 @@ QXmppLogger::LoggingType QXmppLogger::loggingType() void QXmppLogger::log(QXmppLogger::MessageType type, const QString& str) { + bool emitMessageSignal = true; switch(m_loggingType) { case QXmppLogger::FILE: @@ -94,9 +95,11 @@ void QXmppLogger::log(QXmppLogger::MessageType type, const QString& str) std::cout << typeName(type) << " " << qPrintable(str) << std::endl; break; default: + emitMessageSignal = false; break; } - emit message(type, str); + if(emitMessageSignal) + emit message(type, str); } QXmppLogger::LoggingType QXmppLogger::getLoggingType() |
