Bug 117217 - autocomplete in composer completes section title instead of email-address
Summary: autocomplete in composer completes section title instead of email-address
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-28 18:34 UTC by Leo Savernik
Modified: 2007-09-14 12:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leo Savernik 2005-11-28 18:34:46 UTC
Version:            (using KDE KDE 3.5.0)
Installed from:    Compiled From Sources

For a long time, KMail's composer allows email-addresses be autocompleted in every url-bar. This feature worked very well.

Since KDE 3.5, the autocomplete list got section headers like "Most recently used" intermingled with the actual email-addresses.

Let's assume my fictitious mru-list looks like this:

aberer@invalid
beberer@invalid
ceberer@invalid

Then under KDE 3.5, this list would look like this in the autocomplete-dropdown:

Most recently used:
  aberer@invalid
  beberer@invalid
  ceberer@invalid

where the "Most recently used" comprises a normal line.

The problem is now that the first line will be automatically eligible for autocompletion.

For reproduction, I will refer to this ficitious list, but every mru list with at least one email-address starting with 'a' will do.

Steps to reproduce:
1. Open new composer
2. Navigate to url-bar
3. Enter 'a' (without the quotes, of course)
4. Hit tab

Expected results:
The url-bar will be autocompleted with "aberer@invalid"

Actual results:
The url-bar is autocompleted with "Most recently used"

This is quite a big usability-regression.
Comment 1 Thiago Macieira 2005-11-29 01:27:28 UTC
I can reproduce this.
Comment 2 David Faure 2005-11-29 15:03:54 UTC
SVN commit 484134 by dfaure:

Handle <tab> like <arrow down> in completion list, to skip section headers
BUG: 117217


 M  +2 -2      addresseelineedit.cpp  


--- branches/KDE/3.5/kdepim/libkdepim/addresseelineedit.cpp #484133:484134
@@ -805,7 +805,7 @@
   if ( ( obj == this ) &&
      ( e->type() == QEvent::AccelOverride ) ) {
     QKeyEvent *ke = static_cast<QKeyEvent*>( e );
-    if ( ke->key() == Key_Up || ke->key() == Key_Down ) {
+    if ( ke->key() == Key_Up || ke->key() == Key_Down || ke->key() == Key_Tab ) {
       ke->accept();
       return true;
     }
@@ -834,7 +834,7 @@
         }
         return true;
       }
-    } else if ( ke->key() == Key_Down ) {
+    } else if ( ke->key() == Key_Down || ke->key() == Key_Tab ) {
       // same strategy for downwards
       //kdDebug() << "EVENTFILTER: Key_Down. currentIndex=" << currentIndex << endl;
       QListBoxItem *itemBelow = completionBox()->item( currentIndex + 1 );