Commit 0b8014ee authored by Claudio Valerio's avatar Claudio Valerio

fixed issue 994

parent 070d0340
......@@ -107,7 +107,7 @@ void UBFeaturesWidget::currentSelected(const QModelIndex &current)
QString objName = sender()->objectName();
if (objName.isEmpty()) {
qWarning() << "incorrrect sender";
qWarning() << "incorrect sender";
} else if (objName == objNamePathList) {
//Calling to reset the model for listView. Maybe separate function needed
controller->searchStarted("", centralWidget->listView());
......@@ -732,7 +732,7 @@ UBFeaturesWebView::UBFeaturesWebView(QWidget* parent, const char* name):QWidget(
mpView->setObjectName("SearchEngineView");
mpSankoreAPI = new UBWidgetUniboardAPI(UBApplication::boardController->activeScene());
mpView->page()->mainFrame()->addToJavaScriptWindowObject("sankore", mpSankoreAPI);
connect(mpView->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(javaScriptWindowObjectCleared()));
mpWebSettings = QWebSettings::globalSettings();
mpWebSettings->setAttribute(QWebSettings::JavaEnabled, true);
mpWebSettings->setAttribute(QWebSettings::PluginsEnabled, true);
......@@ -767,6 +767,11 @@ UBFeaturesWebView::~UBFeaturesWebView()
}
}
void UBFeaturesWebView::javaScriptWindowObjectCleared()
{
mpView->page()->mainFrame()->addToJavaScriptWindowObject("sankore", mpSankoreAPI);
}
void UBFeaturesWebView::showElement(const UBFeature &elem)
{
QString qsWidgetName;
......
......@@ -288,6 +288,7 @@ public:
private slots:
void onLoadFinished(bool ok);
void javaScriptWindowObjectCleared();
private:
QWebView* mpView;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment