diff options
| author | Jonathan Bauer | 2011-03-05 22:33:17 +0100 |
|---|---|---|
| committer | Jonathan Bauer | 2011-03-05 22:33:17 +0100 |
| commit | ab1846c64d417224a53e8dc4ef3c55f87a413cd6 (patch) | |
| tree | 4ad604df991076b4e99c6d45aee5725a0d2707f4 /src/JSObject.cpp | |
| parent | -qws options not needed anymore (it is set in the constructor of QApplication.) (diff) | |
| download | fbgui-ab1846c64d417224a53e8dc4ef3c55f87a413cd6.tar.gz fbgui-ab1846c64d417224a53e8dc4ef3c55f87a413cd6.tar.xz fbgui-ab1846c64d417224a53e8dc4ef3c55f87a413cd6.zip | |
downloadFile now needs a QUrl&, simplifies things (startDownload slot in jso needs reworking, tempfix there but messy.)
Diffstat (limited to 'src/JSObject.cpp')
| -rw-r--r-- | src/JSObject.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/JSObject.cpp b/src/JSObject.cpp index 3624a89..062f4cc 100644 --- a/src/JSObject.cpp +++ b/src/JSObject.cpp @@ -23,7 +23,18 @@ void JSObject::attachToDOM() //------------------------------------------------------------------------------------------------------- void JSObject::startDownload(QString filename) { - emit downloadFile(filename); + + if (filename.isEmpty()) + { + owner->evaluateJavaScript("alert(\"No filename!\")"); + return; + } + // Erm fix this + QString qs = "http://132.230.4.3/"; + qs.append(filename); + QUrl url(qs); + emit downloadFile(url); + } //------------------------------------------------------------------------------------------------------- void JSObject::updateProgress(int i) |
