From 37e5759727727e78770fb901e3b72ecdc59d9db0 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Thu, 25 Aug 2011 19:08:08 +0200 Subject: [PATCH] fixed error about wgt that doesn't load when open a document --- src/domain/UBW3CWidget.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/domain/UBW3CWidget.cpp b/src/domain/UBW3CWidget.cpp index 79c3536c..e4ca197c 100644 --- a/src/domain/UBW3CWidget.cpp +++ b/src/domain/UBW3CWidget.cpp @@ -40,7 +40,6 @@ UBW3CWidget::UBW3CWidget(const QUrl& pWidgetUrl, QWidget *parent) { QString path = pWidgetUrl.toLocalFile(); - QDir potentialDir(path); if (!path.endsWith(".wgt") && !path.endsWith(".wgt/") && !potentialDir.exists()) @@ -58,7 +57,7 @@ UBW3CWidget::UBW3CWidget(const QUrl& pWidgetUrl, QWidget *parent) int width = 300; int height = 150; - QFile configFile(path + "/config.xml"); + QFile configFile(path + "config.xml"); configFile.open(QFile::ReadOnly); QDomDocument doc; @@ -202,6 +201,8 @@ UBW3CWidget::UBW3CWidget(const QUrl& pWidgetUrl, QWidget *parent) connect(page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(javaScriptWindowObjectCleared())); connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), this, SLOT(javaScriptWindowObjectCleared())); + QWebView::load(mMainHtmlUrl); + setFixedSize(QSize(width, height)); mNominalSize = QSize(width, height);