Commit 26e23139 authored by Frerich Raabe's avatar Frerich Raabe

- Moved class declaration into header file so that the build system notices

  it has to generate a .moc file.

svn path=/trunk/kdemultimedia/juk/; revision=224225
parent 3f3afd36
......@@ -9,13 +9,10 @@
#include <kapplication.h>
#include <kdebug.h>
#include <qobject.h>
#include "musicbrainzquery.h"
class TestMB : public QObject {
Q_OBJECT
public:
TestMB( const QString& file ) : QObject(0, "hello") {
#include "mbtest.h"
TestMB::TestMB( const QString& file ) : QObject(0, "hello") {
QStringList l;
l<<file;
MusicBrainzQuery *query = new MusicBrainzQuery( MusicBrainzQuery::File ,
......@@ -23,9 +20,9 @@ public:
connect( query, SIGNAL(signalDone(const MusicBrainzQuery::TrackList&)),
SLOT(slotTrack(const MusicBrainzQuery::TrackList&)) );
query->start();
}
public slots:
void slotTrack( const MusicBrainzQuery::TrackList& res ) {
}
void TestMB::slotTrack( const MusicBrainzQuery::TrackList& res ) {
for( MusicBrainzQuery::TrackList::ConstIterator itr = res.begin();
itr != res.end(); ++itr ) {
kdDebug() <<"Album = "<< (*itr).album <<endl;
......@@ -36,8 +33,7 @@ public slots:
kdDebug() <<"Song Num = "<< (*itr).number <<endl;
}
kapp->quit();
}
};
}
#include "mbtest.moc"
......
//Zack - Pizza license - you agree to eat pizza if you modify this file.
//Compile with :
//g++ -Wall -g -lmusicbrainz -L$QTDIR/lib -L$KDEDIR/lib -I$QTDIR/include -I$KDEDIR/include -lqt-mt -lkdecore musicbrainzquery.cpp mbtest.cpp -o mbtest
//First create mocs of course:
//moc mbtest.cpp -o mbtest.moc
//moc musicbrainzquery.h -o musicbrainzquery.moc
//then "./test some_file.mp3" will identify (or at least try to) the file
#ifndef JUK_MBTEST_H
#define JUK_MBTEST_H
#include "musicbrainzquery.h"
class TestMB : public QObject {
Q_OBJECT
public:
TestMB( const QString& file );
public slots:
void slotTrack( const MusicBrainzQuery::TrackList& res );
};
#endif // JUK_MBTEST_H
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