[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: KDE/kdelibs/kded
From:       David Faure <faure () kde ! org>
Date:       2010-01-11 11:11:51
Message-ID: 201001111211.52021.faure () kde ! org
[Download RAW message or body]

On Sunday 10 January 2010, André Wöbbeking wrote:
> SVN commit 1072689 by woebbe:
> 
> - kDebug|kWarning|kError|kFatal("string") do not print "string" (the (bool,
> int) overload is called) 

Ooops, good find.
This gave me the following idea for catching such mistakes:

--- ../kdecore/io/kdebug.h      (revision 1071368)
+++ ../kdecore/io/kdebug.h      (working copy)
@@ -283,6 +283,8 @@
      * in other files (with a better name for the function of course).
      */
     static KDECORE_EXPORT int registerArea(const QByteArray& areaName, bool enabled \
= true); +private:
+    inline void operator()(const char*) {} // error! Use kDebug() << "..." or \
kWarning() << "..." instead.  };

Are you already using a patch like this, or should I test-build KDE with it and then \
commit?

-- 
David Faure, faure@kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org).


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic