~notes-app-dev/reminders-app/trunk

« back to all changes in this revision

Viewing changes to src/libqtevernote/resource.cpp

  • Committer: Tarmac
  • Author(s): Michael Zanetti
  • Date: 2014-11-11 15:56:54 UTC
  • mfrom: (291.7.14 reminders-app-caching)
  • Revision ID: tarmac-20141111155654-n5wgbjb99gymnkvk
implement full note caching

note content and resources are now cached. also adds some improvements in regard to refreshing the ui. Fixes: https://bugs.launchpad.net/bugs/1390591.

Approved by Ubuntu Phone Apps Jenkins Bot, David Planella.

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
    QByteArray fileContent = file.readAll();
72
72
    file.close();
73
73
 
74
 
    m_hash = QCryptographicHash::hash(fileContent, QCryptographicHash::Md5).toHex();    
 
74
    m_hash = QCryptographicHash::hash(fileContent, QCryptographicHash::Md5).toHex();
75
75
    m_fileName = path.split('/').last();
76
76
    if (m_fileName.endsWith(".png")) {
77
77
        m_type = "image/png";