[Qt-interest] QFileInfo returning wrong value in != operator
Scott Aron Bloom
Scott.Bloom at onshorecs.com
Mon Aug 15 22:43:34 CEST 2011
I believe there is a bug on this, (or there was that I filed years ago)
It stems from the fact that operator == (and !=) use (or used to)
canonicalPath, which returns empty string if the file does not exist
My bug suggeste it be documented that the results are unknown if the
files don't exist
Scott
From: qt-interest-bounces+scott.bloom=onshorecs.com at qt.nokia.com
[mailto:qt-interest-bounces+scott.bloom=onshorecs.com at qt.nokia.com] On
Behalf Of Eric Clark
Sent: Monday, August 15, 2011 12:09 PM
To: Qt Interest (qt-interest at trolltech.com)
Subject: [Qt-interest] QFileInfo returning wrong value in != operator
Hello All,
I am currently using Qt 4.7.1 and I am running into a problem with
QFileInfo. I have two instances of QFileInfo and they both point to
different files. However, the == operator keeps saying they are the
same. Here is the exact paths of the two files:
1. C:/Users/eclark/EndgameFramework/FourStoryDemo.db
2. C:/Users/eclark/EndgameFramework/test.db
The two files are clearly different. However, QFileInfo keeps saying
they are the same. The only thing I could see that may be a problem is
the fact that the files do not exist yet. Does the == operator check for
existence? Does anyone know why this would be happening?
Thanks in Advance!
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110815/497b38f5/attachment.html
More information about the Qt-interest-old
mailing list