mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 11:04:25 -04:00
Add method for getting the legacy id from the uuid
This commit is contained in:
@ -100,6 +100,12 @@ int YACReaderLibraries::getId(const QString &name)
|
||||
return library != libraries.cend() ? library->getLegacyId() : -1;
|
||||
}
|
||||
|
||||
int YACReaderLibraries::getIdFromUuid(const QUuid &uuid)
|
||||
{
|
||||
auto library = std::find_if(libraries.cbegin(), libraries.cend(), [uuid](const YACReaderLibrary &library) { return library.getId() == uuid; });
|
||||
return library != libraries.cend() ? library->getLegacyId() : -1;
|
||||
}
|
||||
|
||||
YACReaderLibraries &YACReaderLibraries::operator=(const YACReaderLibraries &source)
|
||||
{
|
||||
libraries = source.libraries;
|
||||
|
Reference in New Issue
Block a user