After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 164113 - Feature Request: DirectoryHandle::read_next() return null RefPtr instead of 'exist' arg
Feature Request: DirectoryHandle::read_next() return null RefPtr instead of '...
Status: RESOLVED FIXED
Product: gnome-vfsmm
Classification: Deprecated
Component: general
git master
Other All
: Low enhancement
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2005-01-14 22:18 UTC by Michael J M Thomson
Modified: 2011-01-16 23:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for above feature (1.17 KB, patch)
2005-01-16 19:51 UTC, Michael J M Thomson
none Details | Review
Again, as overloaded read_next() function (1.03 KB, patch)
2005-01-16 20:02 UTC, Michael J M Thomson
none Details | Review

Description Michael J M Thomson 2005-01-14 22:18:26 UTC
Currently, the following has to be done:

bool exist;
Glib::RefPtr<Gnome::Vfs::FileInfo> info;
while ((info = directory_handle.read_next(exist)) && exist) {
  ...
}

The 'exist' argument is cumbersome and seems redundant. Compare if instead
read_next() just returned a null RefPtr, the above could be:

Glib::RefPtr<Gnome::Vfs::FileInfo> info;
while (info = directory_handle.read_next()) {
  ...
}
Comment 1 Michael J M Thomson 2005-01-16 19:51:05 UTC
Created attachment 36106 [details] [review]
Patch for above feature
Comment 2 Michael J M Thomson 2005-01-16 20:02:26 UTC
Created attachment 36108 [details] [review]
Again, as overloaded read_next() function
Comment 3 Murray Cumming 2005-02-01 19:37:48 UTC
This looks good, but unfortunately it has missed the API freeze for GNOME
2.9/2.10. I will apply it when we start GNOME 2.11/2.12 in March.
Comment 4 Murray Cumming 2005-04-15 10:58:47 UTC
Applied to HEAD. Thanks. Please patch the Changelog and create a cvs diff next time:
http://www.gtkmm.org/bugs.shtml#CreatingPatches