Convert QuotedPrintable class to namespace

This commit is contained in:
Vladimir Kolesnikov 2013-02-10 15:47:48 +02:00
parent 4e2d1446dd
commit 8967ae4aad
2 changed files with 7 additions and 14 deletions

View File

@ -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};

View File

@ -19,20 +19,13 @@
#ifndef QUOTEDPRINTABLE_H
#define QUOTEDPRINTABLE_H
#include <QObject>
#include <QByteArray>
#include <QString>
#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