Commit bc7689bc authored by David Jarvie's avatar David Jarvie
Browse files

Add DataModel to generically encapsulate AkonadiDataModel

parent 1ecb94c8
......@@ -25,7 +25,7 @@
#include "kalarmapp.h"
#include "mainwindow.h"
#include "preferences.h"
#include "resources/akonadidatamodel.h"
#include "resources/datamodel.h"
#include "resources/resources.h"
#include "lib/filedialog.h"
#include "lib/messagebox.h"
......@@ -72,7 +72,7 @@ bool AlarmCalendar::initialiseCalendars()
QDir dir;
dir.mkpath(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
QString displayCal = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + displayCalendarName;
AkonadiDataModel::instance();
DataModel::initialise();
Preferences::setBackend(Preferences::Akonadi);
Preferences::self()->save();
mResourcesCalendar = new AlarmCalendar();
......@@ -431,7 +431,7 @@ void AlarmCalendar::updateDisplayKAEvents()
delete event;
continue; // ignore events without usable alarms
}
event->setCollectionId(key);
event->setResourceId(key);
events += event;
mEventMap[EventId(key, kcalevent->uid())] = event;
}
......@@ -455,11 +455,11 @@ void AlarmCalendar::removeKAEvents(ResourceId key, bool closing, CalEvent::Types
for (int i = 0, end = events.count(); i < end; ++i)
{
KAEvent* event = events[i];
bool remove = (event->collectionId() != key);
bool remove = (event->resourceId() != key);
if (remove)
{
if (key != DISPLAY_COL_ID)
qCCritical(KALARM_LOG) << "AlarmCalendar::removeKAEvents: Event" << event->id() << ", resource" << event->collectionId() << "Indexed under resource" << key;
qCCritical(KALARM_LOG) << "AlarmCalendar::removeKAEvents: Event" << event->id() << ", resource" << event->resourceId() << "Indexed under resource" << key;
}
else
remove = event->category() & types;
......@@ -501,12 +501,12 @@ void AlarmCalendar::slotResourceSettingsChanged(Resource& resource, ResourceType
if (resource.isValid())
{
// For each alarm type which has been disabled, remove the
// collection's events from the map, but not from the resource.
// resource's events from the map, but not from the resource.
const CalEvent::Types enabled = resource.enabledTypes();
const CalEvent::Types disabled = ~enabled & (CalEvent::ACTIVE | CalEvent::ARCHIVED | CalEvent::TEMPLATE);
removeKAEvents(resource.id(), false, disabled);
// For each alarm type which has been enabled, add the collection's
// For each alarm type which has been enabled, add the resource's
// events to the map.
if (enabled != CalEvent::EMPTY)
slotEventsAdded(resource, resource.events());
......@@ -689,7 +689,7 @@ bool AlarmCalendar::importAlarms(QWidget* parent, Resource* resourceptr)
default:
continue;
}
res = Resources::destination<AkonadiDataModel>(type);
res = Resources::destination(type);
}
Event::Ptr newev(new Event(*event));
......@@ -948,7 +948,7 @@ bool AlarmCalendar::addEvent(KAEvent& evnt, QWidget* promptParent, bool useEvent
res = resource;
else
{
res = Resources::destination<AkonadiDataModel>(type, promptParent, noPrompt, cancelled);
res = Resources::destination(type, promptParent, noPrompt, cancelled);
if (!res.isValid())
{
const char* typeStr = (type == CalEvent::ACTIVE) ? "Active alarm" : (type == CalEvent::ARCHIVED) ? "Archived alarm" : "alarm Template";
......@@ -1009,7 +1009,7 @@ bool AlarmCalendar::addEvent(KAEvent& evnt, QWidget* promptParent, bool useEvent
void AlarmCalendar::addNewEvent(const Resource& resource, KAEvent* event, bool replace)
{
const ResourceId key = resource.id();
event->setCollectionId(key);
event->setResourceId(key);
if (!replace)
{
mResourceMap[key] += event;
......@@ -1169,7 +1169,7 @@ bool AlarmCalendar::deleteDisplayEvent(const QString& eventID, bool saveit)
*/
CalEvent::Type AlarmCalendar::deleteEventInternal(const KAEvent& event, bool deleteFromAkonadi)
{
Resource resource = Resources::resource(event.collectionId());
Resource resource = Resources::resource(event.resourceId());
if (!resource.isValid())
return CalEvent::EMPTY;
return deleteEventInternal(event.id(), event, resource, deleteFromAkonadi);
......@@ -1179,9 +1179,9 @@ CalEvent::Type AlarmCalendar::deleteEventInternal(const KAEvent& event, Resource
{
if (!resource.isValid())
return CalEvent::EMPTY;
if (event.collectionId() != resource.id())
if (event.resourceId() != resource.id())
{
qCCritical(KALARM_LOG) << "AlarmCalendar::deleteEventInternal: Event" << event.id() << ": resource" << event.collectionId() << "differs from 'resource'" << resource.id();
qCCritical(KALARM_LOG) << "AlarmCalendar::deleteEventInternal: Event" << event.id() << ": resource" << event.resourceId() << "differs from 'resource'" << resource.id();
return CalEvent::EMPTY;
}
return deleteEventInternal(event.id(), event, resource, deleteFromAkonadi);
......
......@@ -32,7 +32,7 @@
#include "preferences.h"
#include "recurrenceedit.h"
#include "reminder.h"
#include "resources/akonadidatamodel.h"
#include "resources/datamodel.h"
#include "resources/resources.h"
#include "lib/autoqpointer.h"
#include "lib/buttongroup.h"
......@@ -1162,7 +1162,7 @@ bool EditAlarmDlg::validate()
bool cancelled = false;
CalEvent::Type type = mTemplate ? CalEvent::TEMPLATE : CalEvent::ACTIVE;
if (!mResource.isWritable(type))
mResource = Resources::destination<AkonadiDataModel>(type, this, false, &cancelled);
mResource = Resources::destination(type, this, false, &cancelled);
if (!mResource.isValid())
{
if (!cancelled)
......
......@@ -32,7 +32,7 @@
#include "preferences.h"
#include "templatelistview.h"
#include "templatemenuaction.h"
#include "resources/akonadidatamodel.h"
#include "resources/datamodel.h"
#include "resources/resources.h"
#include "resources/eventmodel.h"
#include "lib/autoqpointer.h"
......@@ -258,7 +258,7 @@ UpdateResult addEvents(QVector<KAEvent>& events, QWidget* msgParent, bool allowK
status.status = UPDATE_FAILED;
else
{
Resource resource = Resources::destination<AkonadiDataModel>(CalEvent::ACTIVE, msgParent);
Resource resource = Resources::destination(CalEvent::ACTIVE, msgParent);
if (!resource.isValid())
{
qCDebug(KALARM_LOG) << "KAlarm::addEvents: No calendar";
......@@ -591,7 +591,7 @@ UpdateResult reactivateEvents(QVector<KAEvent>& events, QVector<EventId>& inelig
if (resourceptr)
resource = *resourceptr;
if (!resource.isValid())
resource = Resources::destination<AkonadiDataModel>(CalEvent::ACTIVE, msgParent);
resource = Resources::destination(CalEvent::ACTIVE, msgParent);
if (!resource.isValid())
{
qCDebug(KALARM_LOG) << "KAlarm::reactivateEvents: No calendar";
......@@ -746,7 +746,7 @@ QVector<KAEvent> getSortedActiveEvents(QObject* parent, AlarmListModel** model)
model = &mdl;
if (!*model)
{
*model = AlarmListModel::create<AkonadiDataModel>(parent);
*model = DataModel::createAlarmListModel(parent);
(*model)->setEventTypeFilter(CalEvent::ACTIVE);
(*model)->sort(AlarmListModel::TimeColumn);
}
......
......@@ -34,7 +34,7 @@
#include "prefdlg.h"
#include "startdaytimer.h"
#include "traywindow.h"
#include "resources/akonadidatamodel.h"
#include "resources/datamodel.h"
#include "resources/resources.h"
#include "resources/eventmodel.h"
#include "lib/desktop.h"
......@@ -140,8 +140,8 @@ KAlarmApp::KAlarmApp(int& argc, char** argv)
this, &KAlarmApp::purgeNewArchivedDefault);
connect(Resources::instance(), &Resources::resourcesCreated,
this, &KAlarmApp::checkWritableCalendar);
connect(AkonadiDataModel::instance(), &AkonadiDataModel::migrationCompleted,
this, &KAlarmApp::checkWritableCalendar);
connect(Resources::instance(), &Resources::migrationCompleted,
this, &KAlarmApp::checkWritableCalendar);
KConfigGroup config(KSharedConfig::openConfig(), "General");
mNoSystemTray = config.readEntry("NoSystemTray", false);
......@@ -1146,7 +1146,7 @@ void KAlarmApp::checkWritableCalendar()
MessageWin::redisplayAlarms();
}
if (!treeFetched
|| !AkonadiDataModel::instance()->isMigrationComplete())
|| !DataModel::isMigrationComplete())
return;
static bool done = false;
if (done)
......@@ -1156,7 +1156,7 @@ void KAlarmApp::checkWritableCalendar()
// Check for, and remove, any duplicate Akonadi resources, i.e. those which
// use the same calendar file/directory.
AkonadiResource::removeDuplicateResources();
DataModel::removeDuplicateResources();
// Find whether there are any writable active alarm calendars
const bool active = !Resources::enabledResources(CalEvent::ACTIVE, true).isEmpty();
......@@ -2344,7 +2344,7 @@ void KAlarmApp::commandMessage(ShellProcess* proc, QWidget* parent)
* If this is the first time through, open the calendar file, and start
* processing the execution queue.
*/
bool KAlarmApp::initCheck(bool calendarOnly, bool waitForCollection, ResourceId resourceId)
bool KAlarmApp::initCheck(bool calendarOnly, bool waitForResource, ResourceId resourceId)
{
static bool firstTime = true;
if (firstTime)
......@@ -2375,7 +2375,7 @@ bool KAlarmApp::initCheck(bool calendarOnly, bool waitForCollection, ResourceId
if (!calendarOnly)
startProcessQueue(); // start processing the execution queue
if (waitForCollection)
if (waitForResource)
{
// Wait for one or all calendar resources to be populated
if (!waitUntilPopulated(resourceId, AKONADI_TIMEOUT))
......@@ -2398,7 +2398,7 @@ bool KAlarmApp::waitUntilPopulated(ResourceId id, int timeout)
// Use AutoQPointer to guard against crash on application exit while
// the event loop is still running. It prevents double deletion (both
// on deletion of parent, and on return from this function).
AutoQPointer<QEventLoop> loop = new QEventLoop(AlarmListModel::all<AkonadiDataModel>());
AutoQPointer<QEventLoop> loop = new QEventLoop(DataModel::allAlarmListModel());
//TODO: The choice of parent object for QEventLoop can prevent EntityTreeModel signals
// from activating connected slots in AkonadiDataModel, which prevents resources
// from being informed that collections have loaded. Need to find a better parent
......
......@@ -36,7 +36,7 @@
#include "templatepickdlg.h"
#include "traywindow.h"
#include "wakedlg.h"
#include "resources/akonadidatamodel.h"
#include "resources/datamodel.h"
#include "resources/resources.h"
#include "resources/eventmodel.h"
#include "lib/autoqpointer.h"
......@@ -160,7 +160,7 @@ MainWindow::MainWindow(bool restored)
mSplitter->setStretchFactor(1, 1);
// Create the alarm list widget
mListFilterModel = AlarmListModel::create<AkonadiDataModel>(this);
mListFilterModel = DataModel::createAlarmListModel(this);
mListFilterModel->setEventTypeFilter(mShowArchived ? CalEvent::ACTIVE | CalEvent::ARCHIVED : CalEvent::ACTIVE);
mListView = new AlarmListView(WINDOW_NAME, mSplitter);
mListView->setModel(mListFilterModel);
......@@ -618,7 +618,7 @@ void MainWindow::enableTemplateMenuItem(bool enable)
void MainWindow::refresh()
{
qCDebug(KALARM_LOG) << "MainWindow::refresh";
AkonadiDataModel::instance()->reload();
DataModel::reload();
}
/******************************************************************************
......
......@@ -22,7 +22,7 @@
#include "functions.h"
#include "templatemenuaction.h"
#include "resources/akonadidatamodel.h"
#include "resources/datamodel.h"
#include "resources/resources.h"
#include "resources/eventmodel.h"
#include "lib/shellprocess.h"
......@@ -83,7 +83,7 @@ NewAlarmAction::NewAlarmAction(bool templates, const QString& label, QObject* pa
mTemplateAction = new TemplateMenuAction(QIcon::fromTheme(TEMPLATE_ICON), i18nc("@action", "New Alarm From &Template"), parent);
menu()->addAction(mTemplateAction);
connect(Resources::instance(), &Resources::settingsChanged, this, &NewAlarmAction::slotCalendarStatusChanged);
connect(TemplateListModel::all<AkonadiDataModel>(), &EventListModel::haveEventsStatus, this, &NewAlarmAction::slotCalendarStatusChanged);
connect(DataModel::allTemplateListModel(), &EventListModel::haveEventsStatus, this, &NewAlarmAction::slotCalendarStatusChanged);
slotCalendarStatusChanged(); // initialise action states
}
setDelayed(false);
......@@ -171,7 +171,7 @@ void NewAlarmAction::slotCalendarStatusChanged()
{
// Find whether there are any writable active alarm calendars
bool active = !Resources::enabledResources(CalEvent::ACTIVE, true).isEmpty();
bool haveEvents = TemplateListModel::all<AkonadiDataModel>()->haveEvents();
bool haveEvents = DataModel::allTemplateListModel()->haveEvents();
mTemplateAction->setEnabled(active && haveEvents);
setEnabled(active);
}
......
......@@ -401,11 +401,11 @@ void AkonadiDataModel::slotUpdateWorkingHours()
/******************************************************************************
* Reload a collection from Akonadi storage. The backend data is not reloaded.
*/
bool AkonadiDataModel::reloadResource(const Resource& resource)
bool AkonadiDataModel::reload(const Resource& resource)
{
if (!resource.isValid())
return false;
qCDebug(KALARM_LOG) << "AkonadiDataModel::reloadResource:" << resource.id();
qCDebug(KALARM_LOG) << "AkonadiDataModel::reload:" << resource.id();
Collection collection(resource.id());
mMonitor->setCollectionMonitored(collection, false);
mMonitor->setCollectionMonitored(collection, true);
......@@ -714,7 +714,6 @@ void AkonadiDataModel::setCollectionChanged(Resource& resource, const Collection
{
qCDebug(KALARM_LOG) << "AkonadiDataModel::setCollectionChanged: Migration completed";
setMigrationComplete();
Q_EMIT migrationCompleted();
}
}
}
......@@ -770,7 +769,6 @@ void AkonadiDataModel::slotMigrationCompleted()
{
qCDebug(KALARM_LOG) << "AkonadiDataModel: Migration completed";
setMigrationComplete();
Q_EMIT migrationCompleted();
}
}
......
......@@ -70,7 +70,7 @@ class AkonadiDataModel : public Akonadi::EntityTreeModel, public ResourceDataMod
Akonadi::Collection* collection(const Resource&) const;
/** Reload a collection's data from Akonadi storage (not from the backend). */
bool reloadResource(const Resource&);
bool reload(const Resource&);
/** Reload all collections' data from Akonadi storage (not from the backend). */
void reload();
......@@ -100,9 +100,6 @@ class AkonadiDataModel : public Akonadi::EntityTreeModel, public ResourceDataMod
void slotResourceMessage(Resource&, ResourceType::MessageType, const QString& message, const QString& details);
Q_SIGNALS:
/** Signal emitted when calendar migration/creation has completed. */
void migrationCompleted();
/** Signal emitted when the Akonadi server has stopped. */
void serverStopped();
......
......@@ -562,16 +562,6 @@ KAEvent AkonadiResource::event(Resource& resource, const Akonadi::Item& item)
return ev;
}
/******************************************************************************
* Get the collection to use for storing an alarm.
* Optionally, the standard collection for the alarm type is returned. If more
* than one collection is a candidate, the user is prompted.
*/
Resource AkonadiResource::destination(CalEvent::Type type, QWidget* promptParent, bool noPrompt, bool* cancelled)
{
return Resources::destination<AkonadiDataModel>(type, promptParent, noPrompt, cancelled);
}
/******************************************************************************
* Check for, and remove, any Akonadi resources which duplicate use of calendar
* files/directories.
......
......@@ -279,17 +279,6 @@ public:
static KAEvent event(Resource&, const Akonadi::Item&);
using QObject::event; // prevent warning about hidden virtual method
/** Find the collection to be used to store an event of a given type.
* This will be the standard collection for the type, but if this is not valid,
* the user will be prompted to select a collection.
* @param type The event type
* @param promptParent The parent widget for the prompt
* @param noPrompt Don't prompt the user even if the standard collection is not valid
* @param cancelled If non-null: set to true if the user cancelled the
* prompt dialogue; set to false if any other error
*/
static Resource destination(CalEvent::Type type, QWidget* promptParent = nullptr, bool noPrompt = false, bool* cancelled = nullptr);
/** Check for, and remove, Akonadi resources which duplicate use of
* calendar files/directories.
*/
......
/*
* datamodel.cpp - calendar data model dependent functions
* Program: kalarm
* Copyright © 2019 David Jarvie <djarvie@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "datamodel.h"
#include "akonadidatamodel.h"
#include "akonadiresource.h"
#include "eventmodel.h"
#include "resourcemodel.h"
namespace DataModel
{
void initialise()
{
AkonadiDataModel::instance();
}
void reload()
{
AkonadiDataModel::instance()->reload();
}
bool reload(Resource& resource)
{
return AkonadiDataModel::instance()->reload(resource);
}
bool isMigrationComplete()
{
return AkonadiDataModel::instance()->isMigrationComplete();
}
void removeDuplicateResources()
{
AkonadiResource::removeDuplicateResources();
}
ResourceListModel* createResourceListModel(QObject* parent)
{
return ResourceListModel::create<AkonadiDataModel>(parent);
}
ResourceFilterCheckListModel* createResourceFilterCheckListModel(QObject* parent)
{
return ResourceFilterCheckListModel::create<AkonadiDataModel>(parent);
}
AlarmListModel* createAlarmListModel(QObject* parent)
{
return AlarmListModel::create<AkonadiDataModel>(parent);
}
AlarmListModel* allAlarmListModel()
{
return AlarmListModel::all<AkonadiDataModel>();
}
TemplateListModel* createTemplateListModel(QObject* parent)
{
return TemplateListModel::create<AkonadiDataModel>(parent);
}
TemplateListModel* allTemplateListModel()
{
return TemplateListModel::all<AkonadiDataModel>();
}
} // namespace DataModel
// vim: et sw=4:
/*
* datamodel.h - calendar data model dependent functions
* Program: kalarm
* Copyright © 2019 David Jarvie <djarvie@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef DATAMODEL_H
#define DATAMODEL_H
class Resource;
class ResourceListModel;
class ResourceFilterCheckListModel;
class AlarmListModel;
class TemplateListModel;
class QObject;
/** Class to create objects dependent on data model. */
namespace DataModel
{
void initialise();
/** Reload all resources' data from storage.
* @note In the case of Akonadi, this does not reload from the backend storage.
*/
void reload();
/** Reload a resource's data from storage.
* @note In the case of Akonadi, this does not reload from the backend storage.
*/
bool reload(Resource&);
bool isMigrationComplete();
/** Check for, and remove, any duplicate Akonadi resources, i.e. those which
* use the same calendar file/directory.
*/
void removeDuplicateResources();
ResourceListModel* createResourceListModel(QObject* parent);
ResourceFilterCheckListModel* createResourceFilterCheckListModel(QObject* parent);
AlarmListModel* createAlarmListModel(QObject* parent);
AlarmListModel* allAlarmListModel();
TemplateListModel* createTemplateListModel(QObject* parent);
TemplateListModel* allTemplateListModel();
} // namespace DataModel
#endif // DATAMODEL_H
// vim: et sw=4:
......@@ -20,7 +20,7 @@
#include "resourcedatamodelbase.h"
#include "resource.h"
#include "resources.h"
#include "alarmtime.h"
#include "mainwindow.h"
......@@ -621,6 +621,7 @@ void ResourceDataModelBase::setMigrationInitiated(bool started)
void ResourceDataModelBase::setMigrationComplete()
{
mMigrationStatus = 1;
Resources::notifyResourcesMigrated();
}
// vim: et sw=4:
......@@ -238,11 +238,11 @@ void Resources::setStandard(Resource& resource, CalEvent::Types types)
}
/******************************************************************************
* Get the collection to use for storing an alarm.
* Optionally, the standard collection for the alarm type is returned. If more
* than one collection is a candidate, the user is prompted.
* Find the resource to be used to store an event of a given type.
* This will be the standard resource for the type, but if this is not valid,
* the user will be prompted to select a resource.
*/
Resource Resources::destination(ResourceListModel* model, CalEvent::Type type, QWidget* promptParent, bool noPrompt, bool* cancelled)
Resource Resources::destination(CalEvent::Type type, QWidget* promptParent, bool noPrompt, bool* cancelled)
{
if (cancelled)
*cancelled = false;
......@@ -257,6 +257,7 @@ Resource Resources::destination(ResourceListModel* model, CalEvent::Type type, Q
return standard;
// Prompt for which collection to use
ResourceListModel* model = DataModel::createResourceListModel(promptParent);
model->setFilterWritable(true);
model->setFilterEnabled(true);
model->setEventTypeFilter(type);
......@@ -386,6 +387,14 @@ void Resources::notifyResourcePopulated(const ResourceType* res)
checkResourcesPopulated();
}
/******************************************************************************
* Called to notify that migration/creation of resources has completed.
*/
void Resources::notifyResourcesMigrated()
{
Q_EMIT instance()->migrationCompleted();
}
/******************************************************************************
* Called by a resource to notify that its settings have changed.
* Emits the settingsChanged() signal.
......
......@@ -21,6 +21,7 @@
#ifndef RESOURCES_H
#define RESOURCES_H
#include "datamodel.h"
#include "resource.h"
#include "resourcemodel.h"
......@@ -121,7 +122,6 @@ public:
* @param cancelled If non-null: set to true if the user cancelled the
* prompt dialogue; set to false if any other error
*/
template <class DataModel>
static Resource destination(CalEvent::Type type, QWidget* promptParent = nullptr, bool noPrompt = false, bool* cancelled = nullptr);
/** Return whether all configured resources have been created. */
......@@ -151,6 +151,9 @@ public:
/** Called by a resource to notify that loading of events has successfully completed. */
static void notifyResourcePopulated(const ResourceType*);
/** Called to notify that migration/creation of resources has completed. */
static void notifyResourcesMigrated();
/** Called by a resource to notify that its settings have changed.
* This will cause the settingsChanged() signal to be emitted.
*/
......@@ -184,12 +187,18 @@ Q_SIGNALS:
void settingsChanged(Resource&, ResourceType::Changes);
/** Emitted when all configured resource have been created (but not
* necessarily populated). */
* necessarily populated). Note that after this, resource migration and
* the creation of default resources is performed and notified by the
* signal migrationCompleted().
*/
void resourcesCreated();
/** Emitted when all configured resources have been loaded for the first time. */
void resourcesPopulated();
/** Signal emitted when resource migration/creation at startup has completed. */
void migrationCompleted();
/** Emitted when a new resource has been created. */
void resourceAdded(Resource&);
......@@ -222,7 +231,6 @@ Q_SIGNALS:
private:
Resources();
static Resource destination(ResourceListModel* model, CalEvent::Type type, QWidget* promptParent, bool noPrompt, bool* cancelled);
/** Add a new ResourceType instance, with a Resource owner.
* Once the resource has completed its initialisation, call
......@@ -275,13 +283,6 @@ QVector<Resource> Resources::allResources(CalEvent::Type type)
return result;