mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-22 11:37:56 -04:00
De-overloaded ContentManager::cancelBook()
Renamed one of the two overloads of ContentManager::cancelBook() to reallyCancelBook().
This commit is contained in:
parent
595973b3bb
commit
c6d892a15f
@ -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());
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user