Created
September 25, 2014 17:44
-
-
Save nowrep/edd236ac370cc79cb85c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/lib/webkit/webpage.cpp b/src/lib/webkit/webpage.cpp | |
index 5e67a44..4ad479d 100644 | |
--- a/src/lib/webkit/webpage.cpp | |
+++ b/src/lib/webkit/webpage.cpp | |
@@ -93,7 +93,8 @@ 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*))); | |
+ connect(this, SIGNAL(frameCreated(QWebFrame*)), this, SLOT(frameCreated(QWebFrame*))); | |
+ connect(mainFrame(), SIGNAL(initialLayoutCompleted()), this, SLOT(frameInitialLayoutCompleted())); | |
connect(this, SIGNAL(databaseQuotaExceeded(QWebFrame*,QString)), | |
this, SLOT(dbQuotaExceeded(QWebFrame*))); | |
@@ -449,8 +450,17 @@ 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; | |
+ | |
// Autofill | |
m_passwordEntries = mApp->autoFill()->completeFrame(frame); | |
} | |
diff --git a/src/lib/webkit/webpage.h b/src/lib/webkit/webpage.h | |
index e4e2ef8..4e1004b 100644 | |
--- a/src/lib/webkit/webpage.h | |
+++ b/src/lib/webkit/webpage.h | |
@@ -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); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment