Commit 809ea95b authored by Jonathan Marten's avatar Jonathan Marten
Browse files

Fix window title not being shown by embedded KPart

DocumentViewPrivate::updateCaption() will not change the caption when
mCurrent is false (as introduced by commit a7819f6e). It is correctly
set when using the Gwenview application, but it is never set by the part
and so the window title is never set.

Since there is no image selection or slideshow when using the part,
it is enough to simply call setCurrent() in openUrl().
parent c0bdb453
......@@ -66,8 +66,8 @@ GVPart::GVPart(QWidget* parentWidget, QObject* parent, const QVariantList& /*arg
connect(mDocumentView, &DocumentView::captionUpdateRequested,
this, &KParts::Part::setWindowCaption);
connect(mDocumentView, SIGNAL(completed()),
SIGNAL(completed()));
connect(mDocumentView, &DocumentView::completed,
this, QOverload<>::of(&KParts::ReadOnlyPart::completed));
connect(mDocumentView, &DocumentView::contextMenuRequested,
this, &GVPart::showContextMenu);
......@@ -113,6 +113,7 @@ bool GVPart::openUrl(const QUrl& url)
DocumentView::Setup setup;
setup.zoomToFit = true;
mDocumentView->openUrl(url, setup);
mDocumentView->setCurrent(true);
return true;
}
......
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