<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/123670/">https://git.reviewboard.kde.org/r/123670/</a>
     </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 Calligra, Camilla Boemann, Inge Wallin, Boudewijn Rempt, and Thorsten Zachmann.</div>
<div>By Friedrich W. H. Kossebau.</div>


<p style="color: grey;"><i>Updated Mai 7, 2015, 12:50 vorm.</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;">Fix premature description</pre>
  </td>
 </tr>
</table>







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


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description  (updated)</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;">Template folders are currently found by a more complicated approach:</p>
<ul style="padding: 0;text-rendering: inherit;margin: 0 0 0 1em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">part factory adds (and only to the factory's componentdata) a resource type with the respective resource path, e.g. "words_template" and "words/templates/"</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">part itself sets a <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">templateType</code>, which actually is the resource type id for its templates</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">code that wants to lookup matching templates first queries the part for the resource type id, only then queries the standard dirs for the templates (assuming that the maincomponent also is the one which has that resource type set)</li>
</ul>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Though two spots in <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">KoApplication</code> and <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">KoPart</code> (and their <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">Kis</code> counterparts) ignore that and calculate themselves the matching templates locations, using the appname. Which will fail at least with Author and Krita Gemini/Sketch.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Attached patch proposes to change that:
instead of noting the template locations for a document type to the standarddirs of the componentdata of the respecitve part factory, and setting a look-up id with the created parts, the template locations are set directly in the parts and queryable from them.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Advantages:</p>
<ul style="padding: 0;text-rendering: inherit;margin: 0 0 0 1em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Less complex and will also be better portable to Qt5/KF5.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Also fixes the code broken with appnames not matching the prefix of the template locations.</li>
</ul>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Not perfectly happy with this yet, but possibly a step in direction of a better solution.</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>flow/part/FlowFactory.cpp <span style="color: grey">(a3b4b14)</span></li>

 <li>flow/part/FlowPart.cpp <span style="color: grey">(22f67f4)</span></li>

 <li>gemini/TemplatesModel.cpp <span style="color: grey">(c53a64d)</span></li>

 <li>karbon/ui/KarbonFactory.cpp <span style="color: grey">(be55d4c)</span></li>

 <li>karbon/ui/KarbonPart.cpp <span style="color: grey">(6cfc9e3)</span></li>

 <li>krita/ui/KisApplication.cpp <span style="color: grey">(af59d90)</span></li>

 <li>krita/ui/KisOpenPane.h <span style="color: grey">(7725227)</span></li>

 <li>krita/ui/KisOpenPane.cpp <span style="color: grey">(bf89caa)</span></li>

 <li>krita/ui/KisPart.h <span style="color: grey">(77ccf5f)</span></li>

 <li>krita/ui/KisPart.cpp <span style="color: grey">(5f7d625)</span></li>

 <li>krita/ui/KisTemplateCreateDia.h <span style="color: grey">(f6e2874)</span></li>

 <li>krita/ui/KisTemplateCreateDia.cpp <span style="color: grey">(08fb546)</span></li>

 <li>krita/ui/KisTemplateTree.h <span style="color: grey">(7aa7119)</span></li>

 <li>krita/ui/KisTemplateTree.cpp <span style="color: grey">(b658330)</span></li>

 <li>krita/ui/kis_factory2.cc <span style="color: grey">(3a85bcf)</span></li>

 <li>libs/main/KoApplication.cpp <span style="color: grey">(189cbe5)</span></li>

 <li>libs/main/KoOpenPane.h <span style="color: grey">(009b38d)</span></li>

 <li>libs/main/KoOpenPane.cpp <span style="color: grey">(752ea15)</span></li>

 <li>libs/main/KoPart.h <span style="color: grey">(491da0a)</span></li>

 <li>libs/main/KoPart.cpp <span style="color: grey">(59f8140)</span></li>

 <li>libs/main/KoTemplateCreateDia.h <span style="color: grey">(d20937f)</span></li>

 <li>libs/main/KoTemplateCreateDia.cpp <span style="color: grey">(e65a65b6)</span></li>

 <li>libs/main/KoTemplateTree.h <span style="color: grey">(16f3957)</span></li>

 <li>libs/main/KoTemplateTree.cpp <span style="color: grey">(c2b1a4d)</span></li>

 <li>plan/kptfactory.cpp <span style="color: grey">(58138b5)</span></li>

 <li>plan/kptpart.cpp <span style="color: grey">(fe285a9)</span></li>

 <li>plan/kptview.cpp <span style="color: grey">(ad18ccc)</span></li>

 <li>sheets/part/Factory.cpp <span style="color: grey">(dc448ac)</span></li>

 <li>sheets/part/Part.cpp <span style="color: grey">(26dbb5e)</span></li>

 <li>sheets/part/View.cpp <span style="color: grey">(bf4b239)</span></li>

 <li>stage/part/KPrFactory.cpp <span style="color: grey">(be7b861)</span></li>

 <li>stage/part/KPrPart.cpp <span style="color: grey">(f8ae251)</span></li>

 <li>words/part/KWFactory.cpp <span style="color: grey">(cb1f131)</span></li>

 <li>words/part/KWPart.cpp <span style="color: grey">(3d3013f)</span></li>

 <li>words/part/KWView.cpp <span style="color: grey">(3628cae)</span></li>

 <li>words/part/author/CAuFactory.cpp <span style="color: grey">(07c482a)</span></li>

 <li>words/part/author/CAuPart.cpp <span style="color: grey">(5bd43fb)</span></li>

</ul>

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






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



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