From 8c555aa3d5583667a47e3aa1d822b215f0a8a828 Mon Sep 17 00:00:00 2001 From: Andreas Loibl Date: Tue, 27 Sep 2011 22:45:08 +0200 Subject: added missing signal-slot-connections, check current wizardpage --- wizard/hdmap.cpp | 5 +++++ wizard/rootpartition.cpp | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/wizard/hdmap.cpp b/wizard/hdmap.cpp index 491e5b6..10c3324 100644 --- a/wizard/hdmap.cpp +++ b/wizard/hdmap.cpp @@ -2,6 +2,7 @@ #include "hdmap.h" #include "../listdelegate.h" #include "../listitem.h" +#include "../mainwizard.h" wpHdMap::wpHdMap(QWidget *parent) : QWizardPage(parent) { @@ -44,11 +45,15 @@ void wpHdMap::receivedDataLine(QString data, QString line) void wpHdMap::receivedCommand(QString command, QString args) { + if(this->wizard()->currentId() != MainWizard::Page_HdMap) return; + if(command == "error") checkPassed = false; } void wpHdMap::backendFinishedCommand(QString command) { + if(this->wizard()->currentId() != MainWizard::Page_HdMap) return; + if(command == "fill_hdmap") { diff --git a/wizard/rootpartition.cpp b/wizard/rootpartition.cpp index b020370..2b2b023 100644 --- a/wizard/rootpartition.cpp +++ b/wizard/rootpartition.cpp @@ -9,6 +9,8 @@ wpRootPartition::wpRootPartition(QWidget *parent) : QWizardPage(parent) setupUi(this); backend = Backend::instance(); connect(backend, SIGNAL(receivedDataLine(QString,QString)), this, SLOT(receivedDataLine(QString,QString))); + connect(backend, SIGNAL(receivedCommand(QString,QString)), this, SLOT(receivedCommand(QString,QString))); + connect(backend, SIGNAL(finishedCommand(QString)), this, SLOT(backendFinishedCommand(QString))); connect(rootPartitionDev, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), this, SLOT(updateComplete())); connect(chkAdvanced, SIGNAL(stateChanged(int)), this, SLOT(updateComplete())); @@ -56,6 +58,8 @@ bool wpRootPartition::isComplete() const void wpRootPartition::backendFinishedCommand(QString command) { + if(this->wizard()->currentId() != MainWizard::Page_RootPartition) return; + if(command == "check_partitions_for_install" && checkPassed) { this->wizard()->next(); @@ -64,6 +68,8 @@ void wpRootPartition::backendFinishedCommand(QString command) void wpRootPartition::receivedCommand(QString command, QString args) { + if(this->wizard()->currentId() != MainWizard::Page_RootPartition) return; + if(command == "error") checkPassed = false; } -- cgit v1.0