Fix wxWindowAccessible compilation with wxUSE_HELP==0

wxWindow::GetHelpTextAtPoint() can't be used in this case, add missing checks
for wxUSE_HELP around it.
This commit is contained in:
René Kijewski 2017-01-10 22:48:35 +01:00 committed by VZ
parent e811c0640a
commit 9c796670eb

View File

@ -3886,12 +3886,15 @@ wxAccStatus wxWindowAccessible::GetDescription(int WXUNUSED(childId), wxString*
{ {
wxCHECK( GetWindow() != NULL, wxACC_FAIL ); wxCHECK( GetWindow() != NULL, wxACC_FAIL );
#if wxUSE_HELP
wxString ht(GetWindow()->GetHelpTextAtPoint(wxDefaultPosition, wxHelpEvent::Origin_Keyboard)); wxString ht(GetWindow()->GetHelpTextAtPoint(wxDefaultPosition, wxHelpEvent::Origin_Keyboard));
if (!ht.empty()) if (!ht.empty())
{ {
*description = ht; *description = ht;
return wxACC_OK; return wxACC_OK;
} }
#endif // wxUSE_HELP
return wxACC_NOT_IMPLEMENTED; return wxACC_NOT_IMPLEMENTED;
} }
@ -3900,12 +3903,15 @@ wxAccStatus wxWindowAccessible::GetHelpText(int WXUNUSED(childId), wxString* hel
{ {
wxCHECK( GetWindow() != NULL, wxACC_FAIL ); wxCHECK( GetWindow() != NULL, wxACC_FAIL );
#if wxUSE_HELP
wxString ht(GetWindow()->GetHelpTextAtPoint(wxDefaultPosition, wxHelpEvent::Origin_Keyboard)); wxString ht(GetWindow()->GetHelpTextAtPoint(wxDefaultPosition, wxHelpEvent::Origin_Keyboard));
if (!ht.empty()) if (!ht.empty())
{ {
*helpText = ht; *helpText = ht;
return wxACC_OK; return wxACC_OK;
} }
#endif // wxUSE_HELP
return wxACC_NOT_IMPLEMENTED; return wxACC_NOT_IMPLEMENTED;
} }