Why std::string is used for the file paths?



Why std::string is used for the file paths?

Most of Miscellaneous Utility Functions (http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/group__MiscUtils.html),
Gio::File, Gtk::Image::set, Gdk::Pixbuf::create_from_file and so on.
Why not just use Glib:ustring everywhere?

For example, this simple code will cause a crash:
Gtk::Image image;
Glib::ustring path("image.png");
image.set(path);

Why I should write image.set(path.raw()); to prevent this crash?

Thanks.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]