author | mickeyl <mickeyl> | 2004-06-22 10:36:11 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-06-22 10:36:11 (UTC) |
commit | 9cff98cb70d8e3a69cefe718bf02720134c10bca (patch) (side-by-side diff) | |
tree | 750f086afefc20e05b5860bf3065697cb75f98ab /libopie2 | |
parent | 526031c34fff4e789b05fddbd7effe83ef057361 (diff) | |
download | opie-9cff98cb70d8e3a69cefe718bf02720134c10bca.zip opie-9cff98cb70d8e3a69cefe718bf02720134c10bca.tar.gz opie-9cff98cb70d8e3a69cefe718bf02720134c10bca.tar.bz2 |
introduce numeric constants for the odebug output destinations
-rw-r--r-- | libopie2/opiecore/odebug.cpp | 12 | ||||
-rw-r--r-- | libopie2/opiecore/odebug.h | 9 |
2 files changed, 14 insertions, 7 deletions
diff --git a/libopie2/opiecore/odebug.cpp b/libopie2/opiecore/odebug.cpp index 3bffdd0..d8dfe26 100644 --- a/libopie2/opiecore/odebug.cpp +++ b/libopie2/opiecore/odebug.cpp @@ -144,19 +144,19 @@ void DebugBackend::debug(unsigned short level, unsigned int, const QString& data if ( oApp ) areaName = oApp->appName(); else areaName = "<unknown>"; switch( m_outp ) { - case -1: // ignore + case ODEBUG_IGNORE: return; - case 0: // File + case ODEBUG_FILE: return debugFile( areaName, data ); - case 1: // Message Box + case ODEBUG_MSGBOX: return debugMsgB( areaName, data ); - case 2: + case ODEBUG_STDERR: return debugShel( areaName,data ); - case 3: // syslog + case ODEBUG_SYSLOG: return debugSysl( priority, data ); - case 4: // socket + case ODEBUG_SOCKET: return debugSock( areaName, data ); } } diff --git a/libopie2/opiecore/odebug.h b/libopie2/opiecore/odebug.h index 3851a41..21a6c26 100644 --- a/libopie2/opiecore/odebug.h +++ b/libopie2/opiecore/odebug.h @@ -66,8 +66,15 @@ class ondbgstream; #define odebug Opie::Core::odDebug() #define ofatal Opie::Core::odFatal() #define oendl "\n" +const int ODEBUG_IGNORE = -1; +const int ODEBUG_FILE = 0; +const int ODEBUG_MSGBOX = 1; +const int ODEBUG_STDERR = 2; +const int ODEBUG_SYSLOG = 3; +const int ODEBUG_SOCKET = 4; + class odbgstreamprivate; /** * odbgstream is a text stream that allows you to print debug messages. * Using the overloaded "<<" operator you can send messages. Usually @@ -396,9 +403,9 @@ class ondbgstream { ondbgstream& operator<<( const QRegion & ) { return *this; } ondbgstream& operator<<( const QStringList & ) { return *this; } ondbgstream& operator<<( const QColor & ) { return *this; } ondbgstream& operator<<( const QBrush & ) { return *this; } - + private: class Private; Private *d; }; |