Fixed an error that caused duplicate instances of FacebookAuthentication, SituareServ...
authorPekka Nissinen <pekka.nissinen@ixonos.com>
Thu, 29 Apr 2010 07:42:55 +0000 (10:42 +0300)
committerPekka Nissinen <pekka.nissinen@ixonos.com>
Thu, 29 Apr 2010 07:42:55 +0000 (10:42 +0300)
src/engine/engine.cpp
src/map/mapbutton.cpp
src/ui/mainwindow.cpp
src/ui/mainwindow.h
src/ui/updatelocation/texteditautoresizer.h

index 54ab250..becf3c2 100644 (file)
@@ -58,7 +58,6 @@ void SituareEngine::start()
 }
 
 void SituareEngine::loginOk()
-
 {
     qDebug() << __PRETTY_FUNCTION__;
     m_loggedIn = true;
index 4c73cc3..a48591e 100644 (file)
@@ -30,10 +30,8 @@ MapButton::MapButton(QString fileName)
     m_buttonWidth(MAP_ZOOM_PANEL_BUTTON_SIZE),
     m_buttonHeight(MAP_ZOOM_PANEL_BUTTON_SIZE)
 {
-    QPixmap pixmap(fileName);
-
-    // Temporary (lazy fix) solution to get the buttons larger
-    addPixmap(pixmap.scaled(m_buttonWidth, m_buttonHeight, Qt::KeepAspectRatio, Qt::FastTransformation));
+    // Add an image to the icon
+    addFile(fileName);
 }
 
 void MapButton::draw(QPainter *painter, int x, int y)
index e0c3e03..4e9f291 100644 (file)
@@ -32,18 +32,13 @@ MainWindow::MainWindow(QWidget *parent)
     : QMainWindow(parent)
 {
     qDebug() << __PRETTY_FUNCTION__;
-    m_loggedIn = false;
+
     createViews();
     setCentralWidget(m_situareViews);
     createMenus();
     setWindowTitle(tr("List view"));
     this->hide();
 
-    m_facebookAuthenticator = new FacebookAuthentication(this);
-    connect(m_facebookAuthenticator, SIGNAL(credentialsReady()), this, SLOT(loginOK()));
-    connect(m_facebookAuthenticator, SIGNAL(userExit()), this, SLOT(loginScreenClosed()));
-    m_facebookAuthenticator->start();
-
     m_locationDialog = new UpdateLocationDialog(this);
     connect(m_listViewScreen->m_personalInfo,SIGNAL(launchMessageUpdate()),
             this,SLOT(openLocationUpdateDialog()));
@@ -51,9 +46,6 @@ 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);
 }
 
 MainWindow::~MainWindow()
@@ -142,22 +134,3 @@ void MainWindow::openSettingsDialog()
     SettingsDialog *dialog = new SettingsDialog(this);
     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();
-}
index 3ea7fa0..e1d0ba8 100644 (file)
@@ -68,7 +68,7 @@ public slots:
     /**
     * @brief Public slot, which open settings dialog
     */
-     void openSettingsDialog();
+    void openSettingsDialog();
 
     /**
     * @brief Public slot, which initiates toListViewAct action to switch view
@@ -100,16 +100,6 @@ private:
 
 private slots:
     /**
-    * @brief Slot to change value of m_loggedIn to true
-    */
-    void loginOK();
-
-    /**
-    * @brief Slot to check login status and exits if necessary
-    */
-    void loginScreenClosed();
-
-    /**
     * @brief Private slot, which starts UpdateLocationDialog
     *
     */
@@ -118,9 +108,7 @@ private slots:
 /*******************************************************************************
  * SIGNALS
  ******************************************************************************/
-
 signals:
-
     /**
     * @brief Signal for requesting reverseGeo from SituareEngine
     *
@@ -145,15 +133,10 @@ signals:
 /*******************************************************************************
  * DATA MEMBERS
  ******************************************************************************/
-
 private:
     ListViewScreen *m_listViewScreen;
     UpdateLocationDialog *m_locationDialog; ///< Message dialog
     MapViewScreen *m_mapViewScreen;
-    FacebookAuthentication *m_facebookAuthenticator; ///< Instance for facebook authenticator
-    QNetworkAccessManager *m_networkManager; ///< NetworkManager that is passed on to SituareService
-    SituareService *m_situareService; ///< Instance of the situare server communication service
-    bool m_loggedIn; ///< Boolean value to indicate whether login has been successfull or not
     QStackedWidget *m_situareViews; ///< Stacked widget that hold both view widgets
     QAction *m_toListViewAct; ///< Action to trigger switch to list view
     QAction *m_toMapViewAct; ///< Action to trigger switch to map view
index 52a3ca8..be313bb 100755 (executable)
@@ -55,6 +55,7 @@ private slots:
     * @fn textEditChanged
     */
     void textEditChanged();
+
 /*******************************************************************************
  * DATA MEMBERS
  ******************************************************************************/