aboutsummaryrefslogtreecommitdiff
path: root/source/QXmppLogger.h
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-03-08 20:57:12 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-03-08 20:57:12 +0000
commitc18325b18acd5b14a3e229067061ce1fea4aa272 (patch)
treea0a0948d8a144a7fd534e2c56af0e26d7a29c896 /source/QXmppLogger.h
parente6cc346c60ff606cefa1773628bd0c8f770dd5d9 (diff)
downloadqxmpp-c18325b18acd5b14a3e229067061ce1fea4aa272.tar.gz
make QXmppLogger a QObject so it can emit signals
Diffstat (limited to 'source/QXmppLogger.h')
-rw-r--r--source/QXmppLogger.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/QXmppLogger.h b/source/QXmppLogger.h
index 17e78312..7847cfa3 100644
--- a/source/QXmppLogger.h
+++ b/source/QXmppLogger.h
@@ -25,9 +25,12 @@
#ifndef QXMPPLOGGER_H
#define QXMPPLOGGER_H
-/// Singleton class
-class QXmppLogger
+#include <QObject>
+
+class QXmppLogger : public QObject
{
+ Q_OBJECT
+
public:
enum LoggingType
{
@@ -36,6 +39,7 @@ public:
STDOUT
};
+ QXmppLogger(QObject *parent = 0);
static QXmppLogger* getLogger();
QXmppLogger::LoggingType loggingType();
@@ -47,8 +51,10 @@ public:
// deprecated accessors, use the form without "get" instead
QXmppLogger::LoggingType Q_DECL_DEPRECATED getLoggingType();
+signals:
+ void message(QtMsgType type, const QString &str);
+
protected:
- QXmppLogger();
virtual void log(QtMsgType type, const QString& str);
private: