Split single/multi line behaviour in Qt wxTextCtrl
Introduce wxQtEdit class and wxQtMultiLineEdit and wxQtSingleLineEdit derived classes instead of using ifs in many wxTextCtrl methods, making the code more clear and maintainable. Also fix some wxTextCtrl-related unit test failures with wxQt and disable some other ones which still don't pass. Closes https://github.com/wxWidgets/wxWidgets/pull/1039
This commit is contained in:
committed by
Vadim Zeitlin
parent
3b6fcbab6d
commit
0fbf87d11b
@@ -45,17 +45,25 @@ void TextEntryTestCase::TextChangeEvents()
|
||||
wxTextEntry * const entry = GetTestEntry();
|
||||
|
||||
// notice that SetValue() generates an event even if the text didn't change
|
||||
#ifndef __WXQT__
|
||||
entry->SetValue("");
|
||||
CPPUNIT_ASSERT_EQUAL( 1, updated.GetCount() );
|
||||
updated.Clear();
|
||||
#else
|
||||
WARN("Events are only sent when text changes in WxQt");
|
||||
#endif
|
||||
|
||||
entry->SetValue("foo");
|
||||
CPPUNIT_ASSERT_EQUAL( 1, updated.GetCount() );
|
||||
updated.Clear();
|
||||
|
||||
#ifndef __WXQT__
|
||||
entry->SetValue("foo");
|
||||
CPPUNIT_ASSERT_EQUAL( 1, updated.GetCount() );
|
||||
updated.Clear();
|
||||
#else
|
||||
WARN("Events are only sent when text changes in WxQt");
|
||||
#endif
|
||||
|
||||
entry->SetValue("");
|
||||
CPPUNIT_ASSERT_EQUAL( 1, updated.GetCount() );
|
||||
|
Reference in New Issue
Block a user