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

Cast and dereference so that the check actually works

This commit is contained in:
Jeff Mitchell 2011-11-03 17:43:16 -04:00
parent e7826d725e
commit 8152207334

View File

@ -372,14 +372,19 @@ InfoSystemWorker::newNam()
return;
}
if (
oldNam &&
!m_nam.isNull() &&
oldNam->configuration() == m_nam.data()->configuration() &&
oldNam->networkAccessible() == m_nam.data()->networkAccessible() &&
oldNam->proxyFactory() == m_nam.data()->proxyFactory()
)
return;
if
(
oldNam &&
!m_nam.isNull() &&
oldNam->configuration() == m_nam.data()->configuration() &&
oldNam->networkAccessible() == m_nam.data()->networkAccessible()
)
{
TomahawkUtils::NetworkProxyFactory fac1 = *( dynamic_cast< TomahawkUtils::NetworkProxyFactory * >( oldNam->proxyFactory() ) );
TomahawkUtils::NetworkProxyFactory fac2 = *( dynamic_cast< TomahawkUtils::NetworkProxyFactory * >( m_nam.data()->proxyFactory() ) );
if ( fac1 == fac2 )
return;
}
QNetworkAccessManager* newNam;
#ifdef LIBLASTFM_FOUND