[Telepathy-commits] [telepathy-qt4/master] Rename debug.hpp to debug-internal.hpp to avoid confusion with the public debug.h

Olli Salli olli.salli at collabora.co.uk
Mon Aug 25 13:06:13 PDT 2008


---
 TelepathyQt4/Makefile.am        |    2 +-
 TelepathyQt4/debug-internal.hpp |   90 +++++++++++++++++++++++++++++++++++++++
 TelepathyQt4/debug.cpp          |    2 +-
 TelepathyQt4/debug.hpp          |   90 ---------------------------------------
 4 files changed, 92 insertions(+), 92 deletions(-)
 create mode 100644 TelepathyQt4/debug-internal.hpp
 delete mode 100644 TelepathyQt4/debug.hpp

diff --git a/TelepathyQt4/Makefile.am b/TelepathyQt4/Makefile.am
index 0b300a5..11afb87 100644
--- a/TelepathyQt4/Makefile.am
+++ b/TelepathyQt4/Makefile.am
@@ -37,7 +37,7 @@ libtelepathy_qt4_la_SOURCES = \
     cli-media-stream-handler.cpp \
     cli-properties.cpp \
     debug.cpp \
-    debug.hpp \
+    debug-internal.hpp \
     types.cpp \
     header-compile-test.cpp
 
diff --git a/TelepathyQt4/debug-internal.hpp b/TelepathyQt4/debug-internal.hpp
new file mode 100644
index 0000000..9e755cf
--- /dev/null
+++ b/TelepathyQt4/debug-internal.hpp
@@ -0,0 +1,90 @@
+/*
+ * This file is part of TelepathyQt4
+ *
+ * Copyright (C) 2008 Collabora Ltd. <http://www.collabora.co.uk/>
+ * Copyright (C) 2008 Nokia Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _TelepathyQt4_debug_HEADER_GUARD_
+#define _TelepathyQt4_debug_HEADER_GUARD_
+
+#include <QDebug>
+
+#include <config.h>
+
+namespace Telepathy
+{
+#ifdef ENABLE_DEBUG
+
+QDebug enabledDebug();
+QDebug enabledWarning();
+
+inline QDebug debug()
+{
+    QDebug debug = enabledDebug();
+    debug.nospace() << PACKAGE_NAME " (version " PACKAGE_VERSION ") DEBUG:";
+    return debug.space();
+}
+
+inline QDebug warning()
+{
+    QDebug warning = enabledWarning();
+    warning.nospace() << PACKAGE_NAME " (version " PACKAGE_VERSION ") WARNING:";
+    return warning.space();
+}
+
+#else /* #ifdef ENABLE_DEBUG */
+
+struct NoDebug
+{
+    template <typename T>
+    NoDebug& operator<<(const T&)
+    {
+        return *this;
+    }
+
+    NoDebug& space()
+    {
+        return *this;
+    }
+
+    NoDebug& nospace()
+    {
+        return *this;
+    }
+
+    NoDebug& maybeSpace()
+    {
+        return *this;
+    }
+};
+
+inline NoDebug debug()
+{
+    return NoDebug();
+}
+
+inline NoDebug warning()
+{
+    return NoDebug();
+}
+
+#endif /* #ifdef ENABLE_DEBUG */
+
+} /* namespace Telepathy */
+
+#endif
diff --git a/TelepathyQt4/debug.cpp b/TelepathyQt4/debug.cpp
index 9d6cbf7..6973a08 100644
--- a/TelepathyQt4/debug.cpp
+++ b/TelepathyQt4/debug.cpp
@@ -20,7 +20,7 @@
  */
 
 #include "debug.h"
-#include "debug.hpp"
+#include "debug-internal.hpp"
 
 #include <QIODevice>
 
diff --git a/TelepathyQt4/debug.hpp b/TelepathyQt4/debug.hpp
deleted file mode 100644
index 9e755cf..0000000
--- a/TelepathyQt4/debug.hpp
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * This file is part of TelepathyQt4
- *
- * Copyright (C) 2008 Collabora Ltd. <http://www.collabora.co.uk/>
- * Copyright (C) 2008 Nokia Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef _TelepathyQt4_debug_HEADER_GUARD_
-#define _TelepathyQt4_debug_HEADER_GUARD_
-
-#include <QDebug>
-
-#include <config.h>
-
-namespace Telepathy
-{
-#ifdef ENABLE_DEBUG
-
-QDebug enabledDebug();
-QDebug enabledWarning();
-
-inline QDebug debug()
-{
-    QDebug debug = enabledDebug();
-    debug.nospace() << PACKAGE_NAME " (version " PACKAGE_VERSION ") DEBUG:";
-    return debug.space();
-}
-
-inline QDebug warning()
-{
-    QDebug warning = enabledWarning();
-    warning.nospace() << PACKAGE_NAME " (version " PACKAGE_VERSION ") WARNING:";
-    return warning.space();
-}
-
-#else /* #ifdef ENABLE_DEBUG */
-
-struct NoDebug
-{
-    template <typename T>
-    NoDebug& operator<<(const T&)
-    {
-        return *this;
-    }
-
-    NoDebug& space()
-    {
-        return *this;
-    }
-
-    NoDebug& nospace()
-    {
-        return *this;
-    }
-
-    NoDebug& maybeSpace()
-    {
-        return *this;
-    }
-};
-
-inline NoDebug debug()
-{
-    return NoDebug();
-}
-
-inline NoDebug warning()
-{
-    return NoDebug();
-}
-
-#endif /* #ifdef ENABLE_DEBUG */
-
-} /* namespace Telepathy */
-
-#endif
-- 
1.5.6.3



More information about the Telepathy-commits mailing list