[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    RE: [patch] kaction small bug with KRecentFilesAction
From:       "Caleb Tennis" <caleb () aei-tech ! com>
Date:       2002-07-26 17:30:33
[Download RAW message or body]




>
> Oooooooops! It's there - but only on my computer. I didn't commit :(
> Can you test if this fixes the bug for you? I'll commit, if so.
>
> Index: kaction.cpp
> ===================================================================
> RCS file: /home/kde/kdelibs/kdeui/kaction.cpp,v
> retrieving revision 1.285
> diff -u -p -r1.285 kaction.cpp
> - --- kaction.cpp 2002/07/25 18:00:51     1.285
> +++ kaction.cpp 2002/07/26 15:12:41
> @@ -2238,6 +2238,12 @@ void KRecentFilesAction::saveEntries( KC
>          value = lst[ i - 1 ];
>          config->writeEntry( key, value );
>      }
> +    // clear old entries
> +    for( unsigned int i = lst.count() + 1 ; i <= d->m_maxItems ; i++ )
> +    {
> +        key = QString( "File%1" ).arg( i );
> +        config->writeEntry( key, QString::null );
> +    }
>
>      config->setGroup( oldGroup );
>  }

I tested this patch and it has two, in my opinion, undesirable results:

1) It creates a bunch of unnecessary empty "File:" statments in the
RecentFiles list.  If I only had two or three in there to begin with, this
will automatically fill the rest up with blanks.  This leads to problem 2...

2) It looks like the loadEntries code will parse out null values, however
the software program I tested this on (Gideon) didn't seem to fully work as
expected.  In place of the File3: (which I did a removeURL on) was a thick
separator bar.  This isn't particularly bad, and may be a function of the
end program and not krecentfilesaction.  I may investigate this a bit more.

In summary, it works, but did the aforementioned items.  If those aren't big
deals (particularly #1) then I'd say commit it.  I'm not as familiar with
the interworkings of the kde code so I don't know if there's any desire to
minimize the amount of stuff in a rc file or not.

Caleb

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic