Bug 133092

Summary: "Move message to folder" dialog does not accept 'ä' and 'ö'
Product: [Applications] kmail Reporter: Kari Oikarinen <kluge>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: larkang
Priority: NOR    
Version: 1.9.3   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Patch

Description Kari Oikarinen 2006-08-27 22:30:01 UTC
Version:           1.9.3 (using KDE KDE 3.5.4)
Installed from:    Debian testing/unstable Packages
OS:                Linux

"Move message to folder" dialog is accessed with the keyboard shortcut 'M'. It allows one to filter folders by typing in a (start of) folder name. However, characters 'ä' and 'ö' are not accepted.

These characters are normal and common characters in Finnish, not being able to use them reduces the usefulness of this dialog. While trying out, I found that 'å' is also not accepted. It's not really necessary for me, but some Swedes might appreciate allowing it, too.

Of course this problem might affect other non-ASCII characters as well, but these are the ones present on my keyboard.
Comment 1 Richard Lärkäng 2006-12-27 13:28:48 UTC
Confirmed here, the problem seems to be in kmfolderseldlg.cpp which only works for ascii characters:

void SimpleFolderTree::keyPressEvent( QKeyEvent *e ) {
  int ch = e->ascii();

  if ( ch >= 32 && ch <= 126 )
    applyFilter( mFilter + ch );

  else if ( ch == 8 || ch == 127 ) {
    if ( mFilter.length() > 0 ) {
      mFilter.truncate( mFilter.length()-1 );
      applyFilter( mFilter );
    }
  }

  else
    KListView::keyPressEvent( e );
}
Comment 2 Richard Lärkäng 2006-12-27 18:51:00 UTC
Created attachment 19048 [details]
Patch

Here's a patch that should fix the problem. Ok to commit?
Comment 3 Thomas McGuire 2008-05-04 17:27:11 UTC
SVN commit 803952 by tmcguire:

Also allow to input umlauts and other printable characters.

Based on patch by Richard Lärkäng, thanks!

BUG: 133092


 M  +5 -5      folderselectiontreewidget.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=803952