Changeset 066b41f in confclerk_git for src


Ignore:
Timestamp:
10/17/11 22:50:54 (11 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
11d7ec5
Parents:
1ca13ef
Message:

Removed unused nowEvent functions.

Location:
src/mvc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/event.cpp

    r1ca13ef r066b41f  
    7878}
    7979
    80 QList<Event> Event::nowEvents(int conferenceId, QString orderBy)
    81 {
    82     uint curTime_t =  QDateTime(QDate::currentDate(),QTime::currentTime(),Qt::UTC).toTime_t();
    83     //uint curTime_t = 1265457610; // for testing
    84 
    85     QSqlQuery query;
    86     query.prepare(selectQuery() + QString("WHERE xid_conference = :conf AND start <= :now1 AND ( start + duration ) > :now2 ORDER BY %1").arg(orderBy));
    87     query.bindValue(":conf", conferenceId);
    88     query.bindValue(":now1", convertToDb(curTime_t, QVariant::DateTime));
    89     query.bindValue(":now2", convertToDb(curTime_t, QVariant::DateTime));
    90 
    91     return load(query);
    92 }
    93 
    94 QList<Event> Event::conflictEvents(int aEventId, int conferenceId)
    95 {
     80
     81QList<Event> Event::conflictEvents(int aEventId, int conferenceId) {
    9682    QSqlQuery query;
    9783    Event event = Event::getById(aEventId,conferenceId);
     
    10995    return load(query);
    11096}
     97
    11198
    11299QList<Event> Event::getFavByDate(const QDate& date, int conferenceId)
  • src/mvc/event.h

    r1ca13ef r066b41f  
    4747    static QList<Event> getFavByDate(const QDate & date, int conferenceId); // get Favourities by Date
    4848    static QList<Event> getSearchResultByDate(const QDate& date, int conferenceId, QString orderBy);
    49     static QList<Event> nowEvents(int conferenceId, QString orderBy); // get events scheduled NOW
    5049    static QList<Event> getByTrack(int id);
    5150    static QList<Event> getByDateAndRoom(const QDate& date, int conferenceId);
  • src/mvc/eventmodel.cpp

    r1ca13ef r066b41f  
    301301}
    302302
    303 void EventModel::loadNowEvents(int aConferenceId)
    304 {
    305     clearModel();
    306     // check for existence of the conference in the DB
    307     if(Conference::getAll().count())
    308     {
    309         mEvents = Event::nowEvents(aConferenceId, "start");
    310     }
    311     createTimeGroups();
    312 }
    313 
    314 void EventModel::loadConflictEvents(int aEventId, int aConferenceId)
    315 {
     303
     304void EventModel::loadConflictEvents(int aEventId, int aConferenceId) {
    316305    clearModel();
    317306    // check for existence of the conference in the DB
  • src/mvc/eventmodel.h

    r1ca13ef r066b41f  
    4040    void loadEventsByTrack(const QDate &aDate, int aConferenceId); // loads Events sorted by Track id and Event start from the DB
    4141    int loadSearchResultEvents(const QDate &aDate, int aConferenceId);
    42     void loadNowEvents(int aConferenceId); // loads Now events from the DB
    4342    void loadEventsByRoom(const QDate &aDate, int aConferenceId);
    4443    void loadConflictEvents(int aEventId, int aConferenceId); // loads events in conflict
Note: See TracChangeset for help on using the changeset viewer.