Cosmetics

This commit is contained in:
bsongis
2015-05-25 20:09:31 +02:00
parent 6f51fc9da6
commit ae833f98d0
+6 -7
View File
@@ -197,10 +197,8 @@ void FlashProcess::analyseStandardError(const QString &text)
currStderrLine = currStderrLine.mid(nlPos+1); currStderrLine = currStderrLine.mid(nlPos+1);
} }
if (text.contains("-E-") && !text.contains("-E- No receive file name")) { if ((text.contains("-E-") && !text.contains("-E- No receive file name")) ||
hasErrors = true; text.contains("No DFU capable USB device found")) {
}
if (text.contains("No DFU capable USB device found")) {
hasErrors = true; hasErrors = true;
} }
} }
@@ -221,12 +219,12 @@ void FlashProcess::onReadyReadStandardError()
void FlashProcess::errorWizard() void FlashProcess::errorWizard()
{ {
QString output=progress->getText(); // TODO = ui->plainTextEdit->toPlainText(); QString output = progress->getText();
if (output.contains("avrdude: Expected signature for")) { // wrong signature if (output.contains("avrdude: Expected signature for")) { // wrong signature
int pos = output.indexOf("avrdude: Device signature = "); int pos = output.indexOf("avrdude: Device signature = ");
bool fwexist = false; bool fwexist = false;
QString DeviceStr="Unknown"; QString DeviceStr = tr("unknown");
QString FwStr = ""; QString FwStr = "";
if (pos > 0) { if (pos > 0) {
@@ -263,7 +261,8 @@ void FlashProcess::errorWizard()
Firmware *firmware = GetCurrentFirmware(); Firmware *firmware = GetCurrentFirmware();
QMessageBox::warning(NULL, "Companion - Tip of the day", tr("Your radio uses a %1 CPU!!!\n\nPlease select an appropriate firmware type to program it.").arg(DeviceStr)+FwStr+tr("\nYou are currently using:\n %1").arg(firmware->getName())); QMessageBox::warning(NULL, "Companion - Tip of the day", tr("Your radio uses a %1 CPU!!!\n\nPlease select an appropriate firmware type to program it.").arg(DeviceStr)+FwStr+tr("\nYou are currently using:\n %1").arg(firmware->getName()));
} }
} else if (output.contains("No DFU capable USB device found")){ }
else if (output.contains("No DFU capable USB device found")){
#if defined WIN32 || !defined __GNUC__ #if defined WIN32 || !defined __GNUC__
QMessageBox::warning(NULL, "Companion - Tip of the day", tr("Your radio does not seem connected to USB or the driver is not installed!!!\n\nPlease use ZADIG to properly install the driver.")); QMessageBox::warning(NULL, "Companion - Tip of the day", tr("Your radio does not seem connected to USB or the driver is not installed!!!\n\nPlease use ZADIG to properly install the driver."));
#else #else