Skip to content

Instantly share code, notes, and snippets.

@vitallium
Last active December 11, 2015 19:38
Show Gist options
  • Select an option

  • Save vitallium/4649820 to your computer and use it in GitHub Desktop.

Select an option

Save vitallium/4649820 to your computer and use it in GitHub Desktop.
use_auto_connection_for_frameCreated_signal
diff --git a/src/webpage.cpp b/src/webpage.cpp
index 3b21563..82aacf2 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -337,7 +337,7 @@ WebPage::WebPage(QObject *parent, const QUrl &baseUrl)
// @see WebPage::setupFrame(QWebFrame *) for details.
connect(m_mainFrame, SIGNAL(loadStarted()), this, SLOT(switchToMainFrame()), Qt::QueuedConnection);
connect(m_mainFrame, SIGNAL(loadFinished(bool)), this, SLOT(setupFrame()), Qt::QueuedConnection);
- connect(m_customWebPage, SIGNAL(frameCreated(QWebFrame*)), this, SLOT(setupFrame(QWebFrame*)), Qt::QueuedConnection);
+ connect(m_customWebPage, SIGNAL(frameCreated(QWebFrame*)), this, SLOT(setupFrame(QWebFrame*)), Qt::DirectConnection);
connect(m_mainFrame, SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(setupFrame()));
connect(m_mainFrame, SIGNAL(javaScriptWindowObjectCleared()), SIGNAL(initialized()));
connect(m_mainFrame, SIGNAL(urlChanged(QUrl)), SIGNAL(urlChanged(QUrl)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment