diff options
| author | Al12rs <gabriel.cortesi@outlook.com> | 2018-06-20 19:33:56 +0200 |
|---|---|---|
| committer | Al12rs <gabriel.cortesi@outlook.com> | 2018-06-20 19:33:56 +0200 |
| commit | b7d6bbb4513028340a2720070c7a7a968ded1681 (patch) | |
| tree | 5e1408fc91c3667ad9f916c99c1d51f451b99f06 /src/downloadlistwidgetcompact.cpp | |
| parent | b6aa12b323a81f4ac8e1bb76c2fea780a1698d97 (diff) | |
Fix for downloads getting stuck after pausing them.
Disabled timer check as it appeared to terminate some downloads early.
Diffstat (limited to 'src/downloadlistwidgetcompact.cpp')
| -rw-r--r-- | src/downloadlistwidgetcompact.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/downloadlistwidgetcompact.cpp b/src/downloadlistwidgetcompact.cpp index cdce8d7f..99cbd7cb 100644 --- a/src/downloadlistwidgetcompact.cpp +++ b/src/downloadlistwidgetcompact.cpp @@ -114,7 +114,7 @@ void DownloadListWidgetCompactDelegate::paintRegularDownload(int downloadIndex) m_SizeLabel->setText(QString::number(m_Manager->getFileSize(downloadIndex) / 1048576));
}
- if ((state == DownloadManager::STATE_PAUSED) || (state == DownloadManager::STATE_ERROR)) {
+ if ((state == DownloadManager::STATE_PAUSED) || (state == DownloadManager::STATE_ERROR) || (state == DownloadManager::STATE_PAUSING)) {
m_DoneLabel->setVisible(true);
m_Progress->setVisible(false);
m_DoneLabel->setText(QString("%1<img src=\":/MO/gui/inactive\">").arg(tr("Paused")));
@@ -297,7 +297,7 @@ bool DownloadListWidgetCompactDelegate::editorEvent(QEvent *event, QAbstractItem QModelIndex sourceIndex = qobject_cast<QSortFilterProxyModel*>(model)->mapToSource(index);
if (m_Manager->getState(sourceIndex.row()) >= DownloadManager::STATE_READY) {
emit installDownload(sourceIndex.row());
- } else if (m_Manager->getState(sourceIndex.row()) >= DownloadManager::STATE_PAUSED) {
+ } else if ((m_Manager->getState(sourceIndex.row()) >= DownloadManager::STATE_PAUSED) || (m_Manager->getState(sourceIndex.row()) == DownloadManager::STATE_PAUSING)) {
emit resumeDownload(sourceIndex.row());
}
return true;
@@ -327,7 +327,7 @@ bool DownloadListWidgetCompactDelegate::editorEvent(QEvent *event, QAbstractItem } else if (state == DownloadManager::STATE_DOWNLOADING){
menu.addAction(tr("Cancel"), this, SLOT(issueCancel()));
menu.addAction(tr("Pause"), this, SLOT(issuePause()));
- } else if ((state == DownloadManager::STATE_PAUSED) || (state == DownloadManager::STATE_ERROR)) {
+ } else if ((state == DownloadManager::STATE_PAUSED) || (state == DownloadManager::STATE_ERROR) || (state == DownloadManager::STATE_PAUSING)) {
menu.addAction(tr("Remove"), this, SLOT(issueDelete()));
menu.addAction(tr("Resume"), this, SLOT(issueResume()));
}
|
