On Thursday 21 June 2012 23:41:12 Mark wrote:
> So: it's only being set afaict when setWindowTitle from QWidget is
> called otherwise it's the executable name minus extension.

Thanks. Found that code in qwidget_win.cpp in Qt4. That's just fallback to 
avoid empty titles though, it doesn't touch titles set by the user indeed.

> There's no common standard for other windows on mac.

OK, so this leaves two options.

* Doing this only on X11 : http://www.davidfaure.fr/2012/caption.diff
Tested, works.

* Doing this on all 3 desktop platforms, for more consistency among all Qt 
applications, and consistency between platforms for a given Qt application. 
This prevents the risk that a Windows Qt developer does setWindowTitle("foo - 
KMail"), i.e. adds the app name himself in the title, and ends up with "foo - 
KMail - kmail" on X11.

It seems to me that the second solution is better.

Brad wrote:
> Do it in QPlatformWindow.
Did you mean in the XCB specific subclass, like I did above? (thanks for the 
hint)
Or did you mean in the base class itself, by separating the virtual method 
from the public method, to have the add-the-app-name logic before calling the 
platform-specific implementation?

-- 
David Faure, [email protected], http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. KDE Frameworks 5
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to