Changeset 382:c26400d75b91 in SMSSender


Ignore:
Timestamp:
Apr 16, 2014 10:58:51 AM (6 years ago)
Author:
Sämy Zehnder <saemy.zehnder@…>
Branch:
separation-frontend-backend
Message:
  • Non-functional changes only.
  • Applies coding-style throughout the project:
    • "Class* foo" -> "Class *foo"
    • "Class& foo" -> "Class &foo"
    • "Class foo_;" -> "Class m_foo;"
  • Removes imanagers.h since it is obsolete.
Files:
1 deleted
231 edited

Legend:

Unmodified
Added
Removed
  • common/business/iaccount.h

    r316 r382  
    4848public:
    4949    enum Property {
    50         Id           = 0x00,
    51         Name         = 0x01,
    52         Enabled      = 0x02,
    53         Username     = 0x03,
    54         Password     = 0x04,
     50        Id = 0x00,
     51        Name = 0x01,
     52        Enabled = 0x02,
     53        Username = 0x03,
     54        Password = 0x04,
    5555        FreeSMSCount = 0x05,
    5656
     
    6161    virtual IGateway *gateway() const =0;
    6262
    63     virtual int     id() const =0;
     63    virtual int id() const =0;
    6464    virtual QString name() const =0;
    65     virtual bool    isEnabled() const =0;
     65    virtual bool isEnabled() const =0;
    6666    virtual QString username() const =0;
    6767    virtual QString password() const =0;
    68     virtual int     freeSMSCount() const =0;
     68    virtual int freeSMSCount() const =0;
    6969
    70     virtual void setName(const QString& name) =0;
     70    virtual void setName(const QString &name) =0;
    7171    virtual void setEnabled(bool enabled) =0;
    72     virtual void setUsername(const QString& username) =0;
    73     virtual void setPassword(const QString& password) =0;
     72    virtual void setUsername(const QString &username) =0;
     73    virtual void setPassword(const QString &password) =0;
    7474
    7575public:
    76     virtual QStringList divideMessage(const QString& text) const =0;
    77     virtual int         costsForText(const QString& message) const =0;
     76    virtual QStringList divideMessage(const QString &text) const =0;
     77    virtual int costsForText(const QString &message) const =0;
    7878
    7979public:
    80     virtual IAccountInitTaskcreateInitTask() =0;
    81     virtual bool               isInitialized() const =0;
    82     virtual void               resetInitialization() =0;
     80    virtual IAccountInitTask *createInitTask() =0;
     81    virtual bool isInitialized() const =0;
     82    virtual void resetInitialization() =0;
    8383
    8484public:
    85     virtual IAccountLoginTask* createLoginTask() =0;
     85    virtual IAccountLoginTask *createLoginTask() =0;
    8686    virtual bool isLoggedIn() const =0;
    8787    virtual bool stillLoggedIn() =0; // TODO: remove this or at least move it into _impl
     
    8989
    9090public:
    91     virtual ISMSSendTask *createSMSSendTask(const QString& message, const QSet<const SContact*>& recipients) =0;
     91    virtual ISMSSendTask *createSMSSendTask(const QString &message, const QSet<const SContact*> &recipients) =0;
    9292
    9393signals:
    94     void idChanged(IAccount* account, int oldId);
    95     void dataChanged(IAccount* account, int property);
     94    void idChanged(IAccount *account, int oldId);
     95    void dataChanged(IAccount *account, int property);
    9696
    97     void initStateChanged(IAccount* account);
    98     void initDone(IAccount* account, STask::Result taskResult, uint specialResult); // TODO: Take the exception into this signal?
    99     void initErrorOccured(IAccount* account, const EException& exception);
     97    void initStateChanged(IAccount *account);
     98    void initDone(IAccount *account, STask::Result taskResult, uint specialResult); // TODO: Take the exception into this signal?
     99    void initErrorOccured(IAccount *account, const EException &exception);
    100100
    101     void loggedIn(IAccount* account);
    102     void loggedOut(IAccount* account);
     101    void loggedIn(IAccount *account);
     102    void loggedOut(IAccount *account);
    103103
    104     void smsSendingDone(IAccount* account, SendingResult result);
    105     void smsSendingErrorOccured(IAccount* account, const EException& exception);
     104    void smsSendingDone(IAccount *account, SendingResult result);
     105    void smsSendingErrorOccured(IAccount *account, const EException &exception);
    106106
    107107protected:
  • common/business/iaccount_tasks.cpp

    r316 r382  
    2121#include "iaccount.h"
    2222
    23 IAccountTask::IAccountTask(uint UID, IAccount* account)
     23IAccountTask::IAccountTask(uint UID, IAccount *account)
    2424    : SThreadedTask(UID, ACCOUNT_NAMESPACE_PREFIX + account->name())
    25     , account_(account)
     25    , m_account(account)
    2626{
    2727}
    28 IAccount* IAccountTask::account() const {
    29     return account_;
     28IAccount *IAccountTask::account() const {
     29    return m_account;
    3030}
    3131
    32 IAccountInitTask::IAccountInitTask(IAccount* account)
     32IAccountInitTask::IAccountInitTask(IAccount *account)
    3333    : IAccountTask(UID_ACCOUNT_INIT, account)
    3434{
    3535}
    3636
    37 IAccountLoginTask::IAccountLoginTask(IAccount* account)
     37IAccountLoginTask::IAccountLoginTask(IAccount *account)
    3838    : IAccountTask(UID_ACCOUNT_LOGIN, account)
    3939{
    4040}
    4141
    42 ISMSSendTask::ISMSSendTask(IAccount* account)
     42ISMSSendTask::ISMSSendTask(IAccount *account)
    4343    : IAccountTask(UID_SEND_SMS, account)
    4444{
  • common/business/iaccount_tasks.h

    r316 r382  
    3030const QString ACCOUNT_NAMESPACE_PREFIX = "account_";
    3131
    32 const uint UID_ACCOUNT_INIT  = 100;
     32const uint UID_ACCOUNT_INIT = 100;
    3333const uint UID_ACCOUNT_LOGIN = 200;
    34 const uint UID_SEND_SMS      = 300;
     34const uint UID_SEND_SMS = 300;
    3535
    3636class COMMON_EXPORT IAccountTask : public SThreadedTask {
     
    3838
    3939public:
    40     IAccountTask(uint UID, IAccount* account);
     40    IAccountTask(uint UID, IAccount *account);
    4141    virtual ~IAccountTask() {}
    4242
    4343public:
    44     IAccount* account() const;
     44    IAccount *account() const;
    4545
    4646private:
    47     IAccount* account_; // No ownership
     47    IAccount *m_account; // No ownership
    4848};
    4949Q_DECLARE_INTERFACE(IAccountTask, "ch.gorrion.smssender.IAccountTask/1.0")
     
    5454
    5555public:
    56     IAccountInitTask(IAccount* account);
     56    IAccountInitTask(IAccount *account);
    5757    virtual ~IAccountInitTask() {}
    5858};
     
    6464
    6565public:
    66     IAccountLoginTask(IAccount* account);
     66    IAccountLoginTask(IAccount *account);
    6767    virtual ~IAccountLoginTask() {}
    6868};
     
    7474
    7575public:
    76     ISMSSendTask(IAccount* account);
     76    ISMSSendTask(IAccount *account);
    7777    virtual ~ISMSSendTask() {}
    7878
  • common/business/iintegration_base.h

    r316 r382  
    8888    void accountRemoved(IAccount *account);
    8989
    90     void idChanged(IAccount* account, int oldId);
    91     void dataChanged(IAccount* account, int property);
     90    void idChanged(IAccount *account, int oldId);
     91    void dataChanged(IAccount *account, int property);
    9292
    93     void initStateChanged(IAccount* account);
    94     void initDone(IAccount* account, STask::Result taskResult, uint specialResult); // TODO: Take the exception into this signal?
    95     void initErrorOccured(IAccount* account, const EException& exception);
     93    void initStateChanged(IAccount *account);
     94    void initDone(IAccount *account, STask::Result taskResult, uint specialResult); // TODO: Take the exception into this signal?
     95    void initErrorOccured(IAccount *account, const EException &exception);
    9696
    97     void loggedIn(IAccount* account);
    98     void loggedOut(IAccount* account);
     97    void loggedIn(IAccount *account);
     98    void loggedOut(IAccount *account);
    9999
    100     void smsSendingDone(IAccount* account, SendingResult result);
    101     void smsSendingErrorOccured(IAccount* account, const EException& exception);
     100    void smsSendingDone(IAccount *account, SendingResult result);
     101    void smsSendingErrorOccured(IAccount *account, const EException &exception);
    102102
    103103
  • common/business/ilibrary.h

    r356 r382  
    5959     * @return
    6060     */
    61     virtual IGateway* gateway() const =0;
     61    virtual IGateway *gateway() const =0;
    6262
    6363public:
  • common/business/ivalidatable.h

    r316 r382  
    2525class COMMON_EXPORT IValidatable {
    2626public:
    27     virtual IValidator* createValidator() const =0;
     27    virtual IValidator *createValidator() const =0;
    2828
    2929public:
  • common/common-base.pro

    r381 r382  
    3030    business/iintegration_base.h \
    3131    business/ilibrary.h \
    32     business/imanagers.h \
    3332    business/istorable.h \
    3433    business/ivalidatable.h \
  • common/domain/scontact.cpp

    r380 r382  
    5959    emit dataChanged(this);
    6060}
    61 void SContact::setName(const QString& name) {
     61void SContact::setName(const QString &name) {
    6262    SET_IF_DIFFERENT(m_name, name.trimmed());
    6363    m_aliases.removeAll(m_name);
    6464    emit dataChanged(this);
    6565}
    66 void SContact::setNumber(const SNumber& number) {
     66void SContact::setNumber(const SNumber &number) {
    6767    SET_IF_DIFFERENT(m_number, number);
    6868    emit dataChanged(this);
    6969}
    70 void SContact::setAliases(const QStringList& aliases) {
     70void SContact::setAliases(const QStringList &aliases) {
    7171    SET_IF_DIFFERENT(m_aliases, aliases);
    7272    m_aliases.removeDuplicates();
     
    7979    return m_image;
    8080}
    81 void SContact::setImage(const QImage& image) {
     81void SContact::setImage(const QImage &image) {
    8282    SET_IF_DIFFERENT(m_image, image);
    8383    if (!m_image.isNull()) {
  • common/domain/scontact.h

    r336 r382  
    4242
    4343    void setId(int id);
    44     void setName(const QString& name);
    45     void setNumber(const SNumber& number);
    46     void setAliases(const QStringList& aliases);
     44    void setName(const QString &name);
     45    void setNumber(const SNumber &number);
     46    void setAliases(const QStringList &aliases);
    4747
    4848#ifdef FRONTEND_GUI
    4949    QImage image() const;
    50     void setImage(const QImage& image);
     50    void setImage(const QImage &image);
    5151#endif
    5252
  • common/domain/sdatatypes.cpp

    r316 r382  
    1818#include "sdatatypes.h"
    1919
    20 IDialogWrapper::IDialogWrapper(QObject* parent)
     20IDialogWrapper::IDialogWrapper(QObject *parent)
    2121    : QObject(parent)
    2222{
  • common/domain/sdatatypes.h

    r319 r382  
    3939enum State {
    4040    isUninitialized = 0x00,
    41     isInitializing  = 0x01,
    42     isInitialized   = 0x02,
    43     isCancelling    = 0x03,
     41    isInitializing = 0x01,
     42    isInitialized = 0x02,
     43    isCancelling = 0x03,
    4444
    45     lastStateId     = isCancelling
     45    lastStateId = isCancelling
    4646};
    4747}
     
    6060
    6161public:
    62     IDialogWrapper(QObject* parent);
     62    IDialogWrapper(QObject *parent);
    6363    virtual ~IDialogWrapper() {}
    6464};
  • common/domain/sgroup.cpp

    r380 r382  
    4545    emit dataChanged(this);
    4646}
    47 void SGroup::setName(const QString& name){
     47void SGroup::setName(const QString &name){
    4848    SET_IF_DIFFERENT(m_name, name.trimmed());
    4949    emit dataChanged(this);
     
    5454    return m_image;
    5555}
    56 void SGroup::setImage(const QImage& image){
     56void SGroup::setImage(const QImage &image){
    5757    SET_IF_DIFFERENT(m_image, image);
    5858    if (!m_image.isNull()) {
     
    7272    }
    7373}
    74 void SGroup::addContact(const SContact& contact){
     74void SGroup::addContact(const SContact &contact){
    7575    addContactToList(&contact);
    7676}
    77 void SGroup::removeContact(const SContact& contact){
     77void SGroup::removeContact(const SContact &contact){
    7878    removeContactFromList(&contact);
    7979}
    8080
    8181
    82 void SGroup::addContactToList(const SContact* contact) {
     82void SGroup::addContactToList(const SContact *contact) {
    8383    if (m_contactList.contains(contact)) {
    8484        return;
     
    8888    emit contactAdded(this, *contact);
    8989}
    90 void SGroup::removeContactFromList(const SContact* contact) {
     90void SGroup::removeContactFromList(const SContact *contact) {
    9191    if (m_contactList.remove(contact)) {
    9292        emit contactRemoved(this, *contact);
  • common/domain/sgroup.h

    r319 r382  
    4343
    4444    void setId(int id);
    45     void setName(const QString& name);
     45    void setName(const QString &name);
    4646    void setContacts(const QSet<const SContact *> &contacts);
    4747
    4848#ifdef FRONTEND_GUI
    4949    QImage image() const;
    50     void setImage(const QImage& image);
     50    void setImage(const QImage &image);
    5151#endif
    5252
    5353    // Does NOT take ownership.
    54     void addContact(const SContact& contact);
    55     void removeContact(const SContact& contact);
     54    void addContact(const SContact &contact);
     55    void removeContact(const SContact &contact);
    5656
    5757signals:
    5858    void idChanged(SGroup *group, int oldId);
    5959    void dataChanged(SGroup *group);
    60     void contactAdded(SGroup *group, const SContact& contact);
    61     void contactRemoved(SGroup *group, const SContact& contact);
     60    void contactAdded(SGroup *group, const SContact &contact);
     61    void contactRemoved(SGroup *group, const SContact &contact);
    6262
    6363private:
  • common/domain/snumber.cpp

    r364 r382  
    4646const QString SNumber::GuessFormat    = "%%guess%%";
    4747
    48 SNumber::SNumber(const QString& numberStr, const QString& format)
     48SNumber::SNumber(const QString &numberStr, const QString &format)
    4949    : d(new SNumberData)
    5050{
     
    8181
    8282/* CC & AAA are not applicable here! */
    83 bool SNumber::setNumber(const QString& numberStr, const QString& format){
     83bool SNumber::setNumber(const QString &numberStr, const QString &format){
    8484    if (format == SNumber::GuessFormat) {
    8585        if (!numberStr.startsWith('+')) {
     
    191191}
    192192
    193 short SNumber::toShort(const QString& str, bool* ok) {
     193short SNumber::toShort(const QString &str, bool *ok) {
    194194    if (!isStringPositiveNumber(str)) {
    195195        *ok = false;
     
    200200}
    201201
    202 bool SNumber::isStringPositiveNumber(const QString& str) {
     202bool SNumber::isStringPositiveNumber(const QString &str) {
    203203    if (str == "")
    204204        return false;
     
    219219    SET_IF_DIFFERENT(d->areaCode, areaCode);
    220220}
    221 void SNumber::setUserNumber(const QString& userNumberStr){
     221void SNumber::setUserNumber(const QString &userNumberStr){
    222222    QString no = userNumberStr;
    223223    no.remove(QRegExp("[^0-9]"));
     
    228228}
    229229
    230 QString SNumber::toString(const QString& format) const {
     230QString SNumber::toString(const QString &format) const {
    231231    if (!isValid()) {
    232232        return "";
     
    279279}
    280280
    281 bool SNumber::fromString(const QString& string, const QString& format) {
     281bool SNumber::fromString(const QString &string, const QString &format) {
    282282    return setNumber(string, format);
    283283}
    284284
    285 bool SNumber::operator ==(const SNumber& other) const {
     285bool SNumber::operator ==(const SNumber &other) const {
    286286    return toString() == other.toString();
    287287}
  • common/domain/snumber.h

    r321 r382  
    3939
    4040public:
    41     SNumber(const QString& numberStr, const QString& format = SNumber::GuessFormat);
     41    SNumber(const QString &numberStr, const QString &format = SNumber::GuessFormat);
    4242    ~SNumber();
    4343
    44     short   countryCode() const;
    45     short   areaCode() const;
     44    short countryCode() const;
     45    short areaCode() const;
    4646    QString userNumber() const;
    4747
    48     bool    setNumber(const QString& numberStr, const QString& format = SNumber::GuessFormat);
     48    bool setNumber(const QString &numberStr, const QString &format = SNumber::GuessFormat);
    4949
    50     void    clear();
    51     bool    isEmpty() const;
    52     bool    isValid() const;
     50    void clear();
     51    bool isEmpty() const;
     52    bool isValid() const;
    5353
    54     QString toString(const QString& format = SNumber::IsoFormat) const;
    55     bool    fromString(const QString& string, const QString& format = SNumber::GuessFormat);
     54    QString toString(const QString &format = SNumber::IsoFormat) const;
     55    bool fromString(const QString &string, const QString &format = SNumber::GuessFormat);
    5656
    5757private:
    5858    void setCountryCode(short countryCode);
    5959    void setAreaCode(short areaCode);
    60     void setUserNumber(const QString& userNumberStr);
     60    void setUserNumber(const QString &userNumberStr);
    6161
    62     bool isStringPositiveNumber(const QString& str);
     62    bool isStringPositiveNumber(const QString &str);
    6363
    64     short toShort(const QString& str, bool* ok);
     64    short toShort(const QString &str, bool *ok);
    6565};
    6666Q_DECLARE_METATYPE(SNumber)
  • common/domain/snumber_p.h

    r319 r382  
    3030        , userNumber("")
    3131    {}
    32     SNumberData(const SNumberData& other)
     32    SNumberData(const SNumberData &other)
    3333        : SShareable()
    3434        , countryCode(other.countryCode)
     
    3838
    3939public:
    40     short   countryCode;
    41     short   areaCode;
     40    short countryCode;
     41    short areaCode;
    4242    QString userNumber;
    4343};
  • common/domain/stask.cpp

    r364 r382  
    2929#include "common/utils/staskmanager.h"
    3030
    31 STask::STask(uint UID, const QString& nmespace)
     31STask::STask(uint UID, const QString &nmespace)
    3232    : QObject(NULL) // parent gets assigned when the task is started
    33     , dataMutex_(QMutex::Recursive)
    34     , uid_(UID)
    35     , nmespace_(nmespace)
    36     , progress_(0)
    37     , status_(STask::sWaiting)
    38     , taskResult_(STask::rSuccess)
    39     , specialResult_(0)
    40     , parent_(NULL)
    41     , waitForMutex_(QMutex::NonRecursive)
    42     , started_(false)
    43     , cancelled_(false)
    44     , finished_(false)
    45     , autoHaltOnCancelRequested_(false)
    46     , exception_(NULL)
     33    , m_dataMutex(QMutex::Recursive)
     34    , m_uid(UID)
     35    , m_nmespace(nmespace)
     36    , m_progress(0)
     37    , m_status(STask::sWaiting)
     38    , m_taskResult(STask::rSuccess)
     39    , m_specialResult(0)
     40    , m_parent(NULL)
     41    , m_waitForMutex(QMutex::NonRecursive)
     42    , m_started(false)
     43    , m_cancelled(false)
     44    , m_finished(false)
     45    , m_autoHaltOnCancelRequested(false)
     46    , m_exception(NULL)
    4747{
    4848    qRegisterMetaType<STask::Property>("STask::Property");
     
    5454}
    5555STask::~STask() {
    56     QMutexLocker locker(&dataMutex_);
     56    QMutexLocker locker(&m_dataMutex);
    5757}
    5858
     
    8989
    9090    if (isStarted()) {
    91         cancelled_ = true;
     91        m_cancelled = true;
    9292        setTaskResult(STask::rCancelled);
    9393        emit cancelled(this);
     
    9595}
    9696
    97 void STask::startSubTask(STask* subTask, bool waitFor) {
    98     QMutexLocker locker(&dataMutex());
    99 
    100     subTasks_.append(subTask);
     97void STask::startSubTask(STask *subTask, bool waitFor) {
     98    QMutexLocker locker(&dataMutex());
     99
     100    m_subTasks.append(subTask);
    101101    connect(subTask, SIGNAL(finished(STask*)), this, SLOT(onSubTaskFinished(STask*)), Qt::DirectConnection);
    102102    connect(subTask, SIGNAL(exceptionOccured(STask*)), this, SLOT(onSubTaskExceptionOccured(STask*)), Qt::DirectConnection);
     
    110110    }
    111111}
    112 void STask::onSubTaskFinished(STask* subTask) {
    113     QMutexLocker locker(&dataMutex());
    114 
    115     subTasks_.removeAll(subTask);
    116 }
    117 void STask::onSubTaskExceptionOccured(STask* subTask) {
     112void STask::onSubTaskFinished(STask *subTask) {
     113    QMutexLocker locker(&dataMutex());
     114
     115    m_subTasks.removeAll(subTask);
     116}
     117void STask::onSubTaskExceptionOccured(STask *subTask) {
    118118    QSharedPointer<EException> ex(inheritSubtaskException(subTask->exception()));
    119119    if (!ex.isNull()) {
     
    130130 * @return An exception (create a new instance) or NULL
    131131 */
    132 EException* STask::inheritSubtaskException(const EException& exception) {
     132EException *STask::inheritSubtaskException(const EException &exception) {
    133133    return new ESubtaskException(exception);
    134134}
     
    140140 * @param task The task we want to wait for
    141141 */
    142 void STask::waitFor(STask* task) {
     142void STask::waitFor(STask *task) {
    143143    QList<STask*> tasks;
    144144    tasks.append(task);
     
    147147void STask::waitFor(QList<STask*> others) {
    148148    QList<QPointer<STask> > othersPtr;
    149     foreach (STask* task, others) {
     149    foreach (STask *task, others) {
    150150        othersPtr.append(task);
    151151    }
     
    153153}
    154154void STask::waitFor(QList<QPointer<STask> > others) {
    155     QMutexLocker locker(&waitForMutex_);
     155    QMutexLocker locker(&m_waitForMutex);
    156156    foreach (STask *task, others) {
    157         if (!task || waitingFor_.contains(task) || task->isFinished()) {
     157        if (!task || m_waitingFor.contains(task) || task->isFinished()) {
    158158            others.removeAll(task);
    159159        } else {
     
    165165        sDebug() << QString("Waiting for %1 tasks to finish.").arg(others.count());
    166166
    167         waitingFor_.append(others);
    168         waitForWaitCondition_.wait(&waitForMutex_);
     167        m_waitingFor.append(others);
     168        m_waitForWaitCondition.wait(&m_waitForMutex);
    169169
    170170        sDebug() << "All tasks which we were waiting for have finished.";
    171171    }
    172172}
    173 void STask::waitForTaskFinished(STask* task) {
    174     QMutexLocker locker(&waitForMutex_);
     173void STask::waitForTaskFinished(STask *task) {
     174    QMutexLocker locker(&m_waitForMutex);
    175175
    176176    disconnect(task, SIGNAL(finished(STask*)), this, SLOT(waitForTaskFinished(STask*)));
    177177    sDebug() << QString("Task %1 finished.").arg(task->taskIdent());
    178178
    179     waitingFor_.removeAll(task);
    180 
    181     if (waitingFor_.isEmpty()) {
    182         waitForWaitCondition_.wakeAll();
     179    m_waitingFor.removeAll(task);
     180
     181    if (m_waitingFor.isEmpty()) {
     182        m_waitForWaitCondition.wakeAll();
    183183    }
    184184}
     
    217217    sDebug() << "We are starting!";
    218218
    219     autoHaltOnCancelRequested_ = true;
     219    m_autoHaltOnCancelRequested = true;
    220220    try {
    221221        doTheWork();
     
    239239        qWarning() << exception().chainedWhat();
    240240    }
    241     autoHaltOnCancelRequested_ = false;
     241    m_autoHaltOnCancelRequested = false;
    242242
    243243    // Wait until all subtasks are finished
    244     waitFor(subTasks_);
     244    waitFor(m_subTasks);
    245245
    246246    sDebug() << "We have done our job!";
     
    254254
    255255uint STask::uid() const {
    256     return uid_;
     256    return m_uid;
    257257}
    258258QString STask::nmespace() const {
    259     return nmespace_;
     259    return m_nmespace;
    260260}
    261261
     
    263263    QMutexLocker locker(&dataMutex());
    264264
    265     return blockingTaskIdents_;
     265    return m_blockingTaskIdents;
    266266}
    267267QList<QPointer<STask> > STask::blockingTaskInstances() const {
    268268    QMutexLocker locker(&dataMutex());
    269269
    270     return blockingTaskInstances_;
     270    return m_blockingTaskInstances;
    271271}
    272272
     
    274274    QMutexLocker locker(&dataMutex());
    275275
    276     return title_;
     276    return m_title;
    277277}
    278278QString STask::details() const {
    279279    QMutexLocker locker(&dataMutex());
    280280
    281     return details_;
     281    return m_details;
    282282}
    283283uint STask::progress() const {
    284284    QMutexLocker locker(&dataMutex());
    285285
    286     return progress_;
     286    return m_progress;
    287287}
    288288uint STask::status() const {
    289289    QMutexLocker locker(&dataMutex());
    290290
    291     return status_;
     291    return m_status;
    292292}
    293293QString STask::statusStr() const {
     
    311311    QMutexLocker locker(&dataMutex());
    312312
    313     return taskResult_;
     313    return m_taskResult;
    314314}
    315315uint STask::specialResult() const {
    316316    QMutexLocker locker(&dataMutex());
    317317
    318     return specialResult_;
    319 }
    320 
    321 STask* STask::parent() const {
    322     QMutexLocker locker(&dataMutex());
    323 
    324     return parent_;
     318    return m_specialResult;
     319}
     320
     321STask *STask::parent() const {
     322    QMutexLocker locker(&dataMutex());
     323
     324    return m_parent;
    325325}
    326326bool STask::hasParent() const {
    327327    return parent();
    328328}
    329 bool STask::isSubtaskOf(STask* parent) const {
    330     QMutexLocker locker(&dataMutex());
    331 
    332     STask* currentParent = this->parent();
     329bool STask::isSubtaskOf(STask *parent) const {
     330    QMutexLocker locker(&dataMutex());
     331
     332    STask *currentParent = this->parent();
    333333
    334334    while (currentParent) {
     
    343343    QMutexLocker locker(&dataMutex());
    344344
    345     return started_;
     345    return m_started;
    346346}
    347347bool STask::isRunning() const {
     
    353353    QMutexLocker locker(&dataMutex());
    354354
    355     return cancelled_;
     355    return m_cancelled;
    356356}
    357357bool STask::isFinished() const {
    358358    QMutexLocker locker(&dataMutex());
    359359
    360     return finished_;
     360    return m_finished;
    361361}
    362362
     
    384384    addBlockingTask(taskId);
    385385}
    386 void STask::addBlockingTask(const SUIdNamespaceIdent& taskIdent) {
    387     QMutexLocker locker(&dataMutex());
    388 
    389     if (!blockingTaskIdents_.contains(taskIdent)) {
    390         blockingTaskIdents_.append(taskIdent);
    391     }
    392 }
    393 void STask::setBlockingTasks(const QList<SUIdNamespaceIdent>& tasks) {
    394     QMutexLocker locker(&dataMutex());
    395 
    396     blockingTaskIdents_ = tasks;
    397 }
    398 void STask::addBlockingTask(STask* task) {
    399     QMutexLocker locker(&dataMutex());
    400 
    401     if (!blockingTaskInstances_.contains(task)) {
    402         blockingTaskInstances_.append(task);
     386void STask::addBlockingTask(const SUIdNamespaceIdent &taskIdent) {
     387    QMutexLocker locker(&dataMutex());
     388
     389    if (!m_blockingTaskIdents.contains(taskIdent)) {
     390        m_blockingTaskIdents.append(taskIdent);
     391    }
     392}
     393void STask::setBlockingTasks(const QList<SUIdNamespaceIdent> &tasks) {
     394    QMutexLocker locker(&dataMutex());
     395
     396    m_blockingTaskIdents = tasks;
     397}
     398void STask::addBlockingTask(STask *task) {
     399    QMutexLocker locker(&dataMutex());
     400
     401    if (!m_blockingTaskInstances.contains(task)) {
     402        m_blockingTaskInstances.append(task);
    403403    }
    404404}
     
    421421    removeBlockingTask(taskIdent);
    422422}
    423 void STask::removeBlockingTask(const SUIdNamespaceIdent& taskIdent) {
    424     QMutexLocker locker(&dataMutex());
    425 
    426     blockingTaskIdents_.removeAll(taskIdent);
    427 }
    428 void STask::removeBlockingTask(STask* task) {
    429     QMutexLocker locker(&dataMutex());
    430 
    431     blockingTaskInstances_.removeAll(task);
     423void STask::removeBlockingTask(const SUIdNamespaceIdent &taskIdent) {
     424    QMutexLocker locker(&dataMutex());
     425
     426    m_blockingTaskIdents.removeAll(taskIdent);
     427}
     428void STask::removeBlockingTask(STask *task) {
     429    QMutexLocker locker(&dataMutex());
     430
     431    m_blockingTaskInstances.removeAll(task);
    432432}
    433433
     
    438438 * @param onlyIfSuccessful Run the given task only if the given one was successful
    439439 */
    440 void STask::enqueueAfter(STask* other, bool onlyIfSuccessful) {
     440void STask::enqueueAfter(STask *other, bool onlyIfSuccessful) {
    441441    if (onlyIfSuccessful) {
    442442        connect(other, SIGNAL(finished(STask*)), this, SLOT(startIfSuccessful(STask*)), Qt::DirectConnection);
     
    446446    }
    447447}
    448 void  STask::startIfSuccessful(STask* task) {
     448void  STask::startIfSuccessful(STask *task) {
    449449    if (task->taskResult() == STask::rSuccess) {
    450450        start();
     
    454454}
    455455
    456 void STask::setTitle(const QString& title) {
    457     QMutexLocker locker(&dataMutex());
    458 
    459     SET_IF_DIFFERENT(title_, title);
     456void STask::setTitle(const QString &title) {
     457    QMutexLocker locker(&dataMutex());
     458
     459    SET_IF_DIFFERENT(m_title, title);
    460460    emit changed(this, STask::pTitle);
    461461}
     
    466466 * @param details The details string
    467467 */
    468 void STask::setDetails(const QString& details) {
    469     QMutexLocker locker(&dataMutex());
    470 
    471     SET_IF_DIFFERENT(details_, details);
     468void STask::setDetails(const QString &details) {
     469    QMutexLocker locker(&dataMutex());
     470
     471    SET_IF_DIFFERENT(m_details, details);
    472472    emit changed(this, STask::pDetails);
    473473}
     
    475475    QMutexLocker locker(&dataMutex());
    476476
    477     if (autoHaltOnCancelRequested_)  haltIfCancelRequested();
    478 
    479     SET_IF_DIFFERENT(progress_, progress);
     477    if (m_autoHaltOnCancelRequested)  haltIfCancelRequested();
     478
     479    SET_IF_DIFFERENT(m_progress, progress);
    480480    emit changed(this, STask::pProgress);
    481481}
     
    483483    QMutexLocker locker(&dataMutex());
    484484
    485     if (autoHaltOnCancelRequested_)  haltIfCancelRequested();
    486 
    487     SET_IF_DIFFERENT(status_, status);
     485    if (m_autoHaltOnCancelRequested)  haltIfCancelRequested();
     486
     487    SET_IF_DIFFERENT(m_status, status);
    488488    emit changed(this, STask::pStatus);
    489489}
     
    491491    QMutexLocker locker(&dataMutex());
    492492
    493     taskResult_ = taskResult;
     493    m_taskResult = taskResult;
    494494}
    495495void STask::setSpecialResult(uint result) {
    496496    QMutexLocker locker(&dataMutex());
    497497
    498     specialResult_ = result;
     498    m_specialResult = result;
    499499}
    500500
     
    504504 * @param parent Can be null if no parent shall be set
    505505 */
    506 void STask::setParentTask(STask* parent) {
    507     QMutexLocker locker(&dataMutex());
    508 
    509     if (parent_) {
    510         parent_->disconnect(this);
    511     }
    512 
    513     parent_ = parent;
    514 
    515     if (parent_) {
     506void STask::setParentTask(STask *parent) {
     507    QMutexLocker locker(&dataMutex());
     508
     509    if (m_parent) {
     510        m_parent->disconnect(this);
     511    }
     512
     513    m_parent = parent;
     514
     515    if (m_parent) {
    516516        // If an exception occurs on the parent -> do not continue with the work
    517517        connect(parent, SIGNAL(exceptionOccured(STask*)), this, SLOT(cancel()));
     
    522522    QMutexLocker locker(&dataMutex());
    523523
    524     started_ = true;
     524    m_started = true;
    525525}
    526526void STask::setFinished() {
    527527    QMutexLocker locker(&dataMutex());
    528528
    529     finished_ = true;
     529    m_finished = true;
    530530
    531531    setStatus(STask::sFinished);
     
    536536}
    537537
    538 void STask::setException(const EException& e) {
     538void STask::setException(const EException &e) {
    539539    setException(QSharedPointer<EException>(e.createClonedInstance()));
    540540}
    541 void STask::setException(const QSharedPointer<EException>& e) {
    542     QMutexLocker locker(&dataMutex());
    543 
    544     exception_ = e;
     541void STask::setException(const QSharedPointer<EException> &e) {
     542    QMutexLocker locker(&dataMutex());
     543
     544    m_exception = e;
    545545    setTaskResult(STask::rError);
    546546
     
    552552    QMutexLocker locker(&dataMutex());
    553553
    554     return !exception_.isNull();
    555 }
    556 const EException& STask::exception() const {
    557     QMutexLocker locker(&dataMutex());
    558 
    559     return *exception_;
    560 }
    561 
    562 QMutex& STask::dataMutex() const {
    563     return dataMutex_;
     554    return !m_exception.isNull();
     555}
     556const EException &STask::exception() const {
     557    QMutexLocker locker(&dataMutex());
     558
     559    return *m_exception;
     560}
     561
     562QMutex &STask::dataMutex() const {
     563    return m_dataMutex;
    564564}
    565565
    566566/********************************************************/
    567567
    568 SThreadedTask::SThreadedTask(unsigned int UID, const QString& nmespace)
     568SThreadedTask::SThreadedTask(unsigned int UID, const QString &nmespace)
    569569    : STask(UID, nmespace)
    570570{
    571     thread_ = new QThread(this);
    572 
    573     connect(thread_, SIGNAL(started()), this, SLOT(threadStarted()));
     571    m_thread = new QThread(this);
     572
     573    connect(m_thread, SIGNAL(started()), this, SLOT(threadStarted()));
    574574}
    575575SThreadedTask::~SThreadedTask() {
    576     thread_->quit(); // Stop the eventqueue of the thread
    577     thread_->wait();
    578     thread_->deleteLater();
     576    m_thread->quit(); // Stop the eventqueue of the thread
     577    m_thread->wait();
     578    m_thread->deleteLater();
    579579}
    580580
    581581void SThreadedTask::doStart() {
    582     moveToThread(thread_);
    583     Q_ASSERT(thread() == thread_);
    584 
    585     thread_->start();
     582    moveToThread(m_thread);
     583    Q_ASSERT(thread() == m_thread);
     584
     585    m_thread->start();
    586586}
    587587
    588588void SThreadedTask::threadStarted() {
    589     Q_ASSERT(QThread::currentThread() == thread_);
     589    Q_ASSERT(QThread::currentThread() == m_thread);
    590590
    591591    safeDoTheWork();
     
    601601/********************************************************/
    602602
    603 SAsynchroneousTask::SAsynchroneousTask(uint UID, const QString& nmespace)
     603SAsynchroneousTask::SAsynchroneousTask(uint UID, const QString &nmespace)
    604604    : STask(UID, nmespace)
    605605{
     
    624624
    625625
    626 SRessourceMutex::SRessourceMutex(QObject* parent)
     626SRessourceMutex::SRessourceMutex(QObject *parent)
    627627    : QObject(parent)
    628     , dataMutex_(QMutex::NonRecursive)
    629     , lockingMutex_(QMutex::Recursive)
     628    , m_dataMutex(QMutex::NonRecursive)
     629    , m_lockingMutex(QMutex::Recursive)
    630630{
    631631}
    632632
    633 void SRessourceMutex::lock(STask* task, QMutex::RecursionMode mode) {
    634     QMutexLocker locker(&dataMutex_);
    635 
    636     if (!lockingMutex_.tryLock()) {
     633void SRessourceMutex::lock(STask *task, QMutex::RecursionMode mode) {
     634    QMutexLocker locker(&m_dataMutex);
     635
     636    if (!m_lockingMutex.tryLock()) {
    637637        // The mutex is locked
    638638
    639639        bool isSubtaskOfALockHolder = false;
    640640        if (mode == QMutex::Recursive) {
    641             foreach (STask* parent, lockHolders_) {
     641            foreach (STask *parent, m_lockHolders) {
    642642                if (task->isSubtaskOf(parent)) {
    643643                    isSubtaskOfALockHolder = true;
     
    649649        if (!isSubtaskOfALockHolder) {
    650650            // We are not a subtask (or mode is not recursive) -> Wait for the mutex to become unlocked
    651             lockingMutex_.lock();
     651            m_lockingMutex.lock();
    652652        }
    653653    }
    654654
    655655    // We are holding the lock now
    656     lockHolders_.append(task);
    657 }
    658 void SRessourceMutex::unlock(STask* task) {
    659     QMutexLocker locker(&dataMutex_);
    660 
    661     if (lockHolders_.contains(task)) {
    662         lockHolders_.removeOne(task);
    663 
    664         if (lockHolders_.count() == 0) {
     656    m_lockHolders.append(task);
     657}
     658void SRessourceMutex::unlock(STask *task) {
     659    QMutexLocker locker(&m_dataMutex);
     660
     661    if (m_lockHolders.contains(task)) {
     662        m_lockHolders.removeOne(task);
     663
     664        if (m_lockHolders.count() == 0) {
    665665            // The mutex is now unlocked by all recursions (subtasks) -> really unlock the mutex
    666             lockingMutex_.unlock();
     666            m_lockingMutex.unlock();
    667667        }
    668668    }
     
    675675SRessourceMutexHolder::SRessourceMutexHolder()
    676676    : QObject(NULL) // singleton
    677     , ressourceMutex_(QMutex::Recursive)
     677    , m_ressourceMutex(QMutex::Recursive)
    678678{
    679679}
    680680
    681 void SRessourceMutexHolder::lockRessource(STask* task, int ressourceId, QString nmespace, QMutex::RecursionMode mode) {
    682     QMutexLocker locker(&ressourceMutex_);
     681void SRessourceMutexHolder::lockRessource(STask *task, int ressourceId, QString nmespace, QMutex::RecursionMode mode) {
     682    QMutexLocker locker(&m_ressourceMutex);
    683683
    684684    SUIdNamespaceIdent ressourceIdent;
     
    686686    ressourceIdent.nmespace = nmespace;
    687687
    688     if (!ressourceMutexs_.contains(ressourceIdent)) {
    689         ressourceMutexs_.insert(ressourceIdent, new SRessourceMutex(this));
    690     }
    691 
    692     SRessourceMutex* mtx = ressourceMutexs_[ressourceIdent];
     688    if (!m_ressourceMutexs.contains(ressourceIdent)) {
     689        m_ressourceMutexs.insert(ressourceIdent, new SRessourceMutex(this));
     690    }
     691
     692    SRessourceMutex *mtx = m_ressourceMutexs[ressourceIdent];
    693693    mtx->lock(task, mode);
    694694}
    695695
    696 void SRessourceMutexHolder::unlockRessource(STask* task, int ressourceId, QString nmespace) {
    697     QMutexLocker locker(&ressourceMutex_);
     696void SRessourceMutexHolder::unlockRessource(STask *task, int ressourceId, QString nmespace) {
     697    QMutexLocker locker(&m_ressourceMutex);
    698698
    699699    SUIdNamespaceIdent ressourceIdent;
     
    701701    ressourceIdent.nmespace = nmespace;
    702702
    703     if (ressourceMutexs_.contains(ressourceIdent)) {
    704         SRessourceMutex* mtx = ressourceMutexs_[ressourceIdent];
     703    if (m_ressourceMutexs.contains(ressourceIdent)) {
     704        SRessourceMutex *mtx = m_ressourceMutexs[ressourceIdent];
    705705        mtx->unlock(task);
    706706    }
     
    709709/*********************************************************/
    710710
    711 ESubtaskException::ESubtaskException(const EException& exception)
     711ESubtaskException::ESubtaskException(const EException &exception)
    712712    : EException("")
    713713{
    714     originalException_ = exception.createClonedInstance();
    715 
    716     setWhat(originalException_->what(false));
    717     if (originalException_->hasChainedException()) {
    718         chain(originalException_->chainedException());
    719     }
    720 }
    721 ESubtaskException::ESubtaskException(const ESubtaskException& other)
     714    m_originalException = exception.createClonedInstance();
     715
     716    setWhat(m_originalException->what(false));
     717    if (m_originalException->hasChainedException()) {
     718        chain(m_originalException->chainedException());
     719    }
     720}
     721ESubtaskException::ESubtaskException(const ESubtaskException &other)
    722722    : EException(other)
    723723{
    724     originalException_ = other.originalException_->createClonedInstance();
     724    m_originalException = other.m_originalException->createClonedInstance();
    725725}
    726726ESubtaskException::~ESubtaskException() throw() {
    727     delete originalException_;
    728 }
    729 
    730 EException* ESubtaskException::originalException() const throw() {
    731     return originalException_;
     727    delete m_originalException;
     728}
     729
     730EException *ESubtaskException::originalException() const throw() {
     731    return m_originalException;
    732732}
    733733
     
    735735    throw *this;
    736736}
    737 ESubtaskException* ESubtaskException::createClonedInstance() const throw() {
     737ESubtaskException *ESubtaskException::createClonedInstance() const throw() {
    738738    return new ESubtaskException(*this);
    739739}
     
    754754}
    755755
    756 EAbortException* EAbortException::createClonedInstance() const throw() {
     756EAbortException *EAbortException::createClonedInstance() const throw() {
    757757    return new EAbortException(*this);
    758758}
  • common/domain/stask.h

    r319 r382  
    3030
    3131typedef struct {
    32     uint    uid;
     32    uint uid;
    3333    QString nmespace;
    3434} SUIdNamespaceIdent;
    35 inline bool operator==(const SUIdNamespaceIdent& a, const SUIdNamespaceIdent& b) { return (a.uid == b.uid) && (a.nmespace == b.nmespace); }
    36 inline bool operator<(const SUIdNamespaceIdent& a, const SUIdNamespaceIdent& b) { return (a.nmespace + QString::number(a.uid)) < (b.nmespace + QString::number(b.uid)); }
     35inline bool operator==(const SUIdNamespaceIdent &a, const SUIdNamespaceIdent &b) { return (a.uid == b.uid) && (a.nmespace == b.nmespace); }
     36inline bool operator<(const SUIdNamespaceIdent &a, const SUIdNamespaceIdent &b) { return (a.nmespace + QString::number(a.uid)) < (b.nmespace + QString::number(b.uid)); }
    3737
    3838class COMMON_EXPORT STask : public QObject {
     
    5050
    5151    enum Status {
    52         sWaiting  = 0x00,
    53         sRunning  = 0x01,
     52        sWaiting = 0x00,
     53        sRunning = 0x01,
    5454        sFinished = 0x02,
    5555
     
    6464
    6565public:
    66     STask(uint UID, const QString& nmespace);
     66    STask(uint UID, const QString &nmespace);
    6767    ~STask();
    6868
    69     uint    uid() const;
     69    uint uid() const;
    7070    QString nmespace() const;
    7171
    7272    virtual QString title() const;
    7373    virtual QString details() const;
    74     virtual uint    progress() const;
    75     virtual uint    status() const;
     74    virtual uint progress() const;
     75    virtual uint status() const;
    7676    virtual QString statusStr() const;
    7777    virtual STask::Result taskResult() const;
    78     virtual uint    specialResult() const;
    79 
    80     STask*   parent() const;
    81     bool     hasParent() const;
    82     bool     isSubtaskOf(STask* parent) const;
    83 
    84     void     lockRessource(int ressourceId, QString nmespace = "", QMutex::RecursionMode mode = QMutex::Recursive);
    85     void     unlockRessource(int ressourceId, QString nmespace = "");
    86 
    87     void     addBlockingTask(uint uid, QString nmespace = "");
    88     void     addBlockingTask(const SUIdNamespaceIdent& taskIdent);
    89     void     setBlockingTasks(const QList<SUIdNamespaceIdent>& tasks);
    90     void     addBlockingTask(STask* task);
    91     void     setSelfBlocking(bool selfBlocking);
    92     void     removeBlockingTask(uint uid, QString nmespace = "");
    93     void     removeBlockingTask(const SUIdNamespaceIdent& taskIdent);
    94     void     removeBlockingTask(STask* task);
     78    virtual uint specialResult() const;
     79
     80    STask *parent() const;
     81    bool hasParent() const;
     82    bool isSubtaskOf(STask *parent) const;
     83
     84    void lockRessource(int ressourceId, QString nmespace = "", QMutex::RecursionMode mode = QMutex::Recursive);
     85    void unlockRessource(int ressourceId, QString nmespace = "");
     86
     87    void addBlockingTask(uint uid, QString nmespace = "");
     88    void addBlockingTask(const SUIdNamespaceIdent &taskIdent);
     89    void setBlockingTasks(const QList<SUIdNamespaceIdent> &tasks);
     90    void addBlockingTask(STask *task);
     91    void setSelfBlocking(bool selfBlocking);
     92    void removeBlockingTask(uint uid, QString nmespace = "");
     93    void removeBlockingTask(const SUIdNamespaceIdent &taskIdent);
     94    void removeBlockingTask(STask *task);
    9595
    9696    QList<SUIdNamespaceIdent> blockingTaskIdents() const;
    97     QList<QPointer<STask> >   blockingTaskInstances() const;
    98 
    99     void    enqueueAfter(STask* other, bool onlyIfSuccessful = false);
    100 
    101     void    setTitle(const QString& title);
    102     void    setDetails(const QString& details);
    103     void    setProgress(uint progress);
    104     void    setTaskResult(STask::Result taskResult);
    105     void    setSpecialResult(uint result);
    106 
    107     void    setParentTask(STask* parent);
    108 
    109     bool    isStarted() const;
    110     bool    isRunning() const;
    111     bool    isCancelled() const;
    112     bool    isFinished() const;
    113 
    114     bool              hadException() const;
    115     const EException& exception() const;
     97    QList<QPointer<STask> > blockingTaskInstances() const;
     98
     99    void enqueueAfter(STask *other, bool onlyIfSuccessful = false);
     100
     101    void setTitle(const QString &title);
     102    void setDetails(const QString &details);
     103    void setProgress(uint progress);
     104    void setTaskResult(STask::Result taskResult);
     105    void setSpecialResult(uint result);
     106
     107    void setParentTask(STask *parent);
     108
     109    bool isStarted() const;
     110    bool isRunning() const;
     111    bool isCancelled() const;
     112    bool isFinished() const;
     113
     114    bool hadException() const;
     115    const EException &exception() const;
    116116
    117117public slots:
     
    120120
    121121signals:
    122     void changed(STask* task, STask::Property property); // Always use Qt::DirectConnection when connecting!
    123 
    124     void started(STask* task); // Always use Qt::DirectConnection when connecting!
    125     void cancelled(STask* task); // Always use Qt::DirectConnection when connecting!
    126     void exceptionOccured(STask* task); // Always use Qt::DirectConnection when connecting!
    127     void finished(STask* task); // Always use Qt::DirectConnection when connecting!
     122    void changed(STask *task, STask::Property property); // Always use Qt::DirectConnection when connecting!
     123
     124    void started(STask *task); // Always use Qt::DirectConnection when connecting!
     125    void cancelled(STask *task); // Always use Qt::DirectConnection when connecting!
     126    void exceptionOccured(STask *task); // Always use Qt::DirectConnection when connecting!
     127    void finished(STask *task); // Always use Qt::DirectConnection when connecting!
    128128
    129129protected:
    130     QMutex&      dataMutex() const;
    131 
    132     void         setStatus(uint status);
    133     virtual void setException(const EException& e);
    134     virtual void setException(const QSharedPointer<EException>& e);
    135 
    136     void         startSubTask(STask* task, bool waitFor);
    137 
    138     void         waitFor(STask* other);
    139     void         waitFor(QList<STask*> others);
    140     void         waitFor(QList<QPointer<STask> > others);
    141 
    142     void         setStarted();
     130    QMutex &dataMutex() const;
     131
     132    void setStatus(uint status);
     133    virtual void setException(const EException &e);
     134    virtual void setException(const QSharedPointer<EException> &e);
     135
     136    void startSubTask(STask *task, bool waitFor);
     137
     138    void waitFor(STask *other);
     139    void waitFor(QList<STask*> others);
     140    void waitFor(QList<QPointer<STask> > others);
     141
     142    void setStarted();
    143143
    144144    virtual void doStart();
    145145    virtual void doTheWork() =0;
    146     void         safeDoTheWork();
    147 
    148     void         haltIfCancelRequested();
    149 
    150     QString      taskIdent();
    151     QDebug       sDebug();
    152 
    153     virtual EException* inheritSubtaskException(const EException& exception);
     146    void safeDoTheWork();
     147
     148    void haltIfCancelRequested();
     149
     150    QString taskIdent();
     151    QDebug sDebug();
     152
     153    virtual EException *inheritSubtaskException(const EException &exception);
    154154
    155155protected slots:
    156     void         setFinished();
     156    void setFinished();
    157157
    158158private slots:
    159     void         onSigStart();
    160     void         onSubTaskFinished(STask* subTask);
    161     void         onSubTaskExceptionOccured(STask* subTask);
     159    void onSigStart();
     160    void onSubTaskFinished(STask *subTask);
     161    void onSubTaskExceptionOccured(STask *subTask);
    162162
    163163signals: // private
     
    165165
    166166private slots:
    167     void waitForTaskFinished(STask* task);
    168     void startIfSuccessful(STask* task);
     167    void waitForTaskFinished(STask *task);
     168    void startIfSuccessful(STask *task);
    169169
    170170private:
    171     mutable QMutex  dataMutex_;
    172 
    173     uint    uid_;
    174     QString nmespace_;
    175 
    176     QList<SUIdNamespaceIdent> blockingTaskIdents_;
    177     QList<QPointer<STask> >   blockingTaskInstances_;
    178     QString         title_;
    179     QString         details_;
    180     uint            progress_;
    181     uint            status_;
    182     STask::Result   taskResult_;
    183     uint            specialResult_;
    184 
    185     QPointer<STask> parent_;
    186 
    187     QList<QPointer<STask> > waitingFor_;
    188     mutable QMutex waitForMutex_;
    189     QWaitCondition waitForWaitCondition_;
    190 
    191     QList<QPointer<STask> > subTasks_;
    192 
    193     bool started_;
    194     bool cancelled_;
    195     bool finished_;
    196     bool autoHaltOnCancelRequested_;
    197 
    198     QSharedPointer<EException> exception_;
     171    mutable QMutex m_dataMutex;
     172
     173    uint m_uid;
     174    QString m_nmespace;
     175
     176    QList<SUIdNamespaceIdent> m_blockingTaskIdents;
     177    QList<QPointer<STask> > m_blockingTaskInstances;
     178    QString m_title;
     179    QString m_details;
     180    uint m_progress;
     181    uint m_status;
     182    STask::Result m_taskResult;
     183    uint m_specialResult;
     184
     185    QPointer<STask> m_parent;
     186
     187    QList<QPointer<STask> > m_waitingFor;
     188    mutable QMutex m_waitForMutex;
     189    QWaitCondition m_waitForWaitCondition;
     190
     191    QList<QPointer<STask> > m_subTasks;
     192
     193    bool m_started;
     194    bool m_cancelled;
     195    bool m_finished;
     196    bool m_autoHaltOnCancelRequested;
     197
     198    QSharedPointer<EException> m_exception;
    199199};
    200200
     
    204204
    205205public:
    206     SThreadedTask(uint UID, const QString& nmespace);
     206    SThreadedTask(uint UID, const QString &nmespace);
    207207    ~SThreadedTask();
    208208
     
    214214
    215215private:
    216     QThread* thread_;
     216    QThread *m_thread;
    217217};
    218218
     
    222222
    223223public:
    224     SAsynchroneousTask(uint UID, const QString& nmespace);
     224    SAsynchroneousTask(uint UID, const QString &nmespace);
    225225
    226226protected:
     
    240240public: /* EException */
    241241    virtual void raise();
    242     EAbortException* createClonedInstance() const throw();
     242    EAbortException *createClonedInstance() const throw();
    243243};
    244244
  • common/domain/stask_p.h

    r319 r382  
    3131
    3232public:
    33     SRessourceMutex(QObject* parent);
     33    SRessourceMutex(QObject *parent);
    3434
    3535public:
    36     void lock(STask* task, QMutex::RecursionMode mode);
     36    void lock(STask *task, QMutex::RecursionMode mode);
    3737    //bool tryLock();
    3838    //bool tryLock(int timeout);
    39     void unlock(STask* task);
     39    void unlock(STask *task);
    4040
    4141private:
    42     QMutex dataMutex_;
    43     QList<STask*> lockHolders_;
     42    QMutex m_dataMutex;
     43    QList<STask*> m_lockHolders;
    4444
    45     QMutex lockingMutex_;
     45    QMutex m_lockingMutex;
    4646};
    4747
     
    5050
    5151public:
    52     void lockRessource(STask* task, int ressourceId, QString nmespace, QMutex::RecursionMode mode);
    53     void unlockRessource(STask* task, int ressourceId, QString nmespace);
     52    void lockRessource(STask *task, int ressourceId, QString nmespace, QMutex::RecursionMode mode);
     53    void unlockRessource(STask *task, int ressourceId, QString nmespace);
    5454
    5555private:
    56     QMutex ressourceMutex_;
    57     QMap<SUIdNamespaceIdent, SRessourceMutex*> ressourceMutexs_;
     56    QMutex m_ressourceMutex;
     57    QMap<SUIdNamespaceIdent, SRessourceMutex*> m_ressourceMutexs;
    5858};
    5959
    6060class ESubtaskException : public EException {
    6161public:
    62     explicit ESubtaskException(const EException& exception);
     62    explicit ESubtaskException(const EException &exception);
    6363    ~ESubtaskException() throw();
    6464
    65     EException* originalException() const throw();
     65    EException *originalException() const throw();
    6666
    6767    virtual QString toString() const throw();
     
    7070    virtual void raise();
    7171
    72     ESubtaskException* createClonedInstance() const throw();
     72    ESubtaskException *createClonedInstance() const throw();
    7373
    7474protected:
    75     ESubtaskException(const ESubtaskException& other);
     75    ESubtaskException(const ESubtaskException &other);
    7676
    7777private:
    78     EException* originalException_;
     78    EException *m_originalException;
    7979};
    8080
  • common/domain/sversion.cpp

    r316 r382  
    2121
    2222SVersion::SVersion()
    23     : major_(0)
    24     , minor_(0)
    25     , release_(0)
    26     , build_(0)
     23    : m_major(0)
     24    , m_minor(0)
     25    , m_release(0)
     26    , m_build(0)
    2727{
    2828}
    2929
    30 SVersion::SVersion(const QString& versionStr) {
     30SVersion::SVersion(const QString &versionStr) {
    3131    QStringList vl = QString(versionStr).split('.');
    3232    while (vl.size() < 4) {
     
    3737
    3838    bool v;
    39     major_   = vl[0].toInt(&v); valid &= v;
    40     minor_   = vl[1].toInt(&v); valid &= v;
    41     release_ = vl[2].toInt(&v); valid &= v;
    42     build_   = vl[3].toInt(&v); valid &= v;
     39    m_major   = vl[0].toInt(&v); valid &= v;
     40    m_minor   = vl[1].toInt(&v); valid &= v;
     41    m_release = vl[2].toInt(&v); valid &= v;
     42    m_build   = vl[3].toInt(&v); valid &= v;
    4343
    4444    if (!valid) {
    45         major_ = minor_ = release_ = build_ = 0;
     45        m_major = m_minor = m_release = m_build = 0;
    4646    }
    4747}
    4848
    4949QString SVersion::toString(bool withBuildNo) const {
    50     QString v = QString("%1.%2.%3").arg(major_).arg(minor_).arg(release_);
     50    QString v = QString("%1.%2.%3").arg(m_major).arg(m_minor).arg(m_release);
    5151    if (withBuildNo) {
    52         v += "." + QString::number(build_);
     52        v += "." + QString::number(m_build);
    5353    }
    5454    return v;
    5555}
    56 QString SVersion::toReadableString(const QString& pattern) const {
    57     QString v1 = QString("%1.%2").arg(major_).arg(minor_);
     56QString SVersion::toReadableString(const QString &pattern) const {
     57    QString v1 = QString("%1.%2").arg(m_major).arg(m_minor);
    5858
    5959    QString devStage = developmentStageStr(developmentStage());
     
    7171
    7272bool SVersion::isValid() const {
    73     return major_ | minor_ | release_ | build_;
     73    return m_major | m_minor | m_release | m_build;
    7474}
    7575
    7676short SVersion::majorV() const {
    77     return major_;
     77    return m_major;
    7878}
    7979short SVersion::minorV() const {
    80     return minor_;
     80    return m_minor;
    8181}
    8282short SVersion::releaseV() const {
    83     return release_;
     83    return m_release;
    8484}
    8585short SVersion::buildV() const {
    86     return build_;
     86    return m_build;
    8787}
    8888
     
    106106}
    107107
    108 bool SVersion::operator==(const SVersion& other) const {
     108bool SVersion::operator==(const SVersion &other) const {
    109109    return (this->majorV() == other.majorV()) &&
    110110           (this->minorV() == other.minorV()) &&
     
    112112           (this->buildV() == other.buildV());
    113113}
    114 bool SVersion::operator<(const SVersion& other) const {
     114bool SVersion::operator<(const SVersion &other) const {
    115115    if (this->majorV() < other.majorV()) {
    116116        return true;
  • common/domain/sversion.h

    r319 r382  
    3434public:
    3535    SVersion(short major, short minor, short release, short build)
    36         : major_(major)
    37         , minor_(minor)
    38         , release_(release)
    39         , build_(build)
     36        : m_major(major)
     37        , m_minor(minor)
     38        , m_release(release)
     39        , m_build(build)
    4040    {}
    41     SVersion(const QString& versionStr);
     41    SVersion(const QString &versionStr);
    4242    SVersion();
    4343    ~SVersion() {}
     
    4545    QString toString(bool withBuildNo = false) const;
    4646    QString toReadableString(const QString &pattern = "%1 (%2)") const;
    47     bool    isValid() const;
     47    bool isValid() const;
    4848
    4949    short majorV() const;
     
    5555    static QString developmentStageStr(DevelopmentStage developmentStage);
    5656
    57     bool        operator==(const SVersion& other) const;
    58     bool        operator<(const SVersion& other) const;
    59     inline bool operator!=(const SVersion& other) const { return !(*this == other); }
    60     inline bool operator<=(const SVersion& other) const { return (*this == other) || (*this < other); }
    61     inline bool operator>(const SVersion& other) const { return !(*this == other) && !(*this < other); }
    62     inline bool operator>=(const SVersion& other) const { return !(*this < other); }
     57    bool operator==(const SVersion &other) const;
     58    bool operator<(const SVersion &other) const;
     59    inline bool operator!=(const SVersion &other) const { return !(*this == other); }
     60    inline bool operator<=(const SVersion &other) const { return (*this == other) || (*this < other); }
     61    inline bool operator>(const SVersion &other) const { return !(*this == other) && !(*this < other); }
     62    inline bool operator>=(const SVersion &other) const { return !(*this < other); }
    6363
    6464private:
    65     short major_;
    66     short minor_;
    67     short release_;
    68     short build_;
     65    short m_major;
     66    short m_minor;
     67    short m_release;
     68    short m_build;
    6969};
    7070
  • common/exceptions/eexception.cpp

    r316 r382  
    2121
    2222EException::EException()
    23     : chainedException_(NULL)
     23    : m_chainedException(NULL)
    2424{
    2525}
    26 EException::EException(const QString& msg)
    27     : chainedException_(NULL)
     26EException::EException(const QString &msg)
     27    : m_chainedException(NULL)
    2828{
    2929    setWhat(msg);
    3030}
    31 EException::EException(const EException& other)
    32     : message_(other.message_)
    33     , chainedException_(other.chainedException_)
    34     , debugInfos_(other.debugInfos_)
     31EException::EException(const EException &other)
     32    : m_message(other.m_message)
     33    , m_chainedException(other.m_chainedException)
     34    , m_debugInfos(other.m_debugInfos)
    3535{
    3636}
    37 EException & EException::operator =(const EException &other) {
    38     message_ = other.message_;
    39     chainedException_ = other.chainedException_;
    40     debugInfos_ = other.debugInfos_;
     37EException &EException::operator =(const EException &other) {
     38    m_message = other.m_message;
     39    m_chainedException = other.m_chainedException;
     40    m_debugInfos = other.m_debugInfos;
    4141
    4242    return *this;
     
    4848    throw *this;
    4949}
    50 EException* EException::createClonedInstance() const throw() {
     50EException *EException::createClonedInstance() const throw() {
    5151    return new EException(*this);
    5252}
     
    5757 * @return EException
    5858 */
    59 EException& EException::chain(const EException& exception) throw() {
    60     chainedException_ = QSharedPointer<EException>(exception.createClonedInstance());
     59EException &EException::chain(const EException &exception) throw() {
     60    m_chainedException = QSharedPointer<EException>(exception.createClonedInstance());
    6161    return *this;
    6262}
    6363
    64 EException& EException::addDebugInfo(const QString& value) throw() {
     64EException &EException::addDebugInfo(const QString &value) throw() {
    6565    QString val = value;
    6666    val         = val.trimmed().remove(QRegExp("\\n$"));
    67     debugInfos_.append(value);
     67    m_debugInfos.append(value);
    6868    return *this;
    6969}
    70 EException& EException::addDebugInfo(const QString& key, const QString& value) throw() {
     70EException &EException::addDebugInfo(const QString &key, const QString &value) throw() {
    7171    if (key.trimmed() != "") {
    7272        addDebugInfo(key + "=" + value);
     
    7676    return *this;
    7777}
    78 EException& EException::addDebugInfo(const QString& key, int value) throw() {
     78EException &EException::addDebugInfo(const QString &key, int value) throw() {
    7979    addDebugInfo(key, QString::number(value));
    8080    return *this;
    8181}
    82 EException& EException::addDebugInfos(const QList<QString>& debugInfos) throw() {
     82EException &EException::addDebugInfos(const QList<QString> &debugInfos) throw() {
    8383    foreach (QString value, debugInfos) {
    8484        addDebugInfo(value);
     
    8686    return *this;
    8787}
    88 EException& EException::addDebugInfos(const QMap<QString, QString>& debugInfos) throw() {
     88EException &EException::addDebugInfos(const QMap<QString, QString> &debugInfos) throw() {
    8989    foreach (QString key, debugInfos.keys()) {
    9090        addDebugInfo(key, debugInfos[key]);
     
    9393}
    9494QStringList EException::debugInfos() const throw() {
    95     return debugInfos_;
     95    return m_debugInfos;
    9696}
    9797QStringList EException::fullDebugInfos() const throw() {
     
    105105}
    106106
    107 void EException::setWhat(const QString& msg) throw() {
    108     message_ = msg;
     107void EException::setWhat(const QString &msg) throw() {
     108    m_message = msg;
    109109    if (msg == "") {
    110         message_ = QObject::tr("Unknown error");
     110        m_message = QObject::tr("Unknown error");
    111111    }
    112112}
     
    115115}
    116116QString EException::toString() const throw() {
    117     return message_;
     117    return m_message;
    118118}
    119119
    120120bool EException::hasChainedException() const throw() {
    121     return !chainedException_.isNull();
     121    return !m_chainedException.isNull();
    122122}
    123 EException& EException::chainedException() const throw() {
     123EException &EException::chainedException() const throw() {
    124124    if (hasChainedException()) {
    125         return *chainedException_;
     125        return *m_chainedException;
    126126    } else {
    127127        qCritical() << QObject::tr("There is no chained exception!");
  • common/exceptions/eexception.h

    r337 r382  
    3131public:
    3232    EException();
    33     explicit EException(const QString& msg);
    34     EException(const EException& other);
     33    explicit EException(const QString &msg);
     34    EException(const EException &other);
    3535    virtual ~EException() throw();
    3636    virtual void raise();
    3737
    38     EException&     addDebugInfo(const QString& value) throw();
    39     EException&     addDebugInfo(const QString& key, int value) throw();
    40     EException&     addDebugInfo(const QString& key, const QString& value) throw();
    41     EException&     addDebugInfos(const QList<QString>& debugInfos) throw();
    42     EException&     addDebugInfos(const QMap<QString, QString>& debugInfos) throw();
    43     QStringList     debugInfos() const throw();
    44     QStringList     fullDebugInfos() const throw();
     38    EException &addDebugInfo(const QString &value) throw();
     39    EException &addDebugInfo(const QString &key, int value) throw();
     40    EException &addDebugInfo(const QString &key, const QString &value) throw();
     41    EException &addDebugInfos(const QList<QString> &debugInfos) throw();
     42    EException &addDebugInfos(const QMap<QString, QString> &debugInfos) throw();
     43    QStringList debugInfos() const throw();
     44    QStringList fullDebugInfos() const throw();
    4545
    46     EException&     chain(const EException& exception) throw();
    47     bool            hasChainedException() const throw();
    48     EException&     chainedException() const throw();
     46    EException &chain(const EException &exception) throw();
     47    bool hasChainedException() const throw();
     48    EException &chainedException() const throw();
    4949
    50     void            setWhat(const QString& msg) throw();
    51     QString         what(bool chained = true) const throw();
    52     QString         chainedWhat() const throw();
    53     QString         unchainedWhat() const throw();
     50    void setWhat(const QString &msg) throw();
     51    QString what(bool chained = true) const throw();
     52    QString chainedWhat() const throw();
     53    QString unchainedWhat() const throw();
    5454    virtual QString toString() const throw();
    5555
    56     virtual EException* createClonedInstance() const throw();
     56    virtual EException *createClonedInstance() const throw();
    5757
    5858public:
    59     EException & operator =(const EException &other);
     59    EException &operator =(const EException &other);
    6060
    6161private:
    62     QString                    message_;
    63     QSharedPointer<EException> chainedException_;
    64     QStringList                debugInfos_;
     62    QString m_message;
     63    QSharedPointer<EException> m_chainedException;
     64    QStringList m_debugInfos;
    6565};
    6666Q_DECLARE_METATYPE(EException)
  • common/exceptions/elibraryloadexception.cpp

    r370 r382  
    2222namespace Library {
    2323
    24 ELoadException::ELoadException(const QString& message)
     24ELoadException::ELoadException(const QString &message)
    2525    : EException(message)
    26     , purpose_(Other)
     26    , m_purpose(Other)
    2727{
    2828}
    29 ELoadException::ELoadException(const Purpose& purpose)
     29ELoadException::ELoadException(const Purpose &purpose)
    3030    : EException("")
    31     , purpose_ (purpose)
     31    , m_purpose (purpose)
    3232{
    3333}
    34 ELoadException::ELoadException(const ELoadException& other)
     34ELoadException::ELoadException(const ELoadException &other)
    3535    : EException(other)
    3636{
    37     this->purpose_ = other.purpose_;
     37    this->m_purpose = other.m_purpose;
    3838}
    3939
     
    4141    throw *this;
    4242}
    43 ELoadException* ELoadException::createClonedInstance() const throw() {
     43ELoadException *ELoadException::createClonedInstance() const throw() {
    4444    return new ELoadException(*this);
    4545}
     
    4747
    4848ELoadException::Purpose ELoadException::purpose() const throw() {
    49     return purpose_;
     49    return m_purpose;
    5050}
    5151
  • common/exceptions/elibraryloadexception.h

    r370 r382  
    3636    };
    3737
    38     explicit ELoadException(const QString& message);
    39     explicit ELoadException(const Purpose& purpose);
     38    explicit ELoadException(const QString &message);
     39    explicit ELoadException(const Purpose &purpose);
    4040
    4141    Purpose purpose() const throw();
    4242
    4343public: /* EException */
    44     virtual ELoadException* createClonedInstance() const throw();
    45     virtual QString         toString() const throw();
    46     virtual void            raise();
     44    virtual ELoadException *createClonedInstance() const throw();
     45    virtual QString toString() const throw();
     46    virtual void raise();
    4747
    4848protected:
    49     ELoadException(const ELoadException& other);
     49    ELoadException(const ELoadException &other);
    5050
    5151private:
    52     Purpose purpose_;
     52    Purpose m_purpose;
    5353};
    5454
  • common/exceptions/eloginaccountloginexception.cpp

    r316 r382  
    2222namespace LoginAccount {
    2323
    24 ELoginException::ELoginException(const QString& msg)
     24ELoginException::ELoginException(const QString &msg)
    2525    : EException(msg)
    26     , purpose_(Other)
     26    , m_purpose(Other)
    2727{
    2828}
    29 ELoginException::ELoginException(const Purpose& purpose)
     29ELoginException::ELoginException(const Purpose &purpose)
    3030    : EException("")
    31     , purpose_(purpose)
     31    , m_purpose(purpose)
    3232{
    3333}
    34 ELoginException::ELoginException(const ELoginException& other)
     34ELoginException::ELoginException(const ELoginException &other)
    3535    : EException(other)
    3636{
    37     this->purpose_ = other.purpose_;
     37    this->m_purpose = other.m_purpose;
    3838}
    3939
     
    4141    throw *this;
    4242}
    43 ELoginException* ELoginException::createClonedInstance() const throw() {
     43ELoginException *ELoginException::createClonedInstance() const throw() {
    4444    return new ELoginException(*this);
    4545}
    4646
    4747ELoginException::Purpose ELoginException::purpose() const throw() {
    48     return purpose_;
     48    return m_purpose;
    4949}
    5050
  • common/exceptions/eloginaccountloginexception.h

    r319 r382  
    3434    };
    3535
    36     explicit ELoginException(const QString& msg);
    37     explicit ELoginException(const Purpose& purpose);
     36    explicit ELoginException(const QString &msg);
     37    explicit ELoginException(const Purpose &purpose);
    3838
    3939    Purpose purpose() const throw();
    4040
    4141public: /* EException */
    42     virtual ELoginException* createClonedInstance() const throw();
    43     virtual QString          toString() const throw();
    44     virtual void             raise();
     42    virtual ELoginException *createClonedInstance() const throw();
     43    virtual QString toString() const throw();
     44    virtual void raise();
    4545
    4646protected:
    47     ELoginException(const ELoginException& other);
     47    ELoginException(const ELoginException &other);
    4848
    4949private:
    50     Purpose purpose_;
     50    Purpose m_purpose;
    5151};
    5252
  • common/exceptions/enetworkexception.cpp

    r316 r382  
    1919#include "enetworkexception.h"
    2020
    21 ENetworkException::ENetworkException(QNetworkReply::NetworkError networkError, const QString& message)
     21ENetworkException::ENetworkException(QNetworkReply::NetworkError networkError, const QString &message)
    2222    : EException(message)
    23     , networkError_(networkError)
     23    , m_networkError(networkError)
    2424{
    2525}
     
    2828    throw *this;
    2929}
    30 ENetworkException* ENetworkException::createClonedInstance() const throw() {
     30ENetworkException *ENetworkException::createClonedInstance() const throw() {
    3131    return new ENetworkException(*this);
    3232}
    3333
    3434QNetworkReply::NetworkError ENetworkException::networkError() const {
    35     return networkError_;
     35    return m_networkError;
    3636}
  • common/exceptions/enetworkexception.h

    r319 r382  
    2525class COMMON_EXPORT ENetworkException : public EException {
    2626public:
    27     ENetworkException(QNetworkReply::NetworkError networkError, const QString& message);
     27    ENetworkException(QNetworkReply::NetworkError networkError, const QString &message);
    2828
    2929    QNetworkReply::NetworkError networkError() const;
     
    3232    virtual void raise();
    3333
    34     ENetworkException* createClonedInstance() const throw();
     34    ENetworkException *createClonedInstance() const throw();
    3535
    3636private:
    37     QNetworkReply::NetworkError networkError_;
     37    QNetworkReply::NetworkError m_networkError;
    3838};
    3939
  • common/exceptions/eparseexception.cpp

    r316 r382  
    1818#include "eparseexception.h"
    1919
    20 EParseException::EParseException(const QString& msg)
     20EParseException::EParseException(const QString &msg)
    2121    : EException(msg)
    2222{
    2323}
    24 EParseException::EParseException(const EParseException& other)
     24EParseException::EParseException(const EParseException &other)
    2525    : EException(other)
    2626{
     
    3030    throw *this;
    3131}
    32 EParseException* EParseException::createClonedInstance() const throw() {
     32EParseException *EParseException::createClonedInstance() const throw() {
    3333    return new EParseException(*this);
    3434}
  • common/exceptions/eparseexception.h

    r319 r382  
    2323class COMMON_EXPORT EParseException : public EException {
    2424public:
    25     explicit EParseException(const QString& msg);
     25    explicit EParseException(const QString &msg);
    2626
    2727public: /* EException */
    2828    virtual void raise();
    2929
    30     virtual EParseException* createClonedInstance() const throw();
     30    virtual EParseException *createClonedInstance() const throw();
    3131
    3232protected:
    33     EParseException(const EParseException& other);
     33    EParseException(const EParseException &other);
    3434};
    3535
  • common/exceptions/httpexceptions.cpp

    r316 r382  
    2222namespace Http {
    2323
    24 EReadException::EReadException(const QString& msg)
     24EReadException::EReadException(const QString &msg)
    2525    : EException(msg)
    2626{
    2727}
    28 EReadException::EReadException(const EReadException& other)
     28EReadException::EReadException(const EReadException &other)
    2929    : EException(other)
    3030{
     
    3434    throw *this;
    3535}
    36 EReadException* EReadException::createClonedInstance() const throw() {
     36EReadException *EReadException::createClonedInstance() const throw() {
    3737    return new EReadException(*this);
    3838}
    3939
    4040
    41 ESSLException::ESSLException(const QList<QSslError>& errors)
     41ESSLException::ESSLException(const QList<QSslError> &errors)
    4242    : EException("")
    43     , errors_(errors)
     43    , m_errors(errors)
    4444{
    4545    QString errorMsg = QObject::tr("SSL-Errors: ");
     
    5454    EException::setWhat(errorMsg);
    5555}
    56 ESSLException::ESSLException(const ESSLException& other)
     56ESSLException::ESSLException(const ESSLException &other)
    5757    : EException(other)
    5858{
    59     this->errors_ = other.errors_;
     59    this->m_errors = other.m_errors;
    6060}
    6161ESSLException::~ESSLException() throw() {
     
    6666    throw *this;
    6767}
    68 ESSLException* ESSLException::createClonedInstance() const throw() {
     68ESSLException *ESSLException::createClonedInstance() const throw() {
    6969    return new ESSLException(*this);
    7070}
    7171
    7272QList<QSslError> ESSLException::sslErrors() const {
    73     return errors_;
     73    return m_errors;
    7474}
    7575
  • common/exceptions/httpexceptions.h

    r319 r382  
    2727    class COMMON_EXPORT EReadException : public EException {
    2828    public:
    29         explicit EReadException(const QString& msg);
     29        explicit EReadException(const QString &msg);
    3030        virtual void raise();
    3131
    32         virtual EReadException* createClonedInstance() const throw();
     32        virtual EReadException *createClonedInstance() const throw();
    3333
    3434    protected:
    35         EReadException(const EReadException& other);
     35        EReadException(const EReadException &other);
    3636    };
    3737
    3838    class COMMON_EXPORT ESSLException : public EException {
    3939    public:
    40         explicit ESSLException(const QList<QSslError>& errors);
     40        explicit ESSLException(const QList<QSslError> &errors);
    4141        virtual ~ESSLException() throw();
    4242
     
    4545    public: /* EException */
    4646        virtual void raise();
    47         virtual ESSLException* createClonedInstance() const throw();
     47        virtual ESSLException *createClonedInstance() const throw();
    4848
    4949    protected:
    50         ESSLException(const ESSLException& other);
     50        ESSLException(const ESSLException &other);
    5151
    5252    private:
    53         QList<QSslError> errors_;
     53        QList<QSslError> m_errors;
    5454    };
    5555}
  • common/exceptions/persistence/estoragereadexception.cpp

    r316 r382  
    2020namespace Storage {
    2121
    22 EReadException::EReadException(const QString& msg)
     22EReadException::EReadException(const QString &msg)
    2323    : EException(msg)
    2424{
    2525}
    26 EReadException::EReadException(const EReadException& other)
     26EReadException::EReadException(const EReadException &other)
    2727    : EException(other)
    2828{
     
    3232    throw *this;
    3333}
    34 EReadException* EReadException::createClonedInstance() const throw() {
     34EReadException *EReadException::createClonedInstance() const throw() {
    3535    return new EReadException(*this);
    3636}
  • common/exceptions/persistence/estoragereadexception.h

    r319 r382  
    2626    class COMMON_EXPORT EReadException : public EException {
    2727    public:
    28         explicit EReadException(const QString& msg);
     28        explicit EReadException(const QString &msg);
    2929
    3030    public: /* EException */
    3131        virtual void raise();
    32         virtual EReadException* createClonedInstance() const throw();
     32        virtual EReadException *createClonedInstance() const throw();
    3333
    3434    protected:
    35         EReadException(const EReadException& other);
     35        EReadException(const EReadException &other);
    3636    };
    3737}
  • common/exceptions/persistence/estoragewriteexception.cpp

    r316 r382  
    2020namespace Storage {
    2121
    22 EWriteException::EWriteException(const QString& msg)
     22EWriteException::EWriteException(const QString &msg)
    2323    : EException(msg)
    2424{
    2525}
    26 EWriteException::EWriteException(const EWriteException& other)
     26EWriteException::EWriteException(const EWriteException &other)
    2727    : EException(other)
    2828{
     
    3232    throw *this;
    3333}
    34 EWriteException* EWriteException::createClonedInstance() const throw() {
     34EWriteException *EWriteException::createClonedInstance() const throw() {
    3535    return new EWriteException(*this);
    3636}
  • common/exceptions/persistence/estoragewriteexception.h

    r319 r382  
    2626    class COMMON_EXPORT EWriteException : public EException {
    2727    public:
    28         explicit EWriteException(const QString& msg);
     28        explicit EWriteException(const QString &msg);
    2929
    3030    public: /* EException */
    3131        virtual void raise();
    32         virtual EWriteException* createClonedInstance() const throw();
     32        virtual EWriteException *createClonedInstance() const throw();
    3333
    3434    protected:
    35         EWriteException(const EWriteException& other);
     35        EWriteException(const EWriteException &other);
    3636    };
    3737}
  • common/gui/business/iintegration.h

    r369 r382  
    5151     * @return The result of the dialog execution
    5252     */
    53     virtual int execDialog(IDialogWrapper* dialogWrapper) =0;
     53    virtual int execDialog(IDialogWrapper *dialogWrapper) =0;
    5454
    5555    /**
     
    5858     * @return The result of the dialog execution
    5959     */
    60     virtual int execDialog(QMessageBox* msgBox) =0;
     60    virtual int execDialog(QMessageBox *msgBox) =0;
    6161
    6262    /**
  • common/gui/persistence/imainstorage.h

    r369 r382  
    2929class COMMON_EXPORT IMainStorage : public IBaseMainStorage {
    3030public:
    31     virtual QImage       readImage(const QString &_namespace, const QString &key, const QImage &defaultValue = QImage()) =0;
     31    virtual QImage readImage(const QString &_namespace, const QString &key, const QImage &defaultValue = QImage()) =0;
    3232    virtual QKeySequence readShortcut(const QString &_namespace, const QString &key, const QKeySequence &defaultValue = QKeySequence()) =0;
    3333
  • common/gui/ui/iaccountsettingswidget.h

    r369 r382  
    2929
    3030public:
    31     virtual void loadFromAccount(IAccount* account) =0;
    32     virtual void saveToAccount(IAccount* account) =0;
     31    virtual void loadFromAccount(IAccount *account) =0;
     32    virtual void saveToAccount(IAccount *account) =0;
    3333
    3434public:
    35     IAccountSettingsWidget(QWidget* parent = 0)
     35    IAccountSettingsWidget(QWidget *parent = 0)
    3636        : QWidget(parent)
    3737    {}
  • common/gui/ui/iclosepreventabledialog.cpp

    r316 r382  
    2020#include <QCloseEvent>
    2121
    22 IClosePreventableDialog::IClosePreventableDialog(QWidget* parent)
     22IClosePreventableDialog::IClosePreventableDialog(QWidget *parent)
    2323    : QDialog(parent)
    2424    , m_preventCount(0)
  • common/gui/ui/iclosepreventabledialog.h

    r369 r382  
    3838
    3939public:
    40     IClosePreventableDialog(QWidget* parent);
     40    IClosePreventableDialog(QWidget *parent);
    4141    virtual ~IClosePreventableDialog() {}
    4242
  • common/gui/ui/isendingdialog.cpp

    r316 r382  
    1818#include "isendingdialog.h"
    1919
    20 ISendingDialog::ISendingDialog(QWidget* parent)
     20ISendingDialog::ISendingDialog(QWidget *parent)
    2121    : IClosePreventableDialog(parent)
    2222{
  • common/gui/ui/isendingdialog.h

    r369 r382  
    3232
    3333public:
    34     virtual ISMSSendTask* smsSendTask() const =0;
     34    virtual ISMSSendTask *smsSendTask() const =0;
    3535
    3636public:
    37     ISendingDialog(QWidget* parent);
     37    ISendingDialog(QWidget *parent);
    3838    virtual ~ISendingDialog() {}
    3939};
  • common/network/snetworkhelper.cpp

    r378 r382  
    3232    : QObject(parent)
    3333    , MULTIPART_BOUNDARY("---------------------------11677076429873974811095575830")
    34     , sharedCookieJar_(new QNetworkCookieJar(this))
     34    , m_sharedCookieJar(new QNetworkCookieJar(this))
    3535{
    3636    qRegisterMetaType<QList<QSslError> >("QList<QSslError>");
     
    4040
    4141SNetworkHelper::~SNetworkHelper() {
    42     foreach (QThread* thread, networkAccessManager_.keys()) {
    43         networkAccessManager_.take(thread)->deleteLater();
     42    foreach (QThread *thread, m_networkAccessManager.keys()) {
     43        m_networkAccessManager.take(thread)->deleteLater();
    4444    }
    4545}
     
    5050 */
    5151QNetworkAccessManager &SNetworkHelper::networkAccessManager() {
    52     if (!networkAccessManager_.contains(QThread::currentThread())) {
    53         QNetworkAccessManager* nam = new QNetworkAccessManager;
    54         nam->setCookieJar(sharedCookieJar_);
    55         sharedCookieJar_->setParent(this); // setCookieJar takes ownership
     52    if (!m_networkAccessManager.contains(QThread::currentThread())) {
     53        QNetworkAccessManager *nam = new QNetworkAccessManager;
     54        nam->setCookieJar(m_sharedCookieJar);
     55        m_sharedCookieJar->setParent(this); // setCookieJar takes ownership
    5656
    5757        connect(QThread::currentThread(), SIGNAL(terminated()), this, SLOT(onThreadTerminated()));
    58         networkAccessManager_.insert(QThread::currentThread(), nam);
     58        m_networkAccessManager.insert(QThread::currentThread(), nam);
    5959
    6060        connect(nam, SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&)),
     
    6262                Qt::DirectConnection);
    6363    }
    64     return *networkAccessManager_.value(QThread::currentThread());
     64    return *m_networkAccessManager.value(QThread::currentThread());
    6565}
    6666void SNetworkHelper::onThreadTerminated() {
    67     networkAccessManager_.take(QThread::currentThread())->deleteLater();
     67    m_networkAccessManager.take(QThread::currentThread())->deleteLater();
    6868}
    6969
     
    7474}
    7575
    76 void SNetworkHelper::addTrustedCA(const QString& certFilename, QSsl::EncodingFormat format) {
     76void SNetworkHelper::addTrustedCA(const QString &certFilename, QSsl::EncodingFormat format) {
    7777    QFile certFile(certFilename);
    7878    bool canOpen = certFile.open(QIODevice::ReadOnly);
     
    9595 * @return The network reply
    9696 */
    97 SNetworkReply SNetworkHelper::syncGet(const QUrl& destination, SNetworkHelper::RedirectHandling redirectHandling) {
     97SNetworkReply SNetworkHelper::syncGet(const QUrl &destination, SNetworkHelper::RedirectHandling redirectHandling) {
    9898    QNetworkRequest request = createDefaultRequest(destination);
    9999    return syncGet(request, redirectHandling);
     
    106106 * @return The network reply
    107107 */
    108 SNetworkReply SNetworkHelper::syncGet(QNetworkRequest& request, SNetworkHelper::RedirectHandling redirectHandling) {
     108SNetworkReply SNetworkHelper::syncGet(QNetworkRequest &request, SNetworkHelper::RedirectHandling redirectHandling) {
    109109    SNetworkReply reply = asyncGet(request);
    110110    waitFor(reply);
     
    121121 * @return The network reply
    122122 */
    123 SNetworkReply SNetworkHelper::asyncGet(const QUrl& destination) {
     123SNetworkReply SNetworkHelper::asyncGet(const QUrl &destination) {
    124124    QNetworkRequest request = createDefaultRequest(destination);
    125125    return asyncGet(request);
     
    131131 * @return The network reply
    132132 */
    133 SNetworkReply SNetworkHelper::asyncGet(QNetworkRequest& request) {
    134     lastUrl_.insert(&networkAccessManager(), request.url());
     133SNetworkReply SNetworkHelper::asyncGet(QNetworkRequest &request) {
     134    m_lastUrl.insert(&networkAccessManager(), request.url());
    135135
    136136    SNetworkReply reply(networkAccessManager().get(request));
     
    149149 * @return The network reply
    150150 */
    151 SNetworkReply SNetworkHelper::syncPost(const QUrl& destination, QList<IParam*>& posts, SNetworkHelper::PostType postType, SNetworkHelper::RedirectHandling redirectHandling) {
     151SNetworkReply SNetworkHelper::syncPost(const QUrl &destination, QList<IParam*> &posts, SNetworkHelper::PostType postType, SNetworkHelper::RedirectHandling redirectHandling) {
    152152    QNetworkRequest request = createDefaultRequest(destination);
    153153    return syncPost(request, posts, postType, redirectHandling);
     
    162162 * @return The network reply
    163163 */
    164 SNetworkReply SNetworkHelper::syncPost(QNetworkRequest& request, QList<IParam*>& posts, SNetworkHelper::PostType postType, SNetworkHelper::RedirectHandling redirectHandling) {
     164SNetworkReply SNetworkHelper::syncPost(QNetworkRequest &request, QList<IParam*> &posts, SNetworkHelper::PostType postType, SNetworkHelper::RedirectHandling redirectHandling) {
    165165    SNetworkReply reply = asyncPost(request, posts, postType);
    166166    waitFor(reply);
     
    179179 * @return The network reply
    180180 */
    181 SNetworkReply SNetworkHelper::asyncPost(const QUrl& destination, QList<IParam*>& posts, SNetworkHelper::PostType postType) {
     181SNetworkReply SNetworkHelper::asyncPost(const QUrl &destination, QList<IParam*> &posts, SNetworkHelper::PostType postType) {
    182182    QNetworkRequest request  = createDefaultRequest(destination);
    183183    return asyncPost(request, posts, postType);
     
    191191 * @return The network reply
    192192 */
    193 SNetworkReply SNetworkHelper::asyncPost(QNetworkRequest& request, QList<IParam*>& posts, SNetworkHelper::PostType postType) {
    194     lastUrl_.insert(&networkAccessManager(), request.url());
     193SNetworkReply SNetworkHelper::asyncPost(QNetworkRequest &request, QList<IParam*> &posts, SNetworkHelper::PostType postType) {
     194    m_lastUrl.insert(&networkAccessManager(), request.url());
    195195
    196196    // Set the content type header
     
    216216
    217217    // Cleanup the params
    218     foreach (IParam* param, posts) {
     218    foreach (IParam *param, posts) {
    219219        delete param;
    220220    }
     
    226226}
    227227
    228 QUrl SNetworkHelper::getRedirectUrl(const SNetworkReply& reply) {
     228QUrl SNetworkHelper::getRedirectUrl(const SNetworkReply &reply) {
    229229    return reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl();
    230230}
    231231
    232 void SNetworkHelper::waitFor(const SNetworkReply& networkReply) {
     232void SNetworkHelper::waitFor(const SNetworkReply &networkReply) {
    233233    QEventLoop eventLoop;
    234234    connect(networkReply, SIGNAL(finished()), &eventLoop, SLOT(quit()));
     
    270270}
    271271
    272 void SNetworkHelper::adjustUrl(QUrl& url) {
     272void SNetworkHelper::adjustUrl(QUrl &url) {
    273273    QUrl lstUrl = lastUrl();
    274274    if (lstUrl.isEmpty()) {
     
    287287}
    288288QUrl SNetworkHelper::lastUrl() {
    289     return lastUrl_.value(&networkAccessManager());
    290 }
    291 
    292 
    293 QByteArray SNetworkHelper::paramsToEncoded(const QList<IParam*>& posts, SNetworkHelper::PostType postType) {
     289    return m_lastUrl.value(&networkAccessManager());
     290}
     291
     292
     293QByteArray SNetworkHelper::paramsToEncoded(const QList<IParam*> &posts, SNetworkHelper::PostType postType) {
    294294    QByteArray delim;
    295295    QByteArray startMarker;
     
    314314
    315315    QByteArray result = startMarker;
    316     foreach (IParam* param, posts) {
     316    foreach (IParam *param, posts) {
    317317        result += param->encode(postType) + delim;
    318318    }
     
    324324
    325325
    326 QNetworkRequest SNetworkHelper::createDefaultRequest(const QUrl& url) {
     326QNetworkRequest SNetworkHelper::createDefaultRequest(const QUrl &url) {
    327327    QUrl dest(url);
    328328    adjustUrl(dest);
     
    340340}
    341341
    342 void SNetworkHelper::attachDefaultHeaders(QNetworkRequest& request) {
     342void SNetworkHelper::attachDefaultHeaders(QNetworkRequest &request) {
    343343    foreach (const QByteArray header, defaultHeaders().keys()) {
    344344        request.setRawHeader(header, defaultHeaders().value(header));
     
    367367}
    368368
    369 void SNetworkHelper::attachDefaultSSLConfiguration(QNetworkRequest& request) {
     369void SNetworkHelper::attachDefaultSSLConfiguration(QNetworkRequest &request) {
    370370    request.setSslConfiguration(defaultSSLConfiguration());
    371371}
     
    398398}
    399399
    400 void SNetworkHelper::onSslErrors(QNetworkReply* reply, const QList<QSslError>& errors) {
     400void SNetworkHelper::onSslErrors(QNetworkReply *reply, const QList<QSslError> &errors) {
    401401    qDebug() << QString("SSL errors occured while connecting to %1:")
    402402                .arg(reply->request().url().toString());
     
    418418}
    419419
    420 HeadersMap& SNetworkHelper::defaultHeaders() {
    421     return defaultHeaders_;
    422 }
    423 void SNetworkHelper::setDefaultHeaders(const HeadersMap& headers) {
    424     defaultHeaders_ = headers;
    425 }
    426 
    427 QSslConfiguration& SNetworkHelper::defaultSSLConfiguration() {
    428     return defaultSSLConfiguration_;
    429 }
    430 void SNetworkHelper::setDefaultSSLConfiguration(const QSslConfiguration& sslConfiguration) {
    431     defaultSSLConfiguration_ = sslConfiguration;
    432 }
     420HeadersMap &SNetworkHelper::defaultHeaders() {
     421    return m_defaultHeaders;
     422}
     423void SNetworkHelper::setDefaultHeaders(const HeadersMap &headers) {
     424    m_defaultHeaders = headers;
     425}
     426
     427QSslConfiguration &SNetworkHelper::defaultSSLConfiguration() {
     428    return m_defaultSSLConfiguration;
     429}
     430void SNetworkHelper::setDefaultSSLConfiguration(const QSslConfiguration &sslConfiguration) {
     431    m_defaultSSLConfiguration = sslConfiguration;
     432}
  • common/network/snetworkhelper.h

    r319 r382  
    6161    QNetworkAccessManager &networkAccessManager();
    6262
    63     SNetworkReply          syncGet(const QUrl& destination, SNetworkHelper::RedirectHandling redirectHandling = SNetworkHelper::rhHandleRedirects);
    64     SNetworkReply          syncGet(QNetworkRequest& request, SNetworkHelper::RedirectHandling redirectHandling = SNetworkHelper::rhHandleRedirects);
    65     SNetworkReply          asyncGet(const QUrl& destination);
    66     SNetworkReply          asyncGet(QNetworkRequest& request);
    67     SNetworkReply          syncPost(const QUrl& destination, QList<IParam*>& posts, SNetworkHelper::PostType postType = SNetworkHelper::ptUrlEncoded, SNetworkHelper::RedirectHandling redirectHandling = SNetworkHelper::rhHandleRedirects);
    68     SNetworkReply          syncPost(QNetworkRequest& request, QList<IParam*>& posts, SNetworkHelper::PostType postType = SNetworkHelper::ptUrlEncoded, SNetworkHelper::RedirectHandling redirectHandling = SNetworkHelper::rhHandleRedirects);
    69     SNetworkReply          asyncPost(const QUrl& destination, QList<IParam*>& posts, SNetworkHelper::PostType postType = SNetworkHelper::ptUrlEncoded);
    70     SNetworkReply          asyncPost(QNetworkRequest& request, QList<IParam*>& posts, SNetworkHelper::PostType postType = SNetworkHelper::ptUrlEncoded);
     63    SNetworkReply syncGet(const QUrl &destination, SNetworkHelper::RedirectHandling redirectHandling = SNetworkHelper::rhHandleRedirects);
     64    SNetworkReply syncGet(QNetworkRequest &request, SNetworkHelper::RedirectHandling redirectHandling = SNetworkHelper::rhHandleRedirects);
     65    SNetworkReply asyncGet(const QUrl &destination);
     66    SNetworkReply asyncGet(QNetworkRequest &request);
     67    SNetworkReply syncPost(const QUrl &destination, QList<IParam*> &posts, SNetworkHelper::PostType postType = SNetworkHelper::ptUrlEncoded, SNetworkHelper::RedirectHandling redirectHandling = SNetworkHelper::rhHandleRedirects);
     68    SNetworkReply syncPost(QNetworkRequest &request, QList<IParam*> &posts, SNetworkHelper::PostType postType = SNetworkHelper::ptUrlEncoded, SNetworkHelper::RedirectHandling redirectHandling = SNetworkHelper::rhHandleRedirects);
     69    SNetworkReply asyncPost(const QUrl &destination, QList<IParam*> &posts, SNetworkHelper::PostType postType = SNetworkHelper::ptUrlEncoded);
     70    SNetworkReply asyncPost(QNetworkRequest &request, QList<IParam*> &posts, SNetworkHelper::PostType postType = SNetworkHelper::ptUrlEncoded);
    7171
    72     void                   addTrustedCA(const QString& certFilename, QSsl::EncodingFormat format = QSsl::Pem);
     72    void addTrustedCA(const QString &certFilename, QSsl::EncodingFormat format = QSsl::Pem);
    7373
    74     static void            waitFor(const SNetworkReply& networkReply);
    75     SNetworkReply          handleRedirect(SNetworkReply reply, SNetworkHelper::RedirectHandling redirectHandling);
     74    static void waitFor(const SNetworkReply &networkReply);
     75    SNetworkReply handleRedirect(SNetworkReply reply, SNetworkHelper::RedirectHandling redirectHandling);
    7676
    77     QNetworkRequest        createDefaultRequest(const QUrl& url);
    78     QUrl                   getRedirectUrl(const SNetworkReply& reply);
     77    QNetworkRequest createDefaultRequest(const QUrl &url);
     78    QUrl getRedirectUrl(const SNetworkReply &reply);
    7979
    80     void                   clearCookies();
     80    void clearCookies();
    8181
    82     void                   attachDefaultHeaders(QNetworkRequest& request);
    83     void                   attachDefaultSSLConfiguration(QNetworkRequest& request);
     82    void attachDefaultHeaders(QNetworkRequest &request);
     83    void attachDefaultSSLConfiguration(QNetworkRequest &request);
    8484
    85     static QString         htmldecodeString(const QString& str);
    86     static QString         urldecodeString(const QString& str);
     85    static QString htmldecodeString(const QString &str);
     86    static QString urldecodeString(const QString &str);
    8787
    8888public:
    89     HeadersMap&            defaultHeaders();
    90     QSslConfiguration&     defaultSSLConfiguration();
     89    HeadersMap &defaultHeaders();
     90    QSslConfiguration &defaultSSLConfiguration();
    9191
    92     void                   setDefaultHeaders(const HeadersMap& headers);
    93     void                   setDefaultSSLConfiguration(const QSslConfiguration& sslConfiguration);
     92    void setDefaultHeaders(const HeadersMap &headers);
     93    void setDefaultSSLConfiguration(const QSslConfiguration &sslConfiguration);
    9494
    9595private:
    96     void                   initDefaultSSLConfiguration();
     96    void initDefaultSSLConfiguration();
    9797
    98     void                   adjustUrl(QUrl& url);
    99     QByteArray             paramsToEncoded(const QList<IParam*>& posts, SNetworkHelper::PostType postType);
    100     QUrl                   lastUrl();
     98    void adjustUrl(QUrl &url);
     99    QByteArray paramsToEncoded(const QList<IParam*> &posts, SNetworkHelper::PostType postType);
     100    QUrl lastUrl();
    101101
    102102private:
    103     static void                   fillEscapeChars();
     103    static void fillEscapeChars();
    104104    static QMap<QString, QString> escapeChars();
    105105
    106106private slots:
    107107    void onThreadTerminated();
    108     void onSslErrors(QNetworkReply* reply, const QList<QSslError>& errors);
     108    void onSslErrors(QNetworkReply *reply, const QList<QSslError> &errors);
    109109
    110110private:
    111111    const QString MULTIPART_BOUNDARY;
    112112
    113     QNetworkCookieJar *                      sharedCookieJar_;
    114     QMap<QThread *, QNetworkAccessManager *> networkAccessManager_;
    115     QMap<QNetworkAccessManager *, QUrl>      lastUrl_;
     113    QNetworkCookieJar *m_sharedCookieJar;
     114    QMap<QThread *, QNetworkAccessManager *> m_networkAccessManager;
     115    QMap<QNetworkAccessManager *, QUrl> m_lastUrl;
    116116
    117     HeadersMap        defaultHeaders_;
    118     QSslConfiguration defaultSSLConfiguration_;
     117    HeadersMap m_defaultHeaders;
     118    QSslConfiguration m_defaultSSLConfiguration;
    119119
    120     static QMap<QString, QString> escapeChars_;
     120    static QMap<QString, QString> m_escapeChars;
    121121};
    122122
     
    136136
    137137public:
    138     SKeyValueParam(const QByteArray& key, const QByteArray& value);
    139     SKeyValueParam(const SKeyValueParam& other);
     138    SKeyValueParam(const QByteArray &key, const QByteArray &value);
     139    SKeyValueParam(const SKeyValueParam &other);
    140140
    141141    QByteArray encode(SNetworkHelper::PostType postType) const;
     
    146146
    147147private:
    148     QByteArray key_;
    149     QByteArray value_;
     148    QByteArray m_key;
     149    QByteArray m_value;
    150150};
    151151
     
    153153class COMMON_EXPORT SFileParam : public SKeyValueParam {
    154154public:
    155     SFileParam(const QByteArray& key, const QByteArray& fileName, const QByteArray& fileType, const QByteArray& value);
    156     SFileParam(const SFileParam& other);
     155    SFileParam(const QByteArray &key, const QByteArray &fileName, const QByteArray &fileType, const QByteArray &value);
     156    SFileParam(const SFileParam &other);
    157157
    158158    QByteArray encode(SNetworkHelper::PostType postType) const;
     
    163163
    164164private:
    165     QByteArray fileName_;
    166     QByteArray fileType_;
     165    QByteArray m_fileName;
     166    QByteArray m_fileType;
    167167};
    168168
  • common/network/snetworkhelper_escapechars.cpp

    r316 r382  
    2121#include "snetworkreply.h"
    2222
    23 QMap<QString, QString> SNetworkHelper::escapeChars_;
    24 
    25 QString SNetworkHelper::htmldecodeString(const QString& str) {
     23QMap<QString, QString> SNetworkHelper::m_escapeChars;
     24
     25QString SNetworkHelper::htmldecodeString(const QString &str) {
    2626    QString s(str);
    2727    foreach (QString needle, escapeChars().keys()) {
     
    3131    return s;
    3232}
    33 QString SNetworkHelper::urldecodeString(const QString& str) {
     33QString SNetworkHelper::urldecodeString(const QString &str) {
    3434    QString s(str);
    3535
     
    4646
    4747QMap<QString, QString> SNetworkHelper::escapeChars() {
    48     if (escapeChars_.isEmpty()) {
     48    if (m_escapeChars.isEmpty()) {
    4949        fillEscapeChars();
    5050    }
    51     return escapeChars_;
     51    return m_escapeChars;
    5252}
    5353void SNetworkHelper::fillEscapeChars() {
    54     escapeChars_.clear();
     54    m_escapeChars.clear();
    5555
    5656    for (int i = 32; i <= 126; ++i) {
    57         escapeChars_.insert("&#" + QString::number(i) + ";", QChar::fromAscii(char(i)));
     57        m_escapeChars.insert("&#" + QString::number(i) + ";", QChar::fromAscii(char(i)));
    5858    }
    59     escapeChars_.insert("\\/", "/"); // No real html decode sequence but sometimes desired anyway
    60     escapeChars_.insert("&#8482;", QString::fromUtf8("™"));
    61     escapeChars_.insert("&euro;", QString::fromUtf8("€"));
    62     escapeChars_.insert("&nbsp;", " ");
    63     escapeChars_.insert("&#160;", " ");
    64     escapeChars_.insert("&quot;", "\"");
    65     escapeChars_.insert("&amp;", "&");
    66     escapeChars_.insert("&lt;", "<");
    67     escapeChars_.insert("&gt;", ">");
    68     escapeChars_.insert("&#161;", QString::fromUtf8("¡"));
    69     escapeChars_.insert("&iexcl;", QString::fromUtf8("¡"));
    70     escapeChars_.insert("&#162;", QString::fromUtf8("¢"));
    71     escapeChars_.insert("&cent;", QString::fromUtf8("¢"));
    72     escapeChars_.insert("&#163;", QString::fromUtf8("£"));
    73     escapeChars_.insert("&pound;", QString::fromUtf8("£"));
    74     escapeChars_.insert("&#164;", QString::fromUtf8("¤"));
    75     escapeChars_.insert("&curren;", QString::fromUtf8("¤"));
    76     escapeChars_.insert("&#165;", QString::fromUtf8("¥"));
    77     escapeChars_.insert("&yen;", QString::fromUtf8("¥"));
    78     escapeChars_.insert("&#166;", QString::fromUtf8("¦"));
    79     escapeChars_.insert("&brvbar;", QString::fromUtf8("¦"));
    80     escapeChars_.insert("&#167;", QString::fromUtf8("§"));
    81     escapeChars_.insert("&sect;", QString::fromUtf8("§"));
    82     escapeChars_.insert("&#168;", QString::fromUtf8("¨"));
    83     escapeChars_.insert("&uml;", QString::fromUtf8("¨"));
    84     escapeChars_.insert("&#169;", QString::fromUtf8("©"));
    85     escapeChars_.insert("&copy;", QString::fromUtf8("©"));
    86     escapeChars_.insert("&#170;", QString::fromUtf8("ª"));
    87     escapeChars_.insert("&ordf;", QString::fromUtf8("ª"));
    88     escapeChars_.insert("&#171;", QString::fromUtf8("«"));
    89     escapeChars_.insert("&#172;", QString::fromUtf8("¬"));
    90     escapeChars_.insert("&not;", QString::fromUtf8("¬"));
    91     escapeChars_.insert("&#173;", "­");
    92     escapeChars_.insert("&shy", "­");
    93     escapeChars_.insert("&#174;", QString::fromUtf8("®"));
    94     escapeChars_.insert("&reg;", QString::fromUtf8("®"));
    95     escapeChars_.insert("&#175;", QString::fromUtf8("¯"));
    96     escapeChars_.insert("&macr;", QString::fromUtf8("¯"));
    97     escapeChars_.insert("&#176;", QString::fromUtf8("°"));
    98     escapeChars_.insert("&deg;", QString::fromUtf8("°"));
    99     escapeChars_.insert("&#177;", QString::fromUtf8("±"));
    100     escapeChars_.insert("&plusmn;", QString::fromUtf8("±"));
    101     escapeChars_.insert("&#178;", QString::fromUtf8("²"));
    102     escapeChars_.insert("&sup2;", QString::fromUtf8("²"));
    103     escapeChars_.insert("&#179;", QString::fromUtf8("³"));
    104     escapeChars_.insert("&sup3;", QString::fromUtf8("³"));
    105     escapeChars_.insert("&#180;", QString::fromUtf8("´"));
    106     escapeChars_.insert("&acute;", QString::fromUtf8("´"));
    107     escapeChars_.insert("&#181;", QString::fromUtf8("µ"));
    108     escapeChars_.insert("&micro;", QString::fromUtf8("µ"));
    109     escapeChars_.insert("&#182;", QString::fromUtf8("¶"));
    110     escapeChars_.insert("&para;", QString::fromUtf8("¶"));
    111     escapeChars_.insert("&#183;", QString::fromUtf8("·"));
    112     escapeChars_.insert("&middot;", QString::fromUtf8("·"));
    113     escapeChars_.insert("&#184;", QString::fromUtf8("¸"));
    114     escapeChars_.insert("&cedil;", QString::fromUtf8("¸"));
    115     escapeChars_.insert("&#185;", QString::fromUtf8("¹"));
    116     escapeChars_.insert("&sup1;", QString::fromUtf8("¹"));
    117     escapeChars_.insert("&#186;", QString::fromUtf8("º"));
    118     escapeChars_.insert("&ordm;", QString::fromUtf8("º"));
    119     escapeChars_.insert("&#187;", QString::fromUtf8("»"));
    120     escapeChars_.insert("&raquo;", QString::fromUtf8("»"));
    121     escapeChars_.insert("&#188;", QString::fromUtf8("¼"));
    122     escapeChars_.insert("&frac14;", QString::fromUtf8("¼"));
    123     escapeChars_.insert("&#189;", QString::fromUtf8("½"));
    124     escapeChars_.insert("&frac12;", QString::fromUtf8("½"));
    125     escapeChars_.insert("&#190;", QString::fromUtf8("¾"));
    126     escapeChars_.insert("&frac34;", QString::fromUtf8("¾"));
    127     escapeChars_.insert("&#191;", QString::fromUtf8("¿"));
    128     escapeChars_.insert("&iquest;", QString::fromUtf8("¿"));
    129     escapeChars_.insert("&#192;", QString::fromUtf8("À"));
    130     escapeChars_.insert("&Agrave;", QString::fromUtf8("À"));
    131     escapeChars_.insert("&#193;", QString::fromUtf8("Á"));
    132     escapeChars_.insert("&Aacute;", QString::fromUtf8("Á"));
    133     escapeChars_.insert("&#194;", QString::fromUtf8("Â"));
    134     escapeChars_.insert("&Acirc;", QString::fromUtf8("Â"));
    135     escapeChars_.insert("&#195;", QString::fromUtf8("Ã"));
    136     escapeChars_.insert("&Atilde;", QString::fromUtf8("Ã"));
    137     escapeChars_.insert("&#196;", QString::fromUtf8("Ä"));
    138     escapeChars_.insert("&Auml;", QString::fromUtf8("Ä"));
    139     escapeChars_.insert("&#197;", QString::fromUtf8("Å"));
    140     escapeChars_.insert("&Aring;", QString::fromUtf8("Å"));
    141     escapeChars_.insert("&#198;", QString::fromUtf8("Æ"));
    142     escapeChars_.insert("&AElig;", QString::fromUtf8("Æ"));
    143     escapeChars_.insert("&#199;", QString::fromUtf8("Ç"));
    144     escapeChars_.insert("&Ccedil;", QString::fromUtf8("Ç"));
    145     escapeChars_.insert("&#200;", QString::fromUtf8("È"));
    146     escapeChars_.insert("&Egrave;", QString::fromUtf8("È"));
    147     escapeChars_.insert("&#201;", QString::fromUtf8("É"));
    148     escapeChars_.insert("&Eacute;", QString::fromUtf8("É"));
    149     escapeChars_.insert("&#202;", QString::fromUtf8("Ê"));
    150     escapeChars_.insert("&Ecirc;", QString::fromUtf8("Ê"));
    151     escapeChars_.insert("&#203;", QString::fromUtf8("Ë"));
    152     escapeChars_.insert("&Euml;", QString::fromUtf8("Ë"));
    153     escapeChars_.insert("&#204;", QString::fromUtf8("Ì"));
    154     escapeChars_.insert("&Igrave;", QString::fromUtf8("Ì"));
    155     escapeChars_.insert("&#205;", QString::fromUtf8("Í"));
    156     escapeChars_.insert("&Iacute;", QString::fromUtf8("Í"));
    157     escapeChars_.insert("&#206;", QString::fromUtf8("Î"));
    158     escapeChars_.insert("&Icirc;", QString::fromUtf8("Î"));
    159     escapeChars_.insert("&#207;", QString::fromUtf8("Ï"));
    160     escapeChars_.insert("&Iuml;", QString::fromUtf8("Ï"));
    161     escapeChars_.insert("&#208;", QString::fromUtf8("Ð"));
    162     escapeChars_.insert("&ETH;", QString::fromUtf8("Ð"));
    163     escapeChars_.insert("&#209;", QString::fromUtf8("Ñ"));
    164     escapeChars_.insert("&Ntilde;", QString::fromUtf8("Ñ"));
    165     escapeChars_.insert("&#210;", QString::fromUtf8("Ò"));
    166     escapeChars_.insert("&Ograve;", QString::fromUtf8("Ò"));
    167     escapeChars_.insert("&#211;", QString::fromUtf8("Ó"));
    168     escapeChars_.insert("&Oacute;", QString::fromUtf8("Ó"));
    169     escapeChars_.insert("&#212;", QString::fromUtf8("Ô"));
    170     escapeChars_.insert("&Ocirc;", QString::fromUtf8("Ô"));
    171     escapeChars_.insert("&#213;", QString::fromUtf8("Õ"));
    172     escapeChars_.insert("&Otilde;", QString::fromUtf8("Õ"));
    173     escapeChars_.insert("&#214;", QString::fromUtf8("Ö"));
    174     escapeChars_.insert("&Ouml;", QString::fromUtf8("Ö"));
    175     escapeChars_.insert("&#215;", QString::fromUtf8("×"));
    176     escapeChars_.insert("&times;", QString::fromUtf8("×"));
    177     escapeChars_.insert("&#216;", QString::fromUtf8("Ø"));
    178     escapeChars_.insert("&Oslash;", QString::fromUtf8("Ø"));
    179     escapeChars_.insert("&#217;", QString::fromUtf8("Ù"));
    180     escapeChars_.insert("&Ugrave;", QString::fromUtf8("Ù"));
    181     escapeChars_.insert("&#218;", QString::fromUtf8("Ú"));
    182     escapeChars_.insert("&Uacute;", QString::fromUtf8("Ú"));
    183     escapeChars_.insert("&#219;", QString::fromUtf8("Û"));
    184     escapeChars_.insert("&Ucirc;", QString::fromUtf8("Û"));
    185     escapeChars_.insert("&#220;", QString::fromUtf8("Ü"));
    186     escapeChars_.insert("&Uuml;", QString::fromUtf8("Ü"));
    187     escapeChars_.insert("&#221;", QString::fromUtf8("Ý"));
    188     escapeChars_.insert("&Yacute;", QString::fromUtf8("Ý"));
    189     escapeChars_.insert("&#222;", QString::fromUtf8("Þ"));
    190     escapeChars_.insert("&THORN;", QString::fromUtf8("Þ"));
    191     escapeChars_.insert("&#223;", QString::fromUtf8("ß"));
    192     escapeChars_.insert("&szlig;", QString::fromUtf8("ß"));
    193     escapeChars_.insert("&#224;", QString::fromUtf8("à"));
    194     escapeChars_.insert("&agrave;", QString::fromUtf8("à"));
    195     escapeChars_.insert("&#225;", QString::fromUtf8("á"));
    196     escapeChars_.insert("&aacute;", QString::fromUtf8("á"));
    197     escapeChars_.insert("&#226;", QString::fromUtf8("â"));
    198     escapeChars_.insert("&acirc;", QString::fromUtf8("â"));
    199     escapeChars_.insert("&#227;", QString::fromUtf8("ã"));
    200     escapeChars_.insert("&atilde;", QString::fromUtf8("ã"));
    201     escapeChars_.insert("&#228;", QString::fromUtf8("ä"));
    202     escapeChars_.insert("&auml;", QString::fromUtf8("ä"));
    203     escapeChars_.insert("&#229;", QString::fromUtf8("å"));
    204     escapeChars_.insert("&aring;", QString::fromUtf8("å"));
    205     escapeChars_.insert("&#230;", QString::fromUtf8("æ"));
    206     escapeChars_.insert("&aelig;", QString::fromUtf8("æ"));
    207     escapeChars_.insert("&#231;", QString::fromUtf8("ç"));
    208     escapeChars_.insert("&ccedil;", QString::fromUtf8("ç"));
    209     escapeChars_.insert("&#232;", QString::fromUtf8("è"));
    210     escapeChars_.insert("&egrave;", QString::fromUtf8("è"));
    211     escapeChars_.insert("&#233;", QString::fromUtf8("é"));
    212     escapeChars_.insert("&eacute;", QString::fromUtf8("é"));
    213     escapeChars_.insert("&#234;", QString::fromUtf8("ê"));
    214     escapeChars_.insert("&ecirc;", QString::fromUtf8("ê"));
    215     escapeChars_.insert("&#235;", QString::fromUtf8("ë"));
    216     escapeChars_.insert("&euml;", QString::fromUtf8("ë"));
    217     escapeChars_.insert("&#236;", QString::fromUtf8("ì"));
    218     escapeChars_.insert("&igrave;", QString::fromUtf8("ì"));
    219     escapeChars_.insert("&#237;", QString::fromUtf8("í"));
    220     escapeChars_.insert("&iacute;", QString::fromUtf8("í"));
    221     escapeChars_.insert("&#238;", QString::fromUtf8("î"));
    222     escapeChars_.insert("&icirc;", QString::fromUtf8("î"));
    223     escapeChars_.insert("&#239;", QString::fromUtf8("ï"));
    224     escapeChars_.insert("&iuml;", QString::fromUtf8("ï"));
    225     escapeChars_.insert("&#240;", QString::fromUtf8("ð"));
    226     escapeChars_.insert("&eth;", QString::fromUtf8("ð"));
    227     escapeChars_.insert("&#241;", QString::fromUtf8("ñ"));
    228     escapeChars_.insert("&ntilde;", QString::fromUtf8("ñ"));
    229     escapeChars_.insert("&#242;", QString::fromUtf8("ò"));
    230     escapeChars_.insert("&ograve;", QString::fromUtf8("ò"));
    231     escapeChars_.insert("&#243;", QString::fromUtf8("ó"));
    232     escapeChars_.insert("&oacute;", QString::fromUtf8("ó"));
    233     escapeChars_.insert("&#244;", QString::fromUtf8("ô"));
    234     escapeChars_.insert("&ocirc;", QString::fromUtf8("ô"));
    235     escapeChars_.insert("&#245;", QString::fromUtf8("õ"));
    236     escapeChars_.insert("&otilde;", QString::fromUtf8("õ"));
    237     escapeChars_.insert("&#246;", QString::fromUtf8("ö"));
    238     escapeChars_.insert("&ouml;", QString::fromUtf8("ö"));
    239     escapeChars_.insert("&#247;", QString::fromUtf8("÷"));
    240     escapeChars_.insert("&divide;", QString::fromUtf8("÷"));
    241     escapeChars_.insert("&#248;", QString::fromUtf8("ø"));
    242     escapeChars_.insert("&oslash;", QString::fromUtf8("ø"));
    243     escapeChars_.insert("&#249;", QString::fromUtf8("ù"));
    244     escapeChars_.insert("&ugrave;", QString::fromUtf8("ù"));
    245     escapeChars_.insert("&#250;", QString::fromUtf8("ú"));
    246     escapeChars_.insert("&uacute;", QString::fromUtf8("ú"));
    247     escapeChars_.insert("&#251;", QString::fromUtf8("û"));
    248     escapeChars_.insert("&ucirc;", QString::fromUtf8("û"));
    249     escapeChars_.insert("&#252;", QString::fromUtf8("ü"));
    250     escapeChars_.insert("&uuml;", QString::fromUtf8("ü"));
    251     escapeChars_.insert("&#253;", QString::fromUtf8("ý"));
    252     escapeChars_.insert("&yacute;", QString::fromUtf8("ý"));
    253     escapeChars_.insert("&#254;", QString::fromUtf8("þ"));
    254     escapeChars_.insert("&thorn;", QString::fromUtf8("þ"));
    255     escapeChars_.insert("&#255;", QString::fromUtf8("ÿ"));
    256     escapeChars_.insert("&#256;", QString::fromUtf8("Ā"));
    257     escapeChars_.insert("&#257;", QString::fromUtf8("ā"));
    258     escapeChars_.insert("&#258;", QString::fromUtf8("Ă"));
    259     escapeChars_.insert("&#259;", QString::fromUtf8("ă"));
    260     escapeChars_.insert("&#260;", QString::fromUtf8("Ą"));
    261     escapeChars_.insert("&#261;", QString::fromUtf8("ą"));
    262     escapeChars_.insert("&#262;", QString::fromUtf8("Ć"));
    263     escapeChars_.insert("&#263;", QString::fromUtf8("ć"));
    264     escapeChars_.insert("&#264;", QString::fromUtf8("Ĉ"));
    265     escapeChars_.insert("&#265;", QString::fromUtf8("ĉ"));
    266     escapeChars_.insert("&#266;", QString::fromUtf8("Ċ"));
    267     escapeChars_.insert("&#267;", QString::fromUtf8("ċ"));
    268     escapeChars_.insert("&#268;", QString::fromUtf8("Č"));
    269     escapeChars_.insert("&#269;", QString::fromUtf8("č"));
    270     escapeChars_.insert("&#270;", QString::fromUtf8("Ď"));
    271     escapeChars_.insert("&#271;", QString::fromUtf8("ď"));
    272     escapeChars_.insert("&#272;", QString::fromUtf8("Đ"));
    273     escapeChars_.insert("&#273;", QString::fromUtf8("đ"));
    274     escapeChars_.insert("&#274;", QString::fromUtf8("Ē"));
    275     escapeChars_.insert("&#275;", QString::fromUtf8("ē"));
    276     escapeChars_.insert("&#276;", QString::fromUtf8("Ĕ"));
    277     escapeChars_.insert("&#277;", QString::fromUtf8("ĕ"));
    278     escapeChars_.insert("&#278;", QString::fromUtf8("Ė"));
    279     escapeChars_.insert("&#279;", QString::fromUtf8("ė"));
    280     escapeChars_.insert("&#280;", QString::fromUtf8("Ę"));
    281     escapeChars_.insert("&#281;", QString::fromUtf8("ę"));
    282     escapeChars_.insert("&#282;", QString::fromUtf8("Ě"));
    283     escapeChars_.insert("&#283;", QString::fromUtf8("ě"));
    284     escapeChars_.insert("&#284;", QString::fromUtf8("Ĝ"));
    285     escapeChars_.insert("&#285;", QString::fromUtf8("ĝ"));
    286     escapeChars_.insert("&#286;", QString::fromUtf8("Ğ"));
    287     escapeChars_.insert("&#287;", QString::fromUtf8("ğ"));
    288     escapeChars_.insert("&#288;", QString::fromUtf8("Ġ"));
    289     escapeChars_.insert("&#289;", QString::fromUtf8("ġ"));
    290     escapeChars_.insert("&#290;", QString::fromUtf8("Ģ"));
    291     escapeChars_.insert("&#291;", QString::fromUtf8("ģ"));
    292     escapeChars_.insert("&#292;", QString::fromUtf8("Ĥ"));
    293     escapeChars_.insert("&#293;", QString::fromUtf8("ĥ"));
    294     escapeChars_.insert("&#294;", QString::fromUtf8("Ħ"));
    295     escapeChars_.insert("&#295;", QString::fromUtf8("ħ"));
    296     escapeChars_.insert("&#296;", QString::fromUtf8("Ĩ"));
    297     escapeChars_.insert("&#297;", QString::fromUtf8("ĩ"));
    298     escapeChars_.insert("&#298;", QString::fromUtf8("Ī"));
    299     escapeChars_.insert("&#299;", QString::fromUtf8("ī"));
    300     escapeChars_.insert("&#300;", QString::fromUtf8("Ĭ"));
    301     escapeChars_.insert("&#301;", QString::fromUtf8("ĭ"));
    302     escapeChars_.insert("&#302;", QString::fromUtf8("Į"));
    303     escapeChars_.insert("&#303;", QString::fromUtf8("į"));
    304     escapeChars_.insert("&#304;", QString::fromUtf8("İ"));
    305     escapeChars_.insert("&#305;", QString::fromUtf8("ı"));
    306     escapeChars_.insert("&#306;", QString::fromUtf8("IJ"));
    307     escapeChars_.insert("&#307;", QString::fromUtf8("ij"));
    308     escapeChars_.insert("&#308;", QString::fromUtf8("Ĵ"));
    309     escapeChars_.insert("&#309;", QString::fromUtf8("ĵ"));
    310     escapeChars_.insert("&#310;", QString::fromUtf8("Ķ"));
    311     escapeChars_.insert("&#311;", QString::fromUtf8("ķ"));
    312     escapeChars_.insert("&#312;", QString::fromUtf8("ĸ"));
    313     escapeChars_.insert("&#313;", QString::fromUtf8("Ĺ"));
    314     escapeChars_.insert("&#314;", QString::fromUtf8("ĺ"));
    315     escapeChars_.insert("&#315;", QString::fromUtf8("Ļ"));
    316     escapeChars_.insert("&#316;", QString::fromUtf8("ļ"));
    317     escapeChars_.insert("&#317;", QString::fromUtf8("Ľ"));
    318     escapeChars_.insert("&#318;", QString::fromUtf8("ľ"));
    319     escapeChars_.insert("&#319;", QString::fromUtf8("Ŀ"));
    320     escapeChars_.insert("&#320;", QString::fromUtf8("ŀ"));
    321     escapeChars_.insert("&#321;", QString::fromUtf8("Ł"));
    322     escapeChars_.insert("&#322;", QString::fromUtf8("ł"));
    323     escapeChars_.insert("&#323;", QString::fromUtf8("Ń"));
    324     escapeChars_.insert("&#324;", QString::fromUtf8("ń"));
    325     escapeChars_.insert("&#325;", QString::fromUtf8("Ņ"));
    326     escapeChars_.insert("&#326;", QString::fromUtf8("ņ"));
    327     escapeChars_.insert("&#327;", QString::fromUtf8("Ň"));
    328     escapeChars_.insert("&#328;", QString::fromUtf8("ň"));
    329     escapeChars_.insert("&#329;", QString::fromUtf8("ʼn"));
    330     escapeChars_.insert("&#330;", QString::fromUtf8("Ŋ"));
    331     escapeChars_.insert("&#331;", QString::fromUtf8("ŋ"));
    332     escapeChars_.insert("&#332;", QString::fromUtf8("Ō"));
    333     escapeChars_.insert("&#333;", QString::fromUtf8("ō"));
    334     escapeChars_.insert("&#334;", QString::fromUtf8("Ŏ"));
    335     escapeChars_.insert("&#335;", QString::fromUtf8("ŏ"));
    336     escapeChars_.insert("&#336;", QString::fromUtf8("Ő"));
    337     escapeChars_.insert("&#337;", QString::fromUtf8("ő"));
    338     escapeChars_.insert("&#338;", QString::fromUtf8("Œ"));
    339     escapeChars_.insert("&#339;", QString::fromUtf8("œ"));
    340     escapeChars_.insert("&#340;", QString::fromUtf8("Ŕ"));
    341     escapeChars_.insert("&#341;", QString::fromUtf8("ŕ"));
    342     escapeChars_.insert("&#342;", QString::fromUtf8("Ŗ"));
    343     escapeChars_.insert("&#343;", QString::fromUtf8("ŗ"));
    344     escapeChars_.insert("&#344;", QString::fromUtf8("Ř"));
    345     escapeChars_.insert("&#345;", QString::fromUtf8("ř"));
    346     escapeChars_.insert("&#346;", QString::fromUtf8("Ś"));
    347     escapeChars_.insert("&#347;", QString::fromUtf8("ś"));
    348     escapeChars_.insert("&#348;", QString::fromUtf8("Ŝ"));
    349     escapeChars_.insert("&#349;", QString::fromUtf8("ŝ"));
    350     escapeChars_.insert("&#350;", QString::fromUtf8("Ş"));
    351     escapeChars_.insert("&#351;", QString::fromUtf8("ş"));
    352     escapeChars_.insert("&#352;", QString::fromUtf8("Š"));
    353     escapeChars_.insert("&#353;", QString::fromUtf8("š"));
    354     escapeChars_.insert("&#354;", QString::fromUtf8("Ţ"));
    355     escapeChars_.insert("&#355;", QString::fromUtf8("ţ"));
    356     escapeChars_.insert("&#356;", QString::fromUtf8("Ť"));
    357     escapeChars_.insert("&#357;", QString::fromUtf8("ť"));
    358     escapeChars_.insert("&#358;", QString::fromUtf8("Ŧ"));
    359     escapeChars_.insert("&#359;", QString::fromUtf8("ŧ"));
    360     escapeChars_.insert("&#360;", QString::fromUtf8("Ũ"));
    361     escapeChars_.insert("&#361;", QString::fromUtf8("ũ"));
    362     escapeChars_.insert("&#362;", QString::fromUtf8("Ū"));
    363     escapeChars_.insert("&#363;", QString::fromUtf8("ū"));
    364     escapeChars_.insert("&#364;", QString::fromUtf8("Ŭ"));
    365     escapeChars_.insert("&#365;", QString::fromUtf8("ŭ"));
    366     escapeChars_.insert("&#366;", QString::fromUtf8("Ů"));
    367     escapeChars_.insert("&#367;", QString::fromUtf8("ů"));
    368     escapeChars_.insert("&#368;", QString::fromUtf8("Ű"));
    369     escapeChars_.insert("&#369;", QString::fromUtf8("ű"));
    370     escapeChars_.insert("&#370;", QString::fromUtf8("Ų"));
    371     escapeChars_.insert("&#371;", QString::fromUtf8("ų"));
    372     escapeChars_.insert("&#372;", QString::fromUtf8("Ŵ"));
    373     escapeChars_.insert("&#373;", QString::fromUtf8("ŵ"));
    374     escapeChars_.insert("&#374;", QString::fromUtf8("Ŷ"));
    375     escapeChars_.insert("&#375;", QString::fromUtf8("ŷ"));
    376     escapeChars_.insert("&#376;", QString::fromUtf8("Ÿ"));
    377     escapeChars_.insert("&#377;", QString::fromUtf8("Ź"));
    378     escapeChars_.insert("&#378;", QString::fromUtf8("ź"));
    379     escapeChars_.insert("&#379;", QString::fromUtf8("Ż"));
    380     escapeChars_.insert("&#380;", QString::fromUtf8("ż"));
    381     escapeChars_.insert("&#381;", QString::fromUtf8("Ž"));
    382     escapeChars_.insert("&#382;", QString::fromUtf8("ž"));
    383     escapeChars_.insert("&#383;", QString::fromUtf8("ſ"));
    384     escapeChars_.insert("&#340;", QString::fromUtf8("Ŕ"));
    385     escapeChars_.insert("&#341;", QString::fromUtf8("ŕ"));
    386     escapeChars_.insert("&#342;", QString::fromUtf8("Ŗ"));
    387     escapeChars_.insert("&#343;", QString::fromUtf8("ŗ"));
    388     escapeChars_.insert("&#344;", QString::fromUtf8("Ř"));
    389     escapeChars_.insert("&#345;", QString::fromUtf8("ř"));
    390     escapeChars_.insert("&#346;", QString::fromUtf8("Ś"));
    391     escapeChars_.insert("&#347;", QString::fromUtf8("ś"));
    392     escapeChars_.insert("&#348;", QString::fromUtf8("Ŝ"));
    393     escapeChars_.insert("&#349;", QString::fromUtf8("ŝ"));
    394     escapeChars_.insert("&#350;", QString::fromUtf8("Ş"));
    395     escapeChars_.insert("&#351;", QString::fromUtf8("ş"));
    396     escapeChars_.insert("&#352;", QString::fromUtf8("Š"));
    397     escapeChars_.insert("&#353;", QString::fromUtf8("š"));
    398     escapeChars_.insert("&#354;", QString::fromUtf8("Ţ"));
    399     escapeChars_.insert("&#355;", QString::fromUtf8("ţ"));
    400     escapeChars_.insert("&#356;", QString::fromUtf8("Ť"));
    401     escapeChars_.insert("&#577;", QString::fromUtf8("ť"));
    402     escapeChars_.insert("&#358;", QString::fromUtf8("Ŧ"));
    403     escapeChars_.insert("&#359;", QString::fromUtf8("ŧ"));
    404     escapeChars_.insert("&#360;", QString::fromUtf8("Ũ"));
    405     escapeChars_.insert("&#361;", QString::fromUtf8("ũ"));
    406     escapeChars_.insert("&#362;", QString::fromUtf8("Ū"));
    407     escapeChars_.insert("&#363;", QString::fromUtf8("ū"));
    408     escapeChars_.insert("&#364;", QString::fromUtf8("Ŭ"));
    409     escapeChars_.insert("&#365;", QString::fromUtf8("ŭ"));
    410     escapeChars_.insert("&#366;", QString::fromUtf8("Ů"));
    411     escapeChars_.insert("&#367;", QString::fromUtf8("ů"));
    412     escapeChars_.insert("&#368;", QString::fromUtf8("Ű"));
    413     escapeChars_.insert("&#369;", QString::fromUtf8("ű"));
    414     escapeChars_.insert("&#370;", QString::fromUtf8("Ų"));
    415     escapeChars_.insert("&#371;", QString::fromUtf8("ų"));
    416     escapeChars_.insert("&#372;", QString::fromUtf8("Ŵ"));
    417     escapeChars_.insert("&#373;", QString::fromUtf8("ŵ"));
    418     escapeChars_.insert("&#374;", QString::fromUtf8("Ŷ"));
    419     escapeChars_.insert("&#375;", QString::fromUtf8("ŷ"));
    420     escapeChars_.insert("&#376;", QString::fromUtf8("Ÿ"));
    421     escapeChars_.insert("&#377;", QString::fromUtf8("Ź"));
    422     escapeChars_.insert("&#378;", QString::fromUtf8("ź"));
    423     escapeChars_.insert("&#379;", QString::fromUtf8("Ż"));
    424     escapeChars_.insert("&#380;", QString::fromUtf8("ż"));
    425     escapeChars_.insert("&#381;", QString::fromUtf8("Ž"));
    426     escapeChars_.insert("&#382;", QString::fromUtf8("ž"));
    427     escapeChars_.insert("&#383;", QString::fromUtf8("ſ"));
     59    m_escapeChars.insert("\\/", "/"); // No real html decode sequence but sometimes desired anyway
     60    m_escapeChars.insert("&#8482;", QString::fromUtf8("™"));
     61    m_escapeChars.insert("&euro;", QString::fromUtf8("€"));
     62    m_escapeChars.insert("&nbsp;", " ");
     63    m_escapeChars.insert("&#160;", " ");
     64    m_escapeChars.insert("&quot;", "\"");
     65    m_escapeChars.insert("&amp;", "&");
     66    m_escapeChars.insert("&lt;", "<");
     67    m_escapeChars.insert("&gt;", ">");
     68    m_escapeChars.insert("&#161;", QString::fromUtf8("¡"));
     69    m_escapeChars.insert("&iexcl;", QString::fromUtf8("¡"));
     70    m_escapeChars.insert("&#162;", QString::fromUtf8("¢"));
     71    m_escapeChars.insert("&cent;", QString::fromUtf8("¢"));
     72    m_escapeChars.insert("&#163;", QString::fromUtf8("£"));
     73    m_escapeChars.insert("&pound;", QString::fromUtf8("£"));
     74    m_escapeChars.insert("&#164;", QString::fromUtf8("¤"));
     75    m_escapeChars.insert("&curren;", QString::fromUtf8("¤"));
     76    m_escapeChars.insert("&#165;", QString::fromUtf8("¥"));
     77    m_escapeChars.insert("&yen;", QString::fromUtf8("¥"));
     78    m_escapeChars.insert("&#166;", QString::fromUtf8("¦"));
     79    m_escapeChars.insert("&brvbar;", QString::fromUtf8("¦"));
     80    m_escapeChars.insert("&#167;", QString::fromUtf8("§"));
     81    m_escapeChars.insert("&sect;", QString::fromUtf8("§"));
     82    m_escapeChars.insert("&#168;", QString::fromUtf8("¨"));
     83    m_escapeChars.insert("&uml;", QString::fromUtf8("¨"));
     84    m_escapeChars.insert("&#169;", QString::fromUtf8("©"));
     85    m_escapeChars.insert("&copy;", QString::fromUtf8("©"));
     86    m_escapeChars.insert("&#170;", QString::fromUtf8("ª"));
     87    m_escapeChars.insert("&ordf;", QString::fromUtf8("ª"));
     88    m_escapeChars.insert("&#171;", QString::fromUtf8("«"));
     89    m_escapeChars.insert("&#172;", QString::fromUtf8("¬"));
     90    m_escapeChars.insert("&not;", QString::fromUtf8("¬"));
     91    m_escapeChars.insert("&#173;", "­");
     92    m_escapeChars.insert("&shy", "­");
     93    m_escapeChars.insert("&#174;", QString::fromUtf8("®"));
     94    m_escapeChars.insert("&reg;", QString::fromUtf8("®"));
     95    m_escapeChars.insert("&#175;", QString::fromUtf8("¯"));
     96    m_escapeChars.insert("&macr;", QString::fromUtf8("¯"));
     97    m_escapeChars.insert("&#176;", QString::fromUtf8("°"));
     98    m_escapeChars.insert("&deg;", QString::fromUtf8("°"));
     99    m_escapeChars.insert("&#177;", QString::fromUtf8("±"));
     100    m_escapeChars.insert("&plusmn;", QString::fromUtf8("±"));
     101    m_escapeChars.insert("&#178;", QString::fromUtf8("²"));
     102    m_escapeChars.insert("&sup2;", QString::fromUtf8("²"));
     103    m_escapeChars.insert("&#179;", QString::fromUtf8("³"));
     104    m_escapeChars.insert("&sup3;", QString::fromUtf8("³"));
     105    m_escapeChars.insert("&#180;", QString::fromUtf8("´"));
     106    m_escapeChars.insert("&acute;", QString::fromUtf8("´"));
     107    m_escapeChars.insert("&#181;", QString::fromUtf8("µ"));
     108    m_escapeChars.insert("&micro;", QString::fromUtf8("µ"));
     109    m_escapeChars.insert("&#182;", QString::fromUtf8("¶"));
     110    m_escapeChars.insert("&para;", QString::fromUtf8("¶"));
     111    m_escapeChars.insert("&#183;", QString::fromUtf8("·"));
     112    m_escapeChars.insert("&middot;", QString::fromUtf8("·"));
     113    m_escapeChars.insert("&#184;", QString::fromUtf8("¸"));
     114    m_escapeChars.insert("&cedil;", QString::fromUtf8("¸"));
     115    m_escapeChars.insert("&#185;", QString::fromUtf8("¹"));
     116    m_escapeChars.insert("&sup1;", QString::fromUtf8("¹"));
     117    m_escapeChars.insert("&#186;", QString::fromUtf8("º"));
     118    m_escapeChars.insert("&ordm;", QString::fromUtf8("º"));
     119    m_escapeChars.insert("&#187;", QString::fromUtf8("»"));
     120    m_escapeChars.insert("&raquo;", QString::fromUtf8("»"));
     121    m_escapeChars.insert("&#188;", QString::fromUtf8("¼"));
     122    m_escapeChars.insert("&frac14;", QString::fromUtf8("¼"));
     123    m_escapeChars.insert("&#189;", QString::fromUtf8("½"));
     124    m_escapeChars.insert("&frac12;", QString::fromUtf8("½"));
     125    m_escapeChars.insert("&#190;", QString::fromUtf8("¾"));
     126    m_escapeChars.insert("&frac34;", QString::fromUtf8("¾"));
     127    m_escapeChars.insert("&#191;", QString::fromUtf8("¿"));
     128    m_escapeChars.insert("&iquest;", QString::fromUtf8("¿"));
     129    m_escapeChars.insert("&#192;", QString::fromUtf8("À"));
     130    m_escapeChars.insert("&Agrave;", QString::fromUtf8("À"));
     131    m_escapeChars.insert("&#193;", QString::fromUtf8("Á"));
     132    m_escapeChars.insert("&Aacute;", QString::fromUtf8("Á"));
     133    m_escapeChars.insert("&#194;", QString::fromUtf8("Â"));
     134    m_escapeChars.insert("&Acirc;", QString::fromUtf8("Â"));
     135    m_escapeChars.insert("&#195;", QString::fromUtf8("Ã"));
     136    m_escapeChars.insert("&Atilde;", QString::fromUtf8("Ã"));
     137    m_escapeChars.insert("&#196;", QString::fromUtf8("Ä"));
     138    m_escapeChars.insert("&Auml;", QString::fromUtf8("Ä"));
     139    m_escapeChars.insert("&#197;", QString::fromUtf8("Å"));
     140    m_escapeChars.insert("&Aring;", QString::fromUtf8("Å"));
     141    m_escapeChars.insert("&#198;", QString::fromUtf8("Æ"));
     142    m_escapeChars.insert("&AElig;", QString::fromUtf8("Æ"));
     143    m_escapeChars.insert("&#199;", QString::fromUtf8("Ç"));
     144    m_escapeChars.insert("&Ccedil;", QString::fromUtf8("Ç"));
     145    m_escapeChars.insert("&#200;", QString::fromUtf8("È"));
     146    m_escapeChars.insert("&Egrave;", QString::fromUtf8("È"));
     147    m_escapeChars.insert("&#201;", QString::fromUtf8("É"));
     148    m_escapeChars.insert("&Eacute;", QString::fromUtf8("É"));
     149    m_escapeChars.insert("&#202;", QString::fromUtf8("Ê"));
     150    m_escapeChars.insert("&Ecirc;", QString::fromUtf8("Ê"));
     151    m_escapeChars.insert("&#203;", QString::fromUtf8("Ë"));
     152    m_escapeChars.insert("&Euml;", QString::fromUtf8("Ë"));
     153    m_escapeChars.insert("&#204;", QString::fromUtf8("Ì"));
     154    m_escapeChars.insert("&Igrave;", QString::fromUtf8("Ì"));
     155    m_escapeChars.insert("&#205;", QString::fromUtf8("Í"));
     156    m_escapeChars.insert("&Iacute;", QString::fromUtf8("Í"));
     157    m_escapeChars.insert("&#206;", QString::fromUtf8("Î"));
     158    m_escapeChars.insert("&Icirc;", QString::fromUtf8("Î"));
     159    m_escapeChars.insert("&#207;", QString::fromUtf8("Ï"));
     160    m_escapeChars.insert("&Iuml;", QString::fromUtf8("Ï"));
     161    m_escapeChars.insert("&#208;", QString::fromUtf8("Ð"));
     162    m_escapeChars.insert("&ETH;", QString::fromUtf8("Ð"));
     163    m_escapeChars.insert("&#209;", QString::fromUtf8("Ñ"));
     164    m_escapeChars.insert("&Ntilde;", QString::fromUtf8("Ñ"));
     165    m_escapeChars.insert("&#210;", QString::fromUtf8("Ò"));
     166    m_escapeChars.insert("&Ograve;", QString::fromUtf8("Ò"));
     167    m_escapeChars.insert("&#211;", QString::fromUtf8("Ó"));
     168    m_escapeChars.insert("&Oacute;", QString::fromUtf8("Ó"));
     169    m_escapeChars.insert("&#212;", QString::fromUtf8("Ô"));
     170    m_escapeChars.insert("&Ocirc;", QString::fromUtf8("Ô"));
     171    m_escapeChars.insert("&#213;", QString::fromUtf8("Õ"));
     172    m_escapeChars.insert("&Otilde;", QString::fromUtf8("Õ"));
     173    m_escapeChars.insert("&#214;", QString::fromUtf8("Ö"));
     174    m_escapeChars.insert("&Ouml;", QString::fromUtf8("Ö"));
     175    m_escapeChars.insert("&#215;", QString::fromUtf8("×"));
     176    m_escapeChars.insert("&times;", QString::fromUtf8("×"));
     177    m_escapeChars.insert("&#216;", QString::fromUtf8("Ø"));
     178    m_escapeChars.insert("&Oslash;", QString::fromUtf8("Ø"));
     179    m_escapeChars.insert("&#217;", QString::fromUtf8("Ù"));
     180    m_escapeChars.insert("&Ugrave;", QString::fromUtf8("Ù"));
     181    m_escapeChars.insert("&#218;", QString::fromUtf8("Ú"));
     182    m_escapeChars.insert("&Uacute;", QString::fromUtf8("Ú"));
     183    m_escapeChars.insert("&#219;", QString::fromUtf8("Û"));
     184    m_escapeChars.insert("&Ucirc;", QString::fromUtf8("Û"));
     185    m_escapeChars.insert("&#220;", QString::fromUtf8("Ü"));
     186    m_escapeChars.insert("&Uuml;", QString::fromUtf8("Ü"));
     187    m_escapeChars.insert("&#221;", QString::fromUtf8("Ý"));
     188    m_escapeChars.insert("&Yacute;", QString::fromUtf8("Ý"));
     189    m_escapeChars.insert("&#222;", QString::fromUtf8("Þ"));
     190    m_escapeChars.insert("&THORN;", QString::fromUtf8("Þ"));
     191    m_escapeChars.insert("&#223;", QString::fromUtf8("ß"));
     192    m_escapeChars.insert("&szlig;", QString::fromUtf8("ß"));
     193    m_escapeChars.insert("&#224;", QString::fromUtf8("à"));
     194    m_escapeChars.insert("&agrave;", QString::fromUtf8("à"));
     195    m_escapeChars.insert("&#225;", QString::fromUtf8("á"));
     196    m_escapeChars.insert("&aacute;", QString::fromUtf8("á"));
     197    m_escapeChars.insert("&#226;", QString::fromUtf8("â"));
     198    m_escapeChars.insert("&acirc;", QString::fromUtf8("â"));
     199    m_escapeChars.insert("&#227;", QString::fromUtf8("ã"));
     200    m_escapeChars.insert("&atilde;", QString::fromUtf8("ã"));
     201    m_escapeChars.insert("&#228;", QString::fromUtf8("ä"));
     202    m_escapeChars.insert("&auml;", QString::fromUtf8("ä"));
     203    m_escapeChars.insert("&#229;", QString::fromUtf8("å"));
     204    m_escapeChars.insert("&aring;", QString::fromUtf8("å"));
     205    m_escapeChars.insert("&#230;", QString::fromUtf8("æ"));
     206    m_escapeChars.insert("&aelig;", QString::fromUtf8("æ"));
     207    m_escapeChars.insert("&#231;", QString::fromUtf8("ç"));
     208    m_escapeChars.insert("&ccedil;", QString::fromUtf8("ç"));
     209    m_escapeChars.insert("&#232;", QString::fromUtf8("è"));
     210    m_escapeChars.insert("&egrave;", QString::fromUtf8("è"));
     211    m_escapeChars.insert("&#233;", QString::fromUtf8("é"));
     212    m_escapeChars.insert("&eacute;", QString::fromUtf8("é"));
     213    m_escapeChars.insert("&#234;", QString::fromUtf8("ê"));
     214    m_escapeChars.insert("&ecirc;", QString::fromUtf8("ê"));
     215    m_escapeChars.insert("&#235;", QString::fromUtf8("ë"));
     216    m_escapeChars.insert("&euml;", QString::fromUtf8("ë"));
     217    m_escapeChars.insert("&#236;", QString::fromUtf8("ì"));
     218    m_escapeChars.insert("&igrave;", QString::fromUtf8("ì"));
     219    m_escapeChars.insert("&#237;", QString::fromUtf8("í"));
     220    m_escapeChars.insert("&iacute;", QString::fromUtf8("í"));
     221    m_escapeChars.insert("&#238;", QString::fromUtf8("î"));
     222    m_escapeChars.insert("&icirc;", QString::fromUtf8("î"));
     223    m_escapeChars.insert("&#239;", QString::fromUtf8("ï"));
     224    m_escapeChars.insert("&iuml;", QString::fromUtf8("ï"));
     225    m_escapeChars.insert("&#240;", QString::fromUtf8("ð"));
     226    m_escapeChars.insert("&eth;", QString::fromUtf8("ð"));
     227    m_escapeChars.insert("&#241;", QString::fromUtf8("ñ"));
     228    m_escapeChars.insert("&ntilde;", QString::fromUtf8("ñ"));
     229    m_escapeChars.insert("&#242;", QString::fromUtf8("ò"));
     230    m_escapeChars.insert("&ograve;", QString::fromUtf8("ò"));
     231    m_escapeChars.insert("&#243;", QString::fromUtf8("ó"));
     232    m_escapeChars.insert("&oacute;", QString::fromUtf8("ó"));
     233    m_escapeChars.insert("&#244;", QString::fromUtf8("ô"));
     234    m_escapeChars.insert("&ocirc;", QString::fromUtf8("ô"));
     235    m_escapeChars.insert("&#245;", QString::fromUtf8("õ"));
     236    m_escapeChars.insert("&otilde;", QString::fromUtf8("õ"));
     237    m_escapeChars.insert("&#246;", QString::fromUtf8("ö"));
     238    m_escapeChars.insert("&ouml;", QString::fromUtf8("ö"));
     239    m_escapeChars.insert("&#247;", QString::fromUtf8("÷"));
     240    m_escapeChars.insert("&divide;", QString::fromUtf8("÷"));
     241    m_escapeChars.insert("&#248;", QString::fromUtf8("ø"));
     242    m_escapeChars.insert("&oslash;", QString::fromUtf8("ø"));
     243    m_escapeChars.insert("&#249;", QString::fromUtf8("ù"));
     244    m_escapeChars.insert("&ugrave;", QString::fromUtf8("ù"));
     245    m_escapeChars.insert("&#250;", QString::fromUtf8("ú"));
     246    m_escapeChars.insert("&uacute;", QString::fromUtf8("ú"));
     247    m_escapeChars.insert("&#251;", QString::fromUtf8("û"));
     248    m_escapeChars.insert("&ucirc;", QString::fromUtf8("û"));
     249    m_escapeChars.insert("&#252;", QString::fromUtf8("ü"));
     250    m_escapeChars.insert("&uuml;", QString::fromUtf8("ü"));
     251    m_escapeChars.insert("&#253;", QString::fromUtf8("ý"));
     252    m_escapeChars.insert("&yacute;", QString::fromUtf8("ý"));
     253    m_escapeChars.insert("&#254;", QString::fromUtf8("þ"));
     254    m_escapeChars.insert("&thorn;", QString::fromUtf8("þ"));
     255    m_escapeChars.insert("&#255;", QString::fromUtf8("ÿ"));
     256    m_escapeChars.insert("&#256;", QString::fromUtf8("Ā"));
     257    m_escapeChars.insert("&#257;", QString::fromUtf8("ā"));
     258    m_escapeChars.insert("&#258;", QString::fromUtf8("Ă"));
     259    m_escapeChars.insert("&#259;", QString::fromUtf8("ă"));
     260    m_escapeChars.insert("&#260;", QString::fromUtf8("Ą"));
     261    m_escapeChars.insert("&#261;", QString::fromUtf8("ą"));
     262    m_escapeChars.insert("&#262;", QString::fromUtf8("Ć"));
     263    m_escapeChars.insert("&#263;", QString::fromUtf8("ć"));
     264    m_escapeChars.insert("&#264;", QString::fromUtf8("Ĉ"));
     265    m_escapeChars.insert("&#265;", QString::fromUtf8("ĉ"));
     266    m_escapeChars.insert("&#266;", QString::fromUtf8("Ċ"));
     267    m_escapeChars.insert("&#267;", QString::fromUtf8("ċ"));
     268    m_escapeChars.insert("&#268;", QString::fromUtf8("Č"));
     269    m_escapeChars.insert("&#269;", QString::fromUtf8("č"));
     270    m_escapeChars.insert("&#270;", QString::fromUtf8("Ď"));
     271    m_escapeChars.insert("&#271;", QString::fromUtf8("ď"));
     272    m_escapeChars.insert("&#272;", QString::fromUtf8("Đ"));
     273    m_escapeChars.insert("&#273;", QString::fromUtf8("đ"));
     274    m_escapeChars.insert("&#274;", QString::fromUtf8("Ē"));
     275    m_escapeChars.insert("&#275;", QString::fromUtf8("ē"));
     276    m_escapeChars.insert("&#276;", QString::fromUtf8("Ĕ"));
     277    m_escapeChars.insert("&#277;", QString::fromUtf8("ĕ"));
     278    m_escapeChars.insert("&#278;", QString::fromUtf8("Ė"));
     279    m_escapeChars.insert("&#279;", QString::fromUtf8("ė"));
     280    m_escapeChars.insert("&#280;", QString::fromUtf8("Ę"));
     281    m_escapeChars.insert("&#281;", QString::fromUtf8("ę"));
     282    m_escapeChars.insert("&#282;", QString::fromUtf8("Ě"));
     283    m_escapeChars.insert("&#283;", QString::fromUtf8("ě"));
     284    m_escapeChars.insert("&#284;", QString::fromUtf8("Ĝ"));
     285    m_escapeChars.insert("&#285;", QString::fromUtf8("ĝ"));
     286    m_escapeChars.insert("&#286;", QString::fromUtf8("Ğ"));
     287    m_escapeChars.insert("&#287;", QString::fromUtf8("ğ"));
     288    m_escapeChars.insert("&#288;", QString::fromUtf8("Ġ"));
     289    m_escapeChars.insert("&#289;", QString::fromUtf8("ġ"));
     290    m_escapeChars.insert("&#290;", QString::fromUtf8("Ģ"));
     291    m_escapeChars.insert("&#291;", QString::fromUtf8("ģ"));
     292    m_escapeChars.insert("&#292;", QString::fromUtf8("Ĥ"));
     293    m_escapeChars.insert("&#293;", QString::fromUtf8("ĥ"));
     294    m_escapeChars.insert("&#294;", QString::fromUtf8("Ħ"));
     295    m_escapeChars.insert("&#295;", QString::fromUtf8("ħ"));
     296    m_escapeChars.insert("&#296;", QString::fromUtf8("Ĩ"));
     297    m_escapeChars.insert("&#297;", QString::fromUtf8("ĩ"));
     298    m_escapeChars.insert("&#298;", QString::fromUtf8("Ī"));
     299    m_escapeChars.insert("&#299;", QString::fromUtf8("ī"));
     300    m_escapeChars.insert("&#300;", QString::fromUtf8("Ĭ"));
     301    m_escapeChars.insert("&#301;", QString::fromUtf8("ĭ"));
     302    m_escapeChars.insert("&#302;", QString::fromUtf8("Į"));
     303    m_escapeChars.insert("&#303;", QString::fromUtf8("į"));
     304    m_escapeChars.insert("&#304;", QString::fromUtf8("İ"));
     305    m_escapeChars.insert("&#305;", QString::fromUtf8("ı"));
     306    m_escapeChars.insert("&#306;", QString::fromUtf8("IJ"));
     307    m_escapeChars.insert("&#307;", QString::fromUtf8("ij"));
     308    m_escapeChars.insert("&#308;", QString::fromUtf8("Ĵ"));
     309    m_escapeChars.insert("&#309;", QString::fromUtf8("ĵ"));
     310    m_escapeChars.insert("&#310;", QString::fromUtf8("Ķ"));
     311    m_escapeChars.insert("&#311;", QString::fromUtf8("ķ"));
     312    m_escapeChars.insert("&#312;", QString::fromUtf8("ĸ"));
     313    m_escapeChars.insert("&#313;", QString::fromUtf8("Ĺ"));
     314    m_escapeChars.insert("&#314;", QString::fromUtf8("ĺ"));
     315    m_escapeChars.insert("&#315;", QString::fromUtf8("Ļ"));
     316    m_escapeChars.insert("&#316;", QString::fromUtf8("ļ"));
     317    m_escapeChars.insert("&#317;", QString::fromUtf8("Ľ"));
     318    m_escapeChars.insert("&#318;", QString::fromUtf8("ľ"));
     319    m_escapeChars.insert("&#319;", QString::fromUtf8("Ŀ"));
     320    m_escapeChars.insert("&#320;", QString::fromUtf8("ŀ"));
     321    m_escapeChars.insert("&#321;", QString::fromUtf8("Ł"));
     322    m_escapeChars.insert("&#322;", QString::fromUtf8("ł"));
     323    m_escapeChars.insert("&#323;", QString::fromUtf8("Ń"));
     324    m_escapeChars.insert("&#324;", QString::fromUtf8("ń"));
     325    m_escapeChars.insert("&#325;", QString::fromUtf8("Ņ"));
     326    m_escapeChars.insert("&#326;", QString::fromUtf8("ņ"));
     327    m_escapeChars.insert("&#327;", QString::fromUtf8("Ň"));
     328    m_escapeChars.insert("&#328;", QString::fromUtf8("ň"));
     329    m_escapeChars.insert("&#329;", QString::fromUtf8("ʼn"));
     330    m_escapeChars.insert("&#330;", QString::fromUtf8("Ŋ"));
     331    m_escapeChars.insert("&#331;", QString::fromUtf8("ŋ"));
     332    m_escapeChars.insert("&#332;", QString::fromUtf8("Ō"));
     333    m_escapeChars.insert("&#333;", QString::fromUtf8("ō"));
     334    m_escapeChars.insert("&#334;", QString::fromUtf8("Ŏ"));
     335    m_escapeChars.insert("&#335;", QString::fromUtf8("ŏ"));
     336    m_escapeChars.insert("&#336;", QString::fromUtf8("Ő"));
     337    m_escapeChars.insert("&#337;", QString::fromUtf8("ő"));
     338    m_escapeChars.insert("&#338;", QString::fromUtf8("Œ"));
     339    m_escapeChars.insert("&#339;", QString::fromUtf8("œ"));
     340    m_escapeChars.insert("&#340;", QString::fromUtf8("Ŕ"));
     341    m_escapeChars.insert("&#341;", QString::fromUtf8("ŕ"));
     342    m_escapeChars.insert("&#342;", QString::fromUtf8("Ŗ"));
     343    m_escapeChars.insert("&#343;", QString::fromUtf8("ŗ"));
     344    m_escapeChars.insert("&#344;", QString::fromUtf8("Ř"));
     345    m_escapeChars.insert("&#345;", QString::fromUtf8("ř"));
     346    m_escapeChars.insert("&#346;", QString::fromUtf8("Ś"));
     347    m_escapeChars.insert("&#347;", QString::fromUtf8("ś"));
     348    m_escapeChars.insert("&#348;", QString::fromUtf8("Ŝ"));
     349    m_escapeChars.insert("&#349;", QString::fromUtf8("ŝ"));
     350    m_escapeChars.insert("&#350;", QString::fromUtf8("Ş"));
     351    m_escapeChars.insert("&#351;", QString::fromUtf8("ş"));
     352    m_escapeChars.insert("&#352;", QString::fromUtf8("Š"));
     353    m_escapeChars.insert("&#353;", QString::fromUtf8("š"));
     354    m_escapeChars.insert("&#354;", QString::fromUtf8("Ţ"));
     355    m_escapeChars.insert("&#355;", QString::fromUtf8("ţ"));
     356    m_escapeChars.insert("&#356;", QString::fromUtf8("Ť"));
     357    m_escapeChars.insert("&#357;", QString::fromUtf8("ť"));
     358    m_escapeChars.insert("&#358;", QString::fromUtf8("Ŧ"));
     359    m_escapeChars.insert("&#359;", QString::fromUtf8("ŧ"));
     360    m_escapeChars.insert("&#360;", QString::fromUtf8("Ũ"));
     361    m_escapeChars.insert("&#361;", QString::fromUtf8("ũ"));
     362    m_escapeChars.insert("&#362;", QString::fromUtf8("Ū"));
     363    m_escapeChars.insert("&#363;", QString::fromUtf8("ū"));
     364    m_escapeChars.insert("&#364;", QString::fromUtf8("Ŭ"));
     365    m_escapeChars.insert("&#365;", QString::fromUtf8("ŭ"));
     366    m_escapeChars.insert("&#366;", QString::fromUtf8("Ů"));
     367    m_escapeChars.insert("&#367;", QString::fromUtf8("ů"));
     368    m_escapeChars.insert("&#368;", QString::fromUtf8("Ű"));
     369    m_escapeChars.insert("&#369;", QString::fromUtf8("ű"));
     370    m_escapeChars.insert("&#370;", QString::fromUtf8("Ų"));
     371    m_escapeChars.insert("&#371;", QString::fromUtf8("ų"));
     372    m_escapeChars.insert("&#372;", QString::fromUtf8("Ŵ"));
     373    m_escapeChars.insert("&#373;", QString::fromUtf8("ŵ"));
     374    m_escapeChars.insert("&#374;", QString::fromUtf8("Ŷ"));
     375    m_escapeChars.insert("&#375;", QString::fromUtf8("ŷ"));
     376    m_escapeChars.insert("&#376;", QString::fromUtf8("Ÿ"));
     377    m_escapeChars.insert("&#377;", QString::fromUtf8("Ź"));
     378    m_escapeChars.insert("&#378;", QString::fromUtf8("ź"));
     379    m_escapeChars.insert("&#379;", QString::fromUtf8("Ż"));
     380    m_escapeChars.insert("&#380;", QString::fromUtf8("ż"));
     381    m_escapeChars.insert("&#381;", QString::fromUtf8("Ž"));
     382    m_escapeChars.insert("&#382;", QString::fromUtf8("ž"));
     383    m_escapeChars.insert("&#383;", QString::fromUtf8("ſ"));
     384    m_escapeChars.insert("&#340;", QString::fromUtf8("Ŕ"));
     385    m_escapeChars.insert("&#341;", QString::fromUtf8("ŕ"));
     386    m_escapeChars.insert("&#342;", QString::fromUtf8("Ŗ"));
     387    m_escapeChars.insert("&#343;", QString::fromUtf8("ŗ"));
     388    m_escapeChars.insert("&#344;", QString::fromUtf8("Ř"));
     389    m_escapeChars.insert("&#345;", QString::fromUtf8("ř"));
     390    m_escapeChars.insert("&#346;", QString::fromUtf8("Ś"));
     391    m_escapeChars.insert("&#347;", QString::fromUtf8("ś"));
     392    m_escapeChars.insert("&#348;", QString::fromUtf8("Ŝ"));
     393    m_escapeChars.insert("&#349;", QString::fromUtf8("ŝ"));
     394    m_escapeChars.insert("&#350;", QString::fromUtf8("Ş"));
     395    m_escapeChars.insert("&#351;", QString::fromUtf8("ş"));
     396    m_escapeChars.insert("&#352;", QString::fromUtf8("Š"));
     397    m_escapeChars.insert("&#353;", QString::fromUtf8("š"));
     398    m_escapeChars.insert("&#354;", QString::fromUtf8("Ţ"));
     399    m_escapeChars.insert("&#355;", QString::fromUtf8("ţ"));
     400    m_escapeChars.insert("&#356;", QString::fromUtf8("Ť"));
     401    m_escapeChars.insert("&#577;", QString::fromUtf8("ť"));
     402    m_escapeChars.insert("&#358;", QString::fromUtf8("Ŧ"));
     403    m_escapeChars.insert("&#359;", QString::fromUtf8("ŧ"));
     404    m_escapeChars.insert("&#360;", QString::fromUtf8("Ũ"));
     405    m_escapeChars.insert("&#361;", QString::fromUtf8("ũ"));
     406    m_escapeChars.insert("&#362;", QString::fromUtf8("Ū"));
     407    m_escapeChars.insert("&#363;", QString::fromUtf8("ū"));
     408    m_escapeChars.insert("&#364;", QString::fromUtf8("Ŭ"));
     409    m_escapeChars.insert("&#365;", QString::fromUtf8("ŭ"));
     410    m_escapeChars.insert("&#366;", QString::fromUtf8("Ů"));
     411    m_escapeChars.insert("&#367;", QString::fromUtf8("ů"));
     412    m_escapeChars.insert("&#368;", QString::fromUtf8("Ű"));
     413    m_escapeChars.insert("&#369;", QString::fromUtf8("ű"));
     414    m_escapeChars.insert("&#370;", QString::fromUtf8("Ų"));
     415    m_escapeChars.insert("&#371;", QString::fromUtf8("ų"));
     416    m_escapeChars.insert("&#372;", QString::fromUtf8("Ŵ"));
     417    m_escapeChars.insert("&#373;", QString::fromUtf8("ŵ"));
     418    m_escapeChars.insert("&#374;", QString::fromUtf8("Ŷ"));
     419    m_escapeChars.insert("&#375;", QString::fromUtf8("ŷ"));
     420    m_escapeChars.insert("&#376;", QString::fromUtf8("Ÿ"));
     421    m_escapeChars.insert("&#377;", QString::fromUtf8("Ź"));
     422    m_escapeChars.insert("&#378;", QString::fromUtf8("ź"));
     423    m_escapeChars.insert("&#379;", QString::fromUtf8("Ż"));
     424    m_escapeChars.insert("&#380;", QString::fromUtf8("ż"));
     425    m_escapeChars.insert("&#381;", QString::fromUtf8("Ž"));
     426    m_escapeChars.insert("&#382;", QString::fromUtf8("ž"));
     427    m_escapeChars.insert("&#383;", QString::fromUtf8("ſ"));
    428428}
  • common/network/snetworkhelper_params.cpp

    r316 r382  
    1919#include "snetworkhelper.h"
    2020
    21 SKeyValueParam::SKeyValueParam(const QByteArray& key, const QByteArray& value)
    22     : key_(key)
    23     , value_(value)
     21SKeyValueParam::SKeyValueParam(const QByteArray &key, const QByteArray &value)
     22    : m_key(key)
     23    , m_value(value)
    2424{
    2525}
     
    4444
    4545QByteArray SKeyValueParam::key() const {
    46     return key_;
     46    return m_key;
    4747}
    4848QByteArray SKeyValueParam::value() const {
    49     return value_;
     49    return m_value;
    5050}
    5151
    5252/**************************************************/
    5353
    54 SFileParam::SFileParam(const QByteArray& key, const QByteArray& fileName, const QByteArray& fileType, const QByteArray& value)
     54SFileParam::SFileParam(const QByteArray &key, const QByteArray &fileName, const QByteArray &fileType, const QByteArray &value)
    5555    : SKeyValueParam(key, value)
    56     , fileName_(fileName)
    57     , fileType_(fileType)
     56    , m_fileName(fileName)
     57    , m_fileType(fileType)
    5858{
    5959}
     
    7171
    7272QByteArray SFileParam::fileName() const {
    73     return fileName_;
     73    return m_fileName;
    7474}
    7575QByteArray SFileParam::fileType() const {
    76     return fileType_;
     76    return m_fileType;
    7777}
  • common/network/snetworkreply.cpp

    r316 r382  
    2626{
    2727}
    28 SNetworkReply::SNetworkReply(const void* nullPtr)
     28SNetworkReply::SNetworkReply(const void *nullPtr)
    2929    : d(NULL)
    3030{
     
    3232    Q_ASSERT(nullPtr == NULL); /* Do not use this for anything else than assigning NULL! */
    3333}
    34 SNetworkReply::SNetworkReply(QNetworkReply* reply)
     34SNetworkReply::SNetworkReply(QNetworkReply *reply)
    3535    : d(new SNetworkReplyData)
    3636{
    3737    d->init(reply, *this);
    3838}
    39 SNetworkReply::SNetworkReply(const SNetworkReply& other)
     39SNetworkReply::SNetworkReply(const SNetworkReply &other)
    4040    : d(other.d)
    4141{
     
    4444}
    4545
    46 SNetworkReply& SNetworkReply::operator =(const SNetworkReply& other) {
     46SNetworkReply &SNetworkReply::operator =(const SNetworkReply &other) {
    4747    d = other.d;
    4848    return *this;
    4949}
    50 bool SNetworkReply::operator ==(const SNetworkReply& other) const {
     50bool SNetworkReply::operator ==(const SNetworkReply &other) const {
    5151    return d == other.d;
    5252}
    53 SNetworkReply::operator QObject* () const {
     53SNetworkReply::operator QObject *() const {
    5454    return d->networkReply;
    5555}
    56 SNetworkReply::operator QNetworkReply* () const {
     56SNetworkReply::operator QNetworkReply *() const {
    5757    return d->networkReply;
    5858}
    59 QNetworkReply* SNetworkReply::operator ->() {
     59QNetworkReply *SNetworkReply::operator ->() {
    6060    return d->networkReply;
    6161}
    62 QNetworkReply* SNetworkReply::operator ->() const {
     62QNetworkReply *SNetworkReply::operator ->() const {
    6363    return d->networkReply;
    6464}
     
    7373
    7474
    75 SNetworkReplyDataSignalHelper::SNetworkReplyDataSignalHelper(SNetworkReplyData* dataInstance)
     75SNetworkReplyDataSignalHelper::SNetworkReplyDataSignalHelper(SNetworkReplyData *dataInstance)
    7676    : QObject()
    77     , dataInstance_(dataInstance)
     77    , m_dataInstance(dataInstance)
    7878{
    79     connect(dataInstance_->networkReply, SIGNAL(finished()), this, SLOT(releaseOwnInstance()));
    80     connect(dataInstance_->networkReply->manager(), SIGNAL(destroyed(QObject*)), this, SLOT(releaseOwnInstance()));
     79    connect(m_dataInstance->networkReply, SIGNAL(finished()), this, SLOT(releaseOwnInstance()));
     80    connect(m_dataInstance->networkReply->manager(), SIGNAL(destroyed(QObject*)), this, SLOT(releaseOwnInstance()));
    8181}
    8282
    8383void SNetworkReplyDataSignalHelper::releaseOwnInstance() {
    84     dataInstance_->ownInstance_.reset();
     84    m_dataInstance->m_ownInstance.reset();
    8585}
    8686
     
    8888SNetworkReplyData::SNetworkReplyData()
    8989    : networkReply(NULL)
    90     , signalHelper_(NULL)
     90    , m_signalHelper(NULL)
    9191{
    9292}
    9393
    94 void SNetworkReplyData::init(QNetworkReply* reply, SNetworkReply backRef) {
     94void SNetworkReplyData::init(QNetworkReply *reply, SNetworkReply backRef) {
    9595    networkReply = reply;
    9696    networkReply->setParent(NULL); // to not get autodeleted when the network access manager gets deleted (would lead to double-deletion)
    9797    if (!networkReply->isFinished()) {
    9898        // hold reference to ourself so that if noone else holds a reference, the network reply not gets autodeleted until the request has finished
    99         ownInstance_ = backRef;
     99        m_ownInstance = backRef;
    100100
    101         signalHelper_ = new SNetworkReplyDataSignalHelper(this);
     101        m_signalHelper = new SNetworkReplyDataSignalHelper(this);
    102102    }
    103103}
    104104SNetworkReplyData::~SNetworkReplyData() {
    105     delete signalHelper_;
     105    delete m_signalHelper;
    106106    if (networkReply) {
    107107        networkReply->deleteLater();
  • common/network/snetworkreply.h

    r319 r382  
    3535
    3636public:
    37     SNetworkReply(QNetworkReply* reply);
     37    SNetworkReply(QNetworkReply *reply);
    3838    ~SNetworkReply();
    3939
     
    4242
    4343public:
    44     operator QNetworkReply* () const;
    45     QNetworkReply* operator->();
    46     QNetworkReply* operator->() const;
     44    operator QNetworkReply *() const;
     45    QNetworkReply *operator->();
     46    QNetworkReply *operator->() const;
    4747};
    4848COMMON_EXPORT S_QHASH(SNetworkReply)
  • common/network/snetworkreply_p.h

    r319 r382  
    3333    ~SNetworkReplyData();
    3434
    35     void init(QNetworkReply* reply, SNetworkReply backRef);
     35    void init(QNetworkReply *reply, SNetworkReply backRef);
    3636
    3737public:
    38     QNetworkReply* networkReply;
     38    QNetworkReply *networkReply;
    3939
    4040private:
    41     SNetworkReplyDataSignalHelper* signalHelper_;
    42     SNetworkReply ownInstance_;
     41    SNetworkReplyDataSignalHelper *m_signalHelper;
     42    SNetworkReply m_ownInstance;
    4343};
    4444
     
    5151
    5252public:
    53     SNetworkReplyDataSignalHelper(SNetworkReplyData* dataInstance);
     53    SNetworkReplyDataSignalHelper(SNetworkReplyData *dataInstance);
    5454
    5555private slots:
     
    5757
    5858private:
    59     SNetworkReplyData* dataInstance_;
     59    SNetworkReplyData *m_dataInstance;
    6060};
    6161
  • common/persistence/imainstorage_base.h

    r319 r382  
    3131class IBaseMainStorage : public IDatabase::Storage {
    3232public:
    33     virtual QVariant     readValue(const QString &_namespace, const QString &key, const QVariant &defaultValue = QVariant()) =0;
    34     virtual bool         readBool(const QString &_namespace, const QString &key, bool defaultValue = false) =0;
    35     virtual int          readInt(const QString &_namespace, const QString &key, int defaultValue = 0) =0;
    36     virtual QString      readString(const QString &_namespace, const QString &key, const QString &defaultValue = QString()) =0;
    37     virtual QString      readEncryptedString(const QString &_namespace, const QString &key, const QString &password, const QString &defaultValue = "") =0;
     33    virtual QVariant readValue(const QString &_namespace, const QString &key, const QVariant &defaultValue = QVariant()) =0;
     34    virtual bool readBool(const QString &_namespace, const QString &key, bool defaultValue = false) =0;
     35    virtual int readInt(const QString &_namespace, const QString &key, int defaultValue = 0) =0;
     36    virtual QString readString(const QString &_namespace, const QString &key, const QString &defaultValue = QString()) =0;
     37    virtual QString readEncryptedString(const QString &_namespace, const QString &key, const QString &password, const QString &defaultValue = "") =0;
    3838
    3939    virtual void writeValue(const QString &_namespace, const QString &key, const QVariant &value) =0;
  • common/persistence/impl/versionedstorage.cpp

    r364 r382  
    3333}
    3434
    35 void VersionedStorage::init(const QSqlDatabase& db) {
     35void VersionedStorage::init(const QSqlDatabase &db) {
    3636    m_database = db;
    3737
  • common/utils/smacros.h

    r319 r382  
    3131
    3232#define S_QHASH(Class) \
    33 uint qHash(const Class& ref);
     33uint qHash(const Class &ref);
    3434
    3535// --
     
    4141
    4242#define S_QHASH_IMPL(Class) \
    43 uint qHash(const Class& ref) { \
     43uint qHash(const Class &ref) { \
    4444    Q_ASSERT(ref); \
    4545    return qHash(QString(#Class)) ^ qHash<Class##Data>(ref.d.data()); \
     
    5050/*#define S_SINGLETON(Class) \
    5151public: \
    52     static Class* instance(); \
     52    static Class *instance(); \
    5353\
    5454protected: \
    5555    Class(); \
    56     Class(const Class& other); \
    57     bool operator =(const Class& other); \
     56    Class(const Class &other); \
     57    bool operator =(const Class &other); \
    5858\
    5959private: \
    60     static Class* instance_; \
     60    static Class *m_instance; \
    6161\
    6262    class CGuard { \
     
    6464        ~CGuard() { \
    6565            if (Class::instance_) { \
    66                 delete Class::instance_; \
     66                delete Class::m_instance; \
    6767                Class::instance_ = NULL; \
    6868            } \
     
    7474
    7575#define S_SINGLETON_IMPL(Class) \
    76 Class* Class::instance_ = NULL; \
    77 Class* Class::instance() { \
     76Class *Class::instance_ = NULL; \
     77Class *Class::instance() { \
    7878    static CGuard guard; /-* To delete the instance at the end *-/ \
    7979    QMutexLocker locker(&guard.mutex); \
     
    8181        instance_ = new Class; \
    8282    } \
    83     return instance_; \
     83    return m_instance; \
    8484}*/
    8585
     
    9999private: \
    100100    Class(); \
    101     Class(const Class& other); \
    102     bool operator =(const Class& other); \
     101    Class(const Class &other); \
     102    bool operator =(const Class &other); \
    103103\
    104104private: \
  • common/utils/sshared.h

    r319 r382  
    4040ConstructorVisibility: \
    4141    Class(); \
    42     Class(const void* nullPtr); /* To be able to assign NULL */ \
    43     Class(const Class& other); \
     42    Class(const void *nullPtr); /* To be able to assign NULL */ \
     43    Class(const Class &other); \
    4444\
    4545public: \
     
    4747    bool operator !() const { return !(operator bool()); } \
    4848\
    49     bool operator <(const Class& other) const { return d.data() < other.d.data(); } \
    50     bool operator ==(const Class& other) const; \
    51     bool operator !=(const Class& other) const { return !(operator ==(other)); } \
     49    bool operator <(const Class &other) const { return d.data() < other.d.data(); } \
     50    bool operator ==(const Class &other) const; \
     51    bool operator !=(const Class &other) const { return !(operator ==(other)); } \
    5252\
    53     Class& operator =(const Class& other); \
     53    Class &operator =(const Class &other); \
    5454\
    55     operator QObject* () const; \
     55    operator QObject *() const; \
    5656\
    5757private: \
     
    6464    : d(new Class##Data) \
    6565{} \
    66 Class::Class(const void* nullPtr) \
     66Class::Class(const void *nullPtr) \
    6767    : d(NULL) \
    6868{ \
     
    7070    Q_ASSERT(nullPtr == NULL); /* Do not use this for anything else than assigning NULL! */ \
    7171} \
    72 Class::Class(const Class& other) \
     72Class::Class(const Class &other) \
    7373    : d(other.d) \
    7474{} \
    75 Class& Class::operator =(const Class& other) { \
     75Class &Class::operator =(const Class &other) { \
    7676    d = other.d; \
    7777    return *this; \
    7878} \
    79 Class::operator QObject* () const { \
     79Class::operator QObject *() const { \
    8080    return d.data(); \
    8181}
     
    8585#define S_SHARED_IMPL(Class) \
    8686S_SHARED_IMPL_WITHOUT_EQUALS(Class) \
    87 bool Class::operator ==(const Class& other) const { return d == other.d; }
     87bool Class::operator ==(const Class &other) const { return d == other.d; }
    8888
    8989#endif /* COMMON_UTILS_SSHARED_H */
  • common/utils/staskmanager.cpp

    r316 r382  
    2525
    2626STaskManager::STaskManager()
    27     : tasksMutex_(QMutex::Recursive)
    28     , tornDown_(false)
     27    : m_tasksMutex(QMutex::Recursive)
     28    , m_tornDown(false)
    2929{
    3030    moveToThread(qApp->thread());
     
    3333}
    3434STaskManager::~STaskManager() {
    35     QMutexLocker locker(&tasksMutex_);
    36 
    37     foreach (STask* task, taskQueue_) {
     35    QMutexLocker locker(&m_tasksMutex);
     36
     37    foreach (STask *task, m_taskQueue) {
    3838        task->deleteLater();
    3939    }
    40     taskQueue_.clear();
    41 
    42     foreach (STask* task, runningTasks_) {
     40    m_taskQueue.clear();
     41
     42    foreach (STask *task, m_runningTasks) {
    4343        disconnect(task, 0, this, 0);
    4444        connect(task, SIGNAL(finished(STask*)), task, SLOT(deleteLater()), Qt::DirectConnection);
    4545    }
    46     runningTasks_.clear();
     46    m_runningTasks.clear();
    4747}
    4848
     
    5252 */
    5353void STaskManager::tearDown() {
    54     QMutexLocker locker(&tasksMutex_);
    55 
    56     tornDown_ = true;
     54    QMutexLocker locker(&m_tasksMutex);
     55
     56    m_tornDown = true;
    5757
    5858    // Remove waiting tasks
    59     while (!taskQueue_.isEmpty()) {
    60         taskQueue_.takeFirst()->deleteLater();
     59    while (!m_taskQueue.isEmpty()) {
     60        m_taskQueue.takeFirst()->deleteLater();
    6161    }
    6262
    6363    // Cancel running tasks
    64     foreach (STask* task, runningTasks_) {
     64    foreach (STask *task, m_runningTasks) {
    6565        task->cancel();
    6666    }
     
    6969    locker.unlock();
    7070    int runs = 0;
    71     while (!runningTasks_.isEmpty() && (runs < 10)) {
     71    while (!m_runningTasks.isEmpty() && (runs < 10)) {
    7272        QEventLoop eventLoop;
    7373        connect(this, SIGNAL(taskFinished(STask *)), &eventLoop, SLOT(quit()));
     
    8282 * Takes ownership of the task
    8383 */
    84 void STaskManager::addTaskToQueue(STask* task) {
     84void STaskManager::addTaskToQueue(STask *task) {
    8585    if (!task) { // Don't accept null tasks
    8686        return;
    8787    }
    8888
    89     if (tornDown_) { // After tear-down no new tasks are accepted anymore
     89    if (m_tornDown) { // After tear-down no new tasks are accepted anymore
    9090        return;
    9191    }
    9292
    93     QMutexLocker locker(&tasksMutex_);
    94 
    95     if (!taskQueue_.contains(task) && !runningTasks_.contains(task)) {
     93    QMutexLocker locker(&m_tasksMutex);
     94
     95    if (!m_taskQueue.contains(task) && !m_runningTasks.contains(task)) {
    9696        task->moveToThread(thread()); // Move to our thread
    9797
    98         taskQueue_.append(task);
     98        m_taskQueue.append(task);
    9999
    100100        locker.unlock();
     
    107107 * Attention: this does not change the ownership of the task!
    108108 */
    109 void STaskManager::removeTaskFromQueue(STask* task) {
    110     QMutexLocker locker(&tasksMutex_);
    111 
    112     if (taskQueue_.contains(task)) {
    113         taskQueue_.removeAll(task);
     109void STaskManager::removeTaskFromQueue(STask *task) {
     110    QMutexLocker locker(&m_tasksMutex);
     111
     112    if (m_taskQueue.contains(task)) {
     113        m_taskQueue.removeAll(task);
    114114
    115115        locker.unlock();
     
    118118}
    119119
    120 bool STaskManager::hasTaskUnderControl(STask* task) const {
    121     QMutexLocker locker(&tasksMutex_);
     120bool STaskManager::hasTaskUnderControl(STask *task) const {
     121    QMutexLocker locker(&m_tasksMutex);
    122122
    123123    return queuedTasks().contains(task) ||
     
    126126
    127127QList<STask*> STaskManager::queuedTasks() const {
    128     QMutexLocker locker(&tasksMutex_);
    129 
    130     return taskQueue_;
     128    QMutexLocker locker(&m_tasksMutex);
     129
     130    return m_taskQueue;
    131131}
    132132QList<STask*> STaskManager::runningTasks() const {
    133     QMutexLocker locker(&tasksMutex_);
    134 
    135     return runningTasks_;
     133    QMutexLocker locker(&m_tasksMutex);
     134
     135    return m_runningTasks;
    136136}
    137137
     
    144144 * @return The list of tasks with the same uid and namespace
    145145 */
    146 QList<STask*> STaskManager::runningTasksOfThisType(uint uid, const QString& nmespace) const {
    147     QMutexLocker locker(&tasksMutex_);
     146QList<STask*> STaskManager::runningTasksOfThisType(uint uid, const QString &nmespace) const {
     147    QMutexLocker locker(&m_tasksMutex);
    148148
    149149    QList<STask*> tasks;
    150     foreach (STask* task, runningTasks()) {
     150    foreach (STask *task, runningTasks()) {
    151151        if ((task->uid() == uid) && (task->nmespace() == nmespace)) {
    152152            tasks.append(task);
     
    157157
    158158void STaskManager::startTasks() {
    159     QMutexLocker locker(&tasksMutex_);
    160 
    161     STask* runnableTask = NULL;
    162     foreach (STask* task, queuedTasks()) {
     159    QMutexLocker locker(&m_tasksMutex);
     160
     161    STask *runnableTask = NULL;
     162    foreach (STask *task, queuedTasks()) {
    163163        if (task->isRunning()) continue;
    164164        if (!isTaskRunnable(task)) continue;
     
    169169
    170170    if (runnableTask) {
    171         taskQueue_.removeAll(runnableTask);
    172         runningTasks_.append(runnableTask);
     171        m_taskQueue.removeAll(runnableTask);
     172        m_runningTasks.append(runnableTask);
    173173
    174174        connect(runnableTask, SIGNAL(finished(STask*)), this, SLOT(onTaskFinished(STask*)), Qt::DirectConnection);
     
    183183}
    184184
    185 bool STaskManager::isTaskRunnable(STask* task) const {
    186     QMutexLocker locker(&tasksMutex_);
     185bool STaskManager::isTaskRunnable(STask *task) const {
     186    QMutexLocker locker(&m_tasksMutex);
    187187
    188188    foreach (SUIdNamespaceIdent taskIdent, task->blockingTaskIdents()) {
    189         foreach (STask* runningTask, runningTasks()) {
     189        foreach (STask *runningTask, runningTasks()) {
    190190            if ((taskIdent.nmespace != "") && (taskIdent.nmespace != runningTask->nmespace())) continue; // Not in the same namespace
    191191            if (!taskIdent.uid != runningTask->uid()) continue;                                          // Not the same uid
     
    204204}
    205205
    206 void STaskManager::onTaskFinished(STask* task) {
    207     QMutexLocker locker(&tasksMutex_);
    208 
    209     runningTasks_.removeAll(task);
     206void STaskManager::onTaskFinished(STask *task) {
     207    QMutexLocker locker(&m_tasksMutex);
     208
     209    m_runningTasks.removeAll(task);
    210210
    211211    /* This is needed, that we safely can call deleteLater on task. Otherwise it is not guaranteed, that
  • common/utils/staskmanager.h

    r319 r382  
    3434
    3535public:
    36     void addTaskToQueue(STask* task);
    37     void removeTaskFromQueue(STask* task);
     36    void addTaskToQueue(STask *task);
     37    void removeTaskFromQueue(STask *task);
    3838
    39     bool hasTaskUnderControl(STask* task) const;
     39    bool hasTaskUnderControl(STask *task) const;
    4040
    4141    QList<STask*> queuedTasks() const;
    4242    QList<STask*> runningTasks() const;
    4343
    44     QList<STask*> runningTasksOfThisType(uint uid, const QString& nmespace) const;
     44    QList<STask*> runningTasksOfThisType(uint uid, const QString &nmespace) const;
    4545
    4646public:
     
    4848
    4949signals:
    50     void taskEnqueued(STask* task);
    51     void taskDequeued(STask* task);
    52     void taskFinished(STask* task);
     50    void taskEnqueued(STask *task);
     51    void taskDequeued(STask *task);
     52    void taskFinished(STask *task);
    5353
    5454private:
    55     bool isTaskRunnable(STask* task) const;
     55    bool isTaskRunnable(STask *task) const;
    5656
    5757private slots:
    5858    void startTasks();
    59     void onTaskFinished(STask* task);
     59    void onTaskFinished(STask *task);
    6060
    6161private:
    62     mutable QMutex tasksMutex_;
    63     QList<STask*>  taskQueue_;
    64     QList<STask*>  runningTasks_;
     62    mutable QMutex m_tasksMutex;
     63    QList<STask*>m_taskQueue;
     64    QList<STask*> m_runningTasks;
    6565
    66     bool           tornDown_;
     66    bool m_tornDown;
    6767};
    6868
  • common/validation/defaultaccountvalidator.cpp

    r316 r382  
    4444}
    4545
    46 const IAccount* DefaultAccountValidator::account() const {
     46const IAccount *DefaultAccountValidator::account() const {
    4747    return m_account;
    4848}
  • common/validation/defaultaccountvalidator.h

    r319 r382  
    3131
    3232protected:
    33     virtual const IAccount* account() const;
     33    virtual const IAccount *account() const;
    3434
    3535private:
  • common/validation/svalidationresult.cpp

    r316 r382  
    2222 * otherwise the result will be initialized as valid.
    2323 */
    24 SValidationResult::SValidationResult(const QString& message /* = "" */) {
     24SValidationResult::SValidationResult(const QString &message /* = "" */) {
    2525    if (message.trimmed() != "") {
    2626        addError(message);
    2727    }
    2828}
    29 SValidationResult::SValidationResult(const SValidationResult& other) {
    30     errors_   = QStringList(other.errors_);
    31     warnings_ = QStringList(other.warnings_);
     29SValidationResult::SValidationResult(const SValidationResult &other) {
     30    m_errors   = QStringList(other.m_errors);
     31    m_warnings = QStringList(other.m_warnings);
    3232}
    3333
    34 void SValidationResult::addError(const QString& message) {
     34void SValidationResult::addError(const QString &message) {
    3535    if (message.trimmed() != "") {
    36         errors_.append(message);
     36        m_errors.append(message);
    3737    }
    3838}
    39 void SValidationResult::addWarning(const QString& message) {
     39void SValidationResult::addWarning(const QString &message) {
    4040    if (message.trimmed() != "") {
    41         warnings_.append(message);
     41        m_warnings.append(message);
    4242    }
    4343}
     
    5555
    5656QStringList SValidationResult::errors() const {
    57     return errors_;
     57    return m_errors;
    5858}
    5959QStringList SValidationResult::warnings() const {
    60     return warnings_;
     60    return m_warnings;
    6161}
    6262
     
    7171}
    7272
    73 QString SValidationResult::getErrorString(const QString& delimiter /* = "\n" */) const {
     73QString SValidationResult::getErrorString(const QString &delimiter /* = "\n" */) const {
    7474    return getStringFromList(errors(), delimiter);
    7575}
    76 QString SValidationResult::getWarningString(const QString& delimiter /* = "\n" */) const {
     76QString SValidationResult::getWarningString(const QString &delimiter /* = "\n" */) const {
    7777    return getStringFromList(errors(), delimiter);
    7878}
    79 QString SValidationResult::getStringFromList(const QList<QString> list, const QString& delimiter) const {
     79QString SValidationResult::getStringFromList(const QList<QString> list, const QString &delimiter) const {
    8080    QString messages = "";
    8181
  • common/validation/svalidationresult.h

    r319 r382  
    3232    };
    3333
    34     explicit SValidationResult(const QString& message = "");
    35     SValidationResult(const SValidationResult& other);
     34    explicit SValidationResult(const QString &message = "");
     35    SValidationResult(const SValidationResult &other);
    3636
    37     void addError(const QString& message);
    38     void addWarning(const QString& message);
     37    void addError(const QString &message);
     38    void addWarning(const QString &message);
    3939
    4040    ValidationType validationType() const;
    41     QStringList    errors() const;
    42     QStringList    warnings() const;
     41    QStringList errors() const;
     42    QStringList warnings() const;
    4343
    44     bool           hasErrors() const;
    45     bool           hasWarnings() const;
    46     bool           isValid() const;
     44    bool hasErrors() const;
     45    bool hasWarnings() const;
     46    bool isValid() const;
    4747
    48     QString        getErrorString(const QString& delimiter = "\n") const;
    49     QString        getWarningString(const QString& delimiter = "\n") const;
     48    QString getErrorString(const QString &delimiter = "\n") const;
     49    QString getWarningString(const QString &delimiter = "\n") const;
    5050
    5151private:
    52     QString        getStringFromList(const QList<QString> list, const QString& delimiter) const;
     52    QString getStringFromList(const QList<QString> list, const QString &delimiter) const;
    5353
    5454private:
    55     QStringList errors_;
    56     QStringList warnings_;
     55    QStringList m_errors;
     56    QStringList m_warnings;
    5757};
    5858
  • frontend/business/accountinitmanager.cpp

    r316 r382  
    5353
    5454void AccountInitManager::initAccounts(const QSet<IAccount*> &accounts) {
    55     foreach (IAccount* account, accounts) {
     55    foreach (IAccount *account, accounts) {
    5656        initAccount(account);
    5757    }
     
    6060
    6161void AccountInitManager::onAccountInitFinished(STask *task) {
    62     IAccount* account = static_cast<IAccountInitTask*>(task)->account();
     62    IAccount *account = static_cast<IAccountInitTask*>(task)->account();
    6363
    6464    m_initializingAccounts.remove(account);
     
    6666}
    6767void AccountInitManager::onAccountInitFailed(STask *task) {
    68     IAccount* account = static_cast<IAccountInitTask*>(task)->account();
     68    IAccount *account = static_cast<IAccountInitTask*>(task)->account();
    6969
    7070    emit accountInitFailed(account, task->exception());
  • frontend/business/accountinitmanager.h

    r319 r382  
    3636     * @param account The to be initialized account
    3737     */
    38     virtual void initAccount(IAccount* account);
     38    virtual void initAccount(IAccount *account);
    3939
    4040    /**
     
    4646
    4747signals:
    48     void accountInitStateChanged(IAccount* account); // Called when a account gets initialized or un-initialized
    49     void accountInitFinished(IAccount* account, STask::Result result);
    50     void accountInitFailed(IAccount* account, const EException &exception);
     48    void accountInitStateChanged(IAccount *account); // Called when a account gets initialized or un-initialized
     49    void accountInitFinished(IAccount *account, STask::Result result);
     50    void accountInitFailed(IAccount *account, const EException &exception);
    5151
    5252private slots:
    53     void onAccountInitFinished(STask* task);
    54     void onAccountInitFailed(STask* task);
     53    void onAccountInitFinished(STask *task);
     54    void onAccountInitFailed(STask *task);
    5555
    5656private:
  • frontend/business/accountmanager.cpp

    r316 r382  
    3232}
    3333
    34 void AccountManager::addAccountToList(IAccount* account) {
     34void AccountManager::addAccountToList(IAccount *account) {
    3535    Q_ASSERT(account);
    3636    if (m_accountList.contains(account->id()))
     
    7979
    8080    // Process valid accounts
    81     foreach(IAccount* account, accountLoadResult.validAccounts) {
     81    foreach(IAccount *account, accountLoadResult.validAccounts) {
    8282        addAccountToList(account);
    8383    }
     
    102102
    103103
    104 void AccountManager::saveAccount(IAccount* account){
     104void AccountManager::saveAccount(IAccount *account){
    105105    Q_ASSERT(account);
    106106    m_persAccountManager->saveAccount(account);
     
    114114
    115115
    116 void AccountManager::onAccountIdChanged(IAccount* account, int oldId) {
    117     IAccount* acc = m_accountList.take(oldId);
     116void AccountManager::onAccountIdChanged(IAccount *account, int oldId) {
     117    IAccount *acc = m_accountList.take(oldId);
    118118    if (acc) {
    119119        Q_ASSERT(acc == account);
     
    121121    }
    122122}
    123 void AccountManager::onAccountDataChanged(IAccount* account, int property) {
     123void AccountManager::onAccountDataChanged(IAccount *account, int property) {
    124124    emit accountDataChanged(account, property);
    125125
  • frontend/business/accountmanager.h

    r364 r382  
    4545    QSet<IAccount*> erroneousAccounts() const;
    4646
    47     void saveAccount(IAccount* account);
     47    void saveAccount(IAccount *account);
    4848    void removeAccount(int accountId);
    4949
    5050signals:
    51     void accountAdded(IAccount* account);
    52     void accountDataChanged(IAccount* account, int property);
    53     void accountRemoved(IAccount* account);
    54     void accountInitStateChanged(IAccount* account);
     51    void accountAdded(IAccount *account);
     52    void accountDataChanged(IAccount *account, int property);
     53    void accountRemoved(IAccount *account);
     54    void accountInitStateChanged(IAccount *account);
    5555    void accountLoginStateChanged(IAccount *account);
    5656
    5757private:
    58     void addAccountToList(IAccount* account);
     58    void addAccountToList(IAccount *account);
    5959    void removeAccountFromList(int id);
    6060
    6161private slots:
    62     void onAccountIdChanged(IAccount* account, int oldId);
    63     void onAccountDataChanged(IAccount* account, int property);
     62    void onAccountIdChanged(IAccount *account, int oldId);
     63    void onAccountDataChanged(IAccount *account, int property);
    6464
    6565private:
  • frontend/business/contactimporter/contactfilesimporter_base.cpp

    r364 r382  
    156156}
    157157
    158 QStringList ContactFilesImporterCSV::parseLine(const QString& line) const {
     158QStringList ContactFilesImporterCSV::parseLine(const QString &line) const {
    159159    QStringList s;
    160160    QRegExp rx("(\"([^\"]*)\"|)(,|$)");
     
    173173
    174174void ContactFilesImporterCSV::readCSV(
    175         const ContactFilesImporterCSV::CSVFile& csv,
     175        const ContactFilesImporterCSV::CSVFile &csv,
    176176        QSet<SContact*> *contacts) const {
    177177    QStringList nameKeys;
  • frontend/business/contactimporter/contactfilesimporter_p.h

    r324 r382  
    6464    };
    6565
    66     QStringList parseLine(const QString& line) const;
     66    QStringList parseLine(const QString &line) const;
    6767    CSVFile parseCSV() const;
    68     void readCSV(const CSVFile& csv, QSet<SContact*> *contacts) const;
     68    void readCSV(const CSVFile &csv, QSet<SContact*> *contacts) const;
    6969
    7070    QString m_filename;
  • frontend/business/contactimporter/googlecontactimporter_base.cpp

    r378 r382  
    5252}
    5353
    54 void BaseGoogleContactImporter::parseContactsFeed(const QString& feed, QSet<SContact *> *contacts) {
     54void BaseGoogleContactImporter::parseContactsFeed(const QString &feed, QSet<SContact *> *contacts) {
    5555    /*<entry gd:etag=""SXszeTVSLyt7ImA9WxFbFk8ORQU."">
    5656        <id>http://www.google.com/m8/feeds/contacts/saemy.zehnder%40gmail.com/base/59ea8d658e87e360</id>
     
    134134    try {
    135135        result = m_httpHelper.syncPost(QUrl::fromEncoded("https://www.google.com/accounts/ClientLogin"), posts)->readAll();
    136     } catch (EException& e) {
     136    } catch (EException &e) {
    137137        result = "";
    138138    }
  • frontend/business/contactimporter/googlecontactimporter_base.h

    r320 r382  
    5252private:
    5353    void requestAuthToken();
    54     void parseContactsFeed(const QString& feed, QSet<SContact *> *contacts);
     54    void parseContactsFeed(const QString &feed, QSet<SContact *> *contacts);
    5555
    5656private:
  • frontend/business/contactmanager.cpp

    r316 r382  
    9494}
    9595
    96 SContact *ContactManager::contactByNumber(const SNumber& number) const {
     96SContact *ContactManager::contactByNumber(const SNumber &number) const {
    9797    foreach (SContact *contact, contacts()) {
    9898        if (number == contact->number()) {
  • frontend/business/contactmanager.h

    r319 r382  
    2323#include <QSet>
    2424
    25 #include "common/business/imanagers.h"
    2625#include "common/domain/scontact.h"
    2726#include "common/domain/snumber.h"
     
    3938
    4039public:
    41     SContact* contact(int contactId) const;
     40    SContact *contact(int contactId) const;
    4241    QSet<SContact*> contacts() const;
    4342
     
    4746    bool hasContact(int contactId) const;
    4847
    49     SContact *contactByNumber(const SNumber& number) const;
     48    SContact *contactByNumber(const SNumber &number) const;
    5049
    5150signals:
  • frontend/business/erroraccount.h

    r319 r382  
    5858
    5959public:
    60     DO_NOT_CALL_THIS_RET(IAccount* createAccountInstance(), NULL)
    61     DO_NOT_CALL_THIS_RET(IAccountSettingsWidget* createAccountSettingsWidget(QWidget*) const, NULL)
     60    DO_NOT_CALL_THIS_RET(IAccount *createAccountInstance(), NULL)
     61    DO_NOT_CALL_THIS_RET(IAccountSettingsWidget *createAccountSettingsWidget(QWidget*) const, NULL)
    6262    DO_NOT_CALL_THIS_RET(::Persistence::IStorageHelper *createStorageHelper(Persistence::IMainStorage*), NULL)
    6363
     
    7777    ErrorAccount(IGateway *gateway, int accountId, const QString &name, const EException &exception);
    7878
    79     IGateway* gateway() const { return m_gateway; }
     79    IGateway *gateway() const { return m_gateway; }
    8080    int id() const { return m_id; }
    8181    QString name() const { return m_name; }
     
    8888    DO_NOT_CALL_THIS_RET(int fragmentSize() const, 0)
    8989
    90     DO_NOT_CALL_THIS_RET(IValidator* createValidator() const, NULL)
    91     DO_NOT_CALL_THIS_RET(Persistence::IStorageHelper* createStorageHelper(Persistence::IMainStorage*), NULL)
     90    DO_NOT_CALL_THIS_RET(IValidator *createValidator() const, NULL)
     91    DO_NOT_CALL_THIS_RET(Persistence::IStorageHelper *createStorageHelper(Persistence::IMainStorage*), NULL)
    9292
    9393    DO_NOT_CALL_THIS_RET(QString username() const, QString())
     
    104104    DO_NOT_CALL_THIS_RET(int costsForText(const QString&) const, 0)
    105105
    106     DO_NOT_CALL_THIS_RET(IAccountInitTask* createInitTask(), NULL)
     106    DO_NOT_CALL_THIS_RET(IAccountInitTask *createInitTask(), NULL)
    107107    DO_NOT_CALL_THIS_RET(bool isInitialized() const, false)
    108108    DO_NOT_CALL_THIS(void resetInitialization())
    109     DO_NOT_CALL_THIS_RET(IAccountLoginTask* createLoginTask(), NULL)
     109    DO_NOT_CALL_THIS_RET(IAccountLoginTask *createLoginTask(), NULL)
    110110    DO_NOT_CALL_THIS_RET(bool isLoggedIn() const, false)
    111111    DO_NOT_CALL_THIS_RET(bool stillLoggedIn(), false)
    112112    DO_NOT_CALL_THIS(void ensureLoggedIn())
    113     DO_NOT_CALL_THIS_RET(ISMSSendTask* createSMSSendTask(const QString&, const QSet<const SContact*>&), NULL)
     113    DO_NOT_CALL_THIS_RET(ISMSSendTask *createSMSSendTask(const QString&, const QSet<const SContact*>&), NULL)
    114114
    115115protected:
    116116    DO_NOT_CALL_THIS_RET(bool checkStillLoggedIn(), false)
    117117
    118 //    DO_NOT_CALL_THIS_RET(IAccountInitTask* doCreateInitTask(), NULL)
    119 //    DO_NOT_CALL_THIS_RET(IAccountLoginTask* doCreateLoginTask(), NULL)
    120 //    DO_NOT_CALL_THIS_RET(ISMSSendTask* doCreateSMSSendTask(const QString&, const QSet<SContact*>&), NULL)
     118//    DO_NOT_CALL_THIS_RET(IAccountInitTask *doCreateInitTask(), NULL)
     119//    DO_NOT_CALL_THIS_RET(IAccountLoginTask *doCreateLoginTask(), NULL)
     120//    DO_NOT_CALL_THIS_RET(ISMSSendTask *doCreateSMSSendTask(const QString&, const QSet<SContact*>&), NULL)
    121121
    122122private:
  • frontend/business/gatewaymanager.cpp

    r335 r382  
    3838}
    3939
    40 IGateway* GatewayManager::gateway(const QString& gatewayName) const {
     40IGateway *GatewayManager::gateway(const QString &gatewayName) const {
    4141    return m_gatewayList.value(gatewayName);
    4242}
  • frontend/business/gatewaymanager.h

    r335 r382  
    3333    virtual ~GatewayManager() {}
    3434
    35     IGateway *gateway(const QString& gatewayName) const;
     35    IGateway *gateway(const QString &gatewayName) const;
    3636    QSet<IGateway*> gateways() const;
    3737
  • frontend/business/groupmanager.cpp

    r381 r382  
    8080}
    8181
    82 void GroupManager::saveGroup(SGroup* group){
     82void GroupManager::saveGroup(SGroup *group){
    8383    m_persGroupManager->saveGroup(group);
    8484    addGroupToList(group);
  • frontend/business/libraryloader_base.cpp

    r370 r382  
    4141}
    4242
    43 void BaseLibraryLoader::loadLibraries(const QDir& libraryPath) {
     43void BaseLibraryLoader::loadLibraries(const QDir &libraryPath) {
    4444    foreach (QString filename, libraryPath.entryList(QDir::Files)) {
    4545        try {
     
    7171        library.setFileName(filename);
    7272
    73         typedef ILibrary* (*CreateLibraryFunc)();
     73        typedef ILibrary *(*CreateLibraryFunc)();
    7474        CreateLibraryFunc createLibrary = (CreateLibraryFunc)library.resolve("createLibrary");
    7575
     
    123123                .raise();
    124124        }
    125     } catch (Library::ELoadException& e) {
     125    } catch (Library::ELoadException &e) {
    126126        e.addDebugInfo("filename", filename)
    127127                .raise();
  • frontend/business/libraryloader_base.h

    r319 r382  
    2525#include "common/business/igateway.h"
    2626#include "common/business/ilibrary.h"
    27 #include "common/business/imanagers.h"
    2827
    2928class ContactImporterManager;
     
    4544
    4645private:
    47     void loadLibrary(const QString& filename);
     46    void loadLibrary(const QString &filename);
    4847
    4948private:
  • frontend/business/settings_base.cpp

    r373 r382  
    147147
    148148
    149 void BaseSettings::setLocale(const QLocale& locale) {
     149void BaseSettings::setLocale(const QLocale &locale) {
    150150    if (getLocale() == locale) return;
    151151
     
    168168}
    169169
    170 void BaseSettings::setSMSSuffix(const QString& smsSuffix){
     170void BaseSettings::setSMSSuffix(const QString &smsSuffix){
    171171    QString suffix = smsSuffix;
    172172    suffix.replace("\\n", "\n");
     
    178178}
    179179
    180 void BaseSettings::setActiveAccountId(const QString& accountId){
     180void BaseSettings::setActiveAccountId(const QString &accountId){
    181181    if (getActiveAccountId() == accountId) return;
    182182
     
    210210}
    211211
    212 void BaseSettings::setProxyHost(const QString& host){
     212void BaseSettings::setProxyHost(const QString &host){
    213213    if (getProxyHost() == host) return;
    214214
     
    231231}
    232232
    233 void BaseSettings::setProxyUsername(const QString& username){
     233void BaseSettings::setProxyUsername(const QString &username){
    234234    if (getProxyUsername() == username) return;
    235235
     
    238238}
    239239
    240 void BaseSettings::setProxyPassword(const QString& password){
     240void BaseSettings::setProxyPassword(const QString &password){
    241241    if (getProxyPassword() == password) return;
    242242
  • frontend/business/settings_base.h

    r373 r382  
    5757
    5858public: /* Per-execution settings */
    59     const QDir     getLocalePath() const;
    60     QLocale        getLocale();
     59    const QDir getLocalePath() const;
     60    QLocale getLocale();
    6161    QList<QLocale> getLocales();
    6262
     
    6565
    6666public: /* Persistent settings */
    67     bool    getCheckForUpdates();
    68     bool    getAddSuffix();
     67    bool getCheckForUpdates();
     68    bool getAddSuffix();
    6969    QString getActiveAccountId();
    70     bool    getShowSentConfirmation();
     70    bool getShowSentConfirmation();
    7171
    72     bool    isProxyEnabled();
     72    bool isProxyEnabled();
    7373    QNetworkProxy::ProxyType getProxyType();
    7474    QString getProxyHost();
    75     int     getProxyPort();
    76     bool    isProxyAuthEnabled();
     75    int getProxyPort();
     76    bool isProxyAuthEnabled();
    7777    QString getProxyUsername();
    7878    QString getProxyPassword();
     
    8383
    8484
    85     void setLocale(const QLocale& locale);
     85    void setLocale(const QLocale &locale);
    8686
    8787    void setCheckForUpdates(bool checkForUpdates);
    8888    void setAddSuffix(bool addSuffix);
    89     void setActiveAccountId(const QString& accountId);
     89    void setActiveAccountId(const QString &accountId);
    9090    void setShowSentConfirmation(bool showSentConfirmation);
    9191
    9292    void setProxyEnabled(bool enabled);
    9393    void setProxyType(QNetworkProxy::ProxyType type);
    94     void setProxyHost(const QString& host);
     94    void setProxyHost(const QString &host);
    9595    void setProxyPort(int port);
    9696    void setProxyAuthEnabled(bool enabled);
    97     void setProxyUsername(const QString& username);
    98     void setProxyPassword(const QString& password);
     97    void setProxyUsername(const QString &username);
     98    void setProxyPassword(const QString &password);
    9999
    100     void setSMSSuffix(const QString& smsSuffix);
     100    void setSMSSuffix(const QString &smsSuffix);
    101101
    102102signals:
  • frontend/business/suffixmanager.cpp

    r316 r382  
    7474}
    7575
    76 void SuffixManager::_setUserSuffix(const QString& suffix) {
     76void SuffixManager::_setUserSuffix(const QString &suffix) {
    7777    m_userSuffix = suffix;
    7878    m_userSuffix.replace("\\n", "\n");
     
    8484
    8585}
    86 void SuffixManager::setUserSuffix(const QString& suffix) {
     86void SuffixManager::setUserSuffix(const QString &suffix) {
    8787    _setUserSuffix(suffix);
    8888    m_settings->setSMSSuffix(m_userSuffix);
  • frontend/business/suffixmanager.h

    r319 r382  
    2222#include <QString>
    2323
    24 #include "common/business/imanagers.h"
    2524#include "common/network/snetworkreply.h"
    2625
     
    4645    QString userSuffix() const;
    4746    void resetUserSuffix();
    48     void setUserSuffix(const QString& suffix);
     47    void setUserSuffix(const QString &suffix);
    4948
    5049private:
    51     void _setUserSuffix(const QString& suffix);
     50    void _setUserSuffix(const QString &suffix);
    5251
    5352private slots:
  • frontend/business/updatemanager.cpp