m_situareService = new SituareService(this);
// build FacebookAuthenticator
- m_facebookAuthenticator = new FacebookAuthentication(this);
+ m_facebookAuthenticator = new FacebookAuthentication(m_ui, this);
// build routing service
m_routingService = new RoutingService(this); // create this when needed, not in constructor!
m_geocodingService->requestLocation(location);
}
-void SituareEngine::loggedIn()
-{
- qWarning() << __PRETTY_FUNCTION__;
-
- m_ui->destroyFacebookLoginBrowser();
-
- loginOk();
-}
-
void SituareEngine::loginActionPressed()
{
qDebug() << __PRETTY_FUNCTION__;
connect(m_facebookAuthenticator, SIGNAL(error(int, int)),
this, SLOT(error(int, int)));
- connect(m_facebookAuthenticator, SIGNAL(buildLoginBrowser()),
- m_ui, SLOT(buildFacebookLoginBrowser()));
-
connect(m_facebookAuthenticator, SIGNAL(loggedIn(QString)),
m_situareService, SLOT(updateSession(QString)));
connect(m_facebookAuthenticator, SIGNAL(loggedIn(QString)),
- this, SLOT(loggedIn()));
+ this, SLOT(loginOk()));
}
void SituareEngine::signalsFromGeocodingService()
connect(m_ui, SIGNAL(loginActionPressed()),
this, SLOT(loginActionPressed()));
- connect(m_ui, SIGNAL(loginBrowserCreated(FacebookLoginBrowser*)),
- m_facebookAuthenticator, SLOT(setBrowser(FacebookLoginBrowser*)));
-
// signals from map view
connect(m_ui, SIGNAL(mapViewScrolled(SceneCoordinate)),
m_mapEngine, SLOT(setCenterPosition(SceneCoordinate)));