Diffstat (limited to 'noncore/apps/dagger/searchbar.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/dagger/searchbar.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/noncore/apps/dagger/searchbar.cpp b/noncore/apps/dagger/searchbar.cpp index 747d696..ff434dd 100644 --- a/noncore/apps/dagger/searchbar.cpp +++ b/noncore/apps/dagger/searchbar.cpp @@ -26,16 +26,21 @@ file; see the file COPYING. If not, write to the Free Software Foundation, Inc., #include <qaction.h> #include <qcombobox.h> #include <qlineedit.h> #include <listkey.h> #include <regex.h> #include <versekey.h> +void searchCallback( char /*percent*/, void */*userData*/ ) +{ + qApp->processEvents(); +} + SearchBar::SearchBar( QMainWindow *parent ) : QToolBar( QString::null, parent, QMainWindow::Top, true ) , m_currText( 0x0 ) { // Initialize UI m_searchText = new QLineEdit( this ); setStretchableWidget( m_searchText ); connect(m_searchText, SIGNAL(textChanged(const QString &)), @@ -103,17 +108,18 @@ void SearchBar::slotFind() pWidget->setCaption( "Searching..." ); Opie::Ui::OWait wait( pWidget ); wait.show(); qApp->processEvents(); // Perform search // TODO - implement search callback function to animate wait cursor - sword::ListKey results = m_currText->getModule()->Search( m_searchText->text().latin1(), REG_ICASE, 0 ); + sword::ListKey results = m_currText->getModule()->Search( m_searchText->text().latin1(), 0, REG_ICASE, 0, 0, + &searchCallback ); // Process results int count = results.Count(); bool found = count > 0; if ( found ) { // Populate results combo box sword::VerseKey key; |