Trolltech Home | Qt-jambi-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-jambi-interest Archive, November 2007
bug in QFileInfo


Message 1 in thread

Hi,

I think there is a bug in QFileInfo.lastRead()

when I do:
System.out.println(info.lastRead());
it prints:
di apr 24 12:19:52 2007

and when I check the month it is actually the 5th of the year not the 4th, so 
I shows the incorrect month.

Thomas


Message 2 in thread

thomas wrote:
> when I do:
> System.out.println(info.lastRead());
> it prints:
> di apr 24 12:19:52 2007
>
> and when I check the month it is actually the 5th of the year not the 4th, so 
> I shows the incorrect month.
>   
Hi, Thomas.

When you say "check the month" do you mean that you check 
info.lastRead().date().month() and this equals 5?

Or is the entire QDateTime object that you get from lastRead() busted 
compared to "last accessed" date you get when listing the file manually 
in a different application?

Also, could you let me know which platform you are on, please, and which 
locale you are in (german, dutch, ...?)

-- Eskil


Message 3 in thread

On Tuesday 20 November 2007 18:16:06 you wrote:
> thomas wrote:
> > when I do:
> > System.out.println(info.lastRead());
> > it prints:
> > di apr 24 12:19:52 2007
> >
> > and when I check the month it is actually the 5th of the year not the
> > 4th, so I shows the incorrect month.
>
> Hi, Thomas.
>
> When you say "check the month" do you mean that you check
> info.lastRead().date().month() and this equals 5?
>
> Or is the entire QDateTime object that you get from lastRead() busted
> compared to "last accessed" date you get when listing the file manually
> in a different application?
>
> Also, could you let me know which platform you are on, please, and which
> locale you are in (german, dutch, ...?)
>
> -- Eskil

Hi, I can't reproduce it anymore, I searched for more than an hour to 
reproduce it, but it just works all the time.  that's a good thing offcourse.
But I am sure I was not correct because I still have the output of ls -lha and 
it shows :

-rw-r--r-- 1 thomas thomas 498K 2007-05-24 12:19 test.png

(I noticed this first in dolphin, but I wondered if maybe dolphin was wrong so 
I checked with ls)

and as you can see in my mail:

> > System.out.println(info.lastRead());
> > it prints:
> > di apr 24 12:19:52 2007

my locale is nl_BE
and I'm on kubuntu gutsy, and use eclipse 3.3.1 with the downloaded qtjambi 
files (not the ones with Kubuntu)

I'm sorry that I can't reproduce, should have tested it more before...

Thomas