Convert QuotedPrintable class to namespace
This commit is contained in:
parent
4e2d1446dd
commit
8967ae4aad
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#include "quotedprintable.h"
|
#include "quotedprintable.h"
|
||||||
|
|
||||||
QString& QuotedPrintable::encode(const QByteArray &input)
|
QString QuotedPrintable::encode(const QByteArray &input)
|
||||||
{
|
{
|
||||||
QString *output = new QString();
|
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
|
// 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};
|
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
|
#ifndef QUOTEDPRINTABLE_H
|
||||||
#define QUOTEDPRINTABLE_H
|
#define QUOTEDPRINTABLE_H
|
||||||
|
|
||||||
#include <QObject>
|
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
|
#include <QString>
|
||||||
#include "smtpmime_global.h"
|
#include "smtpmime_global.h"
|
||||||
|
|
||||||
class SMTP_MIME_EXPORT QuotedPrintable : public QObject
|
namespace QuotedPrintable {
|
||||||
{
|
SMTP_MIME_EXPORT QString encode(const QByteArray &input);
|
||||||
Q_OBJECT
|
SMTP_MIME_EXPORT QByteArray decode(const QString &input);
|
||||||
public:
|
}
|
||||||
|
|
||||||
static QString& encode(const QByteArray &input);
|
|
||||||
static QByteArray& decode(const QString &input);
|
|
||||||
|
|
||||||
private:
|
|
||||||
QuotedPrintable();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // QUOTEDPRINTABLE_H
|
#endif // QUOTEDPRINTABLE_H
|
||||||
|
Loading…
Reference in New Issue
Block a user