Fix AddDeviceWizard AddSearch not completing

The logic for the AddSearch page (which only appears
if the user did not have the device connected when the
initial scan is performed) would find the device and then
terminate without moving on to the final page.
This commit is contained in:
Mark Liversedge
2012-01-22 08:58:59 +00:00
parent 3822940d5d
commit 4a3e6e2049
3 changed files with 3 additions and 9 deletions

View File

@@ -140,7 +140,7 @@ DeviceScanner::run()
{
active = true;
bool result = false;
for (int i=0; active && !result && i<10; i++) {
for (int i=0; active && !result && i<50; i++) { // search for longer
// better to wait a while, esp. if its just a USB device
#ifdef WIN32
@@ -215,7 +215,6 @@ DeviceScanner::quickScan(bool deep) // scan quickly or if true scan forever, as
// automatically discover a serial port ...
QString error;
foreach (CommPortPtr port, Serial::myListCommPorts(error)) {
if (wizard->controller->discover(port->name()) == true) {
isfound = true;
wizard->portSpec = port->name();
@@ -295,7 +294,6 @@ AddSearch::chooseCOMPort()
if (manual->currentIndex() <= 0) { // we unselected or something.
wizard->found = false;
wizard->portSpec = "";
emit completeChanged();
return;
}
@@ -309,8 +307,6 @@ AddSearch::chooseCOMPort()
// carry on then
wizard->found = true; // ugh
emit completeChanged();
}
void
@@ -406,7 +402,7 @@ int
AddSearch::nextId() const
{
// Still no dice. Go to the not found dialog
if (wizard->found == false) return -1;
if (wizard->found == false) return 60;
else {
switch(wizard->deviceTypes.Supported[wizard->current].type) {
case DEV_ANTLOCAL : return 50; break; // pair