From 80e1946fa47b07f9b45e07ff624a9fb0ad5654f6 Mon Sep 17 00:00:00 2001 From: Leo Franchi <lfranchi@kde.org> Date: Fri, 18 Nov 2011 12:48:19 -0500 Subject: [PATCH] Only show JS errors in tomahawk debug builds --- src/libtomahawk/resolvers/qtscriptresolver.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libtomahawk/resolvers/qtscriptresolver.cpp b/src/libtomahawk/resolvers/qtscriptresolver.cpp index f9939964c..5568fe9a4 100644 --- a/src/libtomahawk/resolvers/qtscriptresolver.cpp +++ b/src/libtomahawk/resolvers/qtscriptresolver.cpp @@ -20,6 +20,7 @@ #include "artist.h" #include "album.h" +#include "config.h" #include "pipeline.h" #include "sourcelist.h" #include "utils/tomahawkutils.h" @@ -192,10 +193,8 @@ void ScriptEngine::javaScriptConsoleMessage( const QString& message, int lineNumber, const QString& sourceID ) { tLog() << "JAVASCRIPT:" << m_scriptPath << message << lineNumber << sourceID; - /// I guess there is somereason for a assert in here, maybe fatal js errors, but - /// undefined is not so fatal #ifndef ENABLE_HEADLESS -#ifdef QT_DEBUG +#ifdef DEBUG_BUILD QMessageBox::critical( 0, "Script Resolver Error", QString( "%1 %2 %3 %4" ).arg( m_scriptPath ).arg( message ).arg( lineNumber ).arg( sourceID ) ); #endif #endif