From 6823cecba5b5db0940fb46859ad56348ee55cd87 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 4 May 2009 18:20:57 +0200 Subject: [PATCH] don't use macros for the Latin1* magic use typedefs and an inline function instead. that's namespace-safe and does not produce unhelpful messages when closing parens are missing. --- src/plugins/debugger/gdbengine.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/plugins/debugger/gdbengine.cpp b/src/plugins/debugger/gdbengine.cpp index 10e74a5683c..a062567554a 100644 --- a/src/plugins/debugger/gdbengine.cpp +++ b/src/plugins/debugger/gdbengine.cpp @@ -92,16 +92,9 @@ Q_DECLARE_METATYPE(Debugger::Internal::GdbMi); #define STRINGIFY_INTERNAL(x) #x #define STRINGIFY(x) STRINGIFY_INTERNAL(x) -struct _c -{ - inline _c(char c) : m_c(c) {} - inline operator QChar() const { return QLatin1Char(m_c); } - char m_c; -}; - -#define _c(c) QLatin1Char(c) -#define __(s) QLatin1String(s) -#define _(s) QString::fromLatin1(s) +typedef QLatin1Char _c; +typedef QLatin1String __; +static inline QString _(const char *s) { return QString::fromLatin1(s); } static const QString tooltipIName = _("tooltip");