[Kstars-devel] KDE/kdeedu/kstars/kstars/dialogs
Alexey Khudyakov
alexey.skladnoy at gmail.com
Fri Nov 6 22:13:24 CET 2009
SVN commit 1045845 by khudyakov:
Fix crash bug.
Location dialog crashed on construction due to use of invalid iterators
CCMAIL: kstars-devel at kde.org
M +5 -6 locationdialog.cpp
--- trunk/KDE/kdeedu/kstars/kstars/dialogs/locationdialog.cpp #1045844:1045845
@@ -46,12 +46,11 @@
ui->TZBox->addItem( KGlobal::locale()->formatNumber( (double)(i-12) ) );
//Populate DSTRuleBox
- QMap<QString, TimeZoneRule>::Iterator it = data->getRulebook().begin();
- QMap<QString, TimeZoneRule>::Iterator itEnd = data->getRulebook().end();
- for ( ; it != itEnd; ++it )
- if ( it.key().length() )
- ui->DSTRuleBox->addItem( it.key() );
-
+ foreach( QString key, data->getRulebook().keys() ) {
+ if( !key.isEmpty() )
+ ui->DSTRuleBox->addItem( key );
+ }
+
connect( this, SIGNAL( cancelClicked() ), this, SLOT( reject() ) );
connect( ui->CityFilter, SIGNAL( textChanged( const QString & ) ), this, SLOT( filterCity() ) );
connect( ui->ProvinceFilter, SIGNAL( textChanged( const QString & ) ), this, SLOT( filterCity() ) );
More information about the Kstars-devel
mailing list