← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~verzegnassi-stefano/ubuntu-docviewer-app/fix-1483218 into lp:ubuntu-docviewer-app

 

Stefano Verzegnassi has proposed merging lp:~verzegnassi-stefano/ubuntu-docviewer-app/fix-1483218 into lp:ubuntu-docviewer-app.

Commit message:
emit DocumentModel::dataChanged()
Sometimes the UI was not notified about changes in model entries (e.g. file size still equals to zero after file has been successfully copied)

Requested reviews:
  Ubuntu Document Viewer Developers (ubuntu-docviewer-dev)
Related bugs:
  Bug #1483218 in Ubuntu Document Viewer App: "Files show "0 bytes" immediately after loading to device"
  https://bugs.launchpad.net/ubuntu-docviewer-app/+bug/1483218

For more details, see:
https://code.launchpad.net/~verzegnassi-stefano/ubuntu-docviewer-app/fix-1483218/+merge/288689

emit DocumentModel::dataChanged()
Sometimes the UI was not notified about changes in model entries (e.g. file size still equals to zero after file has been successfully copied)
-- 
Your team Ubuntu Document Viewer Developers is requested to review the proposed merge of lp:~verzegnassi-stefano/ubuntu-docviewer-app/fix-1483218 into lp:ubuntu-docviewer-app.
=== modified file 'src/plugin/file-qml-plugin/documentmodel.cpp'
--- src/plugin/file-qml-plugin/documentmodel.cpp	2015-09-19 15:40:22 +0000
+++ src/plugin/file-qml-plugin/documentmodel.cpp	2016-03-10 19:51:54 +0000
@@ -65,6 +65,7 @@
     for (int i=0; i<m_docs.length(); i++) {
         if (m_docs.at(i).path == path) {
             m_docs[i] = createEntry(path);
+            Q_EMIT dataChanged(index(i, 0), index(i, 0));
 
             break;
         }


Follow ups