From 745ccd34ffda30d8bff89677e84a869856c4ad60 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Tue, 12 Jun 2012 05:12:08 +0200 Subject: [PATCH] * Hard-coded posting to Twitter in SocialWidget. --- src/SocialWidget.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/SocialWidget.cpp b/src/SocialWidget.cpp index 80f708939..09cad1014 100644 --- a/src/SocialWidget.cpp +++ b/src/SocialWidget.cpp @@ -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(); }