Opened 5 years ago

Last modified 4 weeks ago

#11138 assigned bug

Alert _text field archived but never instantiated (easy)

Reported by: Eddy Owned by: nobody
Priority: normal Milestone: R1
Component: Kits/Interface Kit Version: R1/Development
Keywords: BAlert _text archive Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

In Alert.cpp, the _text field is archived but never restored in the BAlert::BAlert(BMessage* data) function.

Change History (8)

comment:1 Changed 5 years ago by pulkomandy

Summary: Alert _text field archived but never instantiatedAlert _text field archived but never instantiated [easy]

comment:2 Changed 4 years ago by pulkomandy

Summary: Alert _text field archived but never instantiated [easy]Alert _text field archived but never instantiated (easy)

comment:3 Changed 2 years ago by axeld

Owner: changed from axeld to nobody
Status: newassigned

comment:5 in reply to:  4 Changed 4 weeks ago by khyati-agarwalss

Replying to korli:

Code pointers: https://git.haiku-os.org/haiku/tree/src/kits/interface/Alert.cpp#n188 https://git.haiku-os.org/haiku/tree/src/kits/interface/Alert.cpp#n135

Test case example: https://git.haiku-os.org/haiku/tree/src/tests/kits/app/bhandler/BHandlerTester.cpp => new test case: src/tests/kits/interface/balert/BAlertTester.cpp

There is no _text variable in Alert.cpp, how should I use it in Instantiate function?

comment:6 Changed 4 weeks ago by korli

I would code an archive unit test, and compare with BeOS R5. The _text is actually part of the text view in Haiku, maybe it's different in R5.

comment:7 Changed 4 weeks ago by khyati-agarwalss

Is it about calling "BAlert::Instantiate(BMessage* data)" inside "BAlert::BAlert(BMessage* data)" function?

comment:8 in reply to:  7 Changed 4 weeks ago by korli

Replying to khyati-agarwalss:

Is it about calling "BAlert::Instantiate(BMessage* data)" inside "BAlert::BAlert(BMessage* data)" function?

No, please first create a unit test, calling Archive() on a BAlert, dump the resulting BMessage, then instantiate a BAlert using the archive.

Note: See TracTickets for help on using tickets.