From d9a4368be5b46944bc00e9357a171d6c77f6da32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Tue, 7 Apr 2020 18:46:03 +0200 Subject: Add a paired constant for WITHOUT_ARTS so that WITH_ARTS can be used in the code without double negation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko Signed-off-by: gregory guy (cherry picked from commit c6b4624a36c2efe115d42a6c799471cb0761ed66) --- src/notecontent.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/notecontent.cpp') diff --git a/src/notecontent.cpp b/src/notecontent.cpp index c22743e..d7da39d 100644 --- a/src/notecontent.cpp +++ b/src/notecontent.cpp @@ -67,12 +67,11 @@ #include "kcolorcombo2.h" #include "htmlexporter.h" -#include "config.h" -#ifndef WITHOUT_ARTS - #include - #include - #include - #include +#ifdef WITH_ARTS +#include +#include +#include +#include #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 } -- cgit v1.2.1