<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://git.reviewboard.kde.org/r/100098/">http://git.reviewboard.kde.org/r/100098/</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;">Even though QWeakPointer is sometimes not needed, I'm for using it liberally anyway. That's because:
1) There is virtually no overhead (Thiago designed the class very well).
2) Better to be safe than sorry.
3) It's good programming practice. We have many contributors, and not everyone is an expert on memory management.
</pre>
<br />
<p>- Mark</p>
<br />
<p>On October 23rd, 2010, 12:19 a.m., Ralf Engels wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.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 Amarok.</div>
<div>By Ralf Engels.</div>
<p style="color: grey;"><i>Updated 2010-10-23 00:19:36</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;">This patch improves the SqlMeta thread safety.
It has several parts:
- Use QReadWriteLock for SqlTrack.
For this I also needed to pull the read accessor functions into the .cpp
- SqlCollection is a const pointer.
All metas are directly dependent on the SqlCollection and it could and should never change.
Using weak pointers here is not needed.
Note that now the access to m_collection is also thread safe as it's const
- SqlAlbum::setCompilation did modify the old album
This was changed an a new album will be created.
The positive side effect is that the UI will now update directly if setting a compilation
- SqlAlbum::setImage will now copy embedded images directly when set
If the track-uid is set (maybe from another thread) the cover image will still be found.
Note that the image cache is and was not connected to the track uid.</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;">setting and unsetting compilation
changing album name
scanning and fully scanning collection</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://bugs.kde.org/show_bug.cgi?id=254631">254631</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/core-impl/collections/sqlcollection/CapabilityDelegateImpl.cpp <span style="color: grey">(78fd02b)</span></li>
<li>src/core-impl/collections/sqlcollection/SqlCollection.cpp <span style="color: grey">(b88d257)</span></li>
<li>src/core-impl/collections/sqlcollection/SqlMeta.h <span style="color: grey">(b92e351)</span></li>
<li>src/core-impl/collections/sqlcollection/SqlMeta.cpp <span style="color: grey">(6b29b6e)</span></li>
<li>src/core-impl/collections/sqlcollection/SqlRegistry.h <span style="color: grey">(66ba632)</span></li>
<li>src/core-impl/collections/sqlcollection/SqlRegistry.cpp <span style="color: grey">(e1b3571)</span></li>
<li>tests/core-impl/collections/sqlcollection/TestSqlArtist.cpp <span style="color: grey">(d57f55a)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/100098/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>