From ab1846c64d417224a53e8dc4ef3c55f87a413cd6 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Sat, 5 Mar 2011 22:33:17 +0100 Subject: downloadFile now needs a QUrl&, simplifies things (startDownload slot in jso needs reworking, tempfix there but messy.) --- src/JSObject.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/JSObject.cpp') 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) -- cgit v1.2.3-55-g7522