Commit 9817e3c2 authored by Laurent Montel's avatar Laurent Montel 😁

Clean up file. Minor optimization

parent 4035483a
......@@ -18,12 +18,7 @@
#ifndef KOLABCALENDARING_H
#define KOLABCALENDARING_H
#ifndef SWIG
#include "kolab_export.h"
#else
/* No export/import SWIG interface files */
#define KOLAB_EXPORT
#endif
#include <kcalcore/event.h>
#include <kcalcore/memorycalendar.h>
......
......@@ -18,12 +18,7 @@
#ifndef KOLABDATETIMEUTILS_H
#define KOLABDATETIMEUTILS_H
#ifndef SWIG
#include "kolab_export.h"
#else
/* No export/import SWIG interface files */
#define KOLAB_EXPORT
#endif
#include <string>
......
......@@ -19,13 +19,8 @@
#define EVENT_H
#include <kolabevent.h>
#ifndef SWIG
#include "kolab_export.h"
#include <icalendar/icalendar.h>
#else
/* No export/import SWIG interface files */
#define KOLAB_EXPORT
#endif
namespace Kolab {
namespace Calendaring {
......
......@@ -20,12 +20,7 @@
#ifndef ICALENDAR_H
#define ICALENDAR_H
#ifndef SWIG
#include "kolab_export.h"
#else
/* No export/import SWIG interface files */
#define KOLAB_EXPORT
#endif
#include <kolabevent.h>
......
......@@ -207,10 +207,9 @@ class KolabObjectReader::Private
{
public:
Private()
: mObjectType(InvalidObject)
: mObjectType(InvalidObject)
, mVersion(KolabV3)
, mOverrideObjectType(InvalidObject)
, mDoOverrideVersion(false)
{
mAddressee = KContacts::Addressee();
}
......@@ -327,7 +326,9 @@ ObjectType KolabObjectReader::parseMimeMessage(const KMime::Message::Ptr &msg)
const Kolab::Configuration &configuration = mimeObject.getConfiguration();
const Kolab::Dictionary &dictionary = configuration.dictionary();
d->mDictionary.clear();
foreach (const std::string &entry, dictionary.entries()) {
const std::vector<std::string> entries = dictionary.entries();
d->mDictionary.reserve(entries.size());
foreach (const std::string &entry, entries) {
d->mDictionary.append(Conversion::fromStdString(entry));
}
d->mDictionaryLanguage = Conversion::fromStdString(dictionary.language());
......
......@@ -216,10 +216,6 @@ class MIMEObject::Private
{
public:
Private()
: mObjectType(InvalidObject)
, mVersion(KolabV3)
, mOverrideObjectType(InvalidObject)
, mDoOverrideVersion(false)
{
}
......@@ -228,10 +224,10 @@ public:
QVariant parseMimeMessage(const KMime::Message::Ptr &msg);
QVariant parseMimeMessage(const std::string &s);
ObjectType mObjectType;
Version mVersion;
ObjectType mOverrideObjectType;
Version mOverrideVersion;
ObjectType mObjectType = InvalidObject;
Version mVersion = KolabV3;
ObjectType mOverrideObjectType = InvalidObject;
Version mOverrideVersion = KolabV3;
bool mDoOverrideVersion = false;
QVariant mObject;
};
......
......@@ -19,12 +19,7 @@
#ifndef MIMEOBJECT_H
#define MIMEOBJECT_H
#ifndef SWIG
#include "kolab_export.h"
#else
/* No export/import SWIG interface files */
#define KOLAB_EXPORT
#endif
#include <kolabformat.h>
#include "kolabdefinitions.h"
......
......@@ -18,12 +18,7 @@
#ifndef KOLABXMLOBJECT_H
#define KOLABXMLOBJECT_H
#ifndef SWIG
#include "kolab_export.h"
#else
/* No export/import SWIG interface files */
#define KOLAB_EXPORT
#endif
#include <kolabformat.h>
......
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