]> git.lyx.org Git - features.git/commitdiff
Use long path names when comparing FileNames
authorPeter Kümmel <syntheticpp@gmx.net>
Sun, 5 Oct 2008 12:08:21 +0000 (12:08 +0000)
committerPeter Kümmel <syntheticpp@gmx.net>
Sun, 5 Oct 2008 12:08:21 +0000 (12:08 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26745 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/FileName.cpp

index 8e51a4a92eb212f0de8d054250fc5ac43235ca2d..cde0c145aecdf7eb77d41c075a5c80d57a39a0e6 100644 (file)
@@ -916,12 +916,15 @@ docstring const FileName::relPath(string const & path) const
 }
 
 
-bool operator==(FileName const & lhs, FileName const & rhs)
+bool operator==(FileName const & l, FileName const & r)
 {
-       // FIXME: We need to solve this warning from Qt documentation:
+       // FIXME: In future use Qt.
+       // Qt 4.4: We need to solve this warning from Qt documentation:
        // * Long and short file names that refer to the same file on Windows are
        //   treated as if they referred to different files.
        // This is supposed to be fixed for Qt5.
+       FileName const lhs(os::internal_path(l.absFilename()));
+       FileName const rhs(os::internal_path(r.absFilename()));
 
        if (lhs.empty())
                // QFileInfo::operator==() returns false if the two QFileInfo are empty.