summaryrefslogtreecommitdiffstats
path: root/src/fbgui.cpp
diff options
context:
space:
mode:
authorJonathan Bauer2011-04-25 16:33:51 +0200
committerJonathan Bauer2011-04-25 16:33:51 +0200
commit79de7cb99904109346870bc95fc2eef585c500d0 (patch)
tree4ca9d843cf714273297dbbc941bf22d00a8ff0f0 /src/fbgui.cpp
parentloading system page improved display logic (diff)
downloadfbgui-79de7cb99904109346870bc95fc2eef585c500d0.tar.gz
fbgui-79de7cb99904109346870bc95fc2eef585c500d0.tar.xz
fbgui-79de7cb99904109346870bc95fc2eef585c500d0.zip
1sec delay between loading page showing & preparing kexec
Diffstat (limited to 'src/fbgui.cpp')
-rw-r--r--src/fbgui.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/fbgui.cpp b/src/fbgui.cpp
index b55fb9c..45524eb 100644
--- a/src/fbgui.cpp
+++ b/src/fbgui.cpp
@@ -63,7 +63,7 @@ fbgui::fbgui() {
SLOT(updateProgressBar(const int&, const double&, const QString&)));
QObject::connect(dm, SIGNAL(downloadQueueEmpty()), jsi, SLOT(
callbackOnFinished()));
- QObject::connect(dm, SIGNAL(downloadQueueEmpty()), this, SLOT(showLoadSystem()));
+ QObject::connect(dm, SIGNAL(downloadQueueEmpty()), this, SLOT(loadSystem()));
// move download manager to its own thread
dm->moveToThread(&dmThread);
@@ -350,6 +350,14 @@ void fbgui::performReboot() {
//-------------------------------------------------------------------------------------------
// Preparing Kernel Switch per kexec (initiating Stage 3)
//-------------------------------------------------------------------------------------------
+void fbgui::loadSystem() {
+ //show loading system page.
+ //_webView->disconnect(this);
+ //QObject::connect(_webView, SIGNAL(loadFinished(bool)), this, SLOT(prepareKexec()));
+ _webView->load(QUrl("qrc:/html/loadsystem.html"));
+ QTimer::singleShot(1000, this, SLOT(prepareKexec()));
+}
+//-------------------------------------------------------------------------------------------
/**
* This method prepares kexec.
*
@@ -426,9 +434,9 @@ void fbgui::prepareKexec() {
*
*/
void fbgui::runKexec() {
- QProcess *process = new QProcess(this);
- process->startDetached("kexec -e");
- if (!process->waitForStarted()) {
+ QProcess process;
+ process.startDetached("kexec -e");
+ if (!process.waitForStarted()) {
qxtLog->debug() << "[gui] Failed to execute: kexec -e";
qxtLog->debug() << "[gui] Exiting in 5 seconds...";
QTimer::singleShot(5000, this, SLOT(close()));
@@ -479,15 +487,5 @@ void fbgui::toggleDebugConsole() {
}
//-------------------------------------------------------------------------------------------
//
+
//-------------------------------------------------------------------------------------------
-void fbgui::showLoadSystem() {
- //show loading system page.
- _webView->disconnect(this);
- QObject::connect(_webView, SIGNAL(loadFinished(bool)), this, SLOT(prepareKexec()));
- _webView->load(QUrl("qrc:/html/loadsystem.html"));
-}
-//-------------------------------------------------------------------------------------------
-void fbgui::quitFailure() {
-}
-void fbgui::quitSuccess() {
-}