mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 21:14:33 -04:00
Add a small dialog to show some info about a library
This commit is contained in:
@ -54,6 +54,12 @@ QString YACReaderLibraries::getPath(int id)
|
||||
return library != libraries.cend() ? library->getPath() : "";
|
||||
}
|
||||
|
||||
QString YACReaderLibraries::getPath(const QUuid &id)
|
||||
{
|
||||
auto library = std::find_if(libraries.cbegin(), libraries.cend(), [id](const YACReaderLibrary &library) { return library.getId() == id; });
|
||||
return library != libraries.cend() ? library->getPath() : "";
|
||||
}
|
||||
|
||||
QString YACReaderLibraries::getDBPath(int id)
|
||||
{
|
||||
return getPath(id) + "/.yacreaderlibrary";
|
||||
@ -101,6 +107,12 @@ int YACReaderLibraries::getId(const QString &name)
|
||||
return library != libraries.cend() ? library->getLegacyId() : -1;
|
||||
}
|
||||
|
||||
QUuid YACReaderLibraries::getUuid(const QString &name)
|
||||
{
|
||||
auto library = std::find_if(libraries.cbegin(), libraries.cend(), [name](const YACReaderLibrary &library) { return library.getName() == name; });
|
||||
return library != libraries.cend() ? library->getId() : QUuid();
|
||||
}
|
||||
|
||||
int YACReaderLibraries::getIdFromUuid(const QUuid &uuid)
|
||||
{
|
||||
auto library = std::find_if(libraries.cbegin(), libraries.cend(), [uuid](const YACReaderLibrary &library) { return library.getId() == uuid; });
|
||||
|
Reference in New Issue
Block a user