summaryrefslogtreecommitdiffstats
path: root/Tools/QtTestBrowser/launcherwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/QtTestBrowser/launcherwindow.cpp')
-rw-r--r--Tools/QtTestBrowser/launcherwindow.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/Tools/QtTestBrowser/launcherwindow.cpp b/Tools/QtTestBrowser/launcherwindow.cpp
index d76ad3a..f4db898 100644
--- a/Tools/QtTestBrowser/launcherwindow.cpp
+++ b/Tools/QtTestBrowser/launcherwindow.cpp
@@ -108,6 +108,10 @@ void LauncherWindow::initializeView()
m_view = view;
} else {
WebViewGraphicsBased* view = new WebViewGraphicsBased(splitter);
+ m_view = view;
+#if defined(QT_CONFIGURED_WITH_OPENGL)
+ toggleQGLWidgetViewport(m_windowOptions.useQGLWidgetViewport);
+#endif
view->setPage(page());
connect(view, SIGNAL(currentFPSUpdated(int)), this, SLOT(updateFPS(int)));
@@ -116,8 +120,6 @@ void LauncherWindow::initializeView()
// The implementation of QAbstractScrollArea::eventFilter makes us need
// to install the event filter also on the viewport of a QGraphicsView.
view->viewport()->installEventFilter(this);
-
- m_view = view;
}
m_touchMocking = false;
@@ -128,6 +130,9 @@ void LauncherWindow::initializeView()
this, SLOT(showLinkHover(const QString&, const QString&)));
connect(this, SIGNAL(enteredFullScreenMode(bool)), this, SLOT(toggleFullScreenMode(bool)));
+ if (m_windowOptions.printLoadedUrls)
+ connect(page()->mainFrame(), SIGNAL(urlChanged(QUrl)), this, SLOT(printURL(QUrl)));
+
applyPrefs();
splitter->addWidget(m_inspector);
@@ -895,6 +900,12 @@ void LauncherWindow::showUserAgentDialog()
delete dialog;
}
+void LauncherWindow::printURL(const QUrl& url)
+{
+ QTextStream output(stdout);
+ output << "Loaded: " << url.toString() << endl;
+}
+
void LauncherWindow::updateFPS(int fps)
{
QString fpsStatusText = QString("Current FPS: %1").arg(fps);