summaryrefslogtreecommitdiffstats
path: root/src/JSObject.cpp
diff options
context:
space:
mode:
authorJonathan Bauer2011-03-05 22:33:17 +0100
committerJonathan Bauer2011-03-05 22:33:17 +0100
commitab1846c64d417224a53e8dc4ef3c55f87a413cd6 (patch)
tree4ad604df991076b4e99c6d45aee5725a0d2707f4 /src/JSObject.cpp
parent-qws options not needed anymore (it is set in the constructor of QApplication.) (diff)
downloadfbgui-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.cpp13
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)