Review Request 118022: Replace hacky access to the declarative engine by a PmcRuntime class

Shantanu Tushar shantanu at kde.org
Tue May 6 15:56:43 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118022/
-----------------------------------------------------------

(Updated May 6, 2014, 3:56 p.m.)


Review request for Plasma.


Changes
-------

Removed FIXME and obsolete PmcRuntime from mediacenter.qml


Repository: plasma-mediacenter


Description
-------

When backends needed to access some PMC objects like the playlist model or register image providers, they used to fetch a reference to the view's declarative engine. This is risky because it exposes the view to the backends which can then do anything with it.
This patch adds a PmcRuntime class which serves as an official interface to these accesses cleanly.


Diffs (updated)
-----

  browsingbackends/localfiles/localfilesabstractbackend.h 2d47eba 
  browsingbackends/localfiles/localfilesabstractbackend.cpp b86a28a 
  browsingbackends/localfiles/localpictures/localpicturesbackend.cpp f025c04 
  browsingbackends/localfiles/localpictures/localpicturesmodel.h b1a81b4 
  browsingbackends/localfiles/localpictures/localpicturesmodel.cpp c6b1816 
  browsingbackends/localfiles/localvideos/localvideosbackend.cpp 8c20f27 
  browsingbackends/localfiles/localvideos/localvideosmodel.h e836c14 
  browsingbackends/localfiles/localvideos/localvideosmodel.cpp ab24013 
  browsingbackends/metadatabackends/metadatamusicbackend/metadatamusicbackend.h 50af6c2 
  browsingbackends/metadatabackends/metadatamusicbackend/metadatamusicbackend.cpp 6991c97 
  libs/mediacenter/CMakeLists.txt f07d3ec 
  libs/mediacenter/abstractbrowsingbackend.h 537d00d 
  libs/mediacenter/abstractbrowsingbackend.cpp eea4ee5 
  libs/mediacenter/backendsmodel.h f98f60a 
  libs/mediacenter/backendsmodel.cpp 3a5fc30 
  libs/mediacenter/pmcruntime.h PRE-CREATION 
  libs/mediacenter/pmcruntime.cpp PRE-CREATION 
  shells/newshell/mainwindow.h 0aaa513 
  shells/newshell/mainwindow.cpp e369055 
  shells/newshell/package/contents/ui/mediacenter.qml a62becc 

Diff: https://git.reviewboard.kde.org/r/118022/diff/


Testing
-------

Adding songs to playlist, local pictures previews, local videos previews etc work fine.


Thanks,

Shantanu Tushar

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140506/413a0c64/attachment.html>


More information about the Plasma-devel mailing list