Commit 886173ca authored by Alex Richardson's avatar Alex Richardson
Browse files

Reduce ifdefs in Workspace::supportInformation()

All of these preprocessor constants are defined to 0 or 1, so we can use
a ternary expression instead of `#if+#else`.
parent 52c9eef1
Pipeline #140276 passed with stage
in 17 minutes and 25 seconds
......@@ -1485,41 +1485,17 @@ QString Workspace::supportInformation() const
support.append(QStringLiteral("=============\n"));
support.append(QStringLiteral("KWIN_BUILD_DECORATIONS: "));
#ifdef KWIN_BUILD_DECORATIONS
support.append(yes);
#else
support.append(no);
#endif
support.append(KWIN_BUILD_DECORATIONS ? yes : no);
support.append(QStringLiteral("KWIN_BUILD_TABBOX: "));
#ifdef KWIN_BUILD_TABBOX
support.append(yes);
#else
support.append(no);
#endif
support.append(KWIN_BUILD_TABBOX ? yes : no);
support.append(QStringLiteral("KWIN_BUILD_ACTIVITIES: "));
#ifdef KWIN_BUILD_ACTIVITIES
support.append(yes);
#else
support.append(no);
#endif
support.append(KWIN_BUILD_ACTIVITIES ? yes : no);
support.append(QStringLiteral("HAVE_X11_XCB: "));
#if HAVE_X11_XCB
support.append(yes);
#else
support.append(no);
#endif
support.append(HAVE_X11_XCB ? yes : no );
support.append(QStringLiteral("HAVE_EPOXY_GLX: "));
#if HAVE_EPOXY_GLX
support.append(yes);
#else
support.append(no);
#endif
support.append(HAVE_EPOXY_GLX ? yes : no);
support.append(QStringLiteral("HAVE_WAYLAND_EGL: "));
#if HAVE_WAYLAND_EGL
support.append(yes);
#else
support.append(no);
#endif
support.append(HAVE_WAYLAND_EGL ? yes : no);
support.append(QStringLiteral("\n"));
if (auto c = kwinApp()->x11Connection()) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment