diff options
| author | Jonathan Bauer | 2011-03-16 00:36:20 +0100 |
|---|---|---|
| committer | Jonathan Bauer | 2011-03-16 00:36:20 +0100 |
| commit | 6e6631ea46a30b3a727f3b7b2b0fcbd4644d85c6 (patch) | |
| tree | 509a811a180dddeaba64fc9e6f11f41f35d33c28 /src/javascriptInterface.cpp | |
| parent | fixes (diff) | |
| download | fbgui-6e6631ea46a30b3a727f3b7b2b0fcbd4644d85c6.tar.gz fbgui-6e6631ea46a30b3a727f3b7b2b0fcbd4644d85c6.tar.xz fbgui-6e6631ea46a30b3a727f3b7b2b0fcbd4644d85c6.zip | |
update progress now calls updateProgressBar(percent, speed) speed in bytes/sec atm, adapt your sites...
Diffstat (limited to 'src/javascriptInterface.cpp')
| -rw-r--r-- | src/javascriptInterface.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/javascriptInterface.cpp b/src/javascriptInterface.cpp index d57ce44..399f863 100644 --- a/src/javascriptInterface.cpp +++ b/src/javascriptInterface.cpp @@ -33,10 +33,10 @@ void javascriptInterface::startDownload(QString filename) emit requestFile(filename); } //------------------------------------------------------------------------------------------------------- -void javascriptInterface::updateProgressBar(QString current, int i) +void javascriptInterface::updateProgressBar(int percent, double speed) { - if (i == 0) return; - QString code = QString("updateProgress('\%1', \%2)").arg(current).arg(i); + if (percent == 0) return; + QString code = QString("updateProgress('\%1', \%2)").arg(percent).arg(speed); if (debug) qDebug() << "To JS: " << code; _parent->evaluateJavaScript(code); } @@ -57,4 +57,3 @@ void javascriptInterface::quit() if (debug) qDebug() << "Quit signal."; emit quitFbgui(); } - |
