<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/124561/">https://git.reviewboard.kde.org/r/124561/</a>
     </td>
    </tr>
   </table>
   <br />



<table bgcolor="#e0e0e0" width="100%" cellpadding="12" style="border: 1px gray solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>
   <h1 style="margin: 0; padding: 0; font-size: 10pt;">This change has been marked as submitted.</h1>
  </td>
 </tr>
</table>
<br />


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for Marble.</div>
<div>By Dennis Nienhüser.</div>


<p style="color: grey;"><i>Updated Aug. 3, 2015, 7:17 a.m.</i></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Submitted with commit 520558da3f0b48ac77c6f95851e509d5ab05f681 by Dennis Nienhüser to branch master.</pre>
  </td>
 </tr>
</table>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
marble
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Qt's plugin loading mechanism is unable to load plugins from the assets virtual file system they're bundled in (via the .apk). The current workaround in PluginManager is to copy the files from assets:/ (the system plugin path) to the local plugin path. A similar approach is done by Qt internally. Our app's private storage is organized as follows:
    apps/org.kde.marble.maps/
      f/.local/share/marble/maps/earth/     // Downloaded map tiles etc
      f/.marble/plugins                     // Marble plugins
      r/qt-reserved-files/plugins           // Qt plugins
      r/qt-reserved-files/qml               // QML plugins including QtQuick Android controls
      r/qt-reserved-files/android-style     // Graphics resources</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I can't tell how the r/ files are handled during package upgrades (can anyone help out?), but the ones in f/ stay untouched. Therefore we can end up in the following scenario:
  - Marble Maps version n installs plugin foo
  - Marble Maps version n+1 does not ship foo anymore, or has foo renamed bar
  - User updates from n to n+1. f/ files stay intact, so foo stays around
  - User starts n+1, foo is loaded
This can have all sorts of undesired effects, from having foo around although we don't want it to crashes or random runtime behavior due to ABI changes.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The patch fixes this by generating a whitelist of plugins shipped in the current version, then refusing to load any other plugins it encounters. Given the path structure outlined above it should be safe to delete such orphane plugins even (currently not implemented, just a comment in the code).</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">checking qDebug output on a Nexus 4 with adb logcat.</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/lib/marble/PluginManager.cpp <span style="color: grey">(5cc47b2)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/124561/diff/" style="margin-left: 3em;">View Diff</a></p>






  </td>
 </tr>
</table>



  </div>
 </body>
</html>