From 15fc19e0a8eabcd66a73bceb1e226067ed7dadee Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Mon, 23 Jul 2007 20:27:01 +0000 Subject: [PATCH] Disable find/next previous actions before deleting the objects which they rely on. ++ Preconditions. svn path=/trunk/KDE/kdebase/apps/konsole/; revision=691508 --- src/SessionController.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/SessionController.cpp b/src/SessionController.cpp index ec77e172..8c35abf5 100644 --- a/src/SessionController.cpp +++ b/src/SessionController.cpp @@ -675,11 +675,12 @@ void SessionController::searchHistory(bool showSearchBar) } else { + setFindNextPrevEnabled(false); + disconnect( _searchBar , SIGNAL(searchChanged(const QString&)) , this , SLOT(searchTextChanged(const QString&)) ); removeSearchFilter(); - setFindNextPrevEnabled(false); _view->setFocus( Qt::ActiveWindowFocusReason ); } @@ -753,12 +754,14 @@ void SessionController::highlightMatches(bool highlight) void SessionController::findNextInHistory() { Q_ASSERT( _searchBar ); + Q_ASSERT( _searchFilter ); beginSearch(_searchBar->searchText(),SearchHistoryTask::ForwardsSearch); } void SessionController::findPreviousInHistory() { Q_ASSERT( _searchBar ); + Q_ASSERT( _searchFilter ); beginSearch(_searchBar->searchText(),SearchHistoryTask::BackwardsSearch); }