Ejemplo n.º 1
0
void OwncloudShibbolethCredsPage::disposeBrowser()
{
    if (_browser) {
        disconnect(_browser, SIGNAL(otherCookiesReceived(QList<QNetworkCookie>, QUrl)),
                   this, SLOT(slotOtherCookiesReceived(QList<QNetworkCookie>, QUrl)));
        disconnect(_browser, SIGNAL(viewHidden()),
                   this, SLOT(slotViewHidden()));
        disconnect(_browser, SIGNAL(shibbolethCookieReceived(QNetworkCookie)),
                   this, SLOT(slotShibbolethCookieReceived(QNetworkCookie)));
        _browser->hide();
        _browser->deleteLater();
        _browser = 0;
    }
}
Ejemplo n.º 2
0
void OwncloudShibbolethCredsPage::setupBrowser()
{
    if (_browser) {
        return;
    }
    OwncloudWizard *ocWizard = qobject_cast<OwncloudWizard*>(wizard());
    _browser = new ShibbolethWebView(ocWizard->account());
    connect(_browser, SIGNAL(shibbolethCookieReceived(QNetworkCookie)),
            this, SLOT(slotShibbolethCookieReceived(QNetworkCookie)));
    connect(_browser, SIGNAL(viewHidden()),
            this, SLOT(slotViewHidden()));
    connect(_browser, SIGNAL(otherCookiesReceived(QList<QNetworkCookie>, QUrl)),
            this, SLOT(slotOtherCookiesReceived(QList<QNetworkCookie>, QUrl)));

    _browser->show();
    _browser->setFocus();
}
Ejemplo n.º 3
0
void ShibbolethCredentials::fetch(Account *account)
{
    if (_ready) {
        Q_EMIT fetched();
    } else {
        ShibbolethConfigFile cfg;
        if (account) {
            _url = account->url();
        }
        _browser = new ShibbolethWebView(account, cfg.createCookieJar());
        connect(_browser, SIGNAL(shibbolethCookieReceived(QNetworkCookie)),
                this, SLOT(onShibbolethCookieReceived(QNetworkCookie)));
        connect(_browser, SIGNAL(viewHidden()),
                this, SLOT(slotBrowserHidden()));
        _browser->show ();
    }
}
Ejemplo n.º 4
0
void ShibbolethWebView::hideEvent(QHideEvent* event)
{
    Q_EMIT viewHidden();
    QWebView::hideEvent(event);
}