#include <QSettings>
#include <QStringList>
#include <QVariantMap>
+#include <QWebView>
#ifdef Q_WS_MAEMO_5
#include <QMaemo5InformationBox>
#include "error.h"
#include "network/networkcookiejar.h"
#include "situareservice/situarecommon.h"
-#include "ui/facebookloginbrowser.h"
#include "ui/mainwindow.h"
#include "facebookauthentication.h"
{
qWarning() << __PRETTY_FUNCTION__;
- if (!m_browser)
- m_browser = new FacebookLoginBrowser(m_mainWindow);
+ if (!m_browser) {
+ m_browser = new QWebView(m_mainWindow);
- if (m_browser) {
- connect(m_browser, SIGNAL(loadFinished(bool)),
- this, SLOT(loadFinished(bool)));
+ if (m_browser) {
+ m_browser->page()->networkAccessManager()->setCookieJar(new NetworkCookieJar());
- connect(m_browser, SIGNAL(urlChanged(QUrl)),
- this, SLOT(urlChanged(QUrl)));
+ connect(m_browser, SIGNAL(loadFinished(bool)),
+ this, SLOT(loadFinished(bool)));
- connect(m_browser, SIGNAL(destroyed(QObject*)),
- this, SLOT(browserDestroyed()));
+ connect(m_browser, SIGNAL(urlChanged(QUrl)),
+ this, SLOT(urlChanged(QUrl)));
- connect(m_browser->page()->networkAccessManager(), SIGNAL(finished(QNetworkReply*)),
- this, SLOT(networkReplyHandler(QNetworkReply*)));
+ connect(m_browser, SIGNAL(destroyed(QObject*)),
+ this, SLOT(browserDestroyed()));
+ connect(m_browser->page()->networkAccessManager(), SIGNAL(finished(QNetworkReply*)),
+ this, SLOT(networkReplyHandler(QNetworkReply*)));
+ }
+ }
+
+ if (m_browser) {
QString url = FB_LOGIN_URL + "?";
url.append("api_key=" + API_KEY +"&");
url.append("display=touch&");
#include <QUrl>
class QNetworkReply;
+class QWebView;
-class FacebookLoginBrowser;
class MainWindow;
/**
* @brief FacebookAuthentication class takes care of Facebook login process. It creates
- FacebookLoginBrowser instance and tries to login with cookies using hidden browser.
+ QWebView instance and tries to login with cookies using hidden browser.
If failed, then visible login browser dialog is invoked. Class also does parse the
accuired credentials.
*
* DATA MEMBERS
******************************************************************************/
private:
- FacebookLoginBrowser *m_browser;
+ QWebView *m_browser;
MainWindow *m_mainWindow;
};
ui/zoombutton.cpp \
ui/zoombuttonpanel.cpp \
user/user.cpp \
- ui/listitemcontextbuttonbar.cpp \
- ui/facebookloginbrowser.cpp
+ ui/listitemcontextbuttonbar.cpp
HEADERS += application.h \
common.h \
coordinates/geocoordinate.h \
ui/zoombutton.h \
ui/zoombuttonpanel.h \
user/user.h \
- ui/listitemcontextbuttonbar.h \
- ui/facebookloginbrowser.h
+ ui/listitemcontextbuttonbar.h
QT += network \
webkit
DEFINES += QT_NO_DEBUG_OUTPUT
+++ /dev/null
-/*
- Situare - A location system for Facebook
- Copyright (C) 2010 Ixonos Plc. Authors:
-
- Sami Rämö - sami.ramo@ixonos.com
-
- Situare is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- version 2 as published by the Free Software Foundation.
-
- Situare is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Situare; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- USA.
-*/
-
-#include <QDebug>
-
-#include "network/networkcookiejar.h"
-
-#include "facebookloginbrowser.h"
-
-FacebookLoginBrowser::FacebookLoginBrowser(QWidget *parent) :
- QWebView(parent)
-{
- qWarning() << __PRETTY_FUNCTION__;
-
- page()->networkAccessManager()->setCookieJar(new NetworkCookieJar());
-}
+++ /dev/null
-/*
- Situare - A location system for Facebook
- Copyright (C) 2010 Ixonos Plc. Authors:
-
- Sami Rämö - sami.ramo@ixonos.com
-
- Situare is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- version 2 as published by the Free Software Foundation.
-
- Situare is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Situare; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- USA.
-*/
-
-
-#ifndef FACEBOOKLOGINBROWSER_H
-#define FACEBOOKLOGINBROWSER_H
-
-#include <QWebView>
-
-class FacebookLoginBrowser : public QWebView
-{
- Q_OBJECT
-public:
- explicit FacebookLoginBrowser(QWidget *parent = 0);
-
-};
-
-#endif // FACEBOOKLOGINBROWSER_H
this, SIGNAL(searchHistoryItemClicked(QString)));
}
-void MainWindow::buildLoginDialog(FacebookLoginBrowser *browser)
+void MainWindow::buildLoginDialog(QWebView *browser)
{
qWarning() << __PRETTY_FUNCTION__;
class QToolButton;
class QWebView;
-class FacebookLoginBrowser;
class FriendListPanel;
class FullScreenButton;
class GeoCoordinate;
* MEMBER FUNCTIONS AND SLOTS
******************************************************************************/
public:
- void buildLoginDialog(FacebookLoginBrowser *browser);
+ void buildLoginDialog(QWebView *browser);
/**
* @brief