[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/edu/kanagram/src
From:       Pino Toscano <toscano.pino () tiscali ! it>
Date:       2005-08-12 17:09:54
Message-ID: 1123866594.049466.10475.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 446144 by pino:

Make it compile without arts.


 M  +8 -4      kanagram.cpp  
 M  +9 -2      kanagram.h  
 M  +1 -0      newstuff.cpp  


--- trunk/playground/edu/kanagram/src/kanagram.cpp #446143:446144
@@ -22,6 +22,8 @@
 #include <iostream>
 using namespace std;
 
+#include <config.h>
+
 #include <qcursor.h>
 #include <qpainter.h>
 #include <qpixmap.h>
@@ -119,11 +121,11 @@
 	m_font = KGlobalSettings::generalFont();
 
 	//Initialize the sound server
-	#ifndef WITHOUT_ARTS
+#ifndef WITHOUT_ARTS
 	m_artsDispatcher = new KArtsDispatcher();
 	m_artsServer = new KArtsServer();
 	m_artsFactory = new KDE::PlayObjectFactory(m_artsServer->server());
-	#endif
+#endif
 }
 
 Kanagram::~Kanagram()
@@ -642,10 +644,12 @@
 
 void Kanagram::play(QString filename)
 {
-	#ifndef WITHOUT_ARTS
+#ifndef WITHOUT_ARTS
 	KDE::PlayObject *playobj = m_artsFactory->createPlayObject(locate("appdata", \
"sounds/" + filename), true);  playobj->play();
-	#endif
+#else
+	(void)filename;
+#endif
 }
 
 #include "kanagram.moc"
--- trunk/playground/edu/kanagram/src/kanagram.h #446143:446144
@@ -21,6 +21,8 @@
 #ifndef KANAGRAM_H
 #define KANAGRAM_H
 
+#include <config.h>
+
 #include <qwidget.h>
 #include <qlineedit.h>
 
@@ -31,6 +33,13 @@
 #include <arts/kartsserver.h>
 #include <arts/kplayobject.h>
 #include <arts/kplayobjectfactory.h>
+#else
+class KArtsDispatcher;
+class KArtsServer;
+namespace KDE
+{
+	class PlayObjectFactory;
+};
 #endif
 
 #include "kanagramgame.h"
@@ -109,11 +118,9 @@
 
 		QTimer *m_hintTimer;
 
-		#ifndef WITHOUT_ARTS
 		KArtsDispatcher *m_artsDispatcher;
 		KArtsServer *m_artsServer;
 		KDE::PlayObjectFactory *m_artsFactory;
-		#endif
 };
 
 #endif
--- trunk/playground/edu/kanagram/src/newstuff.cpp #446143:446144
@@ -25,3 +25,4 @@
 	dlgDownload->show();
 }
 
+#include "newstuff.moc"


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic