diff --git a/src/libtomahawk/FuncTimeout.cpp b/src/libtomahawk/FuncTimeout.cpp index 3014bc309..ceb5a8450 100644 --- a/src/libtomahawk/FuncTimeout.cpp +++ b/src/libtomahawk/FuncTimeout.cpp @@ -25,7 +25,7 @@ using namespace Tomahawk; -FuncTimeout::FuncTimeout( int ms, boost::function< void() > func, QObject* besafe ) +FuncTimeout::FuncTimeout( int ms, function< void() > func, QObject* besafe ) : m_func( func ) , m_watch( QPointer< QObject >( besafe ) ) { diff --git a/src/libtomahawk/FuncTimeout.h b/src/libtomahawk/FuncTimeout.h index 004e19d5f..8378a7729 100644 --- a/src/libtomahawk/FuncTimeout.h +++ b/src/libtomahawk/FuncTimeout.h @@ -22,17 +22,15 @@ #include #include -#include +#include "utils/tr1-functional.h" #include "DllMacro.h" /* -#include - I want to do: QTimer::singleShot(1000, this, SLOT(doSomething(x))); instead, I'm doing: - new FuncTimeout(1000, boost::bind(&MyClass::doSomething, this, x)); + new FuncTimeout(1000, bind(&MyClass::doSomething, this, x)); */ namespace Tomahawk @@ -43,7 +41,7 @@ class DLLEXPORT FuncTimeout : public QObject Q_OBJECT public: - FuncTimeout( int ms, boost::function func, QObject* besafe ); + FuncTimeout( int ms, function func, QObject* besafe ); ~FuncTimeout(); @@ -51,7 +49,7 @@ public slots: void exec(); private: - boost::function m_func; + function m_func; QPointer< QObject > m_watch; }; diff --git a/src/libtomahawk/Pipeline.cpp b/src/libtomahawk/Pipeline.cpp index fbb4c0be2..e37fb2527 100644 --- a/src/libtomahawk/Pipeline.cpp +++ b/src/libtomahawk/Pipeline.cpp @@ -32,8 +32,6 @@ #include "Source.h" #include "SourceList.h" -#include - #define DEFAULT_CONCURRENT_QUERIES 4 #define MAX_CONCURRENT_QUERIES 16 #define CLEANUP_TIMEOUT 5 * 60 * 1000 @@ -566,7 +564,7 @@ Pipeline::shunt( const query_ptr& q ) if ( r->timeout() > 0 ) { d->qidsTimeout.insert( q->id(), true ); - new FuncTimeout( r->timeout(), boost::bind( &Pipeline::timeoutShunt, this, q ), this ); + new FuncTimeout( r->timeout(), bind( &Pipeline::timeoutShunt, this, q ), this ); } } else @@ -618,7 +616,7 @@ Pipeline::setQIDState( const Tomahawk::query_ptr& query, int state ) { d->qidsState.insert( query->id(), state ); - new FuncTimeout( 0, boost::bind( &Pipeline::shunt, this, query ), this ); + new FuncTimeout( 0, bind( &Pipeline::shunt, this, query ), this ); } else { @@ -628,7 +626,7 @@ Pipeline::setQIDState( const Tomahawk::query_ptr& query, int state ) if ( !d->queries_temporary.contains( query ) ) d->qids.remove( query->id() ); - new FuncTimeout( 0, boost::bind( &Pipeline::shuntNext, this ), this ); + new FuncTimeout( 0, bind( &Pipeline::shuntNext, this ), this ); } }