mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 00:54:20 +02:00
Do less work in the constructor body
This commit is contained in:
@@ -39,21 +39,21 @@
|
|||||||
#include "UrlHandler.h"
|
#include "UrlHandler.h"
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <boost/bind.hpp>
|
||||||
|
#include <QtCrypto>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QtCrypto>
|
|
||||||
#include <QWebFrame>
|
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
|
#include <QWebFrame>
|
||||||
|
|
||||||
using namespace Tomahawk;
|
using namespace Tomahawk;
|
||||||
|
|
||||||
JSResolverHelper::JSResolverHelper( const QString& scriptPath, JSResolver* parent )
|
JSResolverHelper::JSResolverHelper( const QString& scriptPath, JSResolver* parent )
|
||||||
: QObject( parent )
|
: QObject( parent )
|
||||||
|
, m_resolver( parent )
|
||||||
|
, m_scriptPath( scriptPath )
|
||||||
, m_urlCallbackIsAsync( false )
|
, m_urlCallbackIsAsync( false )
|
||||||
, m_urlTranslatorIsAsync( false )
|
, m_urlTranslatorIsAsync( false )
|
||||||
{
|
{
|
||||||
m_scriptPath = scriptPath;
|
|
||||||
m_resolver = parent;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -90,13 +90,13 @@ private:
|
|||||||
boost::function< void( QSharedPointer< QIODevice >& ) > callback );
|
boost::function< void( QSharedPointer< QIODevice >& ) > callback );
|
||||||
void returnUrlTranslation( const QString& streamUrl, boost::function< void( const QString& ) > callback );
|
void returnUrlTranslation( const QString& streamUrl, boost::function< void( const QString& ) > callback );
|
||||||
|
|
||||||
|
QVariantMap m_resolverConfig;
|
||||||
|
JSResolver* m_resolver;
|
||||||
QString m_scriptPath, m_urlCallback, m_urlTranslator;
|
QString m_scriptPath, m_urlCallback, m_urlTranslator;
|
||||||
QHash< QString, boost::function< void( QSharedPointer< QIODevice >& ) > > m_streamCallbacks;
|
QHash< QString, boost::function< void( QSharedPointer< QIODevice >& ) > > m_streamCallbacks;
|
||||||
QHash< QString, boost::function< void( const QString& ) > > m_translatorCallbacks;
|
QHash< QString, boost::function< void( const QString& ) > > m_translatorCallbacks;
|
||||||
bool m_urlCallbackIsAsync;
|
bool m_urlCallbackIsAsync;
|
||||||
bool m_urlTranslatorIsAsync;
|
bool m_urlTranslatorIsAsync;
|
||||||
QVariantMap m_resolverConfig;
|
|
||||||
JSResolver* m_resolver;
|
|
||||||
QString m_pendingUrl;
|
QString m_pendingUrl;
|
||||||
Tomahawk::album_ptr m_pendingAlbum;
|
Tomahawk::album_ptr m_pendingAlbum;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user