HAVE_X11 usage in KIO/core

Alex Merry kde at randomguy3.me.uk
Fri Feb 7 14:08:07 UTC 2014


On 07/02/14 11:45, Aleix Pol wrote:
> On Fri, Feb 7, 2014 at 9:51 AM, Martin Gräßlin <mgraesslin at kde.org
> <mailto:mgraesslin at kde.org>> wrote:
> 
>     On Friday 07 February 2014 09:38:41 Kevin Krammer wrote:
>     > On Friday, 2014-02-07, 08:53:54, Martin Gräßlin wrote:
>     > > Hi,
>     > >
>     > > I found some HAVE_X11 not defined warnings in KIO and had a look
>     at them.
>     > > One of them is in core/kprotocolmanager.cpp in the following
>     snippet.
>     > >
>     > > // This is not the OS, but the windowing system, e.g. X11 on
>     Unix/Linux.
>     > > static QString platform()
>     > > {
> Sounds to me like we want to use QGuiApplication::platformName() there,
> the only problem is that the strings differ.
> 
> Maybe we should just deprecate this function and advise users to use
> ::platformName().

It's not API; it's a static function in a file.  It it used to generate
a default user agent for http transactions.  The only way it acts as
anything like API is that if the default handler for the "text/html"
mimetype specifies a user agent string, it can put in the %PLATFORM%
placeholder, which is replaced with the value of this function.

Alex



More information about the Kde-frameworks-devel mailing list