From edba346ffec6f9b7e2435d0cd7f1465c06cb7120 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Wed, 29 Aug 2012 11:46:32 +0200 Subject: [PATCH] fixed issue with internal webbrowser --- src/web/UBWebController.cpp | 3 +-- src/web/browser/WBBrowserWindow.cpp | 24 +----------------------- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/src/web/UBWebController.cpp b/src/web/UBWebController.cpp index ee69e3d3..9ad0861e 100644 --- a/src/web/UBWebController.cpp +++ b/src/web/UBWebController.cpp @@ -733,6 +733,7 @@ bool UBWebController::isEduMedia(const QUrl& pUrl) void UBWebController::loadUrl(const QUrl& url) { + bool webBrowserAlreadyInstanciated = dynamic_cast(mStackedWidget->widget(WebBrowser)) != NULL; UBApplication::applicationController->showInternet(); if (UBSettings::settings()->webUseExternalBrowser->get().toBool()) { @@ -740,8 +741,6 @@ void UBWebController::loadUrl(const QUrl& url) } else { - bool webBrowserAlreadyInstanciated = mStackedWidget->widget(WebBrowser) != NULL; - if (!webBrowserAlreadyInstanciated) { (*mCurrentWebBrowser)->loadUrl(url); } diff --git a/src/web/browser/WBBrowserWindow.cpp b/src/web/browser/WBBrowserWindow.cpp index 83d41992..cb89dd09 100644 --- a/src/web/browser/WBBrowserWindow.cpp +++ b/src/web/browser/WBBrowserWindow.cpp @@ -270,28 +270,6 @@ void WBBrowserWindow::setupToolBarForTutorial() if (tb && tb->menu()) tb->setMenu(NULL); } -// mTabWidget->addWebAction(mUniboardMainWindow->actionWebReload, QWebPage::Reload); -// mTabWidget->addWebAction(mUniboardMainWindow->actionStopLoading, QWebPage::Stop); - -// mWebToolBar->insertWidget(mUniboardMainWindow->actionWebBigger, mTabWidget->lineEditStack()); - -// mSearchToolBar = new WBToolbarSearch(mWebToolBar); - -// mSearchAction = mWebToolBar->insertWidget(mUniboardMainWindow->actionWebBigger, mSearchToolBar); - -// connect(mSearchToolBar, SIGNAL(search(const QUrl&)), SLOT(loadUrl(const QUrl&))); - -// mChaseWidget = new WBChaseWidget(this); -// mWebToolBar->insertWidget(mUniboardMainWindow->actionWebBigger, mChaseWidget); - -// mWebToolBar->insertSeparator(mUniboardMainWindow->actionWebBigger); - -// connect(mUniboardMainWindow->actionHome, SIGNAL(triggered()), this , SLOT(slotHome())); - -// connect(mUniboardMainWindow->actionBookmarks, SIGNAL(triggered()), this , SLOT(bookmarks())); -// connect(mUniboardMainWindow->actionAddBookmark, SIGNAL(triggered()), this , SLOT(addBookmark())); -// connect(mUniboardMainWindow->actionWebBigger, SIGNAL(triggered()), this , SLOT(slotViewZoomIn())); -// connect(mUniboardMainWindow->actionWebSmaller, SIGNAL(triggered()), this , SLOT(slotViewZoomOut())); mWebToolBar->show(); } @@ -662,4 +640,4 @@ void WBBrowserWindow::openActionUrl(QAction *action) history->goToItem(history->backItems(-1*offset).first()); else if (offset > 0) history->goToItem(history->forwardItems(history->count() - offset + 1).back()); - } \ No newline at end of file + }