lastfm::InternetConnectionMonitor::InternetConnectionMonitor( QObject *parent ) : QObject( parent ) , m_up( true ) { m_networkMonitor = createNetworkConnectionMonitor(); if ( m_networkMonitor ) { connect( m_networkMonitor, SIGNAL( networkUp() ), this, SLOT( onNetworkUp() ) ); connect( m_networkMonitor, SIGNAL( networkDown() ), this, SLOT( onNetworkDown() ) ); } connect( lastfm::nam(), SIGNAL( finished( QNetworkReply* ) ), this, SLOT( onFinished( QNetworkReply* ) ) ); }
lastfm::InternetConnectionMonitor::InternetConnectionMonitor( QObject *parent ) : QObject( parent ) , d( new InternetConnectionMonitorPrivate) { d->m_up = true; d->m_networkMonitor = createNetworkConnectionMonitor(); if ( d->m_networkMonitor ) { connect( d->m_networkMonitor, SIGNAL( networkUp() ), this, SLOT( onNetworkUp() ) ); connect( d->m_networkMonitor, SIGNAL( networkDown() ), this, SLOT( onNetworkDown() ) ); } connect( nam(), SIGNAL( finished( QNetworkReply* ) ), this, SLOT( onFinished( QNetworkReply* ) ) ); }