Location *homeLocation = locations->location( "home" );
Location *workLocation = locations->location( "work" );
+ if ( homeLocation==0 ) {
+ homeLocation = new Location( "home" );
+ locations->addLocation( homeLocation );
+ } else if ( homeLocation->isValid() ) {
+ setHomeButtonValid();
+ }
+
+ if ( workLocation==0 ) {
+ workLocation = new Location( "work" );
+ locations->addLocation( workLocation );
+ } else if ( workLocation->isValid() ) {
+ setWorkButtonValid();
+ }
+
connect(
homeLocation, SIGNAL( becomeValid() ),
this, SLOT( setHomeButtonValid() )
locations, SLOT( saveLocation() )
);
- homeLocation->resolveAddress( Ytv::Home );
- workLocation->resolveAddress( Ytv::Work );
-
destination.append( homeLocation );
destination.append( workLocation );