Results 1 to 2 of 2

Thread: QFile::rename()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2007
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QFile::rename()

    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.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QFile::rename()

    Notice that there are two versions of QFile::rename(). Did you, by any chance, use the static one by accident?
    J-P Nurmi

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.