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