Opened 10 years ago
Last modified 6 years 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: | ||
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 by , 10 years ago
Summary: | Alert _text field archived but never instantiated → Alert _text field archived but never instantiated [easy] |
---|
comment:2 by , 10 years ago
Summary: | Alert _text field archived but never instantiated [easy] → Alert _text field archived but never instantiated (easy) |
---|
comment:3 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
follow-up: 5 comment:4 by , 6 years ago
comment:5 by , 6 years ago
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 by , 6 years ago
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.
follow-up: 8 comment:7 by , 6 years ago
Is it about calling "BAlert::Instantiate(BMessage* data)" inside "BAlert::BAlert(BMessage* data)" function?
comment:8 by , 6 years ago
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.
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