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





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On August 30th, 2010, 10:08 p.m., <b>jmho</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I&#39;m wondering if there is a more canonical way of preventing the screensaver starting. Applications which provide a presentation mode or video players should have the same problem to solve.</pre>
 </blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Hm, the inhibition comes down to

#include &lt;QtMobility&gt;
new QSystemScreenSaver( this )-&gt;setScreenSaverInhibit();

It works on Maemo, Linux, and possibly every other platform supported by Qt. Not sure how a better solution should look like? I&#39;d guess other solutions not using QtMobility are full of platform dependent #ifdefs.

The rest of the code is there to realize it as a Marble plugin, which adds some code overhead, but has the neat side-effect of adding the QtMobility dependency only to the inhibit-screensaver plugin. The marblewidget lib and the marble applications don&#39;t need to know / link against QtMobility.
</pre>
<br />








<p>- Dennis</p>


<br />
<p>On August 27th, 2010, 11:31 a.m., Dennis Nienhüser wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

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


<p style="color: grey;"><i>Updated 2010-08-27 11:31:52</i></p>




<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;">In turn-by-turn navigation mode you usually just watch the screen, but do not &quot;use&quot; the system. A screensaver (screen blanking and locking on Maemo) coming in at that point is highly annoying. This patch adds an invisible render plugin that uses QtMobility to inhibit the screensaver as long as the plugin is enabled and a position provider is active. Given that it is a plugin on its own, the new dependency to QtMobility doesn&#39;t affect Marble much: Without QtMobility, the screensaver inhibition plugin is not build and its functionality isn&#39;t there, nothing else.
</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;">Works on my N900.
</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>/trunk/KDE/kdeedu/marble/FindQtsysteminfo.cmake <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/KDE/kdeedu/marble/src/lib/graphicsview/ScreenGraphicsItem_p.h <span style="color: grey">(1168534)</span></li>

 <li>/trunk/KDE/kdeedu/marble/src/plugins/render/CMakeLists.txt <span style="color: grey">(1168534)</span></li>

 <li>/trunk/KDE/kdeedu/marble/src/plugins/render/inhibit-screensaver/CMakeLists.txt <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/KDE/kdeedu/marble/src/plugins/render/inhibit-screensaver/InhibitScreensaverPlugin.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/KDE/kdeedu/marble/src/plugins/render/inhibit-screensaver/InhibitScreensaverPlugin.cpp <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

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




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








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