Skip to content

Use QUrl::PreferLocalFile for URL emitted with Part::setWindowCaption

Many applications using KParts rely on the signal Part::setWindowCaption to set the window title, to reflect the currently viewed/loaded file/document. WHile apps like KGraphViewer which use KParts::MainWindow get that automatically by that base class listening to the active parts signal, others connect explicitly.

As the string passed in the signal is only intended for user consumption, not processing, preferring a scheme-less (i.e. without file:// prefix) display should fit the grand scheme.

QUrl::PreferLocalFile is already used by some KPart instances when signalling further URL changes, like the Dolphin part or Konsole part.

Merge request reports