1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-18 08:54:15 +01:00

OP-1174 auto update wizard : removed now (hopefully) uneeded workarounds

This commit is contained in:
Philippe Renon 2014-05-03 17:42:19 +02:00
parent 5b64459eb3
commit 1bca36ab8d

View File

@ -41,26 +41,25 @@ void AutoUpdatePage::updateStatus(uploader::AutoUpdateStep status, QVariant valu
switch (status) { switch (status) {
case uploader::WAITING_DISCONNECT: case uploader::WAITING_DISCONNECT:
disableButtons(); disableButtons();
getWizard()->show();
ui->statusLabel->setText(tr("Waiting for all OP boards to be disconnected.")); ui->statusLabel->setText(tr("Waiting for all OP boards to be disconnected."));
// TODO get rid of magic number 20s // TODO get rid of magic number 20s (should use UploaderGadgetWidget::BOARD_EVENT_TIMEOUT)
ui->levellinProgressBar->setMaximum(20); ui->levellinProgressBar->setMaximum(20);
ui->levellinProgressBar->setValue(value.toInt()); ui->levellinProgressBar->setValue(value.toInt());
break; break;
case uploader::WAITING_CONNECT: case uploader::WAITING_CONNECT:
// Note: // Note:
// following two lines of code were probably added to fix an issue when uploader opened a popup requesting // the following commented out lines were probably added to fix an issue when uploader opened a popup requesting
// user to disconnect all boards // user to disconnect all boards
// Side effect is that the wizard dialog flickers // Side effect is that the wizard dialog flickers
// the uploader was changed to avoid popups alltogether and that fix is not need anymore // the uploader was changed to avoid popups alltogether and that fix is not need anymore
// same commented fix can be found in FAILURE case and they are kept for future ref. // same commented fix can be found in FAILURE case and they are kept for future ref.
//getWizard()->setWindowFlags(getWizard()->windowFlags() | Qt::WindowStaysOnTopHint); //getWizard()->setWindowFlags(getWizard()->windowFlags() | Qt::WindowStaysOnTopHint);
//getWizard()->setWindowIcon(qApp->windowIcon()); //getWizard()->setWindowIcon(qApp->windowIcon());
//getWizard()->show();
// End of Note // End of Note
disableButtons(); disableButtons();
getWizard()->show();
ui->statusLabel->setText(tr("Please connect the board to the USB port (don't use external supply).")); ui->statusLabel->setText(tr("Please connect the board to the USB port (don't use external supply)."));
// TODO get rid of magic number 20s // TODO get rid of magic number 20s (should use UploaderGadgetWidget::BOARD_EVENT_TIMEOUT)
ui->levellinProgressBar->setMaximum(20); ui->levellinProgressBar->setMaximum(20);
ui->levellinProgressBar->setValue(value.toInt()); ui->levellinProgressBar->setValue(value.toInt());
break; break;
@ -90,7 +89,6 @@ void AutoUpdatePage::updateStatus(uploader::AutoUpdateStep status, QVariant valu
//getWizard()->setWindowFlags(getWizard()->windowFlags() | Qt::WindowStaysOnTopHint); //getWizard()->setWindowFlags(getWizard()->windowFlags() | Qt::WindowStaysOnTopHint);
//getWizard()->setWindowIcon(qApp->windowIcon()); //getWizard()->setWindowIcon(qApp->windowIcon());
enableButtons(true); enableButtons(true);
getWizard()->show();
QString msg = value.toString(); QString msg = value.toString();
if (msg.isEmpty()) { if (msg.isEmpty()) {
msg = tr("Something went wrong, you will have to manually upgrade the board using the uploader plugin."); msg = tr("Something went wrong, you will have to manually upgrade the board using the uploader plugin.");