kWarning() broken!

David Faure faure at kde.org
Fri Sep 18 20:08:27 BST 2009


On Friday 18 September 2009, Carlo wrote:
> the problem is QT_NO_DEBUG, in non debug builds DefaultOutput is
> defined as NoOutput

Indeed. Fixed.
kDebug/kWarning/etc. should work even when kdelibs was compiled in debug mode.

The question is whether kDebug should work when the _app_ itself is
compiled in release mode. If not, then we might have to do something like
this in addition, could you test it?

--- kdebug.h    (revision 1024583)
+++ kdebug.h    (working copy)
@@ -37,7 +37,7 @@
  */

 #if !defined(KDE_NO_DEBUG_OUTPUT)
-# if defined(QT_NO_DEBUG_OUTPUT) || defined(QT_NO_DEBUG_STREAM)
+# if defined(QT_NO_DEBUG_OUTPUT) || defined(QT_NO_DEBUG_STREAM) || defined(QT_NO_DEBUG)
 #  define KDE_NO_DEBUG_OUTPUT
 # endif
 #endif


> so since there is no WarnOutput in kdebugrc it
> will default to NoOutput, what I don't understand is why it works with
> kdebug

Because I made kDebug() write an entry in kdebugrc (so that the area
name appears in kdebugdialog), and that entry defaults to "yes for kDebug",
cf writeGroupForNamedArea().

> and it can read InfoOutput since I don't have any debug area 0
> in kdebugrc

There is no more debug area 0 in kdebugrc, it's now the app name
(in kdelibs >= 4.4)

-- 
David Faure, faure at kde.org, sponsored by Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list