From 511d353cc6e676637e0fa44cb7bde15bbf2672a7 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Wed, 11 Apr 2012 15:22:34 -0400 Subject: [PATCH] Somehow, who knows how, passing a QImage to the FDO notification spec crashes some X servers, but saving the QImage to a file as a PNG, loading it back from the file as a PNG, and passing that QImage is totally cool. Wut. --- .../infosystem/infoplugins/unix/fdonotifyplugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libtomahawk/infosystem/infoplugins/unix/fdonotifyplugin.cpp b/src/libtomahawk/infosystem/infoplugins/unix/fdonotifyplugin.cpp index b32c00e5e..5c252f820 100644 --- a/src/libtomahawk/infosystem/infoplugins/unix/fdonotifyplugin.cpp +++ b/src/libtomahawk/infosystem/infoplugins/unix/fdonotifyplugin.cpp @@ -149,8 +149,8 @@ FdoNotifyPlugin::nowPlaying( const QVariant &input ) arguments << QStringList(); //actions QVariantMap dict; dict["desktop-entry"] = QString( "tomahawk" ); - if ( map.contains( "cover" ) && map[ "cover" ].canConvert< QImage >() && !map[ "cover" ].value< QImage >().isNull() ) - dict[ "image_data" ] = ImageConverter::variantForImage( map[ "cover" ].value< QImage >() ); + if ( map.contains( "coveruri" ) && map[ "coveruri" ].canConvert< QString >() ) + dict[ "image_data" ] = ImageConverter::variantForImage( QImage( map[ "coveruri" ].toString(), "PNG" ) ); else dict[ "image_data" ] = ImageConverter::variantForImage( QImage( RESPATH "icons/tomahawk-icon-128x128.png" ) ); arguments << dict; //hints