Opened 15 months ago

Closed 15 months ago

Last modified 15 months ago

#15494 closed enhancement (fixed)

wxFile/wxFFile Detach() return value

Reported by: troelsk Owned by: vadz
Priority: normal Milestone:
Component: base Version: stable-latest
Keywords: wxFile wxFFile Cc:
Blocked By: Blocking:
Patch: yes

Description

Add return value, in line with other similar detach methods
(wxFSFile.DetachStream, wxSafeArrayBase.Detach, wxProtocol.DetachLog, wxXmlDocument.DetachRoot etc)

Additional patch:
Bring wxFFile and wxFile implemntations in line (ie camel case, Open() not touching member data if unsuccessful)

Attachments (2)

detach.patch download (2.1 KB) - added by troelsk 15 months ago.
Detach return value
align.patch download (1.3 KB) - added by troelsk 15 months ago.
Align wxFFile implementation with that of wxFile

Download all attachments as: .zip

Change History (5)

Changed 15 months ago by troelsk

Detach return value

Changed 15 months ago by troelsk

Align wxFFile implementation with that of wxFile

comment:1 Changed 15 months ago by vadz

  • Owner set to vadz
  • Status changed from new to accepted

Thanks, I'll apply the first patch and parts of the second one but I'm not going to rename variables, this is not very productive and if we really want to do this, it should be done globally in a separate commit.

comment:2 Changed 15 months ago by VZ

  • Resolution set to fixed
  • Status changed from accepted to closed

(In [74798]) Return the old file descriptor/pointer from wx(F)File::Detach().

Make Detach() more convenient to use.

Closes #15494.

comment:3 Changed 15 months ago by VZ

(In [74799]) Don't reset m_fp if wxFFile::Open() fails.

This makes it behaviour consistent with wxFile::Open().

Also don't use Detach() in Close(), again for consistency with wxFile, even if
this has no user-visible effects at all.

See #15494.

Note: See TracTickets for help on using tickets.