WebPage::WebPage(WebPageManager *manager, QObject *parent) : QWebPage(parent) { m_loading = false; m_manager = manager; m_uuid = QUuid::createUuid().toString(); m_lastStatus = 0; setForwardUnsupportedContent(true); loadJavascript(); setUserStylesheet(); this->setCustomNetworkAccessManager(); connect(this, SIGNAL(loadStarted()), this, SLOT(loadStarted())); connect(this, SIGNAL(loadFinished(bool)), this, SLOT(loadFinished(bool))); connect(this, SIGNAL(frameCreated(QWebFrame *)), this, SLOT(frameCreated(QWebFrame *))); connect(this, SIGNAL(unsupportedContent(QNetworkReply*)), this, SLOT(handleUnsupportedContent(QNetworkReply*))); connect(this, SIGNAL(pageFinished(bool)), m_manager, SLOT(emitPageFinished(bool))); connect(this, SIGNAL(loadStarted()), m_manager, SLOT(emitLoadStarted())); resetWindowSize(); settings()->setAttribute(QWebSettings::JavascriptCanOpenWindows, true); }
WebPage::WebPage(WebPageManager *manager, QObject *parent) : QWebPage(parent) { m_loading = false; m_failed = false; m_manager = manager; m_uuid = QUuid::createUuid().toString(); setForwardUnsupportedContent(true); loadJavascript(); setUserStylesheet(); m_confirm = true; m_prompt = false; m_prompt_text = QString(); this->setCustomNetworkAccessManager(); connect(this, SIGNAL(loadStarted()), this, SLOT(loadStarted())); connect(this, SIGNAL(loadFinished(bool)), this, SLOT(loadFinished(bool))); connect(this, SIGNAL(frameCreated(QWebFrame *)), this, SLOT(frameCreated(QWebFrame *))); connect(this, SIGNAL(unsupportedContent(QNetworkReply*)), this, SLOT(handleUnsupportedContent(QNetworkReply*))); resetWindowSize(); settings()->setAttribute(QWebSettings::JavascriptCanOpenWindows, true); currentFrame()->setUrl(QUrl("about:blank")); }
WebPage::WebPage(QObject *parent) : QWebPage(parent) { setForwardUnsupportedContent(true); loadJavascript(); setUserStylesheet(); m_loading = false; m_ignoreSslErrors = false; this->setCustomNetworkAccessManager(); connect(this, SIGNAL(loadStarted()), this, SLOT(loadStarted())); connect(this, SIGNAL(loadFinished(bool)), this, SLOT(loadFinished(bool))); connect(this, SIGNAL(frameCreated(QWebFrame *)), this, SLOT(frameCreated(QWebFrame *))); connect(this, SIGNAL(unsupportedContent(QNetworkReply*)), this, SLOT(handleUnsupportedContent(QNetworkReply*))); resetWindowSize(); }