From b31d522e9f39e90576a3bc46f912077d5acd1c99 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 13 Nov 2009 02:40:11 +0100 Subject: This hack seems solve the about: protocol loading problem also in Qt 4.6. Hope it works really well :) --- src/mainwindow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 770df91d..7a9e3ad6 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -103,6 +103,7 @@ MainWindow::MainWindow() , m_popup( new KPassivePopup(this) ) , m_hidePopup( new QTimer(this) ) , m_ac( new KActionCollection(this) ) + , m_loadingNewTabPage(false) { // enable window size "auto-save" setAutoSaveSettings(); @@ -1113,6 +1114,9 @@ void MainWindow::openActionUrl(QAction *action) bool MainWindow::newTabPage(const KUrl &url) { + if(m_loadingNewTabPage) + return false; + if ( url == KUrl("about:closedTabs") || url == KUrl("about:history") || url == KUrl("about:bookmarks") @@ -1120,11 +1124,13 @@ bool MainWindow::newTabPage(const KUrl &url) || url == KUrl("about:home") ) { + m_loadingNewTabPage = true; kDebug() << "loading home: " << url; WebView *w = currentTab(); NewTabPage p; QString html = p.newTabPageCode(url); w->setHtml(html, url); + m_loadingNewTabPage = false; return true; } return false; -- cgit v1.2.1