Add a paired constant for WITHOUT_ARTS so that WITH_ARTS can be used

in the code without double negation.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Signed-off-by: gregory guy <gregory-tde@laposte.net>
pull/5/head
Slávek Banko 4 years ago
parent 690b1a7950
commit c6b4624a36
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -141,6 +141,9 @@
/* Defined if compiling without arts */
#undef WITHOUT_ARTS
/* Define a paired constant for WITHOUT_ARTS without a negative notation. */
#undef WITH_ARTS
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN

@ -53,3 +53,6 @@ if test "$KONTACT_SUBDIR" = "no"; then
DO_NOT_COMPILE="$DO_NOT_COMPILE kontact_plugin"
fi
if test "$build_arts" != "no"; then
AC_DEFINE(WITH_ARTS, 1, [Define a paired constant for WITHOUT_ARTS without a negative notation.])
fi

@ -67,12 +67,11 @@
#include "kcolorcombo2.h"
#include "htmlexporter.h"
#include "config.h"
#ifndef WITHOUT_ARTS
#include <arts/kplayobject.h>
#include <arts/kplayobjectfactory.h>
#include <arts/kartsserver.h>
#include <arts/kartsdispatcher.h>
#ifdef WITH_ARTS
#include <arts/kplayobject.h>
#include <arts/kplayobjectfactory.h>
#include <arts/kartsserver.h>
#include <arts/kartsdispatcher.h>
#endif
/** class NoteContent:
@ -1164,11 +1163,7 @@ TQString SoundContent::zoneTip(int zone)
void SoundContent::setHoveredZone(int oldZone, int newZone)
{
#ifdef WITHOUT_ARTS
Q_UNUSED(oldZone);
if (newZone == Note::Custom0 || newZone == Note::Content)
std::cout << "Compiled without aRts: sound is not played." << std::endl;
#else
#ifdef WITH_ARTS
static KArtsDispatcher *s_dispatcher = new KArtsDispatcher(); // Needed for s_playObj (we don't use it directly)
static KArtsServer *s_playServer = new KArtsServer();
static KDE::PlayObjectFactory *s_playFactory = new KDE::PlayObjectFactory(s_playServer);
@ -1189,6 +1184,10 @@ void SoundContent::setHoveredZone(int oldZone, int newZone)
s_playObj = 0;
}
}
#else
Q_UNUSED(oldZone);
if (newZone == Note::Custom0 || newZone == Note::Content)
std::cout << "Compiled without aRts: sound is not played." << std::endl;
#endif
}

Loading…
Cancel
Save