~carla-sella/reminders-app/new-reminders-app-tests

« back to all changes in this revision

Viewing changes to src/plugin/Evernote/notesstore.cpp

  • Committer: Tarmac
  • Author(s): Michael Zanetti
  • Date: 2013-11-26 13:20:39 UTC
  • mfrom: (7.1.6 reminders-app-html2evml)
  • Revision ID: tarmac-20131126132039-3zmyobkekgqi3ckm
"properly" convert html back to enml. Loses images and tables but works quite well for all the rest.

Approved by David Planella, Ubuntu Phone Apps Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#include "notebooks.h"
3
3
#include "notebook.h"
4
4
#include "note.h"
 
5
#include "utils/html2enmlconverter.h"
5
6
 
6
7
#include "jobs/fetchnotesjob.h"
7
8
#include "jobs/fetchnotebooksjob.h"
133
134
void NotesStore::saveNote(const QString &guid)
134
135
{
135
136
    Note *note = m_notes.value(guid);
 
137
 
 
138
    QString enml = Html2EnmlConverter::html2enml(note->content());
 
139
    note->setContent(enml);
 
140
 
136
141
    SaveNoteJob *job = new SaveNoteJob(note, this);
137
142
    connect(job, &SaveNoteJob::resultReady, this, &NotesStore::saveNoteJobDone);
138
143
    m_jobQueue.append(job);