From eecf2c38d2e2311e91d05a6bc68178d8ada69409 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Fri, 8 Jun 2012 20:03:12 +0200 Subject: [PATCH] * Fixed ShortenedLinkParser for headless. --- src/libtomahawk/utils/ShortenedLinkParser.cpp | 8 +++++++- src/libtomahawk/utils/ShortenedLinkParser.h | 10 +++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/libtomahawk/utils/ShortenedLinkParser.cpp b/src/libtomahawk/utils/ShortenedLinkParser.cpp index 6452e1b0c..f683795ac 100644 --- a/src/libtomahawk/utils/ShortenedLinkParser.cpp +++ b/src/libtomahawk/utils/ShortenedLinkParser.cpp @@ -69,8 +69,9 @@ ShortenedLinkParser::handlesUrl( const QString& url ) url.contains( "rd.io" ) ); } + void -ShortenedLinkParser::lookupUrl ( const QString& url ) +ShortenedLinkParser::lookupUrl( const QString& url ) { tDebug() << "Looking up..." << url; QString cleaned = url; @@ -87,6 +88,7 @@ ShortenedLinkParser::lookupUrl ( const QString& url ) } + void ShortenedLinkParser::lookupFinished() { @@ -128,6 +130,8 @@ ShortenedLinkParser::checkFinished() } +#ifndef ENABLE_HEADLESS + QPixmap ShortenedLinkParser::pixmap() { @@ -136,3 +140,5 @@ ShortenedLinkParser::pixmap() return *s_pixmap; } + +#endif diff --git a/src/libtomahawk/utils/ShortenedLinkParser.h b/src/libtomahawk/utils/ShortenedLinkParser.h index 53131f932..b50ce17ec 100644 --- a/src/libtomahawk/utils/ShortenedLinkParser.h +++ b/src/libtomahawk/utils/ShortenedLinkParser.h @@ -26,7 +26,10 @@ #include #include #include -#include + +#ifndef ENABLE_HEADLESS + #include +#endif class QNetworkReply; @@ -61,13 +64,14 @@ private: void lookupUrl( const QString& url ); void checkFinished(); +#ifndef ENABLE_HEADLESS static QPixmap pixmap(); + static QPixmap* s_pixmap; +#endif QStringList m_links; QSet< QNetworkReply* > m_queries; DropJobNotifier* m_expandJob; - - static QPixmap* s_pixmap; }; }