Merge lp:~mzanetti/reminders-app/store-local-resources-in-infofile into lp:reminders-app

Proposed by Michael Zanetti on 2015-06-03
Status: Merged
Approved by: Riccardo Padovani on 2015-06-05
Approved revision: 449
Merged at revision: 449
Proposed branch: lp:~mzanetti/reminders-app/store-local-resources-in-infofile
Merge into: lp:reminders-app
Diff against target: 18 lines (+9/-0)
1 file modified
src/libqtevernote/note.cpp (+9/-0)
To merge this branch: bzr merge lp:~mzanetti/reminders-app/store-local-resources-in-infofile
Reviewer Review Type Date Requested Status
Riccardo Padovani 2015-06-03 Approve on 2015-06-05
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve on 2015-06-03
Review via email: mp+260990@code.launchpad.net

Commit Message

Store locally attached resources into the info file

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/libqtevernote/note.cpp'
2--- src/libqtevernote/note.cpp 2015-03-15 20:00:21 +0000
3+++ src/libqtevernote/note.cpp 2015-06-03 17:47:24 +0000
4@@ -540,6 +540,15 @@
5 Resource *resource = new Resource(fileName.path(), this);
6 m_resources.insert(resource->hash(), resource);
7 m_content.attachFile(position, resource->hash(), resource->type());
8+
9+ QSettings infoFile(m_infoFile, QSettings::IniFormat);
10+ infoFile.beginGroup("resources");
11+ infoFile.beginGroup(resource->hash());
12+ infoFile.setValue("fileName", resource->fileName());
13+ infoFile.setValue("type", resource->type());
14+ infoFile.endGroup();
15+ infoFile.endGroup();
16+
17 emit resourcesChanged();
18 emit contentChanged();
19

Subscribers

People subscribed via source and target branches