LocationDialog.cpp   LocationDialog.cpp 
skipping to change at line 342 skipping to change at line 342
// Create a StelLocation instance from the fields // Create a StelLocation instance from the fields
StelLocation LocationDialog::locationFromFields() const StelLocation LocationDialog::locationFromFields() const
{ {
StelLocation loc; StelLocation loc;
int index = ui->planetNameComboBox->currentIndex(); int index = ui->planetNameComboBox->currentIndex();
if (index < 0) if (index < 0)
loc.planetName = QString();//As returned by QComboBox::curre ntText() loc.planetName = QString();//As returned by QComboBox::curre ntText()
else else
loc.planetName = ui->planetNameComboBox->itemData(index).toS tring(); loc.planetName = ui->planetNameComboBox->itemData(index).toS tring();
loc.name = ui->cityNameLineEdit->text(); loc.name = ui->cityNameLineEdit->text().trimmed(); // avoid location
loc.latitude = ui->latitudeSpinBox->valueDegrees(); s with leading whitespace
loc.latitude = qMin(90.0, qMax(-90.0, ui->latitudeSpinBox->valueDegr
ees()));
loc.longitude = ui->longitudeSpinBox->valueDegrees(); loc.longitude = ui->longitudeSpinBox->valueDegrees();
loc.altitude = ui->altitudeSpinBox->value(); loc.altitude = ui->altitudeSpinBox->value();
index = ui->countryNameComboBox->currentIndex(); index = ui->countryNameComboBox->currentIndex();
if (index < 0) if (index < 0)
loc.country = QString();//As returned by QComboBox::currentT ext() loc.country = QString();//As returned by QComboBox::currentT ext()
else else
loc.country = ui->countryNameComboBox->itemData(index).toStr ing(); loc.country = ui->countryNameComboBox->itemData(index).toStr ing();
return loc; return loc;
} }
 End of changes. 1 change blocks. 
2 lines changed or deleted 4 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/