diff -r cf9a854b56a9 -r 3a4b132b8353 src/libraries.cpp --- a/src/libraries.cpp Tue Jun 28 19:43:55 2022 +0300 +++ b/src/libraries.cpp Tue Jun 28 19:47:34 2022 +0300 @@ -76,7 +76,7 @@ * @brief Removes a library by index. Does nothing if the index is not valid. * @param libraryIndex Index of the library */ -void LibrariesModel::removeLibrary(const qsizetype libraryIndex) +void LibrariesModel::removeLibrary(const index_t libraryIndex) { Q_ASSERT(this->isValidIndex(libraryIndex)); if (this->isValidIndex(libraryIndex)) @@ -93,7 +93,7 @@ * @param libraryIndex Index of the library * @return const reference */ -const Library& LibrariesModel::library(qsizetype libraryIndex) const +const Library& LibrariesModel::library(index_t libraryIndex) const { Q_ASSERT(this->isValidIndex(libraryIndex)); return this->libraries[libraryIndex]; @@ -104,7 +104,7 @@ * @param libraryIndex Index of the library * @param path New path */ -void LibrariesModel::setLibraryPath(qsizetype libraryIndex, const QDir& path) +void LibrariesModel::setLibraryPath(index_t libraryIndex, const QDir& path) { if (this->isValidIndex(libraryIndex)) { @@ -118,7 +118,7 @@ * @param libraryIndex Index of the library * @param role New role */ -void LibrariesModel::setLibraryRole(qsizetype libraryIndex, const Library::Role role) +void LibrariesModel::setLibraryRole(index_t libraryIndex, const Library::Role role) { if (this->isValidIndex(libraryIndex)) { @@ -149,12 +149,12 @@ /** * @returns the amount of libraries */ -qsizetype LibrariesModel::count() const +index_t LibrariesModel::count() const { return this->libraries.size(); } -void LibrariesModel::moveLibrary(const qsizetype libraryFromIndex, const qsizetype libraryToIndex) +void LibrariesModel::moveLibrary(const index_t libraryFromIndex, const index_t libraryToIndex) { if (isValidIndex(libraryFromIndex) and (isValidIndex(libraryToIndex) or libraryToIndex == count()) and @@ -181,7 +181,7 @@ * @param libraryIndex Index to check * @returns whether or not it is valid */ -bool LibrariesModel::isValidIndex(const qsizetype libraryIndex) const +bool LibrariesModel::isValidIndex(const index_t libraryIndex) const { return libraryIndex >= 0 && libraryIndex < this->libraries.size(); } @@ -318,7 +318,7 @@ * to update the table widget know when libraries are changed. * @param libraryIndex Index of the library. */ -void LibrariesModel::signalLibraryChange(const qsizetype libraryIndex) +void LibrariesModel::signalLibraryChange(const index_t libraryIndex) { Q_ASSERT(isValidIndex(libraryIndex)); const QModelIndex topLeft = this->index(static_cast(libraryIndex), 0);