Commit d4ae04a7 authored by David Faure's avatar David Faure

Harmonize use of #if and #ifdef, using #if everywhere.

cmakedefine01 makes this possible, with the benefit of warning if the
config-*.h file isn't included.
parent 55e0e634
......@@ -70,7 +70,6 @@ if (MINGW)
endif()
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
configure_file(config-X11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-X11.h)
add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
......
#cmakedefine01 Qt5X11Extras_FOUND
#define HAVE_X11 Qt5X11Extras_FOUND
#cmakedefine HAVE_STRSIGNAL 1
#cmakedefine HAVE_UNAME 1
#cmakedefine HAVE_X11 1
#define HAVE_XMLRPCCLIENT 1
#cmakedefine01 HAVE_STRSIGNAL
#cmakedefine01 HAVE_UNAME
#cmakedefine01 HAVE_X11
#cmakedefine01 HAVE_XMLRPCCLIENT
#define DEBUG_PACKAGE_INSTALLER_NAME "@DEBUG_PACKAGE_INSTALLER_NAME@"
......@@ -19,7 +19,7 @@
#include "crashedapplication.h"
#if defined(HAVE_STRSIGNAL) && defined(Q_OS_UNIX)
#if HAVE_STRSIGNAL && defined(Q_OS_UNIX)
# include <clocale>
# include <cstring>
# include <cstdlib>
......@@ -83,7 +83,7 @@ int CrashedApplication::signalNumber() const
QString CrashedApplication::signalName() const
{
#if defined(HAVE_STRSIGNAL) && defined(Q_OS_UNIX)
#if HAVE_STRSIGNAL && defined(Q_OS_UNIX)
const char * oldLocale = std::setlocale(LC_MESSAGES, nullptr);
char * savedLocale;
if (oldLocale) {
......
......@@ -34,7 +34,7 @@
#include <KLocalizedString>
#include <QCommandLineParser>
#include <config-X11.h>
#include <config-drkonqi.h>
#if HAVE_X11
#include <QX11Info>
#endif
......
......@@ -22,7 +22,7 @@
#include "systeminformation.h"
#ifdef HAVE_UNAME
#if HAVE_UNAME
# include <errno.h>
# include <sys/utsname.h>
#endif
......@@ -214,7 +214,7 @@ QString SystemInformation::fetchOSDetailInformation() const
//Get complete OS string (and fallback to base string)
QString operatingSystem = m_bugzillaOperatingSystem;
#ifdef HAVE_UNAME
#if HAVE_UNAME
struct utsname buf;
if (uname(&buf) == -1) {
qCDebug(DRKONQI_LOG) << "call to uname failed" << errno;
......
Markdown is supported
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