Changeset 141a5c2


Ignore:
Timestamp:
06/23/11 08:57:20 (10 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
f09a1b9
Parents:
909ea23
Message:

Tracks are inserted now when importing new conferences.

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/track.cpp

    r909ea23 r141a5c2  
    5151}
    5252
    53 Track Track::retrieveByName(QString name)
     53Track Track::retrieveByName(int conferenceid, QString name)
    5454{
    5555    QSqlQuery query;
    5656    query.prepare(
    5757            selectQuery()
    58             + QString("WHERE %1.name = :name").arg(sTableName));
     58            + QString("WHERE %1.xid_conference = :xid_conference and %1.name = :name").arg(sTableName));
     59    query.bindValue(":xid_conference", conferenceid);
    5960    query.bindValue(":name", name);
    6061    return loadOne(query);
  • src/mvc/track.h

    r909ea23 r141a5c2  
    4343    static Track retrieve(int id);
    4444    static QString retrieveTrackName(int id);
    45     static Track retrieveByName(QString name);
     45    static Track retrieveByName(int conferenceid, QString name);
    4646};
    4747
  • src/sql/sqlengine.cpp

    r909ea23 r141a5c2  
    141141        try
    142142        {
    143             track = Track::retrieveByName(name);
     143            track = Track::retrieveByName(conference, name);
    144144            trackId = track.id();
    145145            /*qDebug() << QString("DEBUG: Track %1 in DB").arg(name);*/
Note: See TracChangeset for help on using the changeset viewer.