1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 07:49:42 +01:00

* Hard-coded posting to Twitter in SocialWidget.

This commit is contained in:
Christian Muehlhaeuser 2012-06-12 05:12:08 +02:00
parent 9c1f200905
commit 745ccd34ff

View File

@ -229,6 +229,20 @@ void
SocialWidget::accept()
{
tDebug() << "Sharing social link!";
QVariantMap shareInfo;
Tomahawk::InfoSystem::InfoStringHash trackInfo;
trackInfo["title"] = m_query->track();
trackInfo["artist"] = m_query->artist();
trackInfo["album"] = m_query->album();
shareInfo["trackinfo"] = QVariant::fromValue< Tomahawk::InfoSystem::InfoStringHash >( trackInfo );
shareInfo["message"] = ui->textEdit->toPlainText();
shareInfo["accountlist"] = QStringList( "all" );
Tomahawk::InfoSystem::InfoPushData pushData( uuid(), Tomahawk::InfoSystem::InfoShareTrack, shareInfo, Tomahawk::InfoSystem::PushNoFlag );
Tomahawk::InfoSystem::InfoSystem::instance()->pushInfo( pushData );
deleteLater();
}