Diffstat (limited to 'libopie2/opiecore/odebug.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/odebug.cpp | 12 |
1 files changed, 6 insertions, 6 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 | |||
@@ -136,35 +136,35 @@ void DebugBackend::debug(unsigned short level, unsigned int, const QString& data | |||
136 | if (!oApp && (m_outp == 1)) { | 136 | if (!oApp && (m_outp == 1)) { |
137 | qDebug( "oDebugBackend: Warning: no oapplication object - can't use MsgBox" ); | 137 | qDebug( "oDebugBackend: Warning: no oapplication object - can't use MsgBox" ); |
138 | m_outp = 2; // need an application object to use MsgBox | 138 | m_outp = 2; // need an application object to use MsgBox |
139 | } | 139 | } |
140 | 140 | ||
141 | // gcc 2.9x is dumb and sucks... can you hear it? | 141 | // gcc 2.9x is dumb and sucks... can you hear it? |
142 | //QString areaName = (oApp) ? oApp->appName() : "<unknown>"; | 142 | //QString areaName = (oApp) ? oApp->appName() : "<unknown>"; |
143 | QString areaName; | 143 | QString areaName; |
144 | if ( oApp ) areaName = oApp->appName(); | 144 | if ( oApp ) areaName = oApp->appName(); |
145 | else areaName = "<unknown>"; | 145 | else areaName = "<unknown>"; |
146 | 146 | ||
147 | switch( m_outp ) { | 147 | switch( m_outp ) { |
148 | case -1: // ignore | 148 | case ODEBUG_IGNORE: |
149 | return; | 149 | return; |
150 | case 0: // File | 150 | case ODEBUG_FILE: |
151 | return debugFile( areaName, data ); | 151 | return debugFile( areaName, data ); |
152 | case 1: // Message Box | 152 | case ODEBUG_MSGBOX: |
153 | return debugMsgB( areaName, data ); | 153 | return debugMsgB( areaName, data ); |
154 | case 2: | 154 | case ODEBUG_STDERR: |
155 | return debugShel( areaName,data ); | 155 | return debugShel( areaName,data ); |
156 | case 3: // syslog | 156 | case ODEBUG_SYSLOG: |
157 | return debugSysl( priority, data ); | 157 | return debugSysl( priority, data ); |
158 | case 4: // socket | 158 | case ODEBUG_SOCKET: |
159 | return debugSock( areaName, data ); | 159 | return debugSock( areaName, data ); |
160 | } | 160 | } |
161 | } | 161 | } |
162 | 162 | ||
163 | inline void DebugBackend::debugFile(const QString& area, const QString& data) { | 163 | inline void DebugBackend::debugFile(const QString& area, const QString& data) { |
164 | /* something went wrong with the file don't bother.. */ | 164 | /* something went wrong with the file don't bother.. */ |
165 | if ( m_opened && !m_file ) | 165 | if ( m_opened && !m_file ) |
166 | return; | 166 | return; |
167 | else if ( !m_opened ) { | 167 | else if ( !m_opened ) { |
168 | m_opened = true; | 168 | m_opened = true; |
169 | m_file = new QFile( OGlobalSettings::debugOutput() ); | 169 | m_file = new QFile( OGlobalSettings::debugOutput() ); |
170 | if (!m_file->open( IO_WriteOnly | IO_Append ) ) { | 170 | if (!m_file->open( IO_WriteOnly | IO_Append ) ) { |