1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 07:49:42 +01:00

Don't crash loading covers for some tracks

This commit is contained in:
Leo Franchi 2012-03-13 08:56:43 -04:00
parent 2e6688f42b
commit c5732d0d62
5 changed files with 2 additions and 1207 deletions

View File

@ -262,7 +262,8 @@ void
TrackModel::getCover( const QModelIndex& index )
{
TrackModelItem* item = itemFromIndex( index );
item->query()->cover( QSize( 0, 0 ) );
if ( !item->query().isNull() )
item->query()->cover( QSize( 0, 0 ) );
}

View File

@ -1,71 +0,0 @@
project( tomahawk )
include( ${QT_USE_FILE} )
add_definitions( ${QT_DEFINITIONS} )
add_definitions( -DQT_PLUGIN )
add_definitions( -DQT_SHARED )
add_definitions( -DSIPDLLEXPORT_PRO )
set( jabberSources
jabber.cpp
tomahawksipmessage.cpp
tomahawksipmessagefactory.cpp
)
set( jabberSourcesGui
avatarmanager.cpp
xmlconsole.cpp
)
set( jabberHeaders
jabber.h
)
set( jabberHeadersGui
avatarmanager.h
xmlconsole.h
)
set( jabberUI
configwidget.ui
xmlconsole.ui
)
if(BUILD_GUI)
list(APPEND jabberSources ${jabberSourcesGui})
list(APPEND jabberHeaders ${jabberHeadersGui})
endif()
include_directories( . ${CMAKE_CURRENT_BINARY_DIR} ..
${QT_INCLUDE_DIR}
${LIBJREEN_INCLUDE_DIR}
)
qt4_add_resources( RC_SRCS "resources.qrc" )
qt4_wrap_ui( jabberUI_H ${jabberUI} )
qt4_wrap_cpp( jabberMoc ${jabberHeaders} )
add_library( tomahawk_sipjabber SHARED ${jabberSources} ${jabberMoc} ${jabberUI_H} ${RC_SRCS} )
IF( WIN32 )
SET( OS_SPECIFIC_LINK_LIBRARIES
${OS_SPECIFIC_LINK_LIBRARIES}
"secur32.dll"
"crypt32.dll"
${TOMAHAWK_LIBRARIES}
)
ENDIF( WIN32 )
target_link_libraries( tomahawk_sipjabber
${QT_LIBRARIES}
${LIBJREEN_LIBRARY}
${OS_SPECIFIC_LINK_LIBRARIES}
tomahawklib
)
IF( APPLE )
# SET( CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-undefined dynamic_lookup" )
ENDIF( APPLE )
install( TARGETS tomahawk_sipjabber DESTINATION ${CMAKE_INSTALL_LIBDIR} )
if(BUILD_GUI)
add_subdirectory(googlewrapper)
endif()

View File

@ -1,32 +0,0 @@
# fake google plugin
set( googleHeaders
../jabber.h
../avatarmanager.h
../xmlconsole.h
googlewrapper.h )
set( googleSources
../jabber.cpp
../tomahawksipmessage.cpp
../tomahawksipmessagefactory.cpp
../avatarmanager.cpp
../xmlconsole.cpp
googlewrapper.cpp )
add_definitions(-DGOOGLE_WRAPPER)
qt4_add_resources( RCX_SRCS "resources.qrc" )
qt4_wrap_cpp( googleMoc ${googleHeaders} )
add_library( tomahawk_sipgoogle SHARED ${googleSources} ${googleMoc} ${googleMoc} ${RCX_SRCS} )
target_link_libraries( tomahawk_sipgoogle
${QT_LIBRARIES}
${LIBJREEN_LIBRARY}
${OS_SPECIFIC_LINK_LIBRARIES}
tomahawklib
)
install( TARGETS tomahawk_sipgoogle DESTINATION ${CMAKE_INSTALL_LIBDIR} )

View File

@ -1,32 +0,0 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SIPDLLMACRO_H
#define SIPDLLMACRO_H
#ifdef Q_WS_WIN
#ifdef SIPDLLEXPORT_PRO
#define SIPDLLEXPORT __declspec(dllexport)
#else
#define SIPDLLEXPORT __declspec(dllimport)
#endif
#else
#define SIPDLLEXPORT
#endif
#endif

File diff suppressed because it is too large Load Diff