gwenview: update caption on load failure

otherwise the caption does not indicate the current document/image URL

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-04-19 19:49:03 +03:00
parent e04e8962e1
commit 1d88215e87

View file

@ -443,11 +443,12 @@ DocumentView::Setup DocumentView::setup() const
void DocumentView::slotLoadingFailed()
{
d->hideLoadingIndicator();
MessageViewAdapter* adapter = new MessageViewAdapter;
MessageViewAdapter* adapter = new MessageViewAdapter();
adapter->setDocument(d->mDocument);
QString message = i18n("Loading <filename>%1</filename> failed", d->mDocument->url().fileName());
adapter->setErrorMessage(message, d->mDocument->errorString());
d->setCurrentAdapter(adapter);
d->updateCaption();
emit completed();
}