mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
Showing file size of downloaded file in download options dialog.
This commit is contained in:
parent
42d9e93363
commit
24ad0ffde7
@ -64,6 +64,11 @@ void DownloadFileHelper::handleUnsupportedContent(QNetworkReply* reply, bool ask
|
||||
m_fileIcon = m_iconProvider->icon(tempInfo).pixmap(30, 30);
|
||||
QString mimeType = m_iconProvider->type(tempInfo);
|
||||
|
||||
qint64 size = m_reply->header(QNetworkRequest::ContentLengthHeader).toLongLong();
|
||||
if (size > 0) {
|
||||
mimeType.append(QString(" (%1)").arg(DownloadItem::fileSizeToString(size)));
|
||||
}
|
||||
|
||||
// Close Empty Tab
|
||||
if (m_webPage) {
|
||||
WebView* view = qobject_cast<WebView*>(m_webPage->view());
|
||||
|
@ -24,6 +24,7 @@ DownloadOptionsDialog::DownloadOptionsDialog(const QString &fileName, const QPix
|
||||
, m_signalEmited(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->fileName->setText("<b>" + fileName + "</b>");
|
||||
ui->fileIcon->setPixmap(fileIcon);
|
||||
ui->fileType->setText(mimeType);
|
||||
|
Loading…
Reference in New Issue
Block a user