Your change is not a "correct" fix. What it does is not show the extension being added. The dialog is supposed to show the extension being added, and it works on Windows, OS X, KDE. Furthermore it is the correct was to use QFileDialog as per the official Qt documentation:
http://developer.qt.nokia.com/doc/qt...iledialog.html
Only some GNOME themes have problems with it, the fix needs to happen in them. Not showing the extensions reduces usability of the dialog.