Commit ecf0571e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Modernize code

parent 1f646334
Pipeline #100379 passed with stage
in 4 minutes
......@@ -37,7 +37,7 @@
#include <QBuffer>
#include <QTimeZone>
#include <time.h>
#include <ctime>
using namespace KCalendarCore;
using namespace KTnef;
......@@ -83,7 +83,7 @@ static QDateTime pureISOToLocalQDateTime(const QString &dtStr)
}
return dT;
} else {
return QDateTime();
return {};
}
}
//@endcond
......
......@@ -32,9 +32,7 @@ using namespace KTnef;
class KTnef::KTNEFMessage::MessagePrivate
{
public:
MessagePrivate()
{
}
MessagePrivate() = default;
~MessagePrivate();
void clearAttachments();
......@@ -93,7 +91,7 @@ QString KTNEFMessage::rtfString() const
{
QVariant prop = property(0x1009);
if (prop.isNull() || prop.type() != QVariant::ByteArray) {
return QString();
return {};
} else {
QByteArray rtf;
QByteArray propArray(prop.toByteArray());
......
......@@ -18,7 +18,7 @@
#include "ktnefproperty.h"
#include "mapi.h"
#include <ctype.h>
#include <cctype>
using namespace KTnef;
......
......@@ -111,7 +111,7 @@ QVariant KTNEFPropertySet::property(int key) const
{
QMap<int, KTNEFProperty *>::ConstIterator it = d->properties_.constFind(key);
if (it == d->properties_.constEnd()) {
return QVariant();
return {};
} else {
return (*it)->value();
}
......@@ -159,7 +159,7 @@ QVariant KTNEFPropertySet::attribute(int key) const
{
QMap<int, KTNEFProperty *>::ConstIterator it = d->attributes_.constFind(key);
if (it == d->attributes_.constEnd()) {
return QVariant();
return {};
} else {
return (*it)->value();
}
......
......@@ -27,7 +27,7 @@
#include <QDateTime>
#include <QList>
#include <assert.h>
#include <cassert>
using namespace KTnef;
......
......@@ -19,8 +19,8 @@
#include <QIODevice>
#include <stdio.h>
#include <string.h>
#include <cstdio>
#include <cstring>
#include <sys/types.h>
//#define DO_DEBUG
......
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