| 1075 | } |
| 1076 | |
| 1077 | void MainWindow::beginProfileLoadRadioStateWriteHold(const QString& profileType, |
| 1078 | const QString& profileName) |
| 1079 | { |
| 1080 | if (!profileLoadMayRebuildRadioTopology(profileType)) { |
| 1081 | qCDebug(lcProtocol).noquote() |
| 1082 | << "MainWindow: profile load does not require topology write hold" |
| 1083 | << QStringLiteral("type=%1").arg(profileType) |
| 1084 | << QStringLiteral("name=%1").arg(profileName); |
| 1085 | return; |
| 1086 | } |
| 1087 | |
| 1088 | const qint64 untilMs = QDateTime::currentMSecsSinceEpoch() + kProfileLoadStateWriteHoldMs; |
| 1089 | m_profileLoadRadioStateWriteHoldUntilMs = |
| 1090 | std::max(m_profileLoadRadioStateWriteHoldUntilMs, untilMs); |
| 1091 | m_suppressStartupPanLayoutRearrange = false; |
| 1092 | m_layoutRestoreUntilMs = kPanLayoutRestoreWaitingForFirstPan; |
| 1093 | if (m_layoutRestoreTimer) { |
| 1094 | m_layoutRestoreTimer->stop(); |
| 1095 | } |
| 1096 | if (m_bsAutoSaveTimer) { |
| 1097 | m_bsAutoSaveTimer->stop(); |
| 1098 | } |
| 1099 | m_pendingProfileLoadPanDimensions.clear(); |
| 1100 | m_profileLoadPendingFftYpixels.clear(); |
| 1101 | m_profileLoadPanDimensionsSettlingUntilMs.clear(); |
| 1102 | holdNoiseFloorAutoAdjustForProfileLoad(untilMs); |
| 1103 | if (m_panStack) { |
| 1104 | for (PanadapterApplet* applet : m_panStack->allApplets()) { |
| 1105 | if (applet && applet->spectrumWidget()) { |
| 1106 | applet->spectrumWidget()->clearDisplay(); |
| 1107 | } |
| 1108 | } |
| 1109 | } |
| 1110 | setPanadapterConnectionAnimation(true, "Loading profile..."); |
| 1111 | |
| 1112 | qCInfo(lcProtocol).noquote() |
| 1113 | << "MainWindow: holding profile-owned radio state writes" |
| 1114 | << QStringLiteral("type=%1").arg(profileType) |
| 1115 | << QStringLiteral("name=%1").arg(profileName); |
| 1116 | } |
| 1117 | |
| 1118 | bool MainWindow::profileLoadRadioStateWritesHeld() const |
| 1119 | { |
nothing calls this directly
no test coverage detected