mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-01-18 23:17:59 +01:00
fix forward decs again :)
and some sql fixes
This commit is contained in:
parent
89328215d9
commit
73af178418
@ -14,6 +14,7 @@
|
||||
#include <QDebug>
|
||||
|
||||
#include "tomahawk/functimeout.h"
|
||||
#include "tomahawk/query.h"
|
||||
#include "tomahawk/source.h"
|
||||
#include "tomahawk/typedefs.h"
|
||||
#include "typedefs.h"
|
||||
@ -49,7 +50,7 @@ public:
|
||||
virtual QList< Tomahawk::dynplaylist_ptr > dynamicPlaylists() { return m_dynplaylists; }
|
||||
virtual QList< Tomahawk::query_ptr > tracks() { return m_tracks; }
|
||||
|
||||
const source_ptr& source() const { return m_source; }
|
||||
const source_ptr& source() const;
|
||||
unsigned int lastmodified() const { return m_lastmodified; }
|
||||
|
||||
signals:
|
||||
|
@ -4,11 +4,10 @@
|
||||
#include <QObject>
|
||||
#include <QList>
|
||||
#include <QDebug>
|
||||
#include <QVariant>
|
||||
#include <QSharedPointer>
|
||||
|
||||
#include "tomahawk/query.h"
|
||||
#include "tomahawk/typedefs.h"
|
||||
#include "typedefs.h"
|
||||
|
||||
class DatabaseCommand_LoadAllPlaylists;
|
||||
class DatabaseCommand_SetPlaylistRevision;
|
||||
@ -28,9 +27,12 @@ Q_PROPERTY( unsigned int lastmodified READ lastmodified WRITE setLastmodified )
|
||||
Q_PROPERTY( QVariant query READ queryvariant WRITE setQueryvariant )
|
||||
|
||||
public:
|
||||
void setQuery( const Tomahawk::query_ptr& q ) { m_query = q; }
|
||||
const Tomahawk::query_ptr& query() const { return m_query; }
|
||||
|
||||
PlaylistEntry();
|
||||
virtual ~PlaylistEntry();
|
||||
|
||||
void setQuery( const Tomahawk::query_ptr& q );
|
||||
const Tomahawk::query_ptr& query() const;
|
||||
|
||||
// I wish Qt did this for me once i specified the Q_PROPERTIES:
|
||||
void setQueryvariant( const QVariant& v );
|
||||
QVariant queryvariant() const;
|
||||
@ -50,10 +52,10 @@ public:
|
||||
unsigned int lastmodified() const { return m_lastmodified; }
|
||||
void setLastmodified( unsigned int i ) { m_lastmodified = i; }
|
||||
|
||||
source_ptr lastsource() const { return m_lastsource; }
|
||||
void setLastsource( source_ptr s ) { m_lastsource = s; }
|
||||
source_ptr lastsource() const;
|
||||
void setLastsource( source_ptr s );
|
||||
|
||||
private:
|
||||
private:
|
||||
QString m_guid;
|
||||
Tomahawk::query_ptr m_query;
|
||||
QString m_annotation;
|
||||
@ -90,6 +92,8 @@ friend class ::DatabaseCommand_SetPlaylistRevision;
|
||||
friend class ::DatabaseCommand_CreatePlaylist;
|
||||
|
||||
public:
|
||||
~Playlist();
|
||||
|
||||
// one CTOR is private, only called by DatabaseCommand_LoadAllPlaylists
|
||||
static Tomahawk::playlist_ptr create( const source_ptr& author,
|
||||
const QString& guid,
|
||||
@ -103,7 +107,7 @@ public:
|
||||
|
||||
virtual void loadRevision( const QString& rev = "" );
|
||||
|
||||
const source_ptr& author() { return m_source; }
|
||||
const source_ptr& author();
|
||||
const QString& currentrevision() { return m_currentrevision; }
|
||||
const QString& title() { return m_title; }
|
||||
const QString& info() { return m_info; }
|
||||
|
@ -31,6 +31,11 @@ Collection::name() const
|
||||
return m_name;
|
||||
}
|
||||
|
||||
const
|
||||
source_ptr& Collection::source() const
|
||||
{
|
||||
return m_source;
|
||||
}
|
||||
|
||||
void
|
||||
Collection::addPlaylist( const Tomahawk::playlist_ptr& p )
|
||||
|
@ -13,6 +13,8 @@
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
PlaylistEntry::PlaylistEntry() {}
|
||||
PlaylistEntry::~PlaylistEntry() {}
|
||||
|
||||
void
|
||||
PlaylistEntry::setQueryvariant( const QVariant& v )
|
||||
@ -27,6 +29,30 @@ PlaylistEntry::queryvariant() const
|
||||
return m_query->toVariant();
|
||||
}
|
||||
|
||||
void
|
||||
PlaylistEntry::setQuery( const Tomahawk::query_ptr& q )
|
||||
{
|
||||
m_query = q;
|
||||
}
|
||||
|
||||
const Tomahawk::query_ptr&
|
||||
PlaylistEntry::query() const
|
||||
{
|
||||
return m_query;
|
||||
}
|
||||
|
||||
|
||||
source_ptr
|
||||
PlaylistEntry::lastsource() const
|
||||
{
|
||||
return m_lastsource;
|
||||
}
|
||||
|
||||
void
|
||||
PlaylistEntry::setLastsource( source_ptr s )
|
||||
{
|
||||
m_lastsource = s;
|
||||
}
|
||||
|
||||
Playlist::Playlist( const source_ptr& author )
|
||||
: m_source( author )
|
||||
@ -76,6 +102,7 @@ Playlist::Playlist( const source_ptr& author,
|
||||
qDebug() << Q_FUNC_INFO << "2";
|
||||
}
|
||||
|
||||
Playlist::~Playlist() {}
|
||||
|
||||
playlist_ptr
|
||||
Playlist::create( const source_ptr& author,
|
||||
@ -322,6 +349,12 @@ Playlist::setNewRevision( const QString& rev,
|
||||
return pr;
|
||||
}
|
||||
|
||||
const source_ptr&
|
||||
Playlist::author()
|
||||
{
|
||||
return m_source;
|
||||
}
|
||||
|
||||
void Playlist::resolve()
|
||||
{
|
||||
QList< query_ptr > qlist;
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include "utils/tomahawkutils.h"
|
||||
#include "tomahawk/playlist.h"
|
||||
#include "tomahawk/query.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include "sip/SipHandler.h"
|
||||
#include "dynamic/generatorfactory.h"
|
||||
#include "dynamic/echonest/echonestgenerator.h"
|
||||
#include "jabber/jabber.h"
|
||||
#include "utils/tomahawkutils.h"
|
||||
#include "xmppbot/xmppbot.h"
|
||||
#include "web/api_v1.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user