summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextcontrol.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'qt/4.8'Jyri Tahtela2011-05-181-2/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/examples/wheel.qdoc src/gui/util/qflickgesture.cpp src/gui/util/qflickgesture_p.h src/gui/util/qscroller.cpp src/gui/util/qscroller.h src/gui/util/qscroller_p.h src/gui/util/qscrollerproperties.cpp src/gui/util/qscrollerproperties.h tests/auto/qscroller/tst_qscroller.cpp
| * Merge branch 4.7 into qt-4.8-from-4.7Qt Continuous Integration System2011-05-131-1/+1
| |\
| | * Make TextEdit word selection more natural.Andrew den Exter2011-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTextControl will only extend the selection to a word if the cursor is directly over it which prevents the selection being extended if the mouse is dragged up or down a to a shorter line of text making it difficult to select multiple lines of text. Just disable that limitation when the TextEdit word selection is enabled. Change-Id: I3b9d1575c0141db8441197d740de94a90eacc077 Task-number: QTBUG-19230 Reviewed-by: Martin Jones
| * | Merge branch 4.7 into qt-4.8-from-4.7Qt Continuous Integration System2011-05-121-1/+3
| |\ \ | | |/
| | * Ensure the TextEdit cursor delegate is repositioned on mouse events.Andrew den Exter2011-05-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Update the micro focus when a mouse press changes the cursor position of a read only TextEdit. Change-Id: I11855037f7938b2cd23ac6ad165722b5289b4f46 Task-number: QTBUG-19109 Reviewed-by: Martin Jones
* | | Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
|/ / | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Olivier Goffart2011-04-271-10/+6
|\ \ | |/ | | | | | | | | Conflicts: src/opengl/qwindowsurface_gl.cpp src/s60installs/eabi/QtGuiu.def
| * Ignore changes to selectByMouse during a selection.Andrew den Exter2011-04-271-10/+6
| | | | | | | | | | | | | | | | | | | | | | Use the value of selectByMouse at the time of a mouse press event in all subsequent mouse events in a sequence. This is the same as ignoring the intial mouse press except mouse events for other actions are still accepted. Change-Id: I59b50bf95d26c6320e6e74eeb679b4153e0edf4d Task-number: QTBUG-18887 Reviewed-by: Martin Jones
* | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-04-181-0/+3
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: qmake/generators/makefile.cpp qmake/generators/win32/msbuild_objectmodel.cpp qmake/generators/win32/msvc_vcxproj.cpp src/corelib/global/qnamespace.h src/gui/text/qtextcontrol.cpp
| * Fix TextEdit cursorRectangle property.Andrew den Exter2011-04-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | Translate the cursor rectangle from control coordinates to painting coordinates rather than the other way around, ensure the cursor delegate is also translated, and update the cursor rectangle, cursor delegate and micro focus when the preedit cursor changes position. Change-Id: Iac7a87f7fb965d5f56d059d8f4b97feef8b47789 Task-number: QTBUG-18515 QT-4827 Reviewed-by: Martin Jones
* | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-03-311-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/declarative/example-slideswitch.qdoc doc/src/development/qmake-manual.qdoc doc/src/snippets/code/doc_src_qmake-manual.pro doc/src/snippets/code/doc_src_qtscript.qdoc src/corelib/animation/qabstractanimation.cpp src/s60installs/bwins/QtOpenGLu.def src/s60installs/eabi/QtOpenGLu.def src/s60installs/eabi/QtOpenVGu.def tests/auto/qdir/qdir.pro tests/auto/qsslsocket/tst_qsslsocket.cpp tools/qdoc3/doc/qdoc-manual.qdocconf
| * Fix text selection with shift-click.Andrew den Exter2011-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | Move the cursor when word selection is NOT enabled. If word selection is enabled then then cursor would have been moved in a previous branch, the (incorrectly inverted) check was to prevent that being overridden. Change-Id: I788c3b41c6fdb250d6086893ea98a1aa8c302514 Task-number: QTBUG-18017 Reviewed-by: Alan Alpert
* | Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2011-03-141-2/+9
|\ \ | |/
| * Fix TextEdit mouseSelectionMode overriding selectByMouse.Andrew den Exter2011-03-141-2/+9
| | | | | | | | | | | | | | | | | | If selectByMouse is false don't allow any text selection on mouse move. Change-Id: Ic9f309899bc0de48066a2393e088e15b3a2f06db Task-number: QTBUG-18072 Reviewed-by: Martin Jones
* | Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2011-03-091-1/+1
|\ \ | |/
| * Update TextEdit's visible selection when only the anchor changes.Andrew den Exter2011-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | At the limits of a TextEdit's text a key press can change/reset the anchor position without changing the cursor position. Checking the cursor position alone isn't enough to determine the selection hasn't changed. Change-Id: Ic425ac0c06897d77e9c86b907ff10b39d78dd7a1 Task-number: QTBUG-17982 Reviewed-by: Martin Jones
* | Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2011-03-041-2/+4
|\ \ | |/
| * Fix potential crash in QTextControl.Lasse Holmstedt2011-03-041-2/+4
| | | | | | | | | | | | | | | | inputContext() is only safe to call if there is a current contextWidget. Change-Id: I6cbccf5f5fbb2d8c9ca6acf5f7e02f680eb84483 Reviewed-by: Andrew den Exter
* | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-02-231-38/+82
|\ \ | |/ | | | | | | | | | | | | Conflicts: src/gui/kernel/qcocoaview_mac.mm src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def src/testlib/qtestcase.cpp
| * Forward mouse events from TextInput and TextEdit to QInputContext.Andrew den Exter2011-02-211-38/+82
| | | | | | | | | | | | | | | | | | This brings TextInput in line with QLineEdit. The fix for TextEdit applies equally to QTextEdit. Change-Id: I5c47e5c8e951ee53cb1fe45d9c302050cd19deef Task-number: QTBUG-15705 Reviewed-by: axis
* | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-02-041-3/+41
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/declarative/samegame/SamegameCore/samegame.js mkspecs/features/symbian/default_post.prf src/declarative/qml/qdeclarativeengine.cpp src/gui/text/qtextdocumentlayout.cpp src/plugins/plugins.pro src/s60installs/bwins/QtCoreu.def src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtCoreu.def src/s60installs/eabi/QtGuiu.def src/s60installs/s60installs.pro tests/auto/declarative/declarative.pro tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp tests/auto/declarative/qmlvisual/qmlvisual.pro
| * Add a mouseSelectionMode property to TextEdit and TextInput.Andrew den Exter2011-02-011-2/+25
| | | | | | | | | | | | | | | | | | | | | | Adds an option to do per word selection when selectByMouse is true. Also changes the selection behavior so that the first word selected remains selected when the direction of the selection changes which is more consistent with other implementations including the existing per word selection in QTextEdit. Task-number: QTBUG-16283 Reviewed-by: Martin Jones
| * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into qtquick11Martin Jones2011-01-191-1/+1
| |\
| * | Disable dragging text in TextEdit.Andrew den Exter2011-01-111-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | Add a dragEnabled property to QTextControl so text dragging can optionally be disabled. Task-number: QTBUG-16248 Reviewed-by: Martin Jones
* | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * | Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| |/ | | | | | | Reviewed-by: Trust Me
* | Update the text cursor's position for input method events.Pierre Rossi2010-11-101-0/+3
| | | | | | | | | | Task-number: QTBUG-2064 Reviewed-by: Jiang Jiang
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-09-281-6/+0
|\ \ | |/ | | | | | | | | | | | | Conflicts: src/gui/painting/qrasterizer.cpp src/network/access/qnetworkaccessmanager.cpp tests/auto/qpainter/tst_qpainter.cpp tools/assistant/tools/assistant/mainwindow.cpp
| * Fix text direction setting in QTextBlock layoutJiang Jiang2010-09-231-6/+0
| | | | | | | | | | | | | | | | QTextControl should no longer inherit the layout direction of parent widget as its default text direction. Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Lars Knoll
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-08-251-8/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/win32/msbuild_objectmodel.cpp src/declarative/qml/qdeclarativexmlhttprequest.cpp src/opengl/opengl.pro src/opengl/qgl_p.h src/plugins/bearer/connman/qconnmanservice_linux.cpp tests/auto/qpainter/tst_qpainter.cpp tools/assistant/tools/assistant/helpviewer_qwv.h tools/assistant/tools/assistant/openpageswidget.h
| * Ignore LayoutDirectionChange event in QTextControlJiang Jiang2010-08-191-8/+0
| | | | | | | | | | | | | | | | LayoutDirectionChange should no longer affect text direction in 4.7, by ignoring this event in QTextControl, we make the behavior consistent with QLineEdit. Reviewed-by: Lars Knoll
* | Remove the use of deprecated qVariant*Olivier Goffart2010-08-061-1/+1
|/ | | | | | | | | | | | | | | Test directory untouched. This just apply those regexp: git grep -O"sed -i 's/qVariantValue</qvariant_cast</'" qVariantValue git grep -O"sed -i 's/qVariantSetValue(\([^&*\(),]*\), */\\1.setValue(/'" qVariantSetValue git grep -O"sed -i 's/qVariantSetValue *<\([^>]*\)> *(\([^&*\(),]*\), */\\2.setValue<\\1>(/'" qVariantSetValue git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*([^&*\(),]*)\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert git grep -O"sed -i 's/qVariantFromValue\( *[(<]\)/QVariant::fromValue\\1/'" qVariantFromValue git checkout src/corelib/kernal/qvariant* Rev-by: dev mailing list
* Make sure cursorPositionChanged is emitted when doing undo/redoThorbjørn Lindeijer2010-05-181-0/+8
| | | | | Done-by: mae Reviewed-by: Thorbjørn Lindeijer
* A small mistake when comparing the flag.Alexis Menard2010-04-281-1/+3
| | | | | | | Qt::NoTextInteraction is equal to 0 so you can't compare using & because it will always be false even if the flag is set. Reviewed-by:janarve
* Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-04-121-2/+4
|\ | | | | | | | | | | | | Conflicts: qmake/generators/symbian/symmake.cpp src/gui/image/qimage.cpp src/openvg/qwindowsurface_vgegl.cpp
| * Fix crash with QTextEdit::textChanged() when deleting a characterEskil Abrahamsen Blomfeldt2010-04-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | QTextEdit::textChanged() will be emitted from a function called from within QTextCursorPrivate. If the code connected to textChanged() makes a local copy of the current text cursor and then causes it to detach, we will crash when returning to QTextCursorPrivate and trying to access the now-deleted data. To avoid this, we make a local reference to the current text cursor that gives us a guarantee that it will be valid throughout the delete-call. Task-number: QTBUG-9599 Reviewed-by: Gunnar
* | Remove the "Insert unicode control character" menu entry on X11.Pierre Rossi2010-03-311-2/+2
| | | | | | | | | | | | | | | | It's still displayed when it seems to make sense with respect to the active keyboard layouts. It can also be enabled from qtconfig. Task-number: QTBUG-9186 Reviewed-by: Denis
* | Make QTextControl-based classes and QLineEdit understand Ctrl+Shift+InsertThiago Macieira2010-03-101-3/+8
| | | | | | | | | | | | | | | | On X11, this key is reserved for pasting the text selection (a.k.a. the PRIMARY selection). KDE apps already honour this, not all GNOME ones do, but it was agreed with them on xdg@freedesktop.org. Reviewed-By: mae <qt-info@nokia.com>
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml into ↵Qt Continuous Integration System2010-02-111-3/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-qml: (3397 commits) Update QmlChanges.txt Adds qml prefix to all declarative autotests Removed "running: true" for animations used as propertyvaluesource Animations are running by default when used as property source value Fix QmlEngine offlineStoragePath test. Fix Image test on Windows. Fix FontLoader test on Windows. Test should use ceil() not floor() since ceil() is used for calculating Fix BorderImage tests on Windows. Test should use ceil() not floor() since ceil() is used for calculating Clean up Must pass app arguments onto qExec() or else test system cannot QML Object toString should use 64-bit address on 64-bit platforms Improve stability of tst_qmlecmascript::dynamicDestruction Fix tst_qmlecmascript::callQtInvokables Fixed qmldebug* tests crashing. Fix declarative/qmldom::loadDynamicProperty autotest Fix declarative/animatedimage autotest Removed the tests/auto/declarative/visual(&examples) from .pro Add EXPECT_FAIL to js parser tests in declarative ui ...
| * | A little optimization in QTextControlPrivate::setContent.Alexis Menard2010-02-091-3/+5
| |/
* | Crash when deleting the parent of a context menu while it is being displayedGabriel de Dietrich2010-02-101-2/+2
|/ | | | | | | | | | | | | | | | | | | | | Asynchronous deletion of a widget (e.g. calling deleteLater() after a timeout) could be caught by the context menu's event loop if called with exec() instead of popup(). This causes the context menu to be deleted twice in some cases, and a crash generally follows. Although this introduces a minor behaviour change, we now use popup() with the WA_DeleteOnClose attribute to display the context menu in all the contextMenuEvent() bodies, except in those where the menu was already protected by a QPointer. In QDialog::contextMenuEvent(), we use QWeakPointer to reflect the fact that the menu was previously allocated in the stack. QAbstractSpinBox, QDialog and QMdiSubWindow keep using QMenu::exec() in contextMenuEvent() as they need the QAction returned. Some auto-tests included. Reviewed-by: Olivier Task-number: QTBUG-7902
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Edit focus should not be lost unless by explicit actionSami Merila2009-12-211-1/+5
| | | | | | | | | | | | Currently non-touch devices lose edit focus if window switch happens. I.e. in cases when screensaver activates, an incoming call occurs, a global notification is shown... With this fix, edit focus remain active, until user removes the focus explicitly. Task-number: 4792 Reviewed-by: axis
* Incorrect background while composing Japanese text(e.g 'shi' + <space>).Prasanth Ullattil2009-11-241-4/+2
| | | | | | | | | This happens only when there is a single japanese character entered & the suggested text is same as the one already displayed. In this case, black background was not drawn correctly. Reviewed-by: Simon Hausmann Reviewed-by: axis
* Softkeys: Text disappears from textbox when predictive text is active.Samuel Nevala2009-11-241-1/+2
| | | | | | | | | | | | | | | If two QInputMethodEvent("preedittext", attributes) or more are send in a row, textedit is drawn empty. Event creates lines based on isGettingInput flag and clears line every time there is preedit text. On 2nd event lines are cleared but not created since e->preeditString() != cursor.block().layout()->preeditAreaText() set isGettingInput to zero. When draw begins line count is checked. If no lines return. Moved layout->setPreeditArea() under if (isGettingInput) so pre-edit text is set only when text really changes. http://bugreports.qt.nokia.com/browse/QTBUG-4696 Task-number:QTBUG-4696 Reviewed-by:Markku Luukkainen Merge-request: 2132 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-11-131-11/+17
|\ | | | | | | | | Conflicts: dist/changes-4.6.0
| * Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2009-11-061-10/+14
| |\
| | * Merge commit 'origin/4.6' into 4.6Olivier Goffart2009-11-051-1/+2
| | |\
| | * | Fix textControl so that it ignores mouse press events when neededThierry Bastian2009-11-051-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the issue in the itemviews that the selection would not change when clicking on rich text labels. Task-number: QTBUG-4516 Reviewed-by: ogoffart
| * | | Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2009-11-041-1/+2
| |\ \ \ | | | |/ | | |/|