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