KItemListKeyboardSearchManager and QApplication::keyboardInputInterval()

Frank Reininghaus frank78ac at googlemail.com
Wed Mar 28 18:46:23 BST 2012


Hi,

Am 28. März 2012 17:05 schrieb Peter Penz:
> On 03/28/2012 03:40 PM, Frank Reininghaus wrote:
> [...]
>>
>> So I would suggest to split this into two parts:
>>
>>
>> 1. Bug fix part: Increase the timeout to a larger value (Nautilus' 5
>> seconds seem quite reasonable to me) in the 4.8 branch.
>
>
> Sounds good!

thanks, I did this now [1]. The only downside is that the unit test,
which checks that the search is cancelled when nothing happens during
the timeout, now takes more than 5 seconds to complete, which is a
waste of time IMHO - I run the tests quite often, and I hope that I'm
not the only one :-)

There are two ways out of this:

a) Remove that part of the test.
b) Add some API to set KItemListKeyboardSearchManager's timeout to a
custom value (initialised to 5000 ms in the constructor), which the
unit test would then make quite small.

In spite of the added complexity, b) seems better from a testing point
of view, and it would also make it clear that a timeout exists when
looking at the header file only. Any objections?

Cheers,
Frank

[1] http://quickgit.kde.org/?p=kde-baseapps.git&a=commit&h=02eab49b2de51c31fe46a0d9501327b579b3648e




More information about the kfm-devel mailing list