[PATCH] Fix KLineEdit::rotateText to actually complete.

Allen Winter winter at kde.org
Tue May 6 14:41:41 BST 2008


On Friday 18 April 2008 13:24:55 Kelvie Wong wrote:
> Because input is never set, the skip rotation condition is always true.
>
> This seemed to be broken by r231422 (from 2003), which changed it from a
> ternary expression to an "if" statement.
>
> Not sure if it's used anywhere though, but it seems like a bug.

Does seem like a bug.
Should we commit this?

> ---
>  kdeui/widgets/klineedit.cpp |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kdeui/widgets/klineedit.cpp b/kdeui/widgets/klineedit.cpp
> index 05fa31d..0b7ce03 100644
> --- a/kdeui/widgets/klineedit.cpp
> +++ b/kdeui/widgets/klineedit.cpp
> @@ -383,9 +383,9 @@ void KLineEdit::rotateText(
> KCompletionBase::KeyBindingType type ) QString input;
>
>         if (type == KCompletionBase::PrevCompletionMatch)
> -          comp->previousMatch();
> +	   input = comp->previousMatch();
>         else
> -          comp->nextMatch();
> +	   input = comp->nextMatch();
>
>         // Skip rotation if previous/next match is null or the same text
>         if ( input.isEmpty() || input == displayText() )






More information about the kde-core-devel mailing list