<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/119533/">https://git.reviewboard.kde.org/r/119533/</a>
</td>
</tr>
</table>
<br />
<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;">in mainwindow.cpp I added:</p>
<h1 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">ifdef Q_OS_MAC</h1>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">75<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
// not sure if this is really required but this is the code that works for me with g++-mp-4.8<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
76<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
static KParts::ReadWritePart <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">rwp = factory->create<KParts::ReadWritePart>( this );<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
77<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
static ktimetrackerpart </em>mp = dynamic_cast<ktimetrackerpart<em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">>( rwp );<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
78<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
m_part = dynamic_cast<ktimetrackerpart</em>>( rwp );<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
79<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
kError() << "this=" << this << "; rwp=" << rwp << "; mp=" << mp << "; m_part=" << m_part;<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
80 </p>
<h1 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">else</h1>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">turns out that this doesn't work when building with clang 3.4 (which is the current default compiler on OS X 10.9). the <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">kError</code> statement prints this:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">ktimetracker(92451): this= MainWindow(0x117929f20) ; rwp= ktimetrackerpart(0x103defe60) ; mp= QObject(0x0) ; m_part= QObject(0x0) </p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">which means back to the drawing board. </p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">How can it be that rwp is identified as a (pointer to a) <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">ktimetrackerpart</code>, and yet a <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">dynamic_cast<ktimetrackerpart*></code> returns NULL??</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Does that have anything to do with the comment just above my change,</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"> <span style="color: #408080; font-style: italic">//NOTE: Use the dynamic_cast below. Without it, KPluginLoader will use a qobject_cast</span>
<span style="color: #408080; font-style: italic">// that fails, because ktimetrackerpart is defined twice, once in ktimetracker's binary</span>
<span style="color: #408080; font-style: italic">// and another one in the plugin. The build system should be fixed.</span>
<span style="color: #408080; font-style: italic">//m_part = factory->create<ktimetrackerpart>( this );</span>
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">meaning someone would have to do the (apparently) required fix to the build system in order for this to work?</p></pre>
<br />
<p>- René J.V. Bertin</p>
<br />
<p>On July 31st, 2014, 10:27 p.m. CEST, René J.V. Bertin 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 KDE Software on Mac OS X and KDEPIM.</div>
<div>By René J.V. Bertin.</div>
<p style="color: grey;"><i>Updated July 31, 2014, 10:27 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kdepim
</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;">Signed-off-by: RJVB <rjvbertin@gmail.com></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;">Testing was done under KDE and KDEPIM 4.12.5, MacPorts. The patches from that version applied without issues on the code in git, with 2 exceptions that I could re-apply manually easily.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">With these patches, ktimetracker builds and launches under OS X (•) and loads existing ktimetracker.ics files correctly. The idle time detection feature appears to work as far as I'm able to tell (I don't use it under Linux).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">What remains to be done is to double-check the timing precision: I've had an impression that timing may be too fast but haven't been able to prove timing isn't correct.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The history output to clipboard feature does ignore the date range and "output only the selection" options; removing entries originating from Linux we have</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">"test" 0.00 0.00<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
"test->test 1" 0.07 0.03<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
"test->test 2" 0.00 0.06<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
"test->test 3" 0.00 0.03<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
"test->test 4" 0.00 0.03</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">and the timing output (which does honour the "output only the selection" option):</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Totaux des tâches<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
20140729 13:09</p>
<h2 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">Durée Tâche</h2>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">0:12 test<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
0:05 test 1<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
0:03 test 2<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
0:02 test 3<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
0:02 test 4</p>
<hr style="text-rendering: inherit;margin: 0;padding: 0;white-space: normal;border: 1px solid #ddd;line-height: inherit;" />
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">0:12 Total</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">•) this supposes libical is installed and built following https://trac.macports.org/ticket/44469, i.e. using cmake instead and including a patch from Ubuntu.</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>CMakeLists.txt.orig <span style="color: grey">(d12b90a)</span></li>
<li>ktimetracker/CMakeLists.txt <span style="color: grey">(bf7b0ef41d851055359dc2cdcb2d2d3cbce25a6d)</span></li>
<li>ktimetracker/idletimedetector.h <span style="color: grey">(524f739e89a77d1dbd732af8f258b3276e994eba)</span></li>
<li>ktimetracker/idletimedetector.cpp <span style="color: grey">(250dda55582f53cfc44242582dee7e07062f5358)</span></li>
<li>ktimetracker/ktimetrackerutility.cpp <span style="color: grey">(efeba3abdc94a3725f0e0d6a9b663959a06dcc1f)</span></li>
<li>ktimetracker/mainwindow.cpp <span style="color: grey">(56d4c286213507490b31fb131f1097a4c00b7abe)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/119533/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>