[netinstall] Logging; code duplication
- If there was an error, the network reply was never deleted - Improve logging to show where data is coming from
This commit is contained in:
parent
2bb66b8b9b
commit
82055f6854
@ -74,6 +74,9 @@ NetInstallPage::readGroups( const QByteArray& yamlData )
|
|||||||
void
|
void
|
||||||
NetInstallPage::dataIsHere( QNetworkReply* reply )
|
NetInstallPage::dataIsHere( QNetworkReply* reply )
|
||||||
{
|
{
|
||||||
|
cDebug() << "NetInstall group data received" << reply->url();
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
// If m_required is *false* then we still say we're ready
|
// If m_required is *false* then we still say we're ready
|
||||||
// even if the reply is corrupt or missing.
|
// even if the reply is corrupt or missing.
|
||||||
if ( reply->error() != QNetworkReply::NoError )
|
if ( reply->error() != QNetworkReply::NoError )
|
||||||
@ -92,7 +95,6 @@ NetInstallPage::dataIsHere( QNetworkReply* reply )
|
|||||||
cDebug() << Logger::SubEntry << "Url: " << reply->url().toString();
|
cDebug() << Logger::SubEntry << "Url: " << reply->url().toString();
|
||||||
cDebug() << Logger::SubEntry << "Headers: " << reply->rawHeaderList();
|
cDebug() << Logger::SubEntry << "Headers: " << reply->rawHeaderList();
|
||||||
ui->netinst_status->setText( tr( "Network Installation. (Disabled: Received invalid groups data)" ) );
|
ui->netinst_status->setText( tr( "Network Installation. (Disabled: Received invalid groups data)" ) );
|
||||||
reply->deleteLater();
|
|
||||||
emit checkReady( !m_required );
|
emit checkReady( !m_required );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -101,7 +103,6 @@ NetInstallPage::dataIsHere( QNetworkReply* reply )
|
|||||||
ui->groupswidget->header()->setSectionResizeMode( 0, QHeaderView::ResizeToContents );
|
ui->groupswidget->header()->setSectionResizeMode( 0, QHeaderView::ResizeToContents );
|
||||||
ui->groupswidget->header()->setSectionResizeMode( 1, QHeaderView::Stretch );
|
ui->groupswidget->header()->setSectionResizeMode( 1, QHeaderView::Stretch );
|
||||||
|
|
||||||
reply->deleteLater();
|
|
||||||
emit checkReady( true );
|
emit checkReady( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,6 +121,7 @@ NetInstallPage::selectedPackages() const
|
|||||||
void
|
void
|
||||||
NetInstallPage::loadGroupList( const QString& confUrl )
|
NetInstallPage::loadGroupList( const QString& confUrl )
|
||||||
{
|
{
|
||||||
|
cDebug() << "NetInstall loading groups from" << confUrl;
|
||||||
QNetworkRequest request;
|
QNetworkRequest request;
|
||||||
request.setUrl( QUrl( confUrl ) );
|
request.setUrl( QUrl( confUrl ) );
|
||||||
// Follows all redirects except unsafe ones (https to http).
|
// Follows all redirects except unsafe ones (https to http).
|
||||||
|
Loading…
Reference in New Issue
Block a user