Ignore:
Timestamp:
07/28/21 23:41:39 (13 months ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master
Children:
e4dcafe
Parents:
280f29b
git-author:
Philipp Spitzer <philipp@…> (07/28/21 23:41:14)
git-committer:
Philipp Spitzer <philipp@…> (07/28/21 23:41:39)
Message:

Adjust shown event time when displayTimeShift is set.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/conferencemodel.cpp

    r280f29b r5b7fa79  
    4040        return QVariant();
    4141    }
    42 
    4342    return conferences[index.row()].title();
    44 
    45     try {
    46         const Conference& c = conferenceFromIndex(index);
    47         return c.title();
    48     } catch (OrmNoObjectException&) {
    49         return QVariant();
    50     }
    51 
    5243}
    5344
    5445const Conference& ConferenceModel::conferenceFromIndex(const QModelIndex& index) const
     46{
     47    if (index.parent().isValid()
     48        or index.column() != 0
     49        or index.row() >= conferences.size())
     50    {
     51        throw OrmNoObjectException();
     52    }
     53    return conferences[index.row()];
     54}
     55
     56Conference& ConferenceModel::conferenceFromIndex(const QModelIndex& index)
    5557{
    5658    if (index.parent().isValid()
Note: See TracChangeset for help on using the changeset viewer.