Commit bbc5b8e3 authored by Ahmad Samir's avatar Ahmad Samir
Browse files

Use cmakedefine01

This way we get a build time warning if the var isn't defined at all, e.g.
a missing check_include_files() CMake call.
parent 51f8b1ff
Pipeline #189201 passed with stage
in 2 minutes and 41 seconds
/* Define to 1 if you have Xcursor */
#cmakedefine HAVE_XCURSOR 1
/* Define if you have XorgLibinput */
#cmakedefine01 HAVE_XCURSOR
#cmakedefine01 HAVE_XORGLIBINPUT
/* Define if you have X11 at all */
#cmakedefine01 HAVE_X11
/* Define if you have synaptics */
#cmakedefine01 HAVE_SYNAPTICS
......@@ -7,11 +7,6 @@
/* Number of bits in a file offset, on hosts where this is settable. */
#define _FILE_OFFSET_BITS 64
/* Define to 1 if you have packagekit available. */
#cmakedefine HAVE_PACKAGEKIT 1
/*
On HP-UX, the declaration of vsnprintf() is needed every time !
*/
#cmakedefine01 HAVE_PACKAGEKIT
#define WORKSPACE_VERSION_STRING "${PROJECT_VERSION}"
#ifndef CONFIG_KEYBOARD_H
#define CONFIG_KEYBOARD_H
#cmakedefine HAVE_XINPUT
#cmakedefine HAVE_UDEV
#cmakedefine01 HAVE_XINPUT
#cmakedefine01 HAVE_UDEV
#endif // CONFIG_KEYBOARD_H
......@@ -11,7 +11,7 @@
#include <config-keyboard.h>
#ifdef HAVE_UDEV
#if HAVE_UDEV
#include <libudev.h>
#endif
......@@ -25,7 +25,7 @@ UdevDeviceNotifier::UdevDeviceNotifier(QObject *parent)
init();
}
#ifdef HAVE_UDEV
#if HAVE_UDEV
UdevDeviceNotifier::~UdevDeviceNotifier()
{
if (m_monitor) {
......
......@@ -20,7 +20,7 @@
#include <X11/X.h>
#include <X11/Xatom.h>
#ifdef HAVE_XINPUT
#if HAVE_XINPUT
#include <X11/extensions/XInput.h>
#include <xcb/xproto.h>
typedef struct xcb_input_device_presence_notify_event_t {
......@@ -96,7 +96,7 @@ bool XInputEventNotifier::processOtherEvents(xcb_generic_event_t *event)
return true;
}
#if defined(HAVE_XINPUT)
#if HAVE_XINPUT
// This is ugly but allows to skip multiple execution of setxkbmap
// for all keyboard devices that don't care about layouts
......
......@@ -29,7 +29,7 @@
#include <X11/Xutil.h>
#include <X11/extensions/XI.h>
#include <X11/extensions/XInput2.h>
#ifdef HAVE_XCURSOR
#if HAVE_XCURSOR
#include <X11/Xcursor/Xcursor.h>
#include <X11/extensions/XInput.h>
#endif
......@@ -76,7 +76,7 @@ QString X11Backend::currentCursorTheme()
}
QByteArray name = XGetDefault(m_dpy, "Xcursor", "theme");
#ifdef HAVE_XCURSOR
#if HAVE_XCURSOR
if (name.isEmpty()) {
name = QByteArray(XcursorGetTheme(m_dpy));
}
......@@ -86,7 +86,7 @@ QString X11Backend::currentCursorTheme()
void X11Backend::applyCursorTheme(const QString &theme, int size)
{
#ifdef HAVE_XCURSOR
#if HAVE_XCURSOR
// Apply the KDE cursor theme to ourselves
if (m_dpy) {
......
......@@ -19,7 +19,7 @@
#include <X11/Xutil.h>
#include <X11/extensions/XI.h>
#include <X11/extensions/XInput2.h>
#ifdef HAVE_XCURSOR
#if HAVE_XCURSOR
#include <X11/Xcursor/Xcursor.h>
#include <X11/extensions/XInput.h>
#endif
......
......@@ -15,7 +15,7 @@
#include <QUrl>
#include "config-workspace.h"
#ifdef HAVE_PACKAGEKIT
#if HAVE_PACKAGEKIT
#include "PackageKitJob.h"
#endif
#include "ScriptJob.h"
......@@ -78,7 +78,7 @@ int main(int argc, char *argv[])
if (mimeType == QLatin1String("application/x-rpm") && KOSRelease().idLike().contains(u"suse")) {
job.reset(new ZypperRPMJob());
} else if (binaryPackages.contains(mimeType)) {
#ifdef HAVE_PACKAGEKIT
#if HAVE_PACKAGEKIT
job.reset(new PackageKitJob());
#else
fail(i18nc("@info", "No PackageKit support"));
......
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