Fix duplication of app name in window title with Qt5

Review Request #128422 - Created July 11, 2016 and submitted

Information
Friedrich W. H. Kossebau
massif-visualizer
frameworks
Reviewers
mwolff

When a Massif data file has been loaded, with the Qt5/KF5 version of Massif-Visualizer the appname is shown 2x in the window title (at least on Plasma), once at the beginning and once at the end. Reason is that the app code itself prepends the app title to the window title, but with Qt5 now Qt5 code itself at least on Unix & Windows appends the app display name as well, cmp. http://doc.qt.io/qt-5/qwidget.html#windowTitle-prop:
"
On some desktop platforms (including Windows and Unix), the application name (from QGuiApplication::applicationDisplayName) is added at the end of the window title, if set. This is done by the QPA plugin, so it is shown to the user, but isn't part of the windowTitle string.
"

Thus by this patch I propose to follow what other Qt5(/KF5) apps are doing: no longer setting the window title to the app name in some way, but leave it to the platform integration.

On Plasma with this patch the window title is labelled "Massif Visualizer" when no file has been loaded and is labelled "Evaluation of app (massif.out.12345) -- Massif Visualizer" when file massif.out.12345 is loaded.

Milian Wolff
Friedrich W. H. Kossebau
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit c3377dfe556d68d4b35d2a695656c0535a1e92e8 by Friedrich W. H. Kossebau to branch master.
Loading...