~mixxxcontributors/mixxx/advanced_autodj

« back to all changes in this revision

Viewing changes to mixxx/src/library/browse/browsetablemodel.cpp

  • Committer: Daniel Schürmann
  • Date: 2013-06-12 23:27:21 UTC
  • mfrom: (3184.1.101 mixxx-trunk)
  • Revision ID: daschuer@mixxx.org-20130612232721-ol6h11m9xbf72d2k
merge -r date:2012-06-26 lp:mixxx

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
}
130
130
 
131
131
const QString BrowseTableModel::currentSearch() const {
132
 
    return QString();
 
132
    return QString(""); 
133
133
}
134
134
 
135
135
bool BrowseTableModel::isColumnInternal(int) {
181
181
        return;
182
182
    }
183
183
 
184
 
 
 
184
    QList<int> deleted_ids;
185
185
    bool any_deleted = false;
186
186
    TrackDAO& track_dao = m_pTrackCollection->getTrackDAO();
187
187
 
198
198
        qDebug() << "BrowseFeature: User deleted track " << track_location;
199
199
        any_deleted = true;
200
200
 
201
 
        // If the track was contained in the Mixxx library, delete it
202
 
        if (track_dao.trackExistsInDatabase(track_location)) {
203
 
            int id = track_dao.getTrackId(track_location);
204
 
            qDebug() << "BrowseFeature: Deletion affected database";
205
 
            track_dao.removeTrack(id);
206
 
        }
 
201
        deleted_ids.append(track_dao.getTrackId(track_location));
 
202
    }
 
203
 
 
204
    // If the tracks are contained in the Mixxx library, delete them
 
205
    if (!deleted_ids.isEmpty()) {
 
206
        qDebug() << "BrowseFeature: Purge affected track from database";
 
207
        track_dao.purgeTracks(deleted_ids);
207
208
    }
208
209
 
209
210
    // Repopulate model if any tracks were actually deleted