<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/124327/">https://git.reviewboard.kde.org/r/124327/</a>
     </td>
    </tr>
   </table>
   <br />











<div>



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://git.reviewboard.kde.org/r/124327/diff/7/?file=385769#file385769line22" style="color: black; font-weight: bold; text-decoration: underline;">src/apps/marble_maps/SearchBar.qml</a>
    <span style="font-weight: normal;">

     (Diff revision 7)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">22</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="k">z:</span> <span class="mi">2</span></pre></td>
  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="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;">I don't think we need z-values in here at all.</p></pre>
 </div>
</div>
<br />

<div>



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://git.reviewboard.kde.org/r/124327/diff/7/?file=385769#file385769line26" style="color: black; font-weight: bold; text-decoration: underline;">src/apps/marble_maps/SearchBar.qml</a>
    <span style="font-weight: normal;">

     (Diff revision 7)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">26</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="k">width:</span> <span class="nx">backgroundBar</span><span class="p">.</span><span class="nx">width</span> <span class="o">-</span> <span class="nx">height</span></pre></td>
  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="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;">height should be searchButton.height</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">However I'd really prefer anchors to width/height calculations. It's much easier to maintain. The effect you want is visually like this
|  text input       |O|
with O the button</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Try setting up anchors like this:
inputField.left => parent.left
inputField.right => searchButton.left
searchButton.right => parent.right
and finally a proper width for searchButton.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This way all information is there needed to calculate the (horizontal) positions and the width of both elements, and there is no redundant information. You can also easily introduce margins (anchors.margins or anchors.marginLeft, ...) for fine-tuning. See http://doc.qt.io/qt-5/qtquick-positioning-anchors.html for details. http://doc.qt.io/qt-5/qtquick-positioning-topic.html is a good read also for the more general concepts.</p></pre>
 </div>
</div>
<br />

<div>



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://git.reviewboard.kde.org/r/124327/diff/7/?file=385769#file385769line69" style="color: black; font-weight: bold; text-decoration: underline;">src/apps/marble_maps/SearchBar.qml</a>
    <span style="font-weight: normal;">

     (Diff revision 7)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">69</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="k">height:</span> <span class="nx">inputField</span><span class="p">.</span><span class="nx">height</span> <span class="o">*</span> <span class="mf">1.1</span></pre></td>
  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="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;">I think using anchors+margins in inputField would be nicer and achieves the same result (see above)</p></pre>
 </div>
</div>
<br />

<div>



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://git.reviewboard.kde.org/r/124327/diff/7/?file=385769#file385769line82" style="color: black; font-weight: bold; text-decoration: underline;">src/apps/marble_maps/SearchBar.qml</a>
    <span style="font-weight: normal;">

     (Diff revision 7)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">82</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="k">color:</span> <span class="s2">"#1a1a1a"</span></pre></td>
  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="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;">I wonder if we should introduce some common ColorPalette.qml or similar, which has colors as named properties. Makes it much easier to read and also to maintain.</p></pre>
 </div>
</div>
<br />

<div>



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://git.reviewboard.kde.org/r/124327/diff/7/?file=385770#file385770line48" style="color: black; font-weight: bold; text-decoration: underline;">src/apps/marble_maps/SearchBarBackend.h</a>
    <span style="font-weight: normal;">

     (Diff revision 7)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">48</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">QVariant</span> <span class="n">m_searchSuggestionModel</span><span class="p">;</span></pre></td>
  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="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;">Seems unused</p></pre>
 </div>
</div>
<br />

<div>



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://git.reviewboard.kde.org/r/124327/diff/7/?file=385771#file385771line20" style="color: black; font-weight: bold; text-decoration: underline;">src/apps/marble_maps/SearchBarBackend.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 7)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">20</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">m_marbleQuickItem</span><span class="p">(</span> <span class="k">nullptr</span> <span class="p">)</span></pre></td>
  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="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;">also initialize m_placemarkModel to nullptr here</p></pre>
 </div>
</div>
<br />

<div>



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://git.reviewboard.kde.org/r/124327/diff/7/?file=385771#file385771line64" style="color: black; font-weight: bold; text-decoration: underline;">src/apps/marble_maps/SearchBarBackend.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 7)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">64</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">m_searchManager</span> <span class="o">=</span> <span class="k">new</span> <span class="n">SearchRunnerManager</span><span class="p">(</span><span class="n">m_marbleQuickItem</span><span class="o">-></span><span class="n">model</span><span class="p">(),</span> <span class="k">this</span><span class="p">);</span></pre></td>
  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="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;">I'd delete m_searchManager before (just in case the method is called more than once)</p></pre>
 </div>
</div>
<br />

<div>



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://git.reviewboard.kde.org/r/124327/diff/7/?file=385775#file385775line16" style="color: black; font-weight: bold; text-decoration: underline;">src/plugins/runner/openrouteservice/OpenRouteServiceRunner.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 7)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#ebb1ba" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">16</font></th>
    <td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cp">#include "TinyWebBrowser.h"</span></pre></td>
    <th bgcolor="#ebb1ba" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="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;">Can you push this and the similar change in YoursRunner.cpp directly to master (no review request needed)?</p></pre>
 </div>
</div>
<br />



<p>- Dennis Nienhüser</p>


<br />
<p>On July 19th, 2015, 3:44 p.m. UTC, Gábor Péterffy wrote:</p>








<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 Gábor Péterffy.</div>


<p style="color: grey;"><i>Updated July 19, 2015, 3:44 p.m.</i></p>









<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;">This patch adds a search bar to Marble Maps. Because the loading of the plugins not works on Android, the search function is not working.</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;">On linux it works fine when the runner plugins are loaded. On Android the UI appears fine but not working with loaded plugins.</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>data/android/pixmaps/searchFocused.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/android/pixmaps/searchPressed.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>data/android/pixmaps/searchReleased.png <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/apps/marble_maps/CMakeLists.txt <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/apps/marble_maps/MainScreen.qml <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/apps/marble_maps/MarbleMaps.qrc <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/apps/marble_maps/QmlView.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/apps/marble_maps/QmlView.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/apps/marble_maps/SearchBar.qml <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/apps/marble_maps/SearchBarBackend.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/apps/marble_maps/SearchBarBackend.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/apps/marble_maps/main.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/lib/marble/MarblePlacemarkModel.cpp <span style="color: grey">(a2c78c4f8603752182f64e42e02a585d5ea6b2e3)</span></li>

 <li>src/lib/marble/MarbleQuickItem.h <span style="color: grey">(41e20bb69bbeb9c1d662cd943ecb13674fd04498)</span></li>

 <li>src/plugins/runner/openrouteservice/OpenRouteServiceRunner.cpp <span style="color: grey">(7c1803998ce5a01e338f2eb04a2b7f310a926c26)</span></li>

 <li>src/plugins/runner/yours/YoursRunner.cpp <span style="color: grey">(4b1c0552718acc4a2f3070e95950975a57d4fdd4)</span></li>

</ul>

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



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments </h1>


 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/07/13/95493cb2-c43c-48f4-a1f0-7a5ca0486856__Screenshot_2015-07-13-17-57-06.png">Screenshot</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/07/13/ab43529f-26f4-4f52-9ba5-1c759fcee07d__Screenshot_2015-07-13-17-56-45.png">Screenshot 2</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/07/13/b6c76a6b-9118-4841-97e7-c204567454b8__Screenshot_2015-07-13-17-40-46.png">Screenshot 3</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/07/19/4fc5e41a-40aa-4d62-879c-6436e93dd1a0__searchFocused.png">searchFocused.png</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/07/19/c16c83c4-d25f-482d-b409-7cece2f7bad0__searchPressed.png">searchPressed.png</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/07/19/58b3d964-641d-457f-911e-62066d55cf61__searchReleased.png">searchReleased.png</a></li>

</ul>




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







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