PDA

View Full Version : QFile::rename()



Bagstone
15th February 2008, 09:56
Hi,

in one of my classes I use rename() on a QFile* object. After renaming (successfully) the fileName() value of the object still gives me the old name, thus making any operation to the object pointless unless I re-assign the correct filename with setFileName() to the object.

Is this intended to be handled this way by Trolltech or a bug?
Anyone else experienced this and/or has a solution or workaround for this?

Happened in 4.3.2 and heard from someone with 4.4 that it's the same problem there as well.

jpn
15th February 2008, 10:53
Notice that there are two versions of QFile::rename(). Did you, by any chance, use the static one by accident?