thumbnail: rename get/setStage to get/setTrashed

Also return a bool in getTrashed since it's already used as a bool in
setTrash and in all the checks.
This commit is contained in:
Simone Gotti
2024-03-12 08:50:44 +01:00
parent 11240bc97d
commit dcc983331d
4 changed files with 25 additions and 25 deletions

View File

@@ -1910,7 +1910,7 @@ void FileCatalog::emptyTrash ()
std::vector<FileBrowserEntry*> toDel;
for (const auto entry : t) {
if ((static_cast<FileBrowserEntry*>(entry))->thumbnail->getStage() == 1) {
if ((static_cast<FileBrowserEntry*>(entry))->thumbnail->getTrashed()) {
toDel.push_back(static_cast<FileBrowserEntry*>(entry));
}
}
@@ -1926,7 +1926,7 @@ bool FileCatalog::trashIsEmpty ()
const auto& t = fileBrowser->getEntries();
for (const auto entry : t) {
if ((static_cast<FileBrowserEntry*>(entry))->thumbnail->getStage() == 1) {
if ((static_cast<FileBrowserEntry*>(entry))->thumbnail->getTrashed()) {
return false;
}
}