m_email(),
m_loginAttempts(0),
m_password(),
- m_refresh(0)
+ m_refresh(0),
+ m_webView(0)
{
qDebug() << __PRETTY_FUNCTION__;
{
qDebug() << __PRETTY_FUNCTION__;
+ if(m_webView)
+ delete m_webView;
+
delete m_mainlayout;
}
void FacebookAuthentication::start()
{
- qDebug() << __PRETTY_FUNCTION__;
- if (!verifyCredentials(m_loginCredentials)){
+ qDebug() << __PRETTY_FUNCTION__;
+
+ if (!verifyCredentials(m_loginCredentials)) {
- m_webView = new QWebView(this);
+ m_webView = new QWebView;
m_loginDialog = new LoginDialog(this);
connect(m_webView, SIGNAL(urlChanged(const QUrl &)),
this, SLOT(loginDialogDone(QString,QString)));
if(m_loginDialog->exec() != QDialog::Accepted) {
- // if login dialog was canceled we need to stop processing webview
+ // if login dialog was canceled we need to stop processing webview
// stop and disconnect m_webView;
m_webView->stop();
disconnect(m_webView, SIGNAL(loadFinished(bool)),
toggleProgressIndicator(true);
m_refresh = true;
setCentralWidget(m_webView);
- this->show();
m_webView->hide();
+ this->show();
}
else
emit credentialsReady(m_loginCredentials);