diff options
author | Andreas Loibl <andreas@andreas-loibl.de> | 2011-09-27 21:39:11 +0200 |
---|---|---|
committer | Andreas Loibl <andreas@andreas-loibl.de> | 2011-09-27 21:39:11 +0200 |
commit | fa22289c6fbd3abc1b4506553d55dcff20d619f1 (patch) | |
tree | 737b37738e80a9677934cbfbe72028f07e24d023 /wizard/hdmap.cpp | |
parent | 18a5985a2b829aa0858433faee98c13a5c9a5d08 (diff) | |
download | acritoxinstaller-fa22289c6fbd3abc1b4506553d55dcff20d619f1.zip acritoxinstaller-fa22289c6fbd3abc1b4506553d55dcff20d619f1.tar.gz |
strip_live_media, error handling, hdmap fixes
Diffstat (limited to 'wizard/hdmap.cpp')
-rw-r--r-- | wizard/hdmap.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/wizard/hdmap.cpp b/wizard/hdmap.cpp index 526ebef..491e5b6 100644 --- a/wizard/hdmap.cpp +++ b/wizard/hdmap.cpp @@ -8,8 +8,11 @@ wpHdMap::wpHdMap(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))); tableWidget->horizontalHeader()->setResizeMode(QHeaderView::Stretch); + + checkPassed = false; } void wpHdMap::initializePage() @@ -39,6 +42,11 @@ void wpHdMap::receivedDataLine(QString data, QString line) } } +void wpHdMap::receivedCommand(QString command, QString args) +{ + if(command == "error") checkPassed = false; +} + void wpHdMap::backendFinishedCommand(QString command) { if(command == "fill_hdmap") @@ -65,6 +73,12 @@ void wpHdMap::backendFinishedCommand(QString command) if(hdmap.at(row).section(":",3,3) == "auto") automount->setChecked(true); else automount->setChecked(false); tableWidget->setCellWidget(row, 3, automount); } + + checkPassed = false; + } + else if(command == "check_partitions_for_install" && checkPassed) + { + this->wizard()->next(); } } @@ -82,6 +96,11 @@ bool wpHdMap::isComplete() const bool wpHdMap::validatePage() { if(!isComplete()) return false; + if(checkPassed) + { + checkPassed = false; + return true; + } QStringList* hdmap = new QStringList(); for(int row = 0; row < tableWidget->rowCount(); row++) { @@ -93,5 +112,7 @@ bool wpHdMap::validatePage() } backend->cfg("hdmap", hdmap->join("\n")); // backend->exec(QString("hdmap_set %1").arg(hdmap->join("\n"))); - return true; + backend->exec("check_partitions_for_install"); + checkPassed = true; // if an error occurrs receivedCommand will set it to false. + return false; } |