aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktextcontrol_p_p.h
diff options
context:
space:
mode:
authorDan Cape <dcape@qnx.com>2015-08-13 14:59:52 -0400
committerDan Cape <dcape@qnx.com>2015-09-21 13:53:49 +0000
commit0f29340a10b9638666ded939b4f6bf3d891f1320 (patch)
treee96210a55e8847dc9022f263d5c8da67831f140a /src/quick/items/qquicktextcontrol_p_p.h
parent8614d4d8362e2fbc56f6b027d310a0d8f11a212f (diff)
TextEdit: selectedTextChanged not emitted when calling select 2nd time
qquicktextcontrol was only checking if the text was previous selected or not and if the current state matched the previous state it would not dispatch a selectedTextChanged event. This is wrong if you programmatically select text a second time with a different start or end of selection. You must notify that the selected text changed since visually you can see the highlight changed locations. When correcting this and creating a test case, it was seen that other tests had QEXPECT_FAIL set for this specific case. Upon further inspection, I could remove those calls and adjust the expected data that was set before the test (changing false to true). testing of tst_qquicktext: Totals: 182 passed, 0 failed, 0 skipped, 0 blacklisted testing of tst_qquicktextedit: Totals: 354 passed, 0 failed, 3 skipped, 0 blacklisted Task-number: QTBUG-38704 Change-Id: Ib5244dc264ab76951bb722a31dcb64717282725a Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/quick/items/qquicktextcontrol_p_p.h')
-rw-r--r--src/quick/items/qquicktextcontrol_p_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/items/qquicktextcontrol_p_p.h b/src/quick/items/qquicktextcontrol_p_p.h
index 4c3e03a552..3c2e579737 100644
--- a/src/quick/items/qquicktextcontrol_p_p.h
+++ b/src/quick/items/qquicktextcontrol_p_p.h
@@ -156,6 +156,9 @@ public:
bool hasImState : 1;
bool cursorRectangleChanged : 1;
+ int lastSelectionStart;
+ int lastSelectionEnd;
+
void _q_copyLink();
};