From 8967ae4aad7e0e3624831585d8e35425246f65ad Mon Sep 17 00:00:00 2001 From: Vladimir Kolesnikov Date: Sun, 10 Feb 2013 15:47:48 +0200 Subject: [PATCH] Convert QuotedPrintable class to namespace --- src/quotedprintable.cpp | 4 ++-- src/quotedprintable.h | 17 +++++------------ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/quotedprintable.cpp b/src/quotedprintable.cpp index e7e130c..ab56a36 100644 --- a/src/quotedprintable.cpp +++ b/src/quotedprintable.cpp @@ -18,7 +18,7 @@ #include "quotedprintable.h" -QString& QuotedPrintable::encode(const QByteArray &input) +QString QuotedPrintable::encode(const QByteArray &input) { QString *output = new QString(); @@ -43,7 +43,7 @@ QString& QuotedPrintable::encode(const QByteArray &input) } -QByteArray& QuotedPrintable::decode(const QString &input) +QByteArray QuotedPrintable::decode(const QString &input) { // 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F const int hexVal[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 10, 11, 12, 13, 14, 15}; diff --git a/src/quotedprintable.h b/src/quotedprintable.h index 5a54dc4..7eb855c 100644 --- a/src/quotedprintable.h +++ b/src/quotedprintable.h @@ -19,20 +19,13 @@ #ifndef QUOTEDPRINTABLE_H #define QUOTEDPRINTABLE_H -#include #include +#include #include "smtpmime_global.h" -class SMTP_MIME_EXPORT QuotedPrintable : public QObject -{ - Q_OBJECT -public: - - static QString& encode(const QByteArray &input); - static QByteArray& decode(const QString &input); - -private: - QuotedPrintable(); -}; +namespace QuotedPrintable { + SMTP_MIME_EXPORT QString encode(const QByteArray &input); + SMTP_MIME_EXPORT QByteArray decode(const QString &input); +} #endif // QUOTEDPRINTABLE_H