ConfigurationDialog.cpp   ConfigurationDialog.cpp 
skipping to change at line 555 skipping to change at line 555
StelCore* core = StelApp::getInstance().getCore(); StelCore* core = StelApp::getInstance().getCore();
const StelProjectorP proj = core->getProjection(StelCore::FrameJ2000 ); const StelProjectorP proj = core->getProjection(StelCore::FrameJ2000 );
Q_ASSERT(proj); Q_ASSERT(proj);
// view dialog / sky tab settings // view dialog / sky tab settings
conf->setValue("stars/absolute_scale", skyd->getAbsoluteStarScale()) ; conf->setValue("stars/absolute_scale", skyd->getAbsoluteStarScale()) ;
conf->setValue("stars/relative_scale", skyd->getRelativeStarScale()) ; conf->setValue("stars/relative_scale", skyd->getRelativeStarScale()) ;
conf->setValue("stars/flag_star_twinkle", skyd->getFlagTwinkle()); conf->setValue("stars/flag_star_twinkle", skyd->getFlagTwinkle());
conf->setValue("stars/star_twinkle_amount", skyd->getTwinkleAmount() ); conf->setValue("stars/star_twinkle_amount", skyd->getTwinkleAmount() );
conf->setValue("astro/flag_star_magnitude_limit", conf->setValue("astro/flag_star_magnitude_limit", skyd->getFlagStarM
skyd->getFlagStarMagnitudeLimit()); agnitudeLimit());
conf->setValue("astro/star_magnitude_limit", conf->setValue("astro/star_magnitude_limit", skyd->getCustomStarMagn
skyd->getCustomStarMagnitudeLimit()); itudeLimit());
conf->setValue("astro/flag_planet_magnitude_limit", conf->setValue("astro/flag_planet_magnitude_limit", skyd->getFlagPla
skyd->getFlagPlanetMagnitudeLimit()); netMagnitudeLimit());
conf->setValue("astro/planet_magnitude_limit", conf->setValue("astro/planet_magnitude_limit", skyd->getCustomPlanet
skyd->getCustomPlanetMagnitudeLimit()); MagnitudeLimit());
conf->setValue("astro/flag_nebula_magnitude_limit", conf->setValue("astro/flag_nebula_magnitude_limit", skyd->getFlagNeb
skyd->getFlagNebulaMagnitudeLimit()); ulaMagnitudeLimit());
conf->setValue("astro/nebula_magnitude_limit", conf->setValue("astro/nebula_magnitude_limit", skyd->getCustomNebula
skyd->getCustomNebulaMagnitudeLimit()); MagnitudeLimit());
conf->setValue("viewing/use_luminance_adaptation", skyd->getFlagLumi nanceAdaptation()); conf->setValue("viewing/use_luminance_adaptation", skyd->getFlagLumi nanceAdaptation());
conf->setValue("astro/flag_planets", ssmgr->getFlagPlanets()); conf->setValue("astro/flag_planets", ssmgr->getFlagPlanets());
conf->setValue("astro/flag_planets_hints", ssmgr->getFlagHints()); conf->setValue("astro/flag_planets_hints", ssmgr->getFlagHints());
conf->setValue("astro/flag_planets_orbits", ssmgr->getFlagOrbits()); conf->setValue("astro/flag_planets_orbits", ssmgr->getFlagOrbits());
conf->setValue("viewing/flag_isolated_trails", ssmgr->getFlagIsolate
dTrails());
conf->setValue("viewing/flag_isolated_orbits", ssmgr->getFlagIsolate
dOrbits());
conf->setValue("astro/flag_light_travel_time", ssmgr->getFlagLightTr avelTime()); conf->setValue("astro/flag_light_travel_time", ssmgr->getFlagLightTr avelTime());
conf->setValue("viewing/flag_moon_scaled", ssmgr->getFlagMoonScale() ); conf->setValue("viewing/flag_moon_scaled", ssmgr->getFlagMoonScale() );
conf->setValue("viewing/moon_scale", ssmgr->getMoonScale()); conf->setValue("viewing/moon_scale", ssmgr->getMoonScale());
conf->setValue("astro/meteor_rate", mmgr->getZHR()); conf->setValue("astro/meteor_rate", mmgr->getZHR());
conf->setValue("astro/milky_way_intensity", GETSTELMODULE(MilkyWay)- >getIntensity()); conf->setValue("astro/milky_way_intensity", GETSTELMODULE(MilkyWay)- >getIntensity());
conf->setValue("astro/zodiacal_light_intensity", GETSTELMODULE(Zodia calLight)->getIntensity()); conf->setValue("astro/zodiacal_light_intensity", GETSTELMODULE(Zodia calLight)->getIntensity());
// view dialog / markings tab settings // view dialog / markings tab settings
conf->setValue("viewing/flag_azimuthal_grid", glmgr->getFlagAzimutha lGrid()); conf->setValue("viewing/flag_azimuthal_grid", glmgr->getFlagAzimutha lGrid());
conf->setValue("viewing/flag_equatorial_grid", glmgr->getFlagEquator Grid()); conf->setValue("viewing/flag_equatorial_grid", glmgr->getFlagEquator Grid());
skipping to change at line 1133 skipping to change at line 1129
req.setRawHeader("User-Agent", userAgent.toLatin1()); req.setRawHeader("User-Agent", userAgent.toLatin1());
starCatalogDownloadReply = StelApp::getInstance().getNetworkAccessMa nager()->get(req); starCatalogDownloadReply = StelApp::getInstance().getNetworkAccessMa nager()->get(req);
starCatalogDownloadReply->setReadBufferSize(1024*1024*2); starCatalogDownloadReply->setReadBufferSize(1024*1024*2);
connect(starCatalogDownloadReply, SIGNAL(finished()), this, SLOT(dow nloadFinished())); connect(starCatalogDownloadReply, SIGNAL(finished()), this, SLOT(dow nloadFinished()));
connect(starCatalogDownloadReply, SIGNAL(error(QNetworkReply::Networ kError)), this, SLOT(downloadError(QNetworkReply::NetworkError))); connect(starCatalogDownloadReply, SIGNAL(error(QNetworkReply::Networ kError)), this, SLOT(downloadError(QNetworkReply::NetworkError)));
progressBar = StelApp::getInstance().addProgressBar(); progressBar = StelApp::getInstance().addProgressBar();
progressBar->setValue(0); progressBar->setValue(0);
progressBar->setRange(0, nextStarCatalogToDownload.value("sizeMb").t oDouble()*1024); progressBar->setRange(0, nextStarCatalogToDownload.value("sizeMb").t oDouble()*1024);
progressBar->setFormat(QString("%1: %p%").arg(nextStarCatalogToDownl oad.value("id").toString())); progressBar->setFormat(QString("%1: %p%").arg(nextStarCatalogToDownl oad.value("id").toString()));
qDebug() << "Downloading file" << nextStarCatalogToDownload.value("u
rl").toString();
} }
void ConfigurationDialog::downloadError(QNetworkReply::NetworkError) void ConfigurationDialog::downloadError(QNetworkReply::NetworkError)
{ {
Q_ASSERT(currentDownloadFile); Q_ASSERT(currentDownloadFile);
Q_ASSERT(starCatalogDownloadReply); Q_ASSERT(starCatalogDownloadReply);
isDownloadingStarCatalog = false; isDownloadingStarCatalog = false;
qWarning() << "Error downloading file" << starCatalogDownloadReply-> url() << ": " << starCatalogDownloadReply->errorString(); qWarning() << "Error downloading file" << starCatalogDownloadReply-> url() << ": " << starCatalogDownloadReply->errorString();
ui->downloadLabel->setText(q_("Error downloading %1:\n%2").arg(nextS tarCatalogToDownload.value("id").toString()).arg(starCatalogDownloadReply-> errorString())); ui->downloadLabel->setText(q_("Error downloading %1:\n%2").arg(nextS tarCatalogToDownload.value("id").toString()).arg(starCatalogDownloadReply-> errorString()));
skipping to change at line 1167 skipping to change at line 1165
starCatalogDownloadReply->deleteLater(); starCatalogDownloadReply->deleteLater();
starCatalogDownloadReply = NULL; starCatalogDownloadReply = NULL;
currentDownloadFile->close(); currentDownloadFile->close();
currentDownloadFile->deleteLater(); currentDownloadFile->deleteLater();
currentDownloadFile = NULL; currentDownloadFile = NULL;
StelApp::getInstance().removeProgressBar(progressBar); StelApp::getInstance().removeProgressBar(progressBar);
progressBar=NULL; progressBar=NULL;
return; return;
} }
Q_ASSERT(starCatalogDownloadReply->bytesAvailable()==0);
const QVariant& redirect = starCatalogDownloadReply->attribute(QNetw orkRequest::RedirectionTargetAttribute); const QVariant& redirect = starCatalogDownloadReply->attribute(QNetw orkRequest::RedirectionTargetAttribute);
if (!redirect.isNull()) if (!redirect.isNull())
{ {
// We got a redirection, we need to follow // We got a redirection, we need to follow
starCatalogDownloadReply->deleteLater(); starCatalogDownloadReply->deleteLater();
QNetworkRequest req(redirect.toUrl()); QNetworkRequest req(redirect.toUrl());
req.setAttribute(QNetworkRequest::CacheSaveControlAttribute, false); req.setAttribute(QNetworkRequest::CacheSaveControlAttribute, false);
req.setAttribute(QNetworkRequest::RedirectionTargetAttribute , false); req.setAttribute(QNetworkRequest::RedirectionTargetAttribute , false);
req.setRawHeader("User-Agent", userAgent.toLatin1()); req.setRawHeader("User-Agent", userAgent.toLatin1());
starCatalogDownloadReply = StelApp::getInstance().getNetwork AccessManager()->get(req); starCatalogDownloadReply = StelApp::getInstance().getNetwork AccessManager()->get(req);
starCatalogDownloadReply->setReadBufferSize(1024*1024*2); starCatalogDownloadReply->setReadBufferSize(1024*1024*2);
connect(starCatalogDownloadReply, SIGNAL(readyRead()), this, SLOT(newStarCatalogData())); connect(starCatalogDownloadReply, SIGNAL(readyRead()), this, SLOT(newStarCatalogData()));
connect(starCatalogDownloadReply, SIGNAL(finished()), this, SLOT(downloadFinished())); connect(starCatalogDownloadReply, SIGNAL(finished()), this, SLOT(downloadFinished()));
connect(starCatalogDownloadReply, SIGNAL(error(QNetworkReply ::NetworkError)), this, SLOT(downloadError(QNetworkReply::NetworkError))); connect(starCatalogDownloadReply, SIGNAL(error(QNetworkReply ::NetworkError)), this, SLOT(downloadError(QNetworkReply::NetworkError)));
return; return;
} }
Q_ASSERT(starCatalogDownloadReply->bytesAvailable()==0);
isDownloadingStarCatalog = false; isDownloadingStarCatalog = false;
currentDownloadFile->close(); currentDownloadFile->close();
currentDownloadFile->deleteLater(); currentDownloadFile->deleteLater();
currentDownloadFile = NULL; currentDownloadFile = NULL;
starCatalogDownloadReply->deleteLater(); starCatalogDownloadReply->deleteLater();
starCatalogDownloadReply = NULL; starCatalogDownloadReply = NULL;
StelApp::getInstance().removeProgressBar(progressBar); StelApp::getInstance().removeProgressBar(progressBar);
progressBar=NULL; progressBar=NULL;
ui->downloadLabel->setText(q_("Verifying file integrity...")); ui->downloadLabel->setText(q_("Verifying file integrity..."));
 End of changes. 5 change blocks. 
14 lines changed or deleted 21 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/