[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kate/part
From: Anders Lund <anders () alweb ! dk>
Date: 2005-03-31 14:34:27
Message-ID: 20050331143427.872084A6 () office ! kde ! org
[Download RAW message or body]
CVS commit by alund:
second time removing my still private patch, GRRR
CCBUG: 102107
M +11 -18 katesearch.cpp 1.91
--- kdelibs/kate/part/katesearch.cpp #1.90:1.91
@@ -38,5 +38,4 @@
#include <kfinddialog.h>
#include <kreplacedialog.h>
-#include <knotifyclient.h>
#include <qlayout.h>
@@ -113,5 +112,5 @@ void KateSearch::find()
}
-bool KateSearch::find( const QString &pattern, long flags, bool add, bool shownotfound )
+void KateSearch::find( const QString &pattern, long flags, bool add, bool shownotfound )
{
KateViewConfig::global()->setSearchFlags( flags );
@@ -147,5 +146,5 @@ bool KateSearch::find( const QString &pa
s.showNotFound = shownotfound;
- return search( searchFlags );
+ search( searchFlags );
}
@@ -168,5 +167,5 @@ void KateSearch::replace()
m_replacement = replaceDialog->replacement();
s_searchList = replaceDialog->findHistory () ;
- s_replaceList = replaceDialog->replacementHistory ();
+ s_replaceList = replaceDialog->replacementHistory () ;
// Do *not* remove the QString() wrapping, it fixes a nasty crash
@@ -237,5 +236,5 @@ void KateSearch::findAgain( bool back )
}
-bool KateSearch::search( SearchFlags flags )
+void KateSearch::search( SearchFlags flags )
{
s.flags = flags;
@@ -265,7 +264,6 @@ bool KateSearch::search( SearchFlags fla
else
replaceAll();
- return false; // FIXME
} else {
- return findAgain();
+ findAgain();
}
}
@@ -295,21 +293,19 @@ void KateSearch::wrapSearch()
}
-bool KateSearch::findAgain()
+void KateSearch::findAgain()
{
if( s_pattern.isEmpty() ) {
find();
- return false; // ### make find() return a bool too just to be consequent
+ return;
}
if ( doSearch( s_pattern ) ) {
exposeFound( s.cursor, s.matchedLength );
- return true;
} else if( !s.flags.finished ) {
if( askContinue() ) {
wrapSearch();
- return findAgain();
+ findAgain();
} else {
if (arbitraryHLExample) m_arbitraryHLList->clear();
- return false;
}
} else {
@@ -321,5 +317,4 @@ bool KateSearch::findAgain()
i18n("Find"));
}
- return false;
}
@@ -344,5 +339,5 @@ void KateSearch::replaceAll()
}
- // FIXME workaround bad design in katedocument.
+ // FIXME ugly hack to work around bad design in katedocument
if ( 0 == replaces )
m_doc->setModified( false );
@@ -817,6 +812,5 @@ while ( (p = pattern.find( '\\' + delim,
if ( cmd.startsWith( "find" ) )
{
- if ( ! ((KateView*)view)->find( pattern, f ) )
- msg = i18n("'%1' not found.").arg( pattern );
+ ((KateView*)view)->find( pattern, f );
return true;
}
@@ -911,6 +905,5 @@ void SearchCommand::processText( Kate::V
v->setCursorPositionInternal( v->selStartLine(), v->selStartCol() );
- if ( ! v->find( pattern, m_ifindFlags, false ) )
- KNotifyClient::beep();
+ v->find( pattern, m_ifindFlags, false );
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic