From 816b84b7a4263c587c661e4c7178f3b6721e4cfe Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 15 Feb 2014 04:55:46 +0100 Subject: Replace ArchiveModel::FileType with #define These constants are used all over the place and aren't really specific to ArchiveModel, so use the preprocessor. --- archivemodel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'archivemodel.cpp') diff --git a/archivemodel.cpp b/archivemodel.cpp index 388833d..3fcd34e 100644 --- a/archivemodel.cpp +++ b/archivemodel.cpp @@ -486,7 +486,7 @@ void ArchiveModel::addCovers(int partId, const QStringList covers){ qint64 size = fi.size(); QString md5sum = Helper::md5Sum(c); QVariant picSize = Helper::picSize(c); - int type = ArchiveFilesModel::GeneralCover; + int type = FT_GENERALCOVER; QString archivedFile = Helper::moveToArchive(c, md5sum, true); if(archivedFile.isEmpty()){ //copy failed @@ -853,7 +853,7 @@ int ArchiveFilesModel::nextDvd() const{ } bool ArchiveFilesModel::isMovie(const QModelIndex &idx) const{ - return idx.data(FileTypeRole).toInt() == Movie; + return idx.data(FileTypeRole).toInt() == FT_MOVIE; } void ArchiveFilesModel::populate(const QSet &seriesPartIds){ @@ -886,7 +886,7 @@ void ArchiveFilesModel::populate(const QSet &seriesPartIds){ } QString fullPath = Helper::createArchivePath(data.at(Filename).toString(), data.at(Md5Sum).toString()); data << fullPath; - if(data.at(FileType).toInt() == Movie){ + if(data.at(FileType).toInt() == FT_MOVIE){ SmTreeItem *newItem = new SmTreeItem(data, movies); movies->appendChild(newItem); if((data.at(DvdNo).toInt() < 0) && (data.at(SizeDur) == 0)){ -- cgit v1.2.3-70-g09d2