diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-09 03:48:47 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-09 03:48:47 (GMT) |
commit | dc6b5702e0c488bf51ca029290eb65604bfb1dd5 (patch) | |
tree | 5406596b1f92521f479895457aeb7cab4ee4ca0f /src | |
parent | 4dd45d7fe3064aa92c6c37f84c1ff0104495f328 (diff) | |
parent | bd24b4363239e23979695cb765918bdb1c865868 (diff) | |
download | Qt-dc6b5702e0c488bf51ca029290eb65604bfb1dd5.zip Qt-dc6b5702e0c488bf51ca029290eb65604bfb1dd5.tar.gz Qt-dc6b5702e0c488bf51ca029290eb65604bfb1dd5.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml:
Fix unstable qdeclarativeflickable test.
Update TextEdit's visible selection when only the anchor changes.
Set correct initial value for TextEdit and TextInput canPaste property
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextedit.cpp | 1 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextinput.cpp | 1 | ||||
-rw-r--r-- | src/gui/text/qtextcontrol.cpp | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index c28d7f4..d3c5b82 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -1469,6 +1469,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 8b21008..29b1f6b 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -1766,6 +1766,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())); diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index f4054d3..f5da079 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -284,7 +284,7 @@ bool QTextControlPrivate::cursorMoveKeyEvent(QKeyEvent *e) if (cursor.position() != oldCursorPos) emit q->cursorPositionChanged(); emit q->microFocusChanged(); - } else if (ignoreNavigationEvents && isNavigationEvent) { + } else if (ignoreNavigationEvents && isNavigationEvent && oldSelection.anchor() == cursor.anchor()) { return false; } |