1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 22:26:32 +02: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; return;
} }
if ( if
(
oldNam && oldNam &&
!m_nam.isNull() && !m_nam.isNull() &&
oldNam->configuration() == m_nam.data()->configuration() && oldNam->configuration() == m_nam.data()->configuration() &&
oldNam->networkAccessible() == m_nam.data()->networkAccessible() && oldNam->networkAccessible() == m_nam.data()->networkAccessible()
oldNam->proxyFactory() == m_nam.data()->proxyFactory()
) )
{
TomahawkUtils::NetworkProxyFactory fac1 = *( dynamic_cast< TomahawkUtils::NetworkProxyFactory * >( oldNam->proxyFactory() ) );
TomahawkUtils::NetworkProxyFactory fac2 = *( dynamic_cast< TomahawkUtils::NetworkProxyFactory * >( m_nam.data()->proxyFactory() ) );
if ( fac1 == fac2 )
return; return;
}
QNetworkAccessManager* newNam; QNetworkAccessManager* newNam;
#ifdef LIBLASTFM_FOUND #ifdef LIBLASTFM_FOUND