use foreach to eliminate explicit iterator type

Also switch to const RideItem pointer.
This commit is contained in:
Sean Rhea
2009-12-31 10:15:14 -05:00
parent e4b54f42b9
commit f2c53b1707

View File

@@ -59,10 +59,7 @@ void RideCalendar::paintCell(QPainter *painter, const QRect &rect, const QDate &
/*
* Loop over all the rides for today, and record colour and text.
*/
QMultiMap<QDateTime, RideItem *>::const_iterator i = ridesToday.begin();
while (i != ridesToday.end()) {
RideItem *ride = i.value();
foreach (const RideItem *ride, ridesToday.values()) {
QString notesPath = home.absolutePath() + "/" + ride->notesFileName;
QFile notesFile(notesPath);
QColor color(128, 255, 128);
@@ -95,7 +92,6 @@ void RideCalendar::paintCell(QPainter *painter, const QRect &rect, const QDate &
pen.setStyle(Qt::SolidLine);
painter->setPen(pen);
painter->drawRoundRect(textRect, 10, 10);
++i;
++count;
}