Comment 14 for bug 801700

Revision history for this message
Max Linke (max-linke) wrote :

I've changed some comments and used QMutexLocker instead of mutex.lock where the mutex doesn't get unlocked immediately, this should be easier to maintain over time. TrackDAO::addTracksAdd now checks if the querys exists and
exits with an error message if they are missing.

But I have some questions to the code in BaseTrackCache?

       if (id > 0) {
  QVector<QVariant>& record = m_trackInfo[id];
  record.resize(numColumns);

  for (int i = 0; i < numColumns; ++i) {
   record[i] = getTrackValueForColumn(pTrack, i);
  }
 }

why has record to be resized? Shouldn't it already have the right size?

Other from that it looks good to me. I haven't done any performance measurements but it looks faster to me.

best Max