diff --git a/src/GcCalendarModel.h b/src/GcCalendarModel.h index d63215315..2ac6a7f45 100644 --- a/src/GcCalendarModel.h +++ b/src/GcCalendarModel.h @@ -88,6 +88,9 @@ public slots: if (!sourceModel()) return; // no model yet! + // ok, let em know we're about to reset! + beginResetModel(); + QDate first = QDate(year, month, 1); // Date array int monthDays = first.daysTo(first.addMonths(1)); // how many days in this month? @@ -135,12 +138,9 @@ public slots: arr->append(j); dateToRows.insert(dateTime.date(), arr); } -#if QT_VERSION > 0x050000 - resetInternalData(); //XXX BROKEN! -#else - reset(); -#endif + // reset completed + endResetModel(); } public: diff --git a/src/RideNavigatorProxy.h b/src/RideNavigatorProxy.h index dd3651a15..5edd7e0e8 100644 --- a/src/RideNavigatorProxy.h +++ b/src/RideNavigatorProxy.h @@ -488,13 +488,14 @@ public: public slots: void sourceModelChanged() { + + // notify everyone we're changing + beginResetModel(); + clearGroups(); setGroupBy(groupBy+2); // accomodate virtual columns -#if QT_VERSION > 0x050000 - resetInternalData(); //XXX BROKEN! -#else - reset(); -#endif + + endResetModel();// we're clean // lets expand column 0 for the groupBy heading for (int i=0; i < groupCount(); i++)