Fixed issue 558

preferencesAboutTextFull
shibakaneki 12 years ago
parent 5bdeae56c6
commit 0707f90aed
  1. 8
      src/domain/UBGraphicsWidgetItem.cpp
  2. 3
      src/domain/UBGraphicsWidgetItem.h
  3. 2
      src/web/UBWebController.cpp

@ -106,11 +106,17 @@ void UBGraphicsWidgetItem::initialize()
QPalette palette = page()->palette();
palette.setBrush(QPalette::Base, QBrush(Qt::transparent));
page()->setPalette(palette);
page()->setPalette(palette);
page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
connect(page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(javaScriptWindowObjectCleared()));
connect(page(), SIGNAL(geometryChangeRequested(const QRect&)), this, SLOT(geometryChangeRequested(const QRect&)));
connect(this, SIGNAL(loadFinished(bool)), this, SLOT(mainFrameLoadFinished (bool)));
connect(page(), SIGNAL(linkClicked(const QUrl&)), this, SLOT(onLinkClicked(const QUrl&)));
}
void UBGraphicsWidgetItem::onLinkClicked(const QUrl& url){
UBApplication::webController->loadUrl(url);
}
QUrl UBGraphicsWidgetItem::mainHtml()

@ -152,6 +152,9 @@ class UBGraphicsWidgetItem : public UBGraphicsWebView
virtual void javaScriptWindowObjectCleared();
void mainFrameLoadFinished(bool ok);
private slots:
void onLinkClicked(const QUrl& url);
private:
bool mIsFrozen;
bool mIsTakingSnapshot;

@ -719,6 +719,7 @@ bool UBWebController::isEduMedia(const QUrl& pUrl)
void UBWebController::loadUrl(const QUrl& url)
{
UBApplication::applicationController->showInternet();
if (UBSettings::settings()->webUseExternalBrowser->get().toBool())
{
QDesktopServices::openUrl(url);
@ -726,7 +727,6 @@ void UBWebController::loadUrl(const QUrl& url)
else
{
bool webBrowserAlreadyInstanciated = mStackedWidget->widget(WebBrowser) != NULL;
UBApplication::applicationController->showInternet();
if (!webBrowserAlreadyInstanciated) {
(*mCurrentWebBrowser)->loadUrl(url);

Loading…
Cancel
Save