From bda2f4bdd855fddf6bd456efa0389e65eecb8c91 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Tue, 3 Jan 2012 10:37:26 +1000 Subject: Speed up TextInput and TextEdit creation. Update the canPaste property directly when changing the read-only property instead of connecting to the readOnlyChanged signal. Change-Id: Ic6f6ba66f6b94448045703f7d2a66218548190dd Reviewed-by: Martin Jones --- src/quick/items/qquicktextedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quick/items/qquicktextedit.cpp') diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp index c25f305ec5..9977f60519 100644 --- a/src/quick/items/qquicktextedit.cpp +++ b/src/quick/items/qquicktextedit.cpp @@ -1160,6 +1160,7 @@ void QQuickTextEdit::setReadOnly(bool r) if (!r) d->control->moveCursor(QTextCursor::End); + q_canPasteChanged(); emit readOnlyChanged(r); } @@ -1658,7 +1659,6 @@ void QQuickTextEditPrivate::init() QObject::connect(control, SIGNAL(cursorRectangleChanged()), q, SLOT(moveCursorDelegate())); QObject::connect(control, SIGNAL(linkActivated(QString)), q, SIGNAL(linkActivated(QString))); #ifndef QT_NO_CLIPBOARD - QObject::connect(q, SIGNAL(readOnlyChanged(bool)), q, SLOT(q_canPasteChanged())); QObject::connect(QGuiApplication::clipboard(), SIGNAL(dataChanged()), q, SLOT(q_canPasteChanged())); #endif -- cgit v1.2.3