Esempio n. 1
0
// public slots:
QObject *Phantom::createWebPage()
{
    WebPage *page = new WebPage(this);
    page->applySettings(m_defaultPageSettings);
    page->setNetworkAccessManager(m_netAccessMan);
    page->setLibraryPath(QFileInfo(m_scriptFile).dir().absolutePath());
    return page;
}
Esempio n. 2
0
// public slots:
QObject *Phantom::createWebPage()
{
    WebPage *page = new WebPage(this, &m_config);
    m_pages.append(page);
    page->applySettings(m_defaultPageSettings);
    page->setLibraryPath(QFileInfo(m_config.scriptFile()).dir().absolutePath());
    return page;
}
Esempio n. 3
0
// public slots:
QObject *Phantom::createWebPage()
{
    WebPage *page = new WebPage(this, &m_config);
    m_pages.append(page);
    page->applySettings(m_defaultPageSettings);
    page->setLibraryPath(QFileInfo(m_config.scriptFile()).dir().absolutePath());

    if (m_config.debug()) {
      page->showInspector(m_config.remoteDebugPort());
    }

    return page;
}
Esempio n. 4
0
// public slots:
QObject *Phantom::createWebPage()
{
    WebPage *page = new WebPage(this);

    // Store pointer to the page for later cleanup
    m_pages.append(page);
    // Apply default settings to the page
    page->applySettings(m_defaultPageSettings);

    // Show web-inspector if in debug mode
    if (m_config.debug()) {
        page->showInspector(m_config.remoteDebugPort());
    }

    return page;
}