Bug 374083

Summary: setCaption and setPlainCaption always append the application name
Product: [Frameworks and Libraries] frameworks-kxmlgui Reporter: Maximiliano Curia <maxy>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED UPSTREAM    
Severity: normal CC: andydecleyre, aspotashev, j, konstantinos.smanis, maxmustermann1884, r.mitsuklavitt
Priority: NOR    
Version: 5.0.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Maximiliano Curia 2016-12-23 15:48:46 UTC
This is a forward of the bug reported in the Debian bug tracker https://bugs.debian.org/848180 :

konsole calls setCaption or setPlainCaption depending on the value of the user setting "Show application name on the titlebar", this used to do the right thing in qt4, but in qt5 both calls do the same and qt's qpa plugin is responsible for appending the application name in the title.

Please consider either avoiding the append of the application name in the title when calling setPlainCaption, or at least update the documentation to make it clear that setCaption and setPlainCaption will do the same.

Happy hacking,
Comment 1 andydecleyre 2018-07-03 20:01:57 UTC
The Konsole option "Show application name on the titlebar" still does apparently nothing, as of Konsole 18.04.2.
Comment 2 Konstantinos Smanis 2018-08-19 19:51:48 UTC
This bug is still present in KXmlGui 5.49.0 and can be observed in Konsole 18.08.0 through the "Show application name on the titlebar" setting, which still has no effect.
Comment 3 Christoph Feck 2018-09-04 23:33:37 UTC
Could use QWindow::setTitle() instead. It is possible to get the window of a widget via QWidget::windowHandle().
Comment 4 Christoph Feck 2018-09-05 02:23:04 UTC
Unfortunately, this won't work, because it is indeed the QPA that adds the application name. Qt developers would need to add a method to set the 'plain' window title.
Comment 5 Christoph Feck 2019-05-02 07:54:35 UTC
*** Bug 407146 has been marked as a duplicate of this bug. ***
Comment 6 Christoph Feck 2019-05-02 07:56:08 UTC
Qt QPA always adds the application name to the window title. You could ask Qt developers to add a way to avoid this via https://bugreports.qt.io/
Comment 7 r.mitsuklavitt 2019-05-02 08:50:16 UTC
Great, thanks! 

See https://bugreports.qt.io/browse/QTBUG-75535

Should I reopen this bug if/when the upstream bug is resolved, or should I open a new one?
Comment 8 Christoph Feck 2019-05-21 21:48:57 UTC
I am subscribed to the Qt ticket, no need to file a new one.