diff -r 16f6717a218b -r 80bea7a6e84f src/libraries.cpp --- a/src/libraries.cpp Wed Apr 19 22:42:43 2023 +0300 +++ b/src/libraries.cpp Wed Apr 19 22:51:56 2023 +0300 @@ -118,7 +118,7 @@ * @param libraryIndex Index of the library * @param role New role */ -void LibrariesModel::setLibraryRole(index_t libraryIndex, const Library::Role role) +void LibrariesModel::setLibraryRole(index_t libraryIndex, const library_role_e role) { if (this->isValidIndex(libraryIndex)) { @@ -215,15 +215,15 @@ * @param role Role to get a string for * @returns string */ -QString Library::libraryRoleName(const Role role) +QString library_role_name(const library_role_e role) { switch (role) { - case Library::OfficialLibrary: + case library_role_e::official: return LibrariesModel::tr("Official library"); - case Library::UnofficialLibrary: + case library_role_e::unofficial: return LibrariesModel::tr("Unofficial library"); - case Library::WorkingLibrary: + case library_role_e::working: return LibrariesModel::tr("Working library"); } return "???"; @@ -260,7 +260,7 @@ switch (column) { case RoleColumn: - return Library::libraryRoleName(library.role); + return library_role_name(library.role); case PathColumn: return library.path.absolutePath(); } @@ -351,7 +351,7 @@ int role; QDataStream& result = stream >> path >> role; library.path.setPath(path); - library.role = static_cast(role); + library.role = static_cast(role); return result; }