Кресты / Говнокод #3415 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
for (int i = 0; i < m_pTableWidget->rowCount(); i++) {
        m_pFilterList->addFilter(m_pTableWidget->item(i, 0)->text(), 
                                 (qobject_cast<QComboBox*>(m_pTableWidget->cellWidget(i, 1)))->currentText(),
                                 (qobject_cast<QComboBox*>(m_pTableWidget->cellWidget(i, 2)))->itemData((qobject_cast<QComboBox*>(m_pTableWidget->cellWidget(i, 2)))->currentIndex()).toString(),
                                 m_pTableWidget->item(i, 3)->text(),
                                 (qobject_cast<QComboBox*>(m_pTableWidget->cellWidget(i, 4)))->itemData((qobject_cast<QComboBox*>(m_pTableWidget->cellWidget(i, 4)))->currentIndex()).toString(),
                                 ((qobject_cast<QComboBox*>(m_pTableWidget->cellWidget(i, 2)))->currentText().contains("конца") ? "'%" : (qobject_cast<QComboBox*>(m_pTableWidget->cellWidget(i, 2)))->currentText().contains("любой") ? "'%" : "'"),
                                 ((qobject_cast<QComboBox*>(m_pTableWidget->cellWidget(i, 2)))->currentText().contains("начала") ? "%'" : (qobject_cast<QComboBox*>(m_pTableWidget->cellWidget(i, 2)))->currentText().contains("любой") ? "'%" : "'")
                                 );
    }

Вот так вот брутально выглядит код "в одну строчку"

Запостил: JC_NVKZ JC_NVKZ, (Updated )

Комментарии (1) RSS

Добавить комментарий

Переведи на "PHP", guest!

    А не использовать ли нам bbcode?


    8