void MainWindow::enableFlashActions() { for (int i=0; i < ui->tabWidget->count(); i++) { QList<JoyButtonWidget*> list = ui->tabWidget->widget(i)->findChildren<JoyButtonWidget*>(); QListIterator<JoyButtonWidget*> iter(list); while (iter.hasNext()) { JoyButtonWidget *buttonWidget = iter.next(); buttonWidget->enableFlashes(); } QList<JoyAxisWidget*> list2 = ui->tabWidget->widget(i)->findChildren<JoyAxisWidget*>(); QListIterator<JoyAxisWidget*> iter2(list2); while (iter2.hasNext()) { JoyAxisWidget *axisWidget = iter2.next(); axisWidget->enableFlashes(); } QList<JoyControlStickPushButton*> list3 = ui->tabWidget->widget(i)->findChildren<JoyControlStickPushButton*>(); QListIterator<JoyControlStickPushButton*> iter3(list3); while (iter3.hasNext()) { JoyControlStickPushButton *stickWidget = iter3.next(); stickWidget->enableFlashes(); } QList<JoyDPadButtonWidget*> list4 = ui->tabWidget->widget(i)->findChildren<JoyDPadButtonWidget*>(); QListIterator<JoyDPadButtonWidget*> iter4(list4); while (iter4.hasNext()) { JoyDPadButtonWidget *dpadWidget = iter4.next(); dpadWidget->enableFlashes(); } QList<VirtualDPadPushButton*> list5 = ui->tabWidget->widget(i)->findChildren<VirtualDPadPushButton*>(); QListIterator<VirtualDPadPushButton*> iter5(list5); while (iter5.hasNext()) { VirtualDPadPushButton *dpadWidget = iter5.next(); dpadWidget->enableFlashes(); } QList<JoyControlStickButtonPushButton*> list6 = ui->tabWidget->widget(i)->findChildren<JoyControlStickButtonPushButton*>(); QListIterator<JoyControlStickButtonPushButton*> iter6(list6); while (iter6.hasNext()) { JoyControlStickButtonPushButton *stickButtonWidget = iter6.next(); stickButtonWidget->enableFlashes(); } QList<DPadPushButton*> list7 = ui->tabWidget->widget(i)->findChildren<DPadPushButton*>(); QListIterator<DPadPushButton*> iter7(list7); while (iter7.hasNext()) { DPadPushButton *dpadWidget = iter7.next(); dpadWidget->enableFlashes(); } } }
void CollationIteratorTest::TestAssignment() { UErrorCode status = U_ZERO_ERROR; RuleBasedCollator *coll = (RuleBasedCollator *)Collator::createInstance(status); if (coll == NULL || U_FAILURE(status)) { errln("Couldn't create a default collator."); return; } UnicodeString source("abcd"); CollationElementIterator *iter1 = coll->createCollationElementIterator(source); CollationElementIterator iter2 = *iter1; if (*iter1 != iter2) { errln("Fail collation iterator assignment does not produce the same elements"); } CollationElementIterator iter3(*iter1); if (*iter1 != iter3) { errln("Fail collation iterator copy constructor does not produce the same elements"); } source = CharsToUnicodeString("a\\u0300\\u0325"); coll->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status); CollationElementIterator *iter4 = coll->createCollationElementIterator(source); CollationElementIterator iter5(*iter4); if (*iter4 != iter5) { errln("collation iterator assignment does not produce the same elements"); } iter4->next(status); if (U_FAILURE(status) || *iter4 == iter5) { errln("collation iterator not equal"); } iter5.next(status); if (U_FAILURE(status) || *iter4 != iter5) { errln("collation iterator equal"); } iter4->next(status); if (U_FAILURE(status) || *iter4 == iter5) { errln("collation iterator not equal"); } iter5.next(status); if (U_FAILURE(status) || *iter4 != iter5) { errln("collation iterator equal"); } CollationElementIterator iter6(*iter4); if (*iter4 != iter6) { errln("collation iterator equal"); } iter4->next(status); if (U_FAILURE(status) || *iter4 == iter5) { errln("collation iterator not equal"); } iter5.next(status); if (U_FAILURE(status) || *iter4 != iter5) { errln("collation iterator equal"); } iter4->next(status); if (U_FAILURE(status) || *iter4 == iter5) { errln("collation iterator not equal"); } iter5.next(status); if (U_FAILURE(status) || *iter4 != iter5) { errln("collation iterator equal"); } delete iter1; delete iter4; delete coll; }