diff options
author | Arno <am@disconnect.de> | 2014-02-15 04:55:46 +0100 |
---|---|---|
committer | Arno <am@disconnect.de> | 2014-02-15 04:55:46 +0100 |
commit | 816b84b7a4263c587c661e4c7178f3b6721e4cfe (patch) | |
tree | d5d6bd412d26b29f053ba7f3135f85b01dae08a7 /archivemodel.cpp | |
parent | dcbf9244f0ed147a5f3c412b9e83c581b58fa1b2 (diff) | |
download | SheMov-816b84b7a4263c587c661e4c7178f3b6721e4cfe.tar.gz SheMov-816b84b7a4263c587c661e4c7178f3b6721e4cfe.tar.bz2 SheMov-816b84b7a4263c587c661e4c7178f3b6721e4cfe.zip |
Replace ArchiveModel::FileType with #define
These constants are used all over the place and aren't really specific
to ArchiveModel, so use the preprocessor.
Diffstat (limited to 'archivemodel.cpp')
-rw-r--r-- | archivemodel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<int> &seriesPartIds){ @@ -886,7 +886,7 @@ void ArchiveFilesModel::populate(const QSet<int> &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)){ |