Commit 518350c9 authored by Elvis Angelaccio's avatar Elvis Angelaccio
Browse files

part: update window title whenever the URL changes

This fixes a small regression in commit 20c09f3c.
A ReadOnlyPart emits `completed()` if `openUrl()` returns true, so we
lost a call to `setFileNameFromArchive()`.
We fix that by connecting this slot to the `urlChanged()` signal.

Tested by opening some archive and then an header-encrypted archive, and
making sure the window title had the name of the second archive while the
password dialog was open.
parent b40b0e07
......@@ -213,6 +213,8 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QVariantList& args)
this, &Part::setBusyGui);
connect(this, &Part::ready,
this, &Part::setReadyGui);
connect(this, &KParts::ReadOnlyPart::urlChanged,
this, &Part::setFileNameFromArchive);
connect(this, static_cast<void (KParts::ReadOnlyPart::*)()>(&KParts::ReadOnlyPart::completed),
this, &Part::setFileNameFromArchive);
connect(ArkSettings::self(), &KCoreConfigSkeleton::configChanged, this, &Part::updateActions);
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