diff options
author | Arno <arno@disconnect.de> | 2018-01-03 12:14:37 +0100 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2018-01-03 12:19:51 +0100 |
commit | 7f3d33ab7e02ab34efb2e0db9a7a912c66de7eef (patch) | |
tree | a65b1f1c08f551b14f4b788767ec2add2d9d25e0 /filewidget.h | |
parent | 7b7ef1e0d88bbec407de65eac59304bcc01a9c75 (diff) | |
download | ShemovCleaner-7f3d33ab7e02ab34efb2e0db9a7a912c66de7eef.tar.gz ShemovCleaner-7f3d33ab7e02ab34efb2e0db9a7a912c66de7eef.tar.bz2 ShemovCleaner-7f3d33ab7e02ab34efb2e0db9a7a912c66de7eef.zip |
Check Present attribute on cached data
Well, we cannot cache the Present attribute, because it can change
without our knowledge, when a movie file has been archived in the
meantime. Leave it in CachedFileData for now, but check it when we found
a cache entry.
While working on this, I realized that the Origin attribute is pretty
much useless, at least in its current form. countMd5() already checks
the origin table, and everything else was guesswork on the filename.
Also, it was an extra, quite expensive SQL-Query for every video file,
so remove it.
Diffstat (limited to 'filewidget.h')
-rw-r--r-- | filewidget.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/filewidget.h b/filewidget.h index 0d66d9d..131f187 100644 --- a/filewidget.h +++ b/filewidget.h @@ -30,7 +30,7 @@ class QStandardItem; class FileWidget : public QWidget { Q_OBJECT public: - enum FileAttrs { NotPresent = 0, Present = 1, NoVideo = 2, ParentDir = 3, Directory = 4, Origin = 5 }; + enum FileAttrs { NotPresent = 0, Present = 1, NoVideo = 2, ParentDir = 3, Directory = 4 }; enum CustomRoles { AttrsRole = Qt::UserRole + 1, FullPathRole = Qt::UserRole + 2, DurationRole = Qt::UserRole + 3, MD5SumRole = Qt::UserRole + 4, SecondsRole = Qt::UserRole + 5, SizeRole = Qt::UserRole + 6 }; enum { ColumnCount = 7 }; enum Columns { IconColumn = 0, NameColumn = 1, CopiedColumn = 2, MimeColumn = 3, DurationColumn = 4, SizeColumn = 5, Md5Column = 6 }; @@ -83,7 +83,6 @@ class FileWidget : public QWidget { void createActions(); void fileData(const QString &fullPath, const QString &md5); int md5Count(const QString &md5); - bool haveOrigin(const QString filename); void readHeaderData(); void writeHeaderData(); void readSettings(); @@ -103,7 +102,6 @@ class FileWidget : public QWidget { QSqlDatabase mDb; QSqlQuery mQOrigin; QSqlQuery mQFiles; - QSqlQuery mQSimilar; QMimeData *mMimeData; QAction *mSelDirA; QAction *mRefreshA; |