summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-25 02:44:17 (UTC)
committer zautrix <zautrix>2005-06-25 02:44:17 (UTC)
commitdcc7c9ed932ec2ef521aa04b929d0319f65c8bdc (patch) (side-by-side diff)
treef61360b8f883a6e5fe007c5a24cd35d7cc29ffc0
parent1d0b53abc70e66708d93b7081a21a7689b1a1303 (diff)
downloadkdepimpi-dcc7c9ed932ec2ef521aa04b929d0319f65c8bdc.zip
kdepimpi-dcc7c9ed932ec2ef521aa04b929d0319f65c8bdc.tar.gz
kdepimpi-dcc7c9ed932ec2ef521aa04b929d0319f65c8bdc.tar.bz2
serach fix
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/searchdialog.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 2390520..0e9f64c 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -260,25 +260,24 @@ void SearchDialog::updateList()
}
}
void SearchDialog::searchTextChanged( const QString &_text )
{
#if 0
enableButton( KDialogBase::User1, !_text.isEmpty() );
#endif
}
void SearchDialog::doSearch()
{
QRegExp re;
-
re.setWildcard(true); // most people understand these better.
re.setCaseSensitive(false);
QString st = searchEdit->text();
if ( st.right(1) != "*")
st += "*";
re.setPattern(st);
if (!mSearchEvent->isChecked() && !mSearchTodo->isChecked() && !mSearchJournal->isChecked() ) {
KMessageBox::sorry(this,
i18n("Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals"));
return;
}
if (!re.isValid() ) {
@@ -309,30 +308,29 @@ void SearchDialog::updateConfig()
listView->updateConfig();
}
void SearchDialog::updateView()
{
//qDebug("SearchDialog::updateView() %d ", isVisible());
QRegExp re;
re.setWildcard(true); // most people understand these better.
re.setCaseSensitive(false);
QString st = searchEdit->text();
if ( st.right(1) != "*")
st += "*";
re.setPattern(st);
- if (re.isValid()) {
- search(re);
- } else {
mMatchedEvents.clear();
mMatchedTodos.clear();
mMatchedJournals.clear();
+ if (re.isValid()) {
+ search(re);
}
listView->setStartDate( mStartDate->date() );
listView->showEvents(mMatchedEvents);
listView->addTodos(mMatchedTodos);
listView->addJournals(mMatchedJournals);
}
void SearchDialog::search(const QRegExp &re)
{
QPtrList<Event> events;
if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) {
if ( mRefineItems->isChecked() ) events = mMatchedEvents;