useConference(Conference::activeConference());
// optimization, see useConference() code
try {
- initTabs();
- } catch (OrmException) {
- clearTabs();
+ initTabs();
+ } catch (const OrmException& e) {
+ qDebug() << "OrmException:" << e.text();
+ clearTabs();
}
// TODO: open conferences at startup?
{
Q_UNUSED(aDate);
Q_UNUSED(aConferenceId);
- };
+ }
signals:
void eventHasChanged(int aEventId, bool aReloadModel);
void EventModel::clearModel()
{
- qDebug() << __PRETTY_FUNCTION__ << this << mEvents.count();
+ // qDebug() << __PRETTY_FUNCTION__ << this << mEvents.count();
mGroups.clear();
mEvents.clear();
mParents.clear();
class EventModel : public QAbstractItemModel
{
public:
- static const QString COMMA_SEPARATOR;
+ static const QString COMMA_SEPARATOR; // ", "
public:
EventModel();
QVariant data(const QModelIndex& index, int role) const;
Group(const QString & title,
int firstEventIndex) :
- mTitle(title),
- mFirstEventIndex(firstEventIndex),
- mChildCount(0)
+ mTitle(title), // e.g. "16:00 - 17:30"
+ mFirstEventIndex(firstEventIndex), // first index within mEvents
+ mChildCount(0) // number of events in mEvents
{}
QString mTitle;
class OrmException
{
public:
- OrmException(const QString& text) : mText(text) {};
- virtual ~OrmException(){};
+ OrmException(const QString& text) : mText(text) {}
+ virtual ~OrmException(){}
virtual const QString& text() const { return mText; }
private:
QString mText;
class OrmNoObjectException : public OrmException
{
public:
- OrmNoObjectException() : OrmException("No object exception"){};
- ~OrmNoObjectException(){};
+ OrmNoObjectException() : OrmException("No object exception"){}
+ ~OrmNoObjectException(){}
};
class OrmSqlException : public OrmException
{
public:
- OrmSqlException(const QString& text) : OrmException( QString("Sql error: ") + text ) {};
- ~OrmSqlException(){};
+ OrmSqlException(const QString& text) : OrmException( QString("Sql error: ") + text ) {}
+ ~OrmSqlException(){}
};
template <typename T>