PDA

View Full Version : QFileDialog::getSaveFileName produces GTK warning for non-existent files



colinb
20th February 2012, 12:52
On my system, the getSaveFileName convenience function in QFileDialog triggers a GTK warning on the console when the name of a non-existent file is entered:

(my-binary:30000): Gtk-WARNING **: Unable to retrieve the file info for `file:///home/colinb/test.txt': Error stating file '/home/colinb/test.txt': No such file or directory
It seems harmless, but I'd like to understand it and prevent it if possible. My system is Qt 4.7.4 and Openbox (no Gnome or KDE) on Ubuntu 11.10. Any ideas?

EDIT: It looks like this is probably due to Qt using the "native" file dialog on my system, which is probably the GTK dialog. GTK must have debugging statements turned on.

--Colin