Changeset 73:85d8decd3656 in SMSSender for lib/libdatatypes/src/exceptions/elibraryloadexception.h


Ignore:
Timestamp:
Feb 10, 2010 7:11:29 PM (8 years ago)
Author:
Sämy Zehnder <saemy.zehnder@…>
Branch:
3.0
Convert:
svn:3639001d-8e34-449c-bb86-3782b86c4877/branches/3.0@72
Message:
  • Backupversion only! Before removal of QObject as parent of EException
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libdatatypes/src/exceptions/elibraryloadexception.h

    r72 r73  
    1515namespace Library {
    1616    class ELoadException: EException {
     17        Q_OBJECT
     18
    1719    public:
    1820        enum Purpose {
     
    2325            Unknown
    2426        };
     27        Q_DECLARE_METATYPE(Purpose);
    2528
    26         explicit ELoadException(const QString& message)
     29        ELoadException(const QString& message)
    2730            : purpose_(Other)
    2831            , msgStr_(message)
    29         {};
    30         explicit ELoadException(const Purpose& purpose)
     32        {
     33            qRegisterMetaType<Purpose>("Purpose");
     34        };
     35        ELoadException(const Purpose& purpose)
    3136            : purpose_ (purpose)
    32         {};
     37        {
     38            qRegisterMetaType<Purpose>("Purpose");
     39        };
     40        ~ELoadException() throw() {};
    3341
    3442        Purpose purpose() const throw() { return purpose_; }
     
    5058        }
    5159
     60        ELoadException& operator=(const ELoadException& other) {
     61            EException::operator=(other);
     62            purpose_ = other.purpose();
     63            msgStr_  = other.toString();
     64
     65            return *this;
     66        }
     67
    5268    private:
    5369        Purpose purpose_;
     
    5672}
    5773
     74
    5875#endif /* ELIBRARYLOADEXCEPTION_H_ */
Note: See TracChangeset for help on using the changeset viewer.