1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 14:16:32 +02:00

Added ErrorJob

This commit is contained in:
Hugo Lindström
2012-04-12 18:04:51 +02:00
parent 2a44de8641
commit 0eafeb995d

View File

@@ -27,12 +27,19 @@
#include "utils/tomahawkutils.h" #include "utils/tomahawkutils.h"
#include "actioncollection.h" #include "actioncollection.h"
#ifndef ENABLE_HEADLESS
#include "jobview/JobStatusView.h"
#include "jobview/JobStatusModel.h"
#include "jobview/ErrorStatusMessage.h"
#endif
#include <QPixmap> #include <QPixmap>
#include <QAction> #include <QAction>
using namespace Tomahawk; using namespace Tomahawk;
using namespace Accounts; using namespace Accounts;
class JobStatusView;
class ErrorStatusMessage;
static QPixmap* s_icon = 0; static QPixmap* s_icon = 0;
@@ -341,9 +348,10 @@ SpotifyAccount::resolverMessage( const QString &msgType, const QVariantMap &msg
else if( msgType == "spotifyError" ) else if( msgType == "spotifyError" )
{ {
const QString error = msg.value( "msg" ).toString(); const QString error = msg.value( "msg" ).toString();
if( error.isEmpty() )
error = "Spotify: Got empty error message...Please report";
qDebug() << Q_FUNC_INFO << " === GOT ERROR " << error; JobStatusView::instance()->model()->addJob( new ErrorStatusMessage( QString( "Spotify: %1" ).arg( error ) ) );
/// @todo: send to jobview
} }
} }