1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

AutoFill: Fix completing forms after recent change

Fix regression from 3360a531f1
This commit is contained in:
David Rosca 2014-09-25 21:03:55 +02:00
parent 61bc7f4543
commit 2730fd4b4a
2 changed files with 18 additions and 3 deletions

View File

@ -93,7 +93,9 @@ WebPage::WebPage(QObject* parent)
connect(this, SIGNAL(printRequested(QWebFrame*)), this, SLOT(printFrame(QWebFrame*)));
connect(this, SIGNAL(downloadRequested(QNetworkRequest)), this, SLOT(downloadRequested(QNetworkRequest)));
connect(this, SIGNAL(windowCloseRequested()), this, SLOT(windowCloseRequested()));
connect(this, SIGNAL(restoreFrameStateRequested(QWebFrame*)), this, SLOT(restoreFrameRequested(QWebFrame*)));
frameCreated(mainFrame());
connect(this, SIGNAL(frameCreated(QWebFrame*)), this, SLOT(frameCreated(QWebFrame*)));
connect(this, SIGNAL(databaseQuotaExceeded(QWebFrame*,QString)),
this, SLOT(dbQuotaExceeded(QWebFrame*)));
@ -449,8 +451,19 @@ void WebPage::windowCloseRequested()
webView->closeView();
}
void WebPage::restoreFrameRequested(QWebFrame* frame)
void WebPage::frameCreated(QWebFrame *frame)
{
connect(frame, SIGNAL(initialLayoutCompleted()), this, SLOT(frameInitialLayoutCompleted()));
}
void WebPage::frameInitialLayoutCompleted()
{
QWebFrame* frame = qobject_cast<QWebFrame*>(sender());
if (!frame)
return;
qDebug() << frame;
// Autofill
m_passwordEntries = mApp->autoFill()->completeFrame(frame);
}

View File

@ -104,7 +104,9 @@ private slots:
void downloadRequested(const QNetworkRequest &request);
void windowCloseRequested();
void restoreFrameRequested(QWebFrame* frame);
void frameCreated(QWebFrame* frame);
void frameInitialLayoutCompleted();
void dbQuotaExceeded(QWebFrame* frame);
void doWebSearch(const QString &text);