summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorJoona Petrell <joona.t.petrell@nokia.com>2011-03-08 00:16:18 (GMT)
committerJoona Petrell <joona.t.petrell@nokia.com>2011-03-08 00:16:18 (GMT)
commitc783cbfe3839d7a4c0f75613d2a94e8cfb7a29d1 (patch)
treeee82d1dd01085ebea39df116e1a356490dc2198d /src/declarative
parent38a3d51593bb5591c7c4f6d51d7d9fa203b4d56e (diff)
parent88c4bd4d5fc25a58d3b71c540acd6f2484c3a9a3 (diff)
downloadQt-c783cbfe3839d7a4c0f75613d2a94e8cfb7a29d1.zip
Qt-c783cbfe3839d7a4c0f75613d2a94e8cfb7a29d1.tar.gz
Qt-c783cbfe3839d7a4c0f75613d2a94e8cfb7a29d1.tar.bz2
Merge branch '4.7' into qtquick11
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp1
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index 7a75ece..75a22d1 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -1562,6 +1562,7 @@ void QDeclarativeTextEditPrivate::init()
#ifndef QT_NO_CLIPBOARD
QObject::connect(q, SIGNAL(readOnlyChanged(bool)), q, SLOT(q_canPasteChanged()));
QObject::connect(QApplication::clipboard(), SIGNAL(dataChanged()), q, SLOT(q_canPasteChanged()));
+ canPaste = control->canPaste();
#endif
document = control->document();
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index 0deffe9..6305eaa 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -1861,6 +1861,7 @@ void QDeclarativeTextInputPrivate::init()
q, SLOT(q_canPasteChanged()));
q->connect(QApplication::clipboard(), SIGNAL(dataChanged()),
q, SLOT(q_canPasteChanged()));
+ canPaste = !control->isReadOnly() && QApplication::clipboard()->text().length() != 0;
#endif // QT_NO_CLIPBOARD
q->connect(control, SIGNAL(updateMicroFocus()),
q, SLOT(updateMicroFocus()));