Commit dcb9e955e33e0397493cf99e31ad2a11c66b7e96
1 parent
35109e1d
In LoadStore, save the results of description() rather than a static transform string
This gives us robustness to one type of model file compatibility break, if e.g. the FaceRecognitionRegistration abbreviation is changed, any results of <FaceRecognitionRegistration> that were previously saved to disk are not invalidated (although any changes to FaceRecognitionRegistration will not be reflected until the model is re-trained).
Showing
1 changed file
with
1 additions
and
1 deletions
openbr/plugins/meta.cpp
| @@ -541,7 +541,7 @@ private: | @@ -541,7 +541,7 @@ private: | ||
| 541 | qDebug("Storing %s", qPrintable(baseName)); | 541 | qDebug("Storing %s", qPrintable(baseName)); |
| 542 | QByteArray byteArray; | 542 | QByteArray byteArray; |
| 543 | QDataStream stream(&byteArray, QFile::WriteOnly); | 543 | QDataStream stream(&byteArray, QFile::WriteOnly); |
| 544 | - stream << description2; | 544 | + stream << transform->description(); |
| 545 | transform->store(stream); | 545 | transform->store(stream); |
| 546 | QtUtils::writeFile(baseName, byteArray, -1); | 546 | QtUtils::writeFile(baseName, byteArray, -1); |
| 547 | } | 547 | } |