phonebookui/pbkcommonui/src/cntnoteeditormodel.cpp
changeset 40 b46a585f6909
parent 31 2a11b5b00470
child 46 efe85016a067
equal deleted inserted replaced
37:fd64c38c277d 40:b46a585f6909
    53         {
    53         {
    54             mContact->removeDetail( &note );
    54             mContact->removeDetail( &note );
    55         }
    55         }
    56     }
    56     }
    57 }
    57 }
       
    58 
       
    59 QContactDetail CntNoteEditorModel::detail() const
       
    60 {
       
    61     QListIterator<QContactNote> noteList(mContact->details<QContactNote>());
       
    62     noteList.toBack(); // go through backwards, so the newest item will be returned
       
    63     while ( noteList.hasPrevious() )
       
    64     {
       
    65         QContactNote note = noteList.previous();
       
    66         if ( !note.value(QContactNote::FieldNote).isEmpty() )
       
    67         {
       
    68             return note;
       
    69         }
       
    70     }
       
    71     return QContactNote(); // return empty address if none found
       
    72 }
    58 // End of File
    73 // End of File