Ref T152, do not start loading if the model dir does not exists/is empty

This commit is contained in:
Klaus Basan
2017-09-19 00:44:19 +02:00
committed by Mathew Sutcliffe
parent 725341cdbe
commit e269ce5bd8
4 changed files with 90 additions and 10 deletions

View File

@@ -360,6 +360,14 @@ namespace BlackMisc
return failed;
}
bool CDirectoryUtils::existsUnemptyDirectory(const QString &testDir)
{
if (testDir.isEmpty()) { return false; }
const QDir dir(testDir);
if (!dir.exists()) { return false; }
return !dir.isEmpty();
}
QSet<QString> CDirectoryUtils::fileNamesToQSet(const QFileInfoList &fileInfoList)
{
QSet<QString> sl;