localLibraryWidget: Logging fixes

This commit is contained in:
Nicolas Mailloux 2022-10-16 22:37:24 -04:00
parent a034ce62af
commit ad017083ad

View file

@ -467,7 +467,7 @@ void localLibraryWidget::setupBooksListToggle(int pageNumber) {
void localLibraryWidget::setupBooksListFolders(int pageNumber) { void localLibraryWidget::setupBooksListFolders(int pageNumber) {
log("Showing folders for page: " + QString::number(pageNumber), className); log("Showing folders for page: " + QString::number(pageNumber), className);
QStringList directoryList = QDir(pathForFolders).entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name); QStringList directoryList = QDir(pathForFolders).entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name);
log("Full directory list: "+ directoryList.join(","), className); log("Full directory list is '"+ directoryList.join(", ") + "'", className);
if(mainPathIsEmpty == true) { if(mainPathIsEmpty == true) {
// Main path is set and is empty // Main path is set and is empty
@ -489,7 +489,7 @@ void localLibraryWidget::setupBooksListFolders(int pageNumber) {
} }
pageNumberAbove = pageNumberAbove - 1; pageNumberAbove = pageNumberAbove - 1;
} }
log("Front directory list: " + directoryListFront.join(","), className); log("Front directory list is '" + directoryListFront.join(", ") + "'", className);
int aboveRemove = pageNumber * buttonsNumber; int aboveRemove = pageNumber * buttonsNumber;
if(directoryListBack.count() > aboveRemove) { if(directoryListBack.count() > aboveRemove) {
@ -499,7 +499,7 @@ void localLibraryWidget::setupBooksListFolders(int pageNumber) {
} }
} }
} }
log("Back directory list: " + directoryListBack.join(","), className); log("Back directory list is '" + directoryListBack.join(", ") + "'", className);
QStringList directoryListPure; QStringList directoryListPure;
for(QString directory: directoryListFront) { for(QString directory: directoryListFront) {
@ -507,7 +507,7 @@ void localLibraryWidget::setupBooksListFolders(int pageNumber) {
directoryListPure.append(directory); directoryListPure.append(directory);
} }
} }
log("Final directory list: " + directoryListPure.join(","), className); log("Final directory list is '" + directoryListPure.join(", ") + "'", className);
idList.clear(); idList.clear();
int in = 1; int in = 1;
@ -657,7 +657,7 @@ void localLibraryWidget::calculateMaximumPagesNumberForFolders() {
foreach (int number, booksListForPathIndex) { foreach (int number, booksListForPathIndex) {
list.append(QString::number(number)); list.append(QString::number(number));
} }
log("bookListForPathIndex is: " + list.join(","), className); log("bookListForPathIndex is '" + list.join(", ") + "'", className);
directoryListCount = QDir(pathForFolders).entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name).count(); directoryListCount = QDir(pathForFolders).entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name).count();
log("Directories count in directory: " + QString::number(directoryListCount), className); log("Directories count in directory: " + QString::number(directoryListCount), className);