diff options
author | Georg Zotti <Georg.Zotti@univie.ac.at> | 2022-10-08 22:23:48 +0200 |
---|---|---|
committer | Georg Zotti <Georg.Zotti@univie.ac.at> | 2022-10-08 22:23:48 +0200 |
commit | 04ee741c551491cef5822dd008dda06512d584d3 (patch) | |
tree | 94e660aff44ab1ad25e5c442cec8e730fd57582c | |
parent | fa977fadc5cacca3eded52237ca0c93bfb649c11 (diff) |
Added at least debug notes where indicated missing years agofix/TelescopeControl_2713
Also improved an iterator loop (clazy hint)
3 files changed, 9 insertions, 4 deletions
diff --git a/plugins/TelescopeControl/src/TelescopeControl.cpp b/plugins/TelescopeControl/src/TelescopeControl.cpp index ed539f0b71..113d62c18a 100644 --- a/plugins/TelescopeControl/src/TelescopeControl.cpp +++ b/plugins/TelescopeControl/src/TelescopeControl.cpp @@ -1631,10 +1631,12 @@ QHash<int, QString> TelescopeControl::getConnectedClientsNames() if (telescopeClients.isEmpty()) return connectedClientsNames; - for (const auto slotNumber : telescopeClients.keys()) + QMapIterator<int, TelescopeClientP> it(telescopeClients); + while (it.hasNext()) { - if (telescopeClients.value(slotNumber)->isConnected()) - connectedClientsNames.insert(slotNumber, telescopeClients.value(slotNumber)->getNameI18n()); + it.next(); + if (telescopeClients.value(it.key())->isConnected()) + connectedClientsNames.insert(it.key(), it.value()->getNameI18n()); } return connectedClientsNames; diff --git a/plugins/TelescopeControl/src/gui/TelescopeConfigurationDialog.cpp b/plugins/TelescopeControl/src/gui/TelescopeConfigurationDialog.cpp index 8a5bf19be7..d739d848d2 100644 --- a/plugins/TelescopeControl/src/gui/TelescopeConfigurationDialog.cpp +++ b/plugins/TelescopeControl/src/gui/TelescopeConfigurationDialog.cpp @@ -288,7 +288,8 @@ void TelescopeConfigurationDialog::initExistingTelescopeConfiguration(int slot) connectAtStartup, circles, deviceModelName, serialPortName, rts2Url, rts2Username, rts2Password, rts2Refresh, ascomDeviceId, ascomUseDeviceEqCoordType)) { - // TODO: Add debug + // TODO: Add better debug + qDebug() << "Cannot get telescope for slot" << slot; return; } ui->lineEditTelescopeName->setText(name); diff --git a/plugins/TelescopeControl/src/gui/TelescopeDialog.cpp b/plugins/TelescopeControl/src/gui/TelescopeDialog.cpp index 63f98f7158..19925d42e4 100644 --- a/plugins/TelescopeControl/src/gui/TelescopeDialog.cpp +++ b/plugins/TelescopeControl/src/gui/TelescopeDialog.cpp @@ -790,12 +790,14 @@ void TelescopeDialog::buttonRemovePressed() if(!telescopeManager->removeTelescopeAtSlot(selectedSlot)) { //TODO: Add debug + qDebug() << "Cannot remove telescope at slot" << selectedSlot; return; } } else { //TODO: Add debug + qDebug() << "Cannot stop telescope at slot" << selectedSlot << ". Rejecting removal."; return; } |