Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
afd9edab
Commit
afd9edab
authored
Jun 05, 2012
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issue with sankore object that is not persistent and has to be reloaded
parent
dc7e8b94
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
19 deletions
+5
-19
UBLibWebView.cpp
src/gui/UBLibWebView.cpp
+3
-17
UBLibWebView.h
src/gui/UBLibWebView.h
+2
-2
No files found.
src/gui/UBLibWebView.cpp
View file @
afd9edab
...
...
@@ -24,20 +24,9 @@ UBLibWebView::UBLibWebView(QWidget* parent, const char* name):QWidget(parent)
mpView
=
new
QWebView
(
this
);
mpView
->
setObjectName
(
"SearchEngineView"
);
mpSankoreAPI
=
new
UBWidgetUniboardAPI
(
UBApplication
::
boardController
->
activeScene
());
mpView
->
page
()
->
mainFrame
()
->
addToJavaScriptWindowObject
(
"sankore"
,
mpSankoreAPI
);
mpWebSettings
=
QWebSettings
::
globalSettings
();
mpWebSettings
->
setAttribute
(
QWebSettings
::
JavaEnabled
,
true
);
mpWebSettings
->
setAttribute
(
QWebSettings
::
PluginsEnabled
,
true
);
mpWebSettings
->
setAttribute
(
QWebSettings
::
LocalStorageDatabaseEnabled
,
true
);
mpWebSettings
->
setAttribute
(
QWebSettings
::
OfflineWebApplicationCacheEnabled
,
true
);
mpWebSettings
->
setAttribute
(
QWebSettings
::
OfflineStorageDatabaseEnabled
,
true
);
mpWebSettings
->
setAttribute
(
QWebSettings
::
JavascriptCanAccessClipboard
,
true
);
mpWebSettings
->
setAttribute
(
QWebSettings
::
DnsPrefetchEnabled
,
true
);
connect
(
mpView
->
page
()
->
mainFrame
(),
SIGNAL
(
javaScriptWindowObjectCleared
()),
this
,
SLOT
(
javaScriptWindowObjectCleared
()));
mpLayout
->
addWidget
(
mpView
);
connect
(
mpView
,
SIGNAL
(
loadFinished
(
bool
)),
this
,
SLOT
(
onLoadFinished
(
bool
)));
}
UBLibWebView
::~
UBLibWebView
()
...
...
@@ -88,14 +77,11 @@ void UBLibWebView::setElement(UBLibElement *elem)
f
.
close
();
}
}
mpView
->
load
(
QUrl
::
fromLocalFile
(
QString
(
"%0/%1"
).
arg
(
path
).
arg
(
qsWidgetName
)));
}
}
void
UBLibWebView
::
onLoadFinished
(
bool
ok
)
void
UBLibWebView
::
javaScriptWindowObjectCleared
(
)
{
if
(
ok
&&
NULL
!=
mpSankoreAPI
){
mpView
->
page
()
->
mainFrame
()
->
addToJavaScriptWindowObject
(
"sankore"
,
mpSankoreAPI
);
}
}
src/gui/UBLibWebView.h
View file @
afd9edab
...
...
@@ -19,8 +19,8 @@ public:
void
setElement
(
UBLibElement
*
elem
);
pr
ivate
slots
:
v
oid
onLoadFinished
(
bool
ok
);
pr
otected
slots
:
v
irtual
void
javaScriptWindowObjectCleared
(
);
private
:
QWebView
*
mpView
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment