Commit 2a6d92d0 authored by Allen Winter's avatar Allen Winter

Fix the non-Akonadi build. Hopefully I ported QList to QVector ok.

Also note that emailaddresses from KCal::Alarm are still in a QList
and not in a QVector.

CCMAIL: djarvie@kde.org
parent 37e1b07f
......@@ -2209,7 +2209,7 @@ bool KAEvent::Private::updateKCalEvent(Event* ev, UidAction uidact) const
* allows the alarm to float within the 24-hour period defined by the
* start-of-day time (which is user-dependent and therefore can't be
* written into the calendar) rather than midnight to midnight, and there
* is no RFC2445 conformant way to specify this.
* is no RFC2445 conformant way to specify this.
* RFC2445 states that alarm trigger times specified in absolute terms
* (rather than relative to DTSTART or DTEND) can only be specified as a
* UTC DATE-TIME value. So always use a time relative to DTSTART instead of
......@@ -4485,7 +4485,7 @@ bool KAEvent::convertKCalEvents(CalendarLocal& calendar, int calendarVersion, bo
{
/*
* It's a KAlarm pre-2.7.0 calendar file.
* Archive and at-login flags were stored in event's ARCHIVE property when the main alarm had expired.
* Archive and at-login flags were stored in event's ARCHIVE property when the main alarm had expired.
* Reminder parameters were stored in event's ARCHIVE property when no reminder was pending.
* Negative reminder periods (i.e. alarm offset > 0) were invalid, so convert to 0.
* Now store reminder information in FLAGS property, whether reminder is pending or not.
......@@ -4553,7 +4553,7 @@ bool KAEvent::convertKCalEvents(CalendarLocal& calendar, int calendarVersion, bo
}
if (!flags.isEmpty())
alarm->setCustomProperty(KAlarm::Calendar::APPNAME, Private::FLAGS_PROPERTY, flags.join(Private::SC));
// Invalidate negative reminder periods in alarms
if (!alarm->hasStartOffset())
continue;
......@@ -5017,7 +5017,7 @@ void KAAlarmEventBase::baseDumpDebug() const
#ifdef USE_AKONADI
EmailAddressList& EmailAddressList::operator=(const Person::List& addresses)
#else
EmailAddressList& EmailAddressList::operator=(const QVector<Person>& addresses)
EmailAddressList& EmailAddressList::operator=(const QList<Person>& addresses)
#endif
{
clear();
......
......@@ -61,7 +61,7 @@ typedef KCalCore::Person EmailAddress;
class KALARM_CAL_EXPORT EmailAddressList : public KCalCore::Person::List
#else
typedef KCal::Person EmailAddress;
class KALARM_CAL_EXPORT EmailAddressList : public QVector<KCal::Person>
class KALARM_CAL_EXPORT EmailAddressList : public QList<KCal::Person>
#endif
{
public:
......@@ -70,9 +70,9 @@ class KALARM_CAL_EXPORT EmailAddressList : public QVector<KCal::Person>
EmailAddressList(const KCalCore::Person::List& list) { operator=(list); }
EmailAddressList& operator=(const KCalCore::Person::List&);
#else
EmailAddressList() : QVector<KCal::Person>() { }
EmailAddressList(const QVector<KCal::Person>& list) { operator=(list); }
EmailAddressList& operator=(const QVector<KCal::Person>&);
EmailAddressList() : QList<KCal::Person>() { }
EmailAddressList(const QList<KCal::Person>& list) { operator=(list); }
EmailAddressList& operator=(const QList<KCal::Person>&);
#endif
operator QStringList() const;
QString join(const QString& separator) const;
......
......@@ -47,7 +47,7 @@ KAlarm::Calendar::Compat fix(KCal::CalendarLocal& calendar, const QString& local
*wrongType = false;
QString versionString;
int version = KAlarm::Calendar::updateVersion(calendar, localFile, versionString);
if (version == KAlarm::Calendar::IncompatibleFormat)
if (version == KAlarm::IncompatibleFormat)
return KAlarm::Calendar::Incompatible; // calendar was created by another program, or an unknown version of KAlarm
if (!resource)
return KAlarm::Calendar::Current; // update non-shared calendars regardless
......@@ -56,7 +56,7 @@ KAlarm::Calendar::Compat fix(KCal::CalendarLocal& calendar, const QString& local
if (wrongType)
*wrongType = !resource->checkAlarmTypes(calendar);
if (version == KAlarm::Calendar::CurrentFormat)
if (version == KAlarm::CurrentFormat)
return KAlarm::Calendar::Current; // calendar is in current KAlarm format
if (resource->ResourceCached::readOnly() || conv == AlarmResource::NO_CONVERT)
return KAlarm::Calendar::Convertible;
......
......@@ -616,7 +616,7 @@ void EventListModel::slotResourceStatusChanged(AlarmResource* resource, AlarmRes
for (int i = list.count(); --i >= 0; )
{
if (mEvents.indexOf(list[i]) >= 0)
list.removeAt(i); // avoid creating duplicate entries
list.remove(i); // avoid creating duplicate entries
}
if (!list.isEmpty())
{
......@@ -656,7 +656,7 @@ void EventListModel::removeResource(AlarmResource* resource)
{
beginRemoveRows(QModelIndex(), row + 1, lastRow);
while (lastRow > row)
mEvents.removeAt(lastRow--);
mEvents.remove(lastRow--);
endRemoveRows();
lastRow = -1;
}
......@@ -665,7 +665,7 @@ void EventListModel::removeResource(AlarmResource* resource)
{
beginRemoveRows(QModelIndex(), 0, lastRow);
while (lastRow >= 0)
mEvents.removeAt(lastRow--);
mEvents.remove(lastRow--);
endRemoveRows();
}
if (mHaveEvents && mEvents.isEmpty())
......@@ -759,7 +759,7 @@ void EventListModel::removeEvent(int row)
if (row < 0)
return;
beginRemoveRows(QModelIndex(), row, row);
mEvents.removeAt(row);
mEvents.remove(row);
endRemoveRows();
if (mHaveEvents && mEvents.isEmpty())
updateHaveEvents(false);
......
......@@ -1026,7 +1026,7 @@ void purgeArchive(int purgeDays)
KAEvent* event = events[i];
Incidence* kcalIncidence = resource->incidence(event->id());
if (purgeDays && kcalIncidence && kcalIncidence->created().date() >= cutoff)
events.removeAt(i);
events.remove(i);
else
EventListModel::alarms()->removeEvent(events[i++]); // update the window lists
}
......
......@@ -848,11 +848,10 @@ void MainWindow::slotDelete(bool force)
{
AlarmResource* r = resources->resourceForEvent(ids[i]);
if (!r)
events[i] = 0;
events.remove(i);
else
undos.append(*events[i], r);
}
events.removeAll((KAEvent*)0);
#endif
if (events.isEmpty())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment