De-overloaded ContentManager::cancelBook()

Renamed one of the two overloads of ContentManager::cancelBook() to
reallyCancelBook().
This commit is contained in:
Veloman Yunkan 2024-02-28 16:34:09 +04:00
parent 595973b3bb
commit c6d892a15f
2 changed files with 5 additions and 3 deletions

View File

@ -671,11 +671,11 @@ void ContentManager::cancelBook(const QString& id, QModelIndex index)
auto text = gt("cancel-download-text");
text = text.replace("{{ZIM}}", QString::fromStdString(mp_library->getBookById(id).getTitle()));
showConfirmBox(gt("cancel-download"), text, mp_view, [=]() {
cancelBook(id);
reallyCancelBook(id);
});
}
void ContentManager::cancelBook(const QString& id)
void ContentManager::reallyCancelBook(const QString& id)
{
auto& b = mp_library->getBookById(id);
auto download = mp_downloader->getDownload(b.getDownloadId());

View File

@ -61,9 +61,9 @@ public slots:
void updateCategories(const QString& content);
void pauseBook(const QString& id);
void resumeBook(const QString& id);
void cancelBook(const QString& id);
void pauseBook(const QString& id, QModelIndex index);
void resumeBook(const QString& id, QModelIndex index);
// cancelBook() asks for confirmation (reallyCancelBook() doesn't)
void cancelBook(const QString& id, QModelIndex index);
void onCustomContextMenu(const QPoint &point);
void openBookWithIndex(const QModelIndex& index);
@ -71,6 +71,8 @@ public slots:
private: // functions
QStringList getBookIds();
// reallyCancelBook() doesn't ask for confirmation (unlike cancelBook())
void reallyCancelBook(const QString& id);
// reallyEraseBook() doesn't ask for confirmation (unlike eraseBook())
void reallyEraseBook(const QString& id, bool moveToTrash);
void eraseBookFilesFromComputer(const QString dirPath, const QString filename, const bool moveToTrash);