From 04b1a38b50ac1b0a547e49eed30a65a766fcd528 Mon Sep 17 00:00:00 2001 From: Jamie Thompson Date: Thu, 25 Aug 2011 02:51:35 +0100 Subject: [PATCH] Miscellaneous tidying up --- EventParsers/VMGEntities/SMSEntity.h | 12 ++++++++---- EventParsers/VMGEntities/VMessage.cpp | 4 ++-- SyncerThread.cpp | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/EventParsers/VMGEntities/SMSEntity.h b/EventParsers/VMGEntities/SMSEntity.h index 30fe6a8..28925af 100644 --- a/EventParsers/VMGEntities/SMSEntity.h +++ b/EventParsers/VMGEntities/SMSEntity.h @@ -19,6 +19,8 @@ #ifndef EVENTPARSERS_VMGEntities_SMSENTITY_H #define EVENTPARSERS_VMGEntities_SMSENTITY_H +class Settings; + #include #include @@ -31,18 +33,20 @@ namespace EventParsers class SMSEntity { public: - virtual ~SMSEntity() {}; SMSEntity(const Settings &settings, const SMSEntity* parent); + virtual ~SMSEntity() {} protected: const bool isAttachment() const; - const SMSEntity* m_Parent; - const SMSEntity* getParent() const { return m_Parent; }; + const SMSEntity *getParent() const { return m_Parent; } + + virtual const char *getTagName() const { return "VBODY"; } const Settings &CurrentSettings() const { return m_Settings; } - virtual const char* getTagName() const { return "VBODY"; } + private: const Settings &m_Settings; + const SMSEntity *m_Parent; }; } } diff --git a/EventParsers/VMGEntities/VMessage.cpp b/EventParsers/VMGEntities/VMessage.cpp index b798462..75ace8f 100644 --- a/EventParsers/VMGEntities/VMessage.cpp +++ b/EventParsers/VMGEntities/VMessage.cpp @@ -21,9 +21,9 @@ #include "EventTypes/SMS.h" #include "Factory.h" #include "Settings.h" +#include "VBody.h" #include "VCard.h" #include "VEnvelope.h" -#include "VBody.h" #include #include @@ -50,7 +50,7 @@ VMessage::~VMessage() { } -bool VMessage::Read(const QString & initialLine, QTextStream & stream, EventTypes::SMS & event) +bool VMessage::Read(const QString &initialLine, QTextStream &stream, EventTypes::SMS &event) { if(getParent() != NULL) { diff --git a/SyncerThread.cpp b/SyncerThread.cpp index 2a5e3b1..754123b 100644 --- a/SyncerThread.cpp +++ b/SyncerThread.cpp @@ -167,7 +167,7 @@ void SyncerThread::run() foreach(iHashable::Hash hash, newHashes) qDebug() << hash << endl; - // Now an optimisation: group the new hases by the files they come + // Now an optimisation: group the new hashes by the files they come // from. This enables each file to only be parsed once and return // all the required events from it. QHash > newHashesByPath; -- 1.7.9.5