summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextcontrol.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headersAkseli Salovaara2015-03-311-13/+13
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I7e3e96183e073877b46bc8071b2ccae19e69426b Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Updated year in copyright headerKai Koehne2014-03-261-1/+1
| | | | | | | | | | | | | | | | | | find . -path '*/3rdparty/*' -prune -o -type f -print | xargs -L1 sed -i -E 's/Copyright(.*) 2013 Digia/Copyright\1 2014 Digia/g' Manually patched files: demos/spectrum/3rdparty/fftreal/fftreal_wrapper.h demos/spectrum/3rdparty/fftreal/fftreal_wrapper.cpp src/3rdparty/s60/eiksoftkeyimage.h tools/qdoc3/test/qt-project.qdocconf tests/auto/qsharedpointer/nontracked.h tests/auto/qsharedpointer/nontracked.cpp Change-Id: I3f9074923b4d6bd4666258ab04f01476cc6e901c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix text issue with Hiragana characters when stylesheet is applied.Mitch Curtis2013-02-211-0/+6
| | | | | | | | | | | | | | | | | | | When typing into a QTextEdit or QLineEdit with a Japanese IME on Windows, some characters have both a black foreground and background and hence cannot be seen. This patch fixes the issue by setting the appropriate colors for the text in these scenarios. The change also fixes a similar situation with QSyntaxHighlighter and Hiragana, where the background and foreground colors were the same. Now it will use underlining to highlight the text (like WordPad does, for example). Task-number: QTBUG-29442 Change-Id: I364d327a8f6573a73b227b79cc5f570cd02611c9 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Titta Heikkala <titta.heikkala@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* To support QT_NO_IM on Linux/Windows/MacJing Bai2013-01-211-0/+3
| | | | | | | | | | Fix compilation issue when QT_NO_IM is defined. Also fixed references in tests. But fixing plugins/examples seem not necessary at this point. Task-number: QTBUG-26109 Change-Id: I2067051951616012117efa6716640cbf198fdb2a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-291-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fixed compiler warnings about unused q and d pointers.Janne Anttila2012-03-151-1/+0
| | | | | | | | | | The q and d pointers were not used in these functions at all, or they were used only inside some #ifdef quard such as QT_NO_ACCESSIBILITY. Moved the Q_D and Q_Q macros inside the appropriate scope. Task-number: QTBUG-22512 Change-Id: I1624a1d800c7ce21cde4af1678d93e6f615edd45 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Update accessibility selections in QTextControl.Frederik Gladhorn2012-02-081-2/+13
| | | | | | Change-Id: Iae0c2792b64b8ec2736a9ff621cf7c313a394093 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix QPlainTextEdit when using Qt::TextSelectableByKeyboard flagjahonkon2011-11-111-5/+2
| | | | | | | | | It is not possible to select text with keyboard when specifying only Qt::TextSelectableByKeyboard flag. Task-number: QTBUG-18952 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QTBUG-21058: Fix for possible crashes in QTextControl::setCursorWidth()Mikko Knuutila2011-10-041-4/+4
| | | | | | | | | Cursor's width is now queried from the style only when the user calls cursorWidth(). Earlier it was queried already in the ctor, which caused crashes if the application was guiless. Merge-request: 2697 Reviewed-by: Jan-Arve Saether <jan-arve.saether@nokia.com>
* Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml-staging into ↵Qt Continuous Integration System2011-09-091-5/+2
|\ | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-qml-staging: Fix double click and drag not extending word selection.
| * Fix double click and drag not extending word selection.Andrew den Exter2011-09-081-5/+2
| | | | | | | | | | | | | | | | | | | | mousePressed isn't set on the second press of a double click and so can't be used to determine if all selections should be skipped. Instead skip only the single click and drag selections if mousePressed is false. Change-Id: I5e7ba033f38b0f9b98fdca5c61a8548f92991601 Task-number: QTBUG-20925 Reviewed-by: Martin Jones
* | Merge branch 4.7 into qt-4.8-from-4.7Sergio Ahumada2011-08-261-12/+22
|\ \ | | | | | | | | | | | | | | | Conflicts: doc/src/index.qdoc src/xmlpatterns/expr/qevaluationcache_p.h
| * | Make it easier to select words at the start of a line.Andrew den Exter2011-08-241-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTextControl's word selection will only include a word if the cursor position is past the mid point of the word. This can make it difficult to select words near the edges of the screen on touch devices. For the TextEdit word selection mode select a word ignore the relative position within a word. Change-Id: I2bc61376f663836fedd7e157448f0b565a64d485 Task-number: QT-5206 Reviewed-by: Martin Jones
* | | Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-08-151-2/+6
|\| | | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/fancybrowser/fancybrowser.pro src/3rdparty/libpng/ANNOUNCE src/3rdparty/libpng/CHANGES src/3rdparty/libpng/CMakeLists.txt src/3rdparty/libpng/LICENSE src/3rdparty/libpng/README src/3rdparty/libpng/configure.ac src/3rdparty/libpng/example.c src/3rdparty/libpng/libpng-manual.txt src/3rdparty/libpng/libpng.3 src/3rdparty/libpng/libpngpf.3 src/3rdparty/libpng/png.5 src/3rdparty/libpng/png.c src/3rdparty/libpng/png.h src/3rdparty/libpng/pngconf.h src/3rdparty/libpng/pngerror.c src/3rdparty/libpng/pnginfo.h src/3rdparty/libpng/pnglibconf.h src/3rdparty/libpng/pngmem.c src/3rdparty/libpng/pngpread.c src/3rdparty/libpng/pngpriv.h src/3rdparty/libpng/pngread.c src/3rdparty/libpng/pngrtran.c src/3rdparty/libpng/pngrutil.c src/3rdparty/libpng/pngset.c src/3rdparty/libpng/pngstruct.h src/3rdparty/libpng/pngtest.c src/3rdparty/libpng/pngtrans.c src/3rdparty/libpng/pngvalid.c src/3rdparty/libpng/pngwrite.c src/3rdparty/libpng/pngwtran.c src/3rdparty/libpng/pngwutil.c src/gui/dialogs/qfiledialog_symbian.cpp src/gui/kernel/qsoftkeymanager.cpp src/s60installs/s60installs.pro
| * Move cursorDelegate with the mouse selection of read only text input.Andrew den Exter2011-08-041-2/+6
| | | | | | | | | | | | Change-Id: Iae4b2f9f6c9a7da7ec0e194b2568fb3a6da8ea71 Task-number: QTBUG-19109 Reviewed-by: Martin Jones
| * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-05-171-17/+17
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Updating file with CRLF line endings for the updated header Fix a regression in QList::mid() update gitignore remove -fno-stack-protector Fix make confclean Update licenseheader text in source files
| | * Update licenseheader text in source filesJyri 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 '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-141-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-131-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-151-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-101-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-051-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-111-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