1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 09:42:10 +02:00

Showing warning when mime data of download changes -> after some testing

this function will be implemented
This commit is contained in:
nowrep 2011-03-18 23:04:02 +01:00
parent 83721bd9f7
commit d070c785a0
2 changed files with 8 additions and 0 deletions

View File

@ -54,6 +54,7 @@ DownloadItem::DownloadItem(QListWidgetItem* item, QNetworkReply* reply, QString
connect(m_reply, SIGNAL(readyRead()), this, SLOT(readyRead()));
connect(m_reply, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(downloadProgress(qint64, qint64)));
connect(m_reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(error(QNetworkReply::NetworkError)));
connect(m_reply, SIGNAL(metaDataChanged()), this, SLOT(metaDataChanged()));
connect(ui->button, SIGNAL(clicked(QPoint)), this, SLOT(stop()));
m_downloading = true;
@ -69,6 +70,12 @@ DownloadItem::DownloadItem(QListWidgetItem* item, QNetworkReply* reply, QString
show();
}
void DownloadItem::metaDataChanged()
{
QVariant locationHeader = m_reply->header(QNetworkRequest::LocationHeader);
QMessageBox::information(this, "Meta Data Changed", QString("Meta data changed feature unimplemented yet, sorry.\n URL: '%̈́'").arg(locationHeader.toUrl().toString()));
}
void DownloadItem::finished()
{
m_timer.stop();

View File

@ -59,6 +59,7 @@ signals:
private slots:
void finished();
void metaDataChanged();
void downloadProgress(qint64 received, qint64 total);
void stop();
void openFile();