Handle ambiguous state in configuration dialog.

If a single player is detected it might still have ambiguous as state due to
the mountpoint not being found. Make sure to display a sensible error message
in that case.

Change-Id: I7d62e739019b26a583fe6aab502d0f870e67587e
This commit is contained in:
Dominik Riebeling 2013-09-18 23:30:15 +02:00
parent 5c31063a3f
commit 5d9086bcbe

View file

@ -765,7 +765,8 @@ void Config::autodetect()
QMessageBox::Ok ,QMessageBox::Ok);
ui.treeDevices->setEnabled(true);
}
else if(detected.at(0).status != Autodetection::PlayerOk) {
else if(detected.at(0).status != Autodetection::PlayerOk
&& detected.at(0).status != Autodetection::PlayerAmbiguous) {
QString msg;
switch(detected.at(0).status) {
case Autodetection::PlayerIncompatible:
@ -796,9 +797,8 @@ void Config::autodetect()
}
break;
case Autodetection::PlayerError:
msg += tr("An unknown error occured during player detection.");
break;
default:
msg += tr("An unknown error occured during player detection.");
break;
}
QMessageBox::information(this, tr("Device Detection"), msg);