Small code cleanup
This commit is contained in:
@@ -279,9 +279,8 @@ void burnConfigDialog::listProgrammers()
|
||||
QStringList arguments;
|
||||
arguments << "-c?";
|
||||
avrOutputDialog *ad = new avrOutputDialog(this, ui->avrdude_location->text(), arguments, "List available programmers", AVR_DIALOG_KEEP_OPEN, TRUE);
|
||||
QString Theme=getTheme();
|
||||
QIcon Icon;
|
||||
populate_icon(&Icon,Theme,"list.png");
|
||||
populate_icon(&Icon,"list.png");
|
||||
ad->setWindowIcon(Icon);
|
||||
ad->show();
|
||||
}
|
||||
@@ -299,9 +298,8 @@ void burnConfigDialog::on_pushButton_4_clicked()
|
||||
arguments << "-?";
|
||||
|
||||
avrOutputDialog *ad = new avrOutputDialog(this, ui->avrdude_location->text(), arguments, "Show help", AVR_DIALOG_KEEP_OPEN,TRUE);
|
||||
QString Theme=getTheme();
|
||||
QIcon Icon;
|
||||
populate_icon(&Icon,Theme,"configure.png");
|
||||
populate_icon(&Icon,"configure.png");
|
||||
ad->setWindowIcon(Icon);
|
||||
ad->show();
|
||||
}
|
||||
@@ -319,9 +317,8 @@ void burnConfigDialog::readFuses()
|
||||
arguments << "-c" << avrProgrammer << "-p" << avrMCU << args << str;
|
||||
|
||||
avrOutputDialog *ad = new avrOutputDialog(this, avrLoc, arguments, "Read Fuses",AVR_DIALOG_KEEP_OPEN,TRUE);
|
||||
QString Theme=getTheme();
|
||||
QIcon Icon;
|
||||
populate_icon(&Icon,Theme,"fuses.png");
|
||||
populate_icon(&Icon,"fuses.png");
|
||||
ad->setWindowIcon(Icon);
|
||||
ad->show();
|
||||
}
|
||||
@@ -334,8 +331,6 @@ void burnConfigDialog::restFuses(bool eeProtect)
|
||||
//avrdude -c usbasp -p m64 -U efuse:w:<0xFF>:m
|
||||
|
||||
QMessageBox::StandardButton ret = QMessageBox::No;
|
||||
QString Theme=getTheme();
|
||||
|
||||
ret = QMessageBox::warning(this, tr("Companion"),
|
||||
tr("<b><u>WARNING!</u></b><br>This will reset the fuses of %1 to the factory settings.<br>Writing fuses can mess up your radio.<br>Do this only if you are sure they are wrong!<br>Are you sure you want to continue?").arg(avrMCU),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
@@ -358,7 +353,7 @@ void burnConfigDialog::restFuses(bool eeProtect)
|
||||
argread << "-c" << avrProgrammer << "-p" << avrMCU << args <<"-U" << "lfuse:r:"+tempFile+":r" ;
|
||||
avrOutputDialog *ad = new avrOutputDialog(this, avrLoc, argread, "Reset Fuses",AVR_DIALOG_CLOSE_IF_SUCCESSFUL,FALSE);
|
||||
QIcon Icon;
|
||||
populate_icon(&Icon,Theme,"fuses.png");
|
||||
populate_icon(&Icon,"fuses.png");
|
||||
ad->setWindowIcon(Icon);
|
||||
ad->exec();
|
||||
QFile file(tempFile);
|
||||
@@ -389,7 +384,7 @@ void burnConfigDialog::restFuses(bool eeProtect)
|
||||
}
|
||||
avrOutputDialog *ad = new avrOutputDialog(this, avrLoc, arguments, "Reset Fuses",AVR_DIALOG_KEEP_OPEN,TRUE);
|
||||
QIcon Icon;
|
||||
populate_icon(&Icon,Theme,"fuses.png");
|
||||
populate_icon(&Icon,"fuses.png");
|
||||
ad->setWindowIcon(Icon);
|
||||
ad->show();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user