[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kdecore
From: David Faure <faure () kde ! org>
Date: 2010-11-04 19:16:38
Message-ID: 20101104191638.C982DAC89B () svn ! kde ! org
[Download RAW message or body]
SVN commit 1193133 by dfaure:
Add KWARNING_NOTIMPLEMENTED and KWARNING_DEPRECATED, also inspired by the amarok debug framework.
CCMAIL: koffice-devel@kde.org
M +17 -1 io/kdebug.h
M +7 -1 tests/kdebugtest.cpp
--- trunk/KDE/kdelibs/kdecore/io/kdebug.h #1193132:1193133
@@ -362,9 +362,25 @@
Private* const d;
};
-/// Convenience macro for making a standard KDebug::Block
+/**
+ * Convenience macro for making a standard KDebug::Block
+ */
#define KDEBUG_BLOCK KDebug::Block uniquelyNamedStackAllocatedStandardBlock(Q_FUNC_INFO);
+/**
+ * Convenience macro, use this to remind yourself to finish the implementation of a function
+ * The function name will appear in the output (unless $KDE_DEBUG_NOMETHODNAME is set)
+ * @since 4.6
+ */
+#define KWARNING_NOTIMPLEMENTED kWarning() << "NOT-IMPLEMENTED";
+
+/**
+ * Convenience macro, use this to alert other developers to stop using a function
+ * The function name will appear in the output (unless $KDE_DEBUG_NOMETHODNAME is set)
+ * @since 4.6
+ */
+#define KWARNING_DEPRECATED kWarning() << "DEPRECATED";
+
/** @} */
#endif
--- trunk/KDE/kdelibs/kdecore/tests/kdebugtest.cpp #1193132:1193133
@@ -42,7 +42,7 @@
public:
enum Something { foo };
- void func_void() { kDebug(); }
+ void func_void() { KWARNING_NOTIMPLEMENTED }
int func_int() { kDebug(); return 0; }
unsigned func_unsigned() { kDebug(); return 0; }
long func_long() { kDebug(); return 0; }
@@ -89,8 +89,14 @@
{
KDEBUG_BLOCK
func_void();
+ deprecatedMethod();
}
+ void deprecatedMethod()
+ {
+ KWARNING_DEPRECATED
+ }
+
public:
TestClass1()
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic