diff options
author | Jonathan Bauer | 2011-03-08 13:54:50 +0100 |
---|---|---|
committer | Jonathan Bauer | 2011-03-08 13:54:50 +0100 |
commit | 0f3d4931cf763d507d8df7f1fa60ad023d883a33 (patch) | |
tree | c9dbce7a79b1186b8bd034165fd8345aeb179eb9 | |
parent | sysInfoTest.html as reference on how to call the function properly (diff) | |
download | fbgui-0f3d4931cf763d507d8df7f1fa60ad023d883a33.tar.gz fbgui-0f3d4931cf763d507d8df7f1fa60ad023d883a33.tar.xz fbgui-0f3d4931cf763d507d8df7f1fa60ad023d883a33.zip |
binPath init fix
-rw-r--r-- | src/fbgui.cpp | 4 | ||||
-rw-r--r-- | src/main.cpp | 3 | ||||
-rwxr-xr-x | src/testApp.sh | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/fbgui.cpp b/src/fbgui.cpp index 8be9385..d764882 100644 --- a/src/fbgui.cpp +++ b/src/fbgui.cpp @@ -8,8 +8,8 @@ #include <QtWebKit> #include <QApplication> -// Note: Absolute paths. -QString binPath(QApplication::applicationDirPath()); +// Note: Absolute paths. binPath empty init, set in main() after QApplication instanciated. +QString binPath(""); QString downloadPath(binPath + "/downloads"); QUrl baseURL(DEFAULT_URL); bool debug = false; diff --git a/src/main.cpp b/src/main.cpp index 8686407..92e8819 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,6 +26,7 @@ int main(int argc, char *argv[]) app.setOrganizationName("team_projekt_2011"); app.setApplicationName("prebootGUI"); app.setObjectName("test"); + binPath = QApplication::applicationDirPath(); // Translator, for later (maybe). QTranslator translator; @@ -83,7 +84,7 @@ int main(int argc, char *argv[]) else baseURL = DEFAULT_URL; - // Setting downloads target directory. + // Setting target downloads directory. if (clo.contains("downloadDir")){ downloadPath = binPath + clo.value("downloadDir"); if (debug) qDebug() << "clo set downloadDir to: " << binPath + clo.value("downloadDir"); diff --git a/src/testApp.sh b/src/testApp.sh index c9fd5b7..21308c2 100755 --- a/src/testApp.sh +++ b/src/testApp.sh @@ -17,7 +17,7 @@ display_id=$(grep -n $(whoami) /etc/passwd| head -n 1|awk -F : '{print $1}') /usr/local/Trolltech/Qt-4.7.1/bin/qvfb -width 800 -height 600 -qwsdisplay :$display_id & sleep 0.1 # Start fbgui. -$working_path/fbgui -display QVFb:$display_id -D -u $url -d ./downdir +$working_path/fbgui -display QVFb:$display_id -D -u $url # Check if fbbrowser is not running, if so kill the qvfb. if [ $(ps aux | grep -v grep | grep -c fbgui) -eq 1 ] then |