Commit bcd8015e authored by David Faure's avatar David Faure

Harmonize use of HAVE_X11, using cmakedefine01.

Fixes: config-X11.h:44:18: warning: "TRUE" is not defined, evaluates to 0 [-Wundef]

It should *all* be ported to cmakedefine01...
parent e9862c60
......@@ -96,6 +96,9 @@ set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
TYPE REQUIRED
PURPOSE "Required for building the X11 based workspace"
)
if(X11_FOUND)
set(HAVE_X11 1)
endif()
find_package(UDev)
set_package_properties(UDev PROPERTIES DESCRIPTION "UDev library"
......
......@@ -41,4 +41,4 @@
#cmakedefine HAS_RANDR_1_3 1
/* Define if you have X11 at all */
#define HAVE_X11 ${X11_FOUND}
#cmakedefine01 HAVE_X11
......@@ -106,7 +106,7 @@ static QFont nearestExistingFont(const QFont &font)
}
/**** FontAASettings ****/
#if defined(HAVE_FONTCONFIG) && defined (HAVE_X11)
#if defined(HAVE_FONTCONFIG) && HAVE_X11
FontAASettings::FontAASettings(QObject *parent)
: QObject(parent)
, m_subPixelOptionsModel(new QStandardItemModel(this))
......@@ -271,7 +271,7 @@ bool FontAASettings::save(KXftConfig::AntiAliasing::State aaState)
// Don't overwrite global settings unless explicitly asked for - e.g. the system
// fontconfig setup may be much more complex than this module can provide.
// TODO: With AASystem the changes already made by this module should be reverted somehow.
#if defined(HAVE_FONTCONFIG) && defined (HAVE_X11)
#if defined(HAVE_FONTCONFIG) && HAVE_X11
if (mod || (m_antiAliasing != m_antiAliasingOriginal) || m_dpi != m_dpiOriginal) {
KMessageBox::information(nullptr,
i18n(
......
......@@ -51,7 +51,7 @@ class FontAASettings : public QObject
public:
enum AASetting { AAEnabled, AASystem, AADisabled };
#if defined(HAVE_FONTCONFIG) && defined (HAVE_X11)
#if defined(HAVE_FONTCONFIG) && HAVE_X11
FontAASettings(QObject *parent);
bool save(KXftConfig::AntiAliasing::State aaState);
......@@ -95,7 +95,7 @@ Q_SIGNALS:
void subPixelCurrentIndexChanged();
void hintingCurrentIndexChanged();
#if defined(HAVE_FONTCONFIG) && defined (HAVE_X11)
#if defined(HAVE_FONTCONFIG) && HAVE_X11
private:
int m_excludeTo;
int m_excludeToOriginal;
......
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