mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-06 19:20:45 +00:00
Improve file identification in Icon loader
Will no longer attempt to process SleepStyle data with Icon loader A new loader for SleepStyle machines is forthcoming.
This commit is contained in:
parent
e3a87a3148
commit
3114cf517d
@ -66,6 +66,26 @@ bool FPIconLoader::Detect(const QString & givenpath)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ICON serial numbers (directory names) are all digits (SleepStyle are mixed alpha and numeric)
|
||||||
|
QString serialDir(dir.path() + "/FPHCARE/ICON");
|
||||||
|
QDir iconDir(serialDir);
|
||||||
|
|
||||||
|
iconDir.setFilter(QDir::NoDotAndDotDot | QDir::Dirs | QDir::Files | QDir::Hidden | QDir::NoSymLinks);
|
||||||
|
iconDir.setSorting(QDir::Name);
|
||||||
|
QFileInfoList flist = iconDir.entryInfoList();
|
||||||
|
|
||||||
|
bool ok;
|
||||||
|
|
||||||
|
for (int i = 0; i < flist.size(); i++) {
|
||||||
|
QFileInfo fi = flist.at(i);
|
||||||
|
QString filename = fi.fileName();
|
||||||
|
|
||||||
|
filename.toInt(&ok);
|
||||||
|
|
||||||
|
if (!ok) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user