Convert QuotedPrintable class to namespace
This commit is contained in:
parent
4e2d1446dd
commit
8967ae4aad
@ -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};
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user