← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

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

 

Michael Zanetti has proposed merging lp:~mzanetti/reminders-app/store-local-resources-in-infofile into lp:reminders-app.

Commit message:
Store locally attached resources into the info file

Requested reviews:
  Ubuntu Reminders app developers (reminders-app-dev)
Related bugs:
  Bug #1461622 in Ubuntu Notes app: "Images are lost on locally stored notes"
  https://bugs.launchpad.net/reminders-app/+bug/1461622

For more details, see:
https://code.launchpad.net/~mzanetti/reminders-app/store-local-resources-in-infofile/+merge/260990
-- 
Your team Ubuntu Reminders app developers is requested to review the proposed merge of lp:~mzanetti/reminders-app/store-local-resources-in-infofile into lp:reminders-app.
=== modified file 'src/libqtevernote/note.cpp'
--- src/libqtevernote/note.cpp	2015-03-15 20:00:21 +0000
+++ src/libqtevernote/note.cpp	2015-06-03 17:47:24 +0000
@@ -540,6 +540,15 @@
     Resource *resource = new Resource(fileName.path(), this);
     m_resources.insert(resource->hash(), resource);
     m_content.attachFile(position, resource->hash(), resource->type());
+
+    QSettings infoFile(m_infoFile, QSettings::IniFormat);
+    infoFile.beginGroup("resources");
+    infoFile.beginGroup(resource->hash());
+    infoFile.setValue("fileName", resource->fileName());
+    infoFile.setValue("type", resource->type());
+    infoFile.endGroup();
+    infoFile.endGroup();
+
     emit resourcesChanged();
     emit contentChanged();
 


Follow ups