aboutsummaryrefslogtreecommitdiff
path: root/lib/downloads/downloadswidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/downloads/downloadswidget.cpp')
-rw-r--r--lib/downloads/downloadswidget.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/downloads/downloadswidget.cpp b/lib/downloads/downloadswidget.cpp
index 1a5f268..b3bad67 100644
--- a/lib/downloads/downloadswidget.cpp
+++ b/lib/downloads/downloadswidget.cpp
@@ -9,14 +9,14 @@
#include "downloadswidget.h"
#include "ui_downloadsform.h"
-#include <QWebEngineDownloadItem>
+#include "widgets/downloaditemwidget.h"
#include <QFileDialog>
#include <QListWidget>
-#include "widgets/downloaditemwidget.h"
+#include <QWebEngineDownloadItem>
-DownloadsWidget::DownloadsWidget(const QString &downloadPath, QWidget *parent) :
- QDialog(parent),
- ui(new Ui::DownloadDialog)
+DownloadsWidget::DownloadsWidget(const QString &downloadPath, QWidget *parent)
+ : QDialog(parent)
+ , ui(new Ui::DownloadDialog)
{
// make sure this dialog does not get deleted on close
setAttribute(Qt::WA_DeleteOnClose, false);
@@ -27,13 +27,13 @@ DownloadsWidget::DownloadsWidget(const QString &downloadPath, QWidget *parent) :
m_downloadPath = downloadPath;
connect(ui->listWidget, &QListWidget::currentItemChanged, this, [this](QListWidgetItem *current, QListWidgetItem *previous) {
- DownloadItemWidget *currentWidget = qobject_cast<DownloadItemWidget*>(ui->listWidget->itemWidget(current));
+ DownloadItemWidget *currentWidget = qobject_cast<DownloadItemWidget *>(ui->listWidget->itemWidget(current));
currentWidget->showDetails();
currentWidget->setFixedWidth(ui->listWidget->viewport()->width());
currentWidget->adjustSize();
current->setSizeHint(currentWidget->size());
- DownloadItemWidget *previousWidget = qobject_cast<DownloadItemWidget*>(ui->listWidget->itemWidget(previous));
+ DownloadItemWidget *previousWidget = qobject_cast<DownloadItemWidget *>(ui->listWidget->itemWidget(previous));
if(previousWidget != nullptr) {
previousWidget->hideDetails();
previousWidget->setFixedWidth(ui->listWidget->viewport()->width());
@@ -53,8 +53,8 @@ void DownloadsWidget::addDownload(QWebEngineDownloadItem *item)
this->show();
QString filepath = QFileDialog::getSaveFileName(this,
- tr("Save"),
- m_downloadPath + "/" + QFileInfo(item->path()).fileName());
+ tr("Save"),
+ m_downloadPath + "/" + QFileInfo(item->path()).fileName());
if(filepath.isEmpty()) {
// user cancelled the save dialog