On Friday, 2014-02-07, 09:51:27, Martin Gräßlin wrote: > On Friday 07 February 2014 09:38:41 Kevin Krammer wrote: > > On Friday, 2014-02-07, 08:53:54, Martin Gräßlin wrote:
> > > I'm wondering what to do about it. The best would be to use > > > QGuiApplication::platformName, but it's a core app. Also finding X11 in > > > CMakeLists to get the HAVE_X11 defined looks very wrong to me and not > > > future safe (Wayland). > > > > My guess is that platform() in this context means operating system, not > > windowing/display system. > > See the comment I pasted, it's explicitly saying it's the windowing system > and not the OS... Ah, didn't see that. Does it actually make sense? If yes than this obviously has be to be done at runtime, at least for platforms with multiple UI systems: #if defined(Q_OS_MAC) return QL1S("Macintosh") #elfi defined(Q_OS_WINDOWS) return QL1S("Windows") #else const QVariant platformName = qApp ? qApp->property("platformName") : QVariant(); if (platformName.isValid()) { const QString name = platformName.toString(); if (!name.isEmpty()) return name; } #endif return QL1S("Unknown"); Cheers, Kevin -- Kevin Krammer, KDE developer, xdg-utils developer KDE user support, developer mentoring
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel