Preliminary merge. Integration is brancehd from fresh master.
authorKaj Wallin <kaj.wallin@ixonos.com>
Mon, 3 May 2010 09:34:22 +0000 (12:34 +0300)
committerKaj Wallin <kaj.wallin@ixonos.com>
Mon, 3 May 2010 09:34:22 +0000 (12:34 +0300)
Merge branch 'own_location' into integration

Conflicts:
src/engine/engine.cpp
src/engine/engine.h
src/src.pro
src/ui/mainwindow.cpp
src/ui/mainwindow.h

1  2 
src/engine/engine.cpp
src/engine/engine.h
src/situareservice/situareservice.cpp
src/src.pro
src/ui/mainwindow.cpp
src/ui/mainwindow.h
src/ui/updatelocation/texteditautoresizer.h

@@@ -39,12 -40,14 +39,14 @@@ SituareEngine::SituareEngine(QMainWindo
              this, SLOT(loginOk()));
  
      connect(m_ui, SIGNAL(requestReverseGeo()), this, SLOT(requestAddress()));
-     connect(m_situareService, SIGNAL(reverseGeoReady(QString)),
-             m_ui, SIGNAL(reverseGeoReady(QString)));
-     connect(m_ui, SIGNAL(statusUpdate(QString,bool)),
-             this, SLOT(requestUpdateLocation(QString,bool)));
+     connect(m_situareService, SIGNAL(reverseGeoReady(QString)), m_ui, SIGNAL(reverseGeoReady(QString)));
+     connect(m_ui, SIGNAL(statusUpdate(QString,bool)), this, SLOT(requestUpdateLocation(QString,bool)));
+     connect(m_situareService, SIGNAL(userDataChanged(User*,QList<User*>&)),
+             this, SLOT(userDataChanged(User*,QList<User*>&)));
+     connect(this, SIGNAL(userLocationReady(User*)), m_ui, SIGNAL(userLocationReady(User*)));
+     connect(this, SIGNAL(friendsLocationsReady(QList<User*>&)), m_ui, SIGNAL(friendsLocationsReady(QList<User*>&)));
  
 -    start();
 +    m_facebookAuthenticator->start();
  }
  
  SituareEngine::~SituareEngine()
@@@ -76,13 -84,29 +76,22 @@@ public slots
      * @param status Status message
      * @param publish Publish on Facebook
      */
 -    void requestUpdateLocation(const QString &status, const bool &publish);
 +    void requestUpdateLocation(const QString &status, bool publish);
  
 +    /**
 +    * @brief Slot to initiate update friends list function
 +    */
      void updateFriendsList();
  
+     void userDataChanged(User *user, QList<User *> &friendList);
+ /*******************************************************************************
+  * SIGNALS
+  ******************************************************************************/
+ signals:
 -    /**
 -    * @brief Signal that is emitted when UI must be showed
 -    */
 -    void engine_showMainWindow();
 -
 -    /**
 -    * @brief Signal that is emitted when UI must be closed
 -    */
 -    void engine_closeMainWindow();
 -
+     void userLocationReady(User *user);
+     void friendsLocationsReady(QList<User *> &friendList);
  /*******************************************************************************
   * DATA MEMBERS
   ******************************************************************************/
@@@ -317,12 -308,12 +317,12 @@@ void SituareService::addProfileImages(
  {
      qDebug() << __PRETTY_FUNCTION__;
  
-     if(!m_user->profileImageUrl().isEmpty() && m_user->profileImageUrl().isValid()) {
 -    if(m_user->profileImageUrl() != QUrl("")) {
++    if(!m_user->profileImageUrl().isEmpty()) {
          emit fetchImage(m_user->profileImageUrl());
      }
  
      for(int i=0;i<m_friendsList.count();i++) {
-         if(!m_friendsList.at(i)->profileImageUrl().isEmpty() && m_user->profileImageUrl().isValid()) {
 -        if(m_friendsList.at(i)->profileImageUrl() != QUrl("")) {
++        if(!m_friendsList.at(i)->profileImageUrl().isEmpty()) {
              m_visited++; // indicates how many friends that have profile image
              emit fetchImage(m_friendsList.at(i)->profileImageUrl());
          }
diff --cc src/src.pro
Simple merge
@@@ -46,6 -51,14 +46,10 @@@ MainWindow::MainWindow(QWidget *parent
      connect(this, SIGNAL(reverseGeoReady(QString)), m_locationDialog, SLOT(setAddress(QString)));
      connect(m_locationDialog, SIGNAL(statusUpdate(QString,bool)), this,
              SIGNAL(statusUpdate(QString,bool)));
 -    
 -    m_networkManager = new QNetworkAccessManager;
 -    m_situareService = new SituareService(this,m_networkManager);
 -
+     connect(this, SIGNAL(userLocationReady(User*)),
+             m_mapViewScreen, SLOT(userLocationReady(User*)));
+     connect(this, SIGNAL(friendsLocationsReady(QList<User*>&)),
+             m_mapViewScreen, SLOT(friendsLocationsReady(QList<User*>&)));
  }
  
  MainWindow::~MainWindow()
@@@ -135,4 -148,32 +139,3 @@@ void MainWindow::openSettingsDialog(
      dialog->show();
  }
  
 -void MainWindow::loginScreenClosed()
 -{
 -    qDebug() << __PRETTY_FUNCTION__ << m_loggedIn;
 -    if (m_loggedIn) {
 -        this->show();
 -        return;
 -    }
 -    else {
 -        this->close();
 -    }
 -}
 -
 -void MainWindow::loginOK()
 -{
 -    qDebug() << __PRETTY_FUNCTION__ << m_loggedIn;
 -    m_loggedIn = true;
 -    //m_facebookAuthenticator->close();
 -}
 -
 -//void MainWindow::userLocationReady(User &user)
 -//{
 -//    emit userLocationReady(user);
 -//}
 -//
 -//void MainWindow::friendsLocationsReady(QList<User *>friendsList)
 -//{
 -//    emit friendsLocationsReady(friendsList);
 -//}
 -
Simple merge