summaryrefslogtreecommitdiffstats
path: root/src/javascriptInterface.cpp
diff options
context:
space:
mode:
authorJonathan Bauer2011-03-10 01:23:51 +0100
committerJonathan Bauer2011-03-10 01:23:51 +0100
commit9df74a4de07f08d070e503b5bf4432e7c8c90360 (patch)
tree531cd3907959773931b5e21393b365cccb8de113 /src/javascriptInterface.cpp
parentuntested (diff)
downloadfbgui-9df74a4de07f08d070e503b5bf4432e7c8c90360.tar.gz
fbgui-9df74a4de07f08d070e503b5bf4432e7c8c90360.tar.xz
fbgui-9df74a4de07f08d070e503b5bf4432e7c8c90360.zip
callback function when download queue is empty
Diffstat (limited to 'src/javascriptInterface.cpp')
-rw-r--r--src/javascriptInterface.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/javascriptInterface.cpp b/src/javascriptInterface.cpp
index a4f492f..90fed92 100644
--- a/src/javascriptInterface.cpp
+++ b/src/javascriptInterface.cpp
@@ -54,9 +54,15 @@ void javascriptInterface::updateProgressBar(QString current, int i)
_parent->evaluateJavaScript(code);
}
//-------------------------------------------------------------------------------------------------------
-void javascriptInterface::setCallbackOnDlQueueFinished()
+void javascriptInterface::setCallbackOnDlQueueFinished(QString jsFunction)
{
- _parent->evaluateJavaScript("jsFunction();");
+ callBackOnDownloadsFinished = jsFunction;
+}
+void javascriptInterface::callbackOnDlQueueFinished()
+{
+ QString code = QString("\%1").arg(callBackOnDownloadsFinished);
+ qDebug() << "to JS: " << code;
+ _parent->evaluateJavaScript(code);
}
void javascriptInterface::quit()
{