Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#254 closed defect (fixed)

QDir::cleanPath not working correctly

Reported by: rudi Owned by:
Priority: major Milestone: Qt 4.7
Component: QtCore Version:
Severity: low Keywords:
Cc:

Description

QDir::cleanPath("E:\\\\Qt\\\\4.7.3")

will give an unexpected result.

Attachments (2)

qdir.diff (403 bytes) - added by rudi 8 years ago.
Workaround that keeps our changes
Captured2.png (60.9 KB) - added by dmik 8 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 8 years ago by dmik

Hmm, you basically reverted r1042 -) This is not correct; r1042 fixes a fundamental bug in Qt that cost me a lot of time to find and fix. Everything what is necessary in this case is to express that the path with the drive letter is not a network share, see r1084.

But thanks for noticing! It's a tiny regression of r1042.

P.S. The person who wrote QDir::cleanPath() should be seriously punished. I don't know how many hours you need to understand what exactly this code does. This task may be accomplished by a 10 times simpler function...

comment:2 Changed 8 years ago by dmik

  • Resolution set to fixed
  • Status changed from new to closed

comment:3 Changed 8 years ago by rudi

So we don't do something about the mentioned problem ?

QDir::cleanPath("E:\\\\Qt\\\\4.7.3") -> "e://Qt/4.7.3"

BTW, we see this in Creator's options dialog. When hovering the mouse over an given Qt Version, the source location in the popup window will express exactly this.

Changed 8 years ago by rudi

Workaround that keeps our changes

comment:4 Changed 8 years ago by rudi

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:5 Changed 8 years ago by dmik

  • Resolution set to fixed
  • Status changed from reopened to closed

Hmm, didn't you rebuild your QtCore4.dll? The issue has been fixed by r1084.

qDebug() << QDir::cleanPath("E:\\\\Qt\\\\4.7.3")

prints

E:/Qt/4.7.3

here. And Qt Creator also works (see the attachment).

Version 1, edited 8 years ago by dmik (previous) (next) (diff)

Changed 8 years ago by dmik

comment:6 Changed 8 years ago by rudi

You are right ! I had an issue here with the timestamp of a local modification...

Note: See TracTickets for help on using tickets.