リビジョン | f1e6ca28b49c0c0544db734db2d1f68a9c36523f (tree) |
---|---|
日時 | 2010-01-19 19:23:54 |
作者 | nogu <nogu@user...> |
コミッター | nogu |
Use Q_ASSERT_X
@@ -204,6 +204,9 @@ void AxisTicsOptionWidget::setOption(int axis) | ||
204 | 204 | break; |
205 | 205 | case 2: |
206 | 206 | axisTics->setPosition(axis, labelsPosLineEdit->text().split(',')); |
207 | + break; | |
208 | + default: | |
209 | + Q_ASSERT_X(false, "AxisTicsOptionWidget::setOption", "invalid index"); | |
207 | 210 | } |
208 | 211 | } |
209 | 212 |
@@ -301,6 +301,9 @@ void KeyOptionWidget::apply() | ||
301 | 301 | for (int i = 0; !Key::AXIS[i].isEmpty(); i++) { |
302 | 302 | key->setPosition(i, positionDoubleSpinBoxList.at(i)->value()); |
303 | 303 | } |
304 | + break; | |
305 | + default: | |
306 | + Q_ASSERT_X(false, "KeyOptionWidget::apply", "invalid index"); | |
304 | 307 | } |
305 | 308 | |
306 | 309 | key->setLeftJustification(textJustifyCheckBox->isChecked()); |
@@ -300,6 +300,8 @@ void OptionDialog::changePage(QListWidgetItem *current, | ||
300 | 300 | contentsListWidget->row(previous)); |
301 | 301 | setWindowModified(true); |
302 | 302 | return; |
303 | + default: | |
304 | + Q_ASSERT_X(false, "OptionDialog::changePage", "invalid button"); | |
303 | 305 | } |
304 | 306 | } |
305 | 307 | int index = contentsListWidget->row(current); |
@@ -233,6 +233,8 @@ bool PlotOptionDialog::canClose() | ||
233 | 233 | return true; |
234 | 234 | case 2: |
235 | 235 | return false; |
236 | + default: | |
237 | + Q_ASSERT_X(false, "PlotOptionDialog::canClose", "invalid button"); | |
236 | 238 | } |
237 | 239 | return false; |
238 | 240 | } |