summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/downloadmanager.cpp5
-rw-r--r--src/javascriptinterface.cpp5
-rw-r--r--src/javascriptinterface.h1
-rwxr-xr-xsrc/testApp.sh15
4 files changed, 11 insertions, 15 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
index 0f79eef..9f7a628 100644
--- a/src/downloadmanager.cpp
+++ b/src/downloadmanager.cpp
@@ -180,11 +180,6 @@ void DownloadManager::downloadFinished()
currentDownload->deleteLater();
}
else{
- // if kcl, append the session ID to it
- if (outfile.fileName() == downloadDir.absoluteFilePath("kcl")){
- qxtLog->debug() << "[dm] Completing kernel command line...";
- outfile.write(" alpha=" + sessionID.toUtf8());
- }
// end download
outfile.close();
downloaded++;
diff --git a/src/javascriptinterface.cpp b/src/javascriptinterface.cpp
index 49eef82..5ef443e 100644
--- a/src/javascriptinterface.cpp
+++ b/src/javascriptinterface.cpp
@@ -49,11 +49,6 @@ void JavascriptInterface::loadJQuery(){
//-------------------------------------------------------------------------------------------------------
// Javascript functions for webpage
//-------------------------------------------------------------------------------------------------------
-void JavascriptInterface::getSession(const QString& session){
- qxtLog->debug() << "[jsi] Received session id: " << session;
- sessionID = session;
-}
-//-------------------------------------------------------------------------------------------------------
void JavascriptInterface::startDownload(const QString& filename){
// ignore if empty filename
if (filename.isEmpty()){
diff --git a/src/javascriptinterface.h b/src/javascriptinterface.h
index fc2caf3..e686b77 100644
--- a/src/javascriptinterface.h
+++ b/src/javascriptinterface.h
@@ -46,7 +46,6 @@ public slots:
void attachToDOM();
// slots for calling from the webpage
- void getSession(const QString& session);
void startDownload(const QString& filename);
void setCallbackOnFinished(const QString& function);
const QString getSysInfo(const QString& info);
diff --git a/src/testApp.sh b/src/testApp.sh
index 0ae691e..9242688 100755
--- a/src/testApp.sh
+++ b/src/testApp.sh
@@ -5,21 +5,28 @@
# -h, --help prints help
# -D <level>, --debug=<level> sets debug level [0,1]
# -u <url>, --url=<url> sets URL to load
-# -d <dir>, --download=<dir> sets download directory (absolute)
-# -c <path>, --config=<path> sets path to config file (absolute)
+# -d <dir>, --download=<dir> sets download director
+# -c <path>, --config=<path> sets path to config file
# -t <path>, --trigger=<path> sets path to file triggering URL load
# -s <path>, --serial=<path> sets path to serial number file
#
# Note: all path are expected to be absolute.
-#
+
+# clean /tmp/fbgui
rm -rf /tmp/fbgui
+
+# path to script (including script name)
script_path="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")"
-# to get the path only - not the script name - add
+
+# to get the path only: use dirname which strips the filename from a path
working_path=`dirname "$script_path"`
+
+# construct unique display_id based on user, needed for multi-user qvfb usage
display_id=$(grep -n $(whoami) /etc/passwd| head -n 1|awk -F : '{print $1}')
# Start QT's virtual framebuffer with proper display_id
/usr/local/Trolltech/Qt-4.7.2/bin/qvfb -width 1024 -height 768 -qwsdisplay :$display_id &
+# quick sleep to wait for qvfb loading
sleep 0.2
# Start fbgui connecting to QVFb with display_id from above.
$working_path/fbgui -display QVFb:$display_id $@