summaryrefslogtreecommitdiffstats
path: root/src/fbgui.cpp
diff options
context:
space:
mode:
authorJonathan Bauer2011-04-24 16:37:14 +0200
committerJonathan Bauer2011-04-24 16:37:14 +0200
commit9bc86ea4a4179cf671a3aa23ed833f80bfa927dd (patch)
treef16393038f3d9c592cd22d36429f3eb02c2d9ae1 /src/fbgui.cpp
parentdownload manager threaded again, debug preload page (diff)
downloadfbgui-9bc86ea4a4179cf671a3aa23ed833f80bfa927dd.tar.gz
fbgui-9bc86ea4a4179cf671a3aa23ed833f80bfa927dd.tar.xz
fbgui-9bc86ea4a4179cf671a3aa23ed833f80bfa927dd.zip
dm thread ending properly now, few fixes
Diffstat (limited to 'src/fbgui.cpp')
-rw-r--r--src/fbgui.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/fbgui.cpp b/src/fbgui.cpp
index 63f6983..e3c2d3a 100644
--- a/src/fbgui.cpp
+++ b/src/fbgui.cpp
@@ -61,13 +61,12 @@ fbgui::fbgui() {
SLOT(notify(const QString&)));
QObject::connect(jsi, SIGNAL(requestFile(const QString&)), dm,
SLOT(downloadFile(const QString&)));
- QObject::connect(
- dm,
+ QObject::connect(dm,
SIGNAL(updateProgress(const int&, const double&, const QString&)),
jsi,
SLOT(updateProgressBar(const int&, const double&, const QString&)));
- QObject::connect(dm, SIGNAL(downloadQueueEmpty()), jsi, SLOT(
- callbackOnFinished()));
+ QObject::connect(dm, SIGNAL(downloadQueueEmpty()), jsi,
+ SLOT(callbackOnFinished()));
QObject::connect(dm, SIGNAL(downloadQueueEmpty()), this, SLOT(loadSystem()));
// move download manager to its own thread
@@ -92,7 +91,7 @@ fbgui::fbgui() {
showFullScreen();
}
fbgui::~fbgui() {
- dmThread.quit();
+ //dmThread.quit();
}
//-------------------------------------------------------------------------------------------
// Layout / actions setup
@@ -162,8 +161,8 @@ void fbgui::watchForTrigger() {
// watch the path to trigger file
qxtLog->debug() << "[watcher] Watching " << fileToTriggerURL;
_watcher = new QFileSystemWatcher(QStringList(fileToTriggerURL), this);
-QObject::connect(_watcher, SIGNAL(fileChanged(const QString&)), this,
- SLOT(prepareURLLoad()));
+ QObject::connect(_watcher, SIGNAL(fileChanged(const QString&)), this,
+ SLOT(prepareURLLoad()));
}
//-------------------------------------------------------------------------------------------
@@ -353,6 +352,7 @@ void fbgui::performReboot() {
*/
void fbgui::prepareKexec() {
+ qxtLog->debug() << "[gui] Preparing kexec ...";
// try to read KCL file that was downloaded.
QFile file(downloadPath + "/kcl");
if (!file.open(QIODevice::ReadOnly)) {
@@ -465,6 +465,10 @@ void fbgui::toggleDebugConsole() {
//
//-------------------------------------------------------------------------------------------
void fbgui::loadSystem() {
+ // stop the thread for the download manager
+ qxtLog->debug() << "[gui] Stopping download manager's thread...";
+ dmThread.quit();
+
//show loading system page.
_webView->load(QUrl("qrc:/html/loadsystem.html"));
prepareKexec();