mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-22 19:46:12 -04:00
Introduced ContentManager::getLibraryZims()
It is going to slightly evolve as the type of m_knownZimsInDir is enhanced to keep track of file modification times.
This commit is contained in:
parent
72bd099cd1
commit
076c19b645
@ -951,11 +951,16 @@ int ContentManager::handleZimFileInMonitoredDir(QString dir, QString fileName)
|
||||
}
|
||||
}
|
||||
|
||||
ContentManager::QStringSet ContentManager::getLibraryZims(QString dirPath) const
|
||||
{
|
||||
return m_knownZimsInDir[dirPath];
|
||||
}
|
||||
|
||||
void ContentManager::updateLibraryFromDir(QString dirPath)
|
||||
{
|
||||
QMutexLocker locker(&m_updateFromDirMutex);
|
||||
const QDir dir(dirPath);
|
||||
const QStringSet zimsPresentInLib = m_knownZimsInDir[dirPath];
|
||||
const QStringSet zimsPresentInLib = getLibraryZims(dirPath);
|
||||
|
||||
QStringSet zimsInDir;
|
||||
for (const auto &file : dir.entryList({"*.zim"})) {
|
||||
|
@ -132,6 +132,7 @@ private: // functions
|
||||
void updateModel();
|
||||
void setCategories();
|
||||
void setLanguages();
|
||||
QStringSet getLibraryZims(QString dirPath) const;
|
||||
void asyncUpdateLibraryFromDir(QString dir);
|
||||
void updateLibraryFromDir(QString dir);
|
||||
void handleDisappearedZimFiles(const QString& dirPath, const QStringSet& fileNames);
|
||||
|
Loading…
x
Reference in New Issue
Block a user