| 104 | // |
| 105 | |
| 106 | void |
| 107 | InspectionWidget::setState(int state, Suscan::Analyzer *analyzer) |
| 108 | { |
| 109 | bool prevAttached = m_analyzer != nullptr; |
| 110 | |
| 111 | m_state = state; |
| 112 | |
| 113 | if (m_analyzer != analyzer) { |
| 114 | if (prevAttached) |
| 115 | this->detachAnalyzer(); |
| 116 | |
| 117 | if (analyzer != nullptr && !m_onceAttached) { |
| 118 | m_analyzer = analyzer; |
| 119 | m_onceAttached = true; |
| 120 | this->attachAnalyzer(analyzer); |
| 121 | } else { |
| 122 | m_analyzer = nullptr; |
| 123 | } |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | void |
| 128 | InspectionWidget::closeRequested() |
nothing calls this directly
no test coverage detected