qtmobility/src/messaging/qmessageaccountid_symbian.cpp
changeset 8 71781823f776
parent 4 90517678cc4f
child 11 06b8e2af4411
equal deleted inserted replaced
5:453da2cfceef 8:71781823f776
    39 **
    39 **
    40 ****************************************************************************/
    40 ****************************************************************************/
    41 #include "qmessageaccountid.h"
    41 #include "qmessageaccountid.h"
    42 #include "qmessageaccountid_p.h"
    42 #include "qmessageaccountid_p.h"
    43 #include <qhash.h>
    43 #include <qhash.h>
       
    44 #include <messagingutil_p.h>
    44 
    45 
    45 QTM_BEGIN_NAMESPACE
    46 QTM_BEGIN_NAMESPACE
    46 
    47 
    47 QMessageAccountId::QMessageAccountId()
    48 QMessageAccountId::QMessageAccountId()
    48  : d_ptr(0)
    49  : d_ptr(0)
    89         } else {
    90         } else {
    90             delete d_ptr;
    91             delete d_ptr;
    91             d_ptr = 0;
    92             d_ptr = 0;
    92         }
    93         }
    93     }
    94     }
    94     
    95 
    95     return *this;
    96     return *this;
    96 }
    97 }
    97 
    98 
    98 bool QMessageAccountId::operator<(const QMessageAccountId& other) const
    99 bool QMessageAccountId::operator<(const QMessageAccountId& other) const
    99 {
   100 {
   100     long left = 0;
   101     long left = 0;
   101     long right = 0;
   102     long right = 0;
   102     if (d_ptr) {
   103     if (d_ptr) {
   103         left = d_ptr->_id.toLong();
   104         left = SymbianHelpers::stripIdPrefix(d_ptr->_id).toLong();
   104     }
   105     }
   105     if (other.d_ptr) {
   106     if (other.d_ptr) {
   106         right = other.d_ptr->_id.toLong();
   107         right = SymbianHelpers::stripIdPrefix(other.d_ptr->_id).toLong();
   107     }
   108     }
   108     
   109 
   109     return (left < right);
   110     return (left < right);
   110 }
   111 }
   111 
   112 
   112 QString QMessageAccountId::toString() const
   113 QString QMessageAccountId::toString() const
   113 {
   114 {