From efaa1eb18f7432394663a3dc8e411e9449288be3 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sat, 10 Sep 2011 12:07:22 +0200 Subject: [PATCH] * If we couldn't shorten the url, emit the longUrl as shortUrl. --- src/libtomahawk/globalactionmanager.cpp | 2 +- src/libtomahawk/infosystem/infoplugins/mac/adiumplugin.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/libtomahawk/globalactionmanager.cpp b/src/libtomahawk/globalactionmanager.cpp index 17f5cb95c..2baa8920f 100644 --- a/src/libtomahawk/globalactionmanager.cpp +++ b/src/libtomahawk/globalactionmanager.cpp @@ -837,7 +837,7 @@ GlobalActionManager::shortenLinkRequestFinished() if ( !error ) emit shortLinkReady( longUrl, shortUrl ); else - emit shortLinkReady( longUrl, QUrl( "" ) ); + emit shortLinkReady( longUrl, longUrl ); } reply->deleteLater(); diff --git a/src/libtomahawk/infosystem/infoplugins/mac/adiumplugin.cpp b/src/libtomahawk/infosystem/infoplugins/mac/adiumplugin.cpp index 455492772..374aaf4c6 100644 --- a/src/libtomahawk/infosystem/infoplugins/mac/adiumplugin.cpp +++ b/src/libtomahawk/infosystem/infoplugins/mac/adiumplugin.cpp @@ -101,9 +101,8 @@ AdiumPlugin::shortLinkReady( QUrl longUrl, QUrl shortUrl ) nowPlaying.replace( "\"", "\\\"" ); // Escape quotes, or Applescript gets confused // We failed to get the short URL, just update the status with the metadata - if( ( longUrl.toString() == "" ) || ( shortUrl.toString() == "" ) ) + if( ( longUrl.toString() == "" ) ) { - qDebug() << "nowPlaying: " << nowPlaying; setStatus( nowPlaying ); return; } @@ -111,7 +110,6 @@ AdiumPlugin::shortLinkReady( QUrl longUrl, QUrl shortUrl ) // Add the short URL nowPlaying.append( " " ); nowPlaying.append( shortUrl.toEncoded() ); - qDebug() << "nowPlaying: " << nowPlaying; setStatus( nowPlaying ); }