Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 9e60c2e6 authored by Wolfgang Bauer's avatar Wolfgang Bauer

Fix opening downloaded files from the transfer history

The destination file is stored as local path, so QUrl::fromLocalFile()
needs to be used to convert it to QUrl.
Otherwise the QUrl will be invalid causing KRun() to fail.
parent 4d5058bd
......@@ -206,7 +206,7 @@ void TransferHistory::slotOpenFile(const QModelIndex &index)
//qDebug() << "Try to open the file : " << file;
if (!file.isEmpty()) {
new KRun(file, this, true);
new KRun(QUrl::fromLocalFile(file), this, true);
}
}
......
......@@ -187,7 +187,7 @@ void TransferHistoryItemDelegate::slotOpenFile()
{
const QAbstractItemModel *model = static_cast <const QAbstractItemModel *> (m_selectedIndex.model());
new KRun(model->data(m_selectedIndex, TransferHistoryCategorizedDelegate::RoleDest).toString(), m_view, true);
new KRun(QUrl::fromLocalFile(model->data(m_selectedIndex, TransferHistoryCategorizedDelegate::RoleDest).toString()), m_view, true);
}
void TransferHistoryItemDelegate::slotDownload()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment