diff --git a/ANNOUNCE b/ANNOUNCE index e5675bf0c4..77bd16aefa 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -269,6 +269,8 @@ What's new in version 1.6.2? - Fix the use of regular expressions to avoid crashes with Qt4.5. +- Fix an infinite loop when creating multiple unnamed files with Qt4.5. + - Ignore the master_buffer setting in Document>Settings if the current document is no real child. This fixes a crash when using the outliner in such files (bug 5653). diff --git a/src/support/FileName.cpp b/src/support/FileName.cpp index 3bedc0475a..1beeb29194 100644 --- a/src/support/FileName.cpp +++ b/src/support/FileName.cpp @@ -944,7 +944,10 @@ bool operator==(FileName const & l, FileName const & r) if (!lhs.d->fi.isSymLink() && !rhs.d->fi.isSymLink()) { // Qt already checks if the filesystem is case sensitive or not. - return lhs.d->fi == rhs.d->fi; + return lhs.d->fi == rhs.d->fi + // This is needed as in Qt4.5, QFileInfo::operator== compares + // the location of the two files and not the files themselves. + && lhs.d->fi.fileName() == rhs.d->fi.fileName(); } // FIXME: When/if QFileInfo support symlink comparison, remove this code. @@ -954,7 +957,9 @@ bool operator==(FileName const & l, FileName const & r) QFileInfo fi2(rhs.d->fi); if (fi2.isSymLink()) fi2 = QFileInfo(fi2.symLinkTarget()); - return fi1 == fi2; + // This is needed as in Qt4.5, QFileInfo::operator== compares + // the location of the two files and not the files themselves. + return fi1 == fi2 && fi1.fileName() == fi2.fileName(); } diff --git a/status.16x b/status.16x index c3d385c7a8..072362a048 100644 --- a/status.16x +++ b/status.16x @@ -213,6 +213,8 @@ What's new - Fix the use of regular expressions to avoid crashes with Qt4.5. +- Fix an infinite loop when creating multiple unnamed files with Qt4.5. + - Ignore the master_buffer setting in Document>Settings if the current document is no real child. This fixes a crash when using the outliner in such files (bug 5653).