summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-04-07 18:46:03 +0200
committerSlávek Banko <slavek.banko@axis.cz>2020-04-10 12:18:16 +0200
commitc6b4624a36c2efe115d42a6c799471cb0761ed66 (patch)
tree602d6fab93c137da37a2bf9a6402df24fab56468 /src
parent690b1a7950a832fb4f03a0330b8cb320047c14f9 (diff)
downloadbasket-c6b4624a36c2efe115d42a6c799471cb0761ed66.tar.gz
basket-c6b4624a36c2efe115d42a6c799471cb0761ed66.zip
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>
Diffstat (limited to 'src')
-rw-r--r--src/notecontent.cpp21
1 files changed, 10 insertions, 11 deletions
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 <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
}