Commit 40f95f8a authored by Laurent Montel's avatar Laurent Montel 😁

Modernize code

parent 35252815
Pipeline #33444 passed with stage
in 18 minutes and 53 seconds
......@@ -61,17 +61,15 @@ static QString sNamedProp(KTNEFMessage *tnefMsg, const QString &name,
static QDateTime pureISOToLocalQDateTime(const QString &dtStr)
{
const int year = dtStr.leftRef(4).toInt();
const int month = dtStr.midRef(4, 2).toInt();
const int day = dtStr.midRef(6, 2).toInt();
const int hour = dtStr.midRef(9, 2).toInt();
const int minute = dtStr.midRef(11, 2).toInt();
const int second = dtStr.midRef(13, 2).toInt();
QDate tmpDate;
QTime tmpTime;
int year, month, day, hour, minute, second;
year = dtStr.leftRef(4).toInt();
month = dtStr.midRef(4, 2).toInt();
day = dtStr.midRef(6, 2).toInt();
hour = dtStr.midRef(9, 2).toInt();
minute = dtStr.midRef(11, 2).toInt();
second = dtStr.midRef(13, 2).toInt();
tmpDate.setDate(year, month, day);
QTime tmpTime;
tmpTime.setHMS(hour, minute, second);
if (tmpDate.isValid() && tmpTime.isValid()) {
......@@ -92,8 +90,6 @@ static QDateTime pureISOToLocalQDateTime(const QString &dtStr)
QString KTnef::msTNEFToVPart(const QByteArray &tnef)
{
//bool bOk = false;
KTNEFParser parser;
QByteArray b(tnef);
QBuffer buf(&b);
......
......@@ -38,7 +38,7 @@ public:
void clearAttachments();
QList<KTNEFAttach *>attachments_;
QList<KTNEFAttach *> attachments_;
};
KTNEFMessage::MessagePrivate::~MessagePrivate()
......
......@@ -76,9 +76,6 @@ public:
ParserPrivate()
{
defaultdir_ = QStandardPaths::writableLocation(QStandardPaths::TempLocation);
current_ = nullptr;
deleteDevice_ = false;
device_ = nullptr;
message_ = new KTNEFMessage;
}
~ParserPrivate()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment