diff options
author | Arno <arno@disconnect.de> | 2016-03-04 20:06:35 +0100 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2016-03-04 20:06:35 +0100 |
commit | dbe1e9b2fb16ebf25dcb829e066fd9f8690d4283 (patch) | |
tree | f4a0c5979a981a140572a8abfc5baa2f81b6f041 /archivebrowsermodel.cpp | |
parent | 8cd9d32bb11a08ff4ff8265fe9309dda1c666856 (diff) | |
download | SheMov-dbe1e9b2fb16ebf25dcb829e066fd9f8690d4283.tar.gz SheMov-dbe1e9b2fb16ebf25dcb829e066fd9f8690d4283.tar.bz2 SheMov-dbe1e9b2fb16ebf25dcb829e066fd9f8690d4283.zip |
Now MoveToUSB does something!
Make it work. Lessons learned:
Don't keep a QProgressDialog around. Use it and delete it later.
Otherwise it will show up spontaneously.
Diffstat (limited to 'archivebrowsermodel.cpp')
-rw-r--r-- | archivebrowsermodel.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/archivebrowsermodel.cpp b/archivebrowsermodel.cpp index 202a406..7bfa2df 100644 --- a/archivebrowsermodel.cpp +++ b/archivebrowsermodel.cpp @@ -122,6 +122,16 @@ void ArchiveBrowserModel::updateDVDNo(const QList<int> fileNos) { } } +int ArchiveBrowserModel::nextDVDNo() const { + int maxdvd = 0; + QSqlQuery maxDvdQ = QSqlQuery("SELECT max(idvd) FROM files", mDb); + while(maxDvdQ.next()){ + maxdvd = maxDvdQ.value(0).toInt(); + } + ++maxdvd; + return maxdvd; +} + QModelIndexList ArchiveBrowserModel::children(const QModelIndex &idx){ if(!idx.isValid()){ return QModelIndexList(); |