/*! \reimp */ QString QAccessibleListBox::text(Text t, int child) const { if (!child || t != Name) return Q3AccessibleScrollView::text(t, child); Q3ListBoxItem *item = listBox()->item(child - 1); if (item) return item->text(); return QString(); }
bool EditorCompletion::continueComplete() { if ( searchString.isEmpty() ) { completionListBox->clear(); for ( QList<CompletionEntry>::ConstIterator it = cList.begin(); it != cList.end(); ++it ) (void)new CompletionItem( completionListBox, (*it).text, (*it).type, (*it).postfix, (*it).prefix, (*it).postfix2 ); completionListBox->setCurrentItem( 0 ); completionListBox->setSelected( completionListBox->currentItem(), true ); return true; } Q3ListBoxItem *i = completionListBox->findItem( searchString ); if ( !i ) return false; QString txt1 = i->text(); QString txt2 = searchString; strip( txt1 ); strip( txt2 ); if ( txt1 == txt2 && !i->next() ) return false; QList<CompletionEntry> res; for ( QList<CompletionEntry>::ConstIterator it = cList.begin(); it != cList.end(); ++it ) { if ( (*it).text.left( searchString.length() ) == searchString ) res << *it; } if ( res.isEmpty() ) return false; completionListBox->clear(); for ( QList<CompletionEntry>::ConstIterator it2 = res.begin(); it2 != res.end(); ++it2 ) (void)new CompletionItem( completionListBox, (*it2).text, (*it2).type, (*it2).postfix, (*it2).prefix, (*it2).postfix2 ); completionListBox->setCurrentItem( 0 ); completionListBox->setSelected( completionListBox->currentItem(), true ); return true; }