Re: OPIE addressbook

From: Mike Crawford <mike.a.t.tuxnami.org>
Date: Wed Jun 05 2002 - 14:14:33 EDT

Yup, my own dumb fault. I shouldn't be returning there. Got that
patched up in the latest version out on the CVS.

On Wed, 2002-06-05 at 00:41, Oliver Fels wrote:
> Mike Crawford wrote:
>
> > I am aware of this bug. I have yet to find the source of it, but I
> > should be able to find it relitively soon.
>
> I have found parts of the bug so before you look too far- here are some hints.
>
> contacteditor.cpp:
>
> void ContactEditor::saveEntry() {
>
> if ( useFullName == TRUE ) {
> txtFirstName->setText( parseName( txtFullName->text(), NAME_F ) );
> txtMiddleName->setText( parseName( txtFullName->text(), NAME_M ) );
> txtLastName->setText( parseName( txtFullName->text(), NAME_L ) );
> txtSuffix->setText( parseName( txtFullName->text(), NAME_S ) );
>
> useFullName = FALSE;
> }
> [...]
> }
>
> It calls 4 times parseName with the same string- though with a different
> parse mode. However this fails in parseName:
>
>
> QString ContactEditor::parseName( const QString fullName, int type ) {
>
> [...]
> commapos = simplifiedName.find( ',', 0, TRUE);
> spCount = simplifiedName.contains( ' ', TRUE );
> if ( commapos == -1 ) {
>
> switch (spCount) {
> case 0:
> return simplifiedName;
>
> case 1:
> [...]
>
> As commapos==-1 is true and it does not find spaces spCounbt is 0 and it
> simply returns the simplifiedName which is the string entered- 4 times.
>
> So here is the bug.
>
> Regards,
>
> Oliver
Received on Wed Jun 05 18:17:53 2002

This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:50:07 EDT