mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-21 16:29:43 +01:00
First work at shorten-link stuff, does not compile.
This commit is contained in:
parent
202c4b821e
commit
df13198c5c
@ -104,6 +104,14 @@ GlobalActionManager::openLink( const QString& title, const QString& artist, cons
|
||||
return link;
|
||||
}
|
||||
|
||||
QUrl
|
||||
GlobalActionManager::openShortTomahawkLink( const QString& title, const QString& artist, const QString& album ) const
|
||||
{
|
||||
QUrl longLink = openLink( title, artist, album );
|
||||
|
||||
|
||||
}
|
||||
|
||||
QString
|
||||
GlobalActionManager::copyPlaylistToClipboard( const dynplaylist_ptr& playlist )
|
||||
{
|
||||
|
@ -25,8 +25,11 @@
|
||||
#include "playlist/dynamic/DynamicPlaylist.h"
|
||||
#include "dllmacro.h"
|
||||
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QObject>
|
||||
#include <QUrl>
|
||||
#include <QWeakPointer>
|
||||
|
||||
|
||||
/**
|
||||
* Handles global actions such as parsing and creation of links, mime data handling, etc
|
||||
@ -41,6 +44,8 @@ public:
|
||||
QUrl openLinkFromQuery( const Tomahawk::query_ptr& query ) const;
|
||||
QUrl openLink( const QString& title, const QString& artist, const QString& album ) const;
|
||||
|
||||
QUrl shortenLink( const QString& link );
|
||||
|
||||
/// Takes a spotify link and performs the default open action on it
|
||||
bool openSpotifyLink( const QString& link );
|
||||
|
||||
@ -59,6 +64,9 @@ public slots:
|
||||
|
||||
void handleOpenTrack( const Tomahawk::query_ptr& qry );
|
||||
|
||||
signals:
|
||||
void shortLinkReady( QUrl url );
|
||||
|
||||
private slots:
|
||||
void bookmarkPlaylistCreated( const Tomahawk::playlist_ptr& pl );
|
||||
void showPlaylist();
|
||||
@ -93,6 +101,8 @@ private:
|
||||
Tomahawk::query_ptr m_waitingToBookmark;
|
||||
Tomahawk::query_ptr m_waitingToPlay;
|
||||
|
||||
QWeakPointer<QNetworkAccessManager> m_nam;
|
||||
|
||||
static GlobalActionManager* s_instance;
|
||||
};
|
||||
|
||||
|
@ -130,6 +130,18 @@ AdiumPlugin::pushInfo( QString caller, Tomahawk::InfoSystem::InfoType type, QVar
|
||||
m_pauseTimer->stop();
|
||||
}
|
||||
|
||||
void
|
||||
AdiumPlugin::namChangedSlot( QNetworkAccessManager* nam )
|
||||
{
|
||||
m_nam = QWeakPointer<QNetworkAccessManager>( nam );
|
||||
|
||||
if( !m_nam.isNull() )
|
||||
{
|
||||
connect( m_nam.data(), SIGNAL( finished( QNetworkReply* ) ),
|
||||
this, SLOT( replyFinished( QNetworkReply* ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
/** Audio state slots */
|
||||
void
|
||||
AdiumPlugin::audioStarted( const QVariant &input )
|
||||
|
@ -21,8 +21,10 @@
|
||||
|
||||
#include "infosystem/infosystem.h"
|
||||
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QObject>
|
||||
#include <QVariant>
|
||||
#include <QWeakPointer>
|
||||
|
||||
class QTimer;
|
||||
|
||||
@ -48,7 +50,7 @@ protected slots:
|
||||
void pushInfo( QString caller, Tomahawk::InfoSystem::InfoType type, QVariant input );
|
||||
|
||||
public slots:
|
||||
void namChangedSlot( QNetworkAccessManager* /*nam*/ ) {} // unused
|
||||
void namChangedSlot( QNetworkAccessManager* nam );
|
||||
|
||||
virtual void notInCacheSlot( uint requestId, const Tomahawk::InfoSystem::InfoCriteriaHash criteria, Tomahawk::InfoSystem::InfoRequestData requestData )
|
||||
{
|
||||
@ -75,6 +77,7 @@ private:
|
||||
QString m_afterStatus;
|
||||
|
||||
QTimer* m_pauseTimer;
|
||||
QWeakPointer<QNetworkAccessManager> m_nam;
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user