Refactor wxTextEntry to use MSWEnsureHasAutoCompleteData()
The new function has more clear semantics than GetOrCreateCompleter() which both returned the completer value and set m_autoCompleteData to it as a side effect. MSWEnsureHasAutoCompleteData() still does the latter, but returns just a boolean indicating whether it succeeded or failed, making using it more straightforward. No real changes.
This commit is contained in:
@@ -100,9 +100,9 @@ private:
|
||||
// be called and the default implementation asserts if this is not the case.
|
||||
virtual void MSWProcessSpecialKey(wxKeyEvent& event);
|
||||
|
||||
// Get the auto-complete object creating it if necessary. Returns NULL if
|
||||
// creating it failed.
|
||||
wxTextAutoCompleteData *GetOrCreateCompleter();
|
||||
// Check that we have auto-complete data, creating it if necessary. Returns
|
||||
// false if creating it failed.
|
||||
bool MSWEnsureHasAutoCompleteData();
|
||||
|
||||
// Various auto-completion-related stuff, only used if any of AutoComplete()
|
||||
// methods are called. Use the function above to access it.
|
||||
|
Reference in New Issue
Block a user