diff options
author | Arno <arno@disconnect.de> | 2018-03-31 09:06:08 +0200 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2018-03-31 09:06:08 +0200 |
commit | 6ecd0f1ead9262a7de83f6e58c4ba2e9fcaef0eb (patch) | |
tree | b9c176be4fc87813da3627ff19f0c8008141b1aa /fswidget.h | |
parent | cb9e431e305c9417fe4efa38263871464f71d62e (diff) | |
download | SheMov-6ecd0f1ead9262a7de83f6e58c4ba2e9fcaef0eb.tar.gz SheMov-6ecd0f1ead9262a7de83f6e58c4ba2e9fcaef0eb.tar.bz2 SheMov-6ecd0f1ead9262a7de83f6e58c4ba2e9fcaef0eb.zip |
Search database during FSWidget::gatherData
First, look for md5 in files and files_origin. Then look for the complete
filename in files, and finally for the filename without suffix in files_origin.
If we have a match, note it in the new column "Presence". Matches from
files are displayed green, matches from files_orgin blue.
This implementation tries to execute as few QSqlQueries as possible by
using goto for performance. We only want to know if the file is somewhere
present, so skip the remaining queries once we have a match.
Diffstat (limited to 'fswidget.h')
-rw-r--r-- | fswidget.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -2,6 +2,7 @@ #define FSWIDGET_H #include <QWidget> +#include <QSqlQuery> class QComboBox; class QTreeView; @@ -22,6 +23,7 @@ class FSWidget : public QWidget { void insertItem(QComboBox *cb, const QString &text); void removeItem(QComboBox *cb); void gatherData(const QString &curDir); + int queryCount(QSqlQuery &q, const QString &arg) const; private: void setupWidget(); |