aboutsummaryrefslogtreecommitdiff
path: root/lib/downloads/downloadswidget.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-01-07 23:28:42 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2018-01-07 23:28:42 +0100
commitb984992fc92b6dd607732d6dad1c533b36f1ba3a (patch)
tree984c5ede072c2ebb10ad32acb5d5928162feb97f /lib/downloads/downloadswidget.cpp
parentSearching through BookmarkModel elements (diff)
downloadsmolbote-b984992fc92b6dd607732d6dad1c533b36f1ba3a.tar.xz
Added .clang-format
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