From 3db5afa71443533eee6825a5fb0da29498f96b94 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Tue, 20 Dec 2011 17:21:55 +1000 Subject: Delay initializing the canPaste property until it's requested. With xcb querying data from the clipboard can take as long as 50 ms. Deferring the check until it is requested speeds up construction time when it's not used and only checking the available formats when it is requested should also help. Change-Id: I796fc83d0457d9ac1490cfb9f510c6342eb8a872 Reviewed-by: Martin Jones --- src/quick/items/qquicktextinput_p_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/quick/items/qquicktextinput_p_p.h') diff --git a/src/quick/items/qquicktextinput_p_p.h b/src/quick/items/qquicktextinput_p_p.h index 804adf4e62..fafb1819ba 100644 --- a/src/quick/items/qquicktextinput_p_p.h +++ b/src/quick/items/qquicktextinput_p_p.h @@ -112,6 +112,7 @@ public: , autoScroll(true) , selectByMouse(false) , canPaste(false) + , canPasteValid(false) , hAlignImplicit(true) , selectPressed(false) , textLayoutDirty(true) @@ -235,6 +236,7 @@ public: bool autoScroll:1; bool selectByMouse:1; bool canPaste:1; + bool canPasteValid:1; bool hAlignImplicit:1; bool selectPressed:1; bool textLayoutDirty:1; -- cgit v1.2.3