diff -r 56cd8111b7f7 -r 41300fa6a67c src/gui/widgets/qtextedit.cpp --- a/src/gui/widgets/qtextedit.cpp Tue Jan 26 12:42:25 2010 +0200 +++ b/src/gui/widgets/qtextedit.cpp Tue Feb 02 00:43:10 2010 +0200 @@ -116,9 +116,6 @@ preferRichText = false; showCursorOnInitialShow = true; inDrag = false; -#ifdef Q_WS_WIN - setSingleFingerPanEnabled(true); -#endif } void QTextEditPrivate::createAutoBulletList() @@ -161,6 +158,8 @@ QObject::connect(control, SIGNAL(selectionChanged()), q, SIGNAL(selectionChanged())); QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SIGNAL(cursorPositionChanged())); + QObject::connect(control, SIGNAL(textChanged()), q, SLOT(updateMicroFocus())); + QTextDocument *doc = control->document(); // set a null page size initially to avoid any relayouting until the textedit // is shown. relayoutDocument() will take care of setting the page size to the @@ -186,6 +185,9 @@ #ifndef QT_NO_CURSOR viewport->setCursor(Qt::IBeamCursor); #endif +#ifdef Q_WS_WIN + setSingleFingerPanEnabled(true); +#endif } void QTextEditPrivate::_q_repaintContents(const QRectF &contentsRect) @@ -530,7 +532,9 @@ when the property is set. If the text edit has another content type, it will not be replaced - by plain text if you call toPlainText(). + by plain text if you call toPlainText(). The only exception to this + is the non-break space, \e{nbsp;}, that will be converted into + standard space. By default, for an editor with no contents, this property contains an empty string. @@ -1210,7 +1214,9 @@ if (!hasEditFocus() && !(e->modifiers() & Qt::ControlModifier)) { if (e->text()[0].isPrint()) { setEditFocus(true); +#ifndef Q_OS_SYMBIAN clear(); +#endif } else { e->ignore(); return; @@ -1246,7 +1252,6 @@ return; } } -#endif // QT_NO_SHORTCUT if (!(tif & Qt::TextEditable)) { switch (e->key()) { @@ -1274,6 +1279,7 @@ } return; } +#endif // QT_NO_SHORTCUT { QTextCursor cursor = d->control->textCursor(); @@ -1574,7 +1580,8 @@ d->autoScrollTimer.stop(); ensureCursorVisible(); } - d->handleSoftwareInputPanel(e->button(), d->clickCausedFocus); + if (!isReadOnly() && rect().contains(e->pos())) + d->handleSoftwareInputPanel(e->button(), d->clickCausedFocus); d->clickCausedFocus = 0; } @@ -1672,7 +1679,9 @@ && QApplication::keypadNavigationEnabled() && !hasEditFocus()) { setEditFocus(true); +#ifndef Q_OS_SYMBIAN selectAll(); // so text is replaced rather than appended to +#endif } #endif d->sendControlEvent(e); @@ -1899,7 +1908,7 @@ \brief the tab stop width in pixels \since 4.1 - By default, this property contains a value of 80. + By default, this property contains a value of 80 pixels. */ int QTextEdit::tabStopWidth() const