summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qtextedit.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change confusing Q_DEAD_CODE_FROM_QT4_FOO defineTor Arne Vestbø2016-10-141-1/+1
| | | | | | | | | | | | | | | | | | | Commit c5db8fc74 changed all instances of Q_WS_FOO to have the prefix Q_DEAD_CODE_FROM_QT4 instead, to make it clearer when reading the code that the code in question was a left-over from Qt4, when we used Q_WS_ defines instead of Q_OS_ defines. This worked well for cases of #ifdef Q_DEAD_CODE_FROM_QT4, but less so for cases of #ifndef Q_DEAD_CODE_FROM_QT4, where the code was actually unconditionally included. To make this even clearer, the defines have been replaced by checks for 1 or 0, with a comment describing how the code used to look in Qt4. The use of constants in the check also makes it easier for editors to parse the condition and show visually that the code is defined out. Change-Id: I152070d87334df7259b417cd5e17d7b7950379b7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-081-1/+1
|\ | | | | | | | | | | | | | | Conflicts: src/network/access/qhttpnetworkconnection.cpp src/network/access/qhttpnetworkconnection_p.h Change-Id: I11f8641ef482efa8cee1b79977d19cc3182814b4
| * QTextEdit: don't show placeholder text while composing textRichard Moe Gustavsen2016-10-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | If using IM to compose text in QTextEdit, the placeholder text will show underneath until the text is committed. This patch will additionally check if the user is currently composing preedit text before deciding whether or not to draw the placeholder text. Task-number: QTBUG-55758 Change-Id: If7943c6c94fb96d46514a81caa118829e6e6a0f9 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Add Qt::ImInputItemClipRectangle support to widgetsJan Arve Saether2016-05-021-1/+6
| | | | | | | | | | | | | | | | Let widgets respond to ImInputItemClipRectangle inputMethodQuery and notify about potential changes with QInputMethod::update() Change-Id: I01b2c53273df207d26107b237a7096fe53d1b0a5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-291-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qml_module.prf mkspecs/features/qt_common.prf src/gui/text/qzip.cpp src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/windows/array.h src/testlib/qtestcase.cpp src/widgets/dialogs/qfilesystemmodel.h Change-Id: Ie41c5868415b81f7693c80e045497035504bb210
| * Change scroll and text areas to respect native wheel focus ruleMarko Kangas2016-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | [ChangeLog][QtWidgets][QAbstractScrollArea,QTextEdit,QPlainTextEdit] Changed focus to Qt::StrongFocus. That respects platforms' native guidelines. Task-number: QTBUG-52559 Change-Id: I2aa25d25bbc15facce85ceb7d4a4c1d0ac7df962 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QTextEdit: update cursor and anchor rect upon scrollingRichard Moe Gustavsen2016-04-131-0/+1
| | | | | | | | | | | | | | | | | | | | Both cursor and anchor rect will change locally when scrolling. So inform IM about it, so that any overlay done from e.g the platform plugins for dealing with text selection etc. can respond to the change. Change-Id: I4e839e691a20ad07d2aa062e028d22cf5f31b7fa Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | QTextEdit: translate IM argument before passing it on to QWidgetTextControlRichard Moe Gustavsen2016-04-131-1/+19
| | | | | | | | | | | | | | | | | | | | Since we now have the possibility of providing an extra position argument when querying for Qt::ImCursorPosition, we need to ensure that we translate it from scroll view to local coordinates before passing it on to QWidgetTextControl. Change-Id: I4383ae3ea984b6140d8e9b4198047aec8b7e100b Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-041-16/+14
|\| | | | | | | Change-Id: I35ca979395620e104e50b06366d0869433a4ffc2
| * Refactor methods QTextEdit/QPlainTextEdit::inputMethodQuery().Friedemann Kleint2016-03-301-16/+14
| | | | | | | | | | | | | | | | Replace if / else if chain by switch() and return the value instead of reassigning it. Change-Id: Ib87c54bbf9911a58d3ae764b71f19f33d59590ce Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * QTextEdit::inputMethodQuery(): Preserve types when applying offset.Friedemann Kleint2016-03-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The old code converted QRectF into QRect when applying the offset. Change the offset point to QPointF and change the conversions accordingly. Add an autotest similar to that of QPlainTextEdit. This minimizes rounding errors and prevents conversions since the input method logic mostly uses qreal. Task-number: QTBUG-51923 Change-Id: I0c2f80ccae028d8bbbb97ec603f8782f69959c76 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Fixed build breaks that result after disabling "contextmenu" featureShrikant Dhumal2015-09-091-0/+2
|/ | | | | Change-Id: I261f927ee720e0c65abd18417e1ac48dbee820df Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* Clarify QTextEdit::createStandardContextMenu(QPoint) docsJ-P Nurmi2015-02-121-1/+1
| | | | | | | It assumes document coordinates. Change-Id: I9c1db154d45053065533c10bf76c338cc1324081 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | 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. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Make it more obvious that Q_WS_ is dead code, and should perhaps be portedTor Arne Vestbø2015-02-031-1/+1
| | | | | | | | | | | | We still have a bunch of Q_WS_ ifdefs in our code, which are easy to mistake for Q_OS_ ifdefs when quickly scanning the code. By renaming the ifdefs we make it clear that the code in question is dead. In incremental follow-ups, we can then selectively either remove, or port, the pieces that are dead code. Change-Id: Ib5ef3e9e0662d321f179f3e25122cacafff0f41f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-031-3/+3
| | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Text editors: Prevent autoscroll timer triggering from synth mouse eventsFriedemann Kleint2014-11-201-6/+8
| | | | | | | | | | The autoscrolling interferes with scrolling pan gestures and causes the scroll direction to be reversed when moving outside the window. Task-number: QTBUG-40461 Change-Id: I30ef848a346418929540c23730ab92f44e4565e2 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Fix too fast zooming in QTextEdit with smooth scrolling eventsAllan Sandfeld Jensen2014-09-231-12/+19
| | | | | | | | Do not zoom 1pt on every single wheel-event, but instead scale the zoom with the size of the angle delta. Change-Id: Idbe17356c7845ebd0039f655d3e611e71c6f0dd6 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Add ReadOnlyChange event to widgets that support setReadOnly(bool).David Faure2014-03-131-0/+2
| | | | | | | | | | | | This is useful for widget styles to react when widgets are set read-only, e.g. to update their palette accordingly. [ChangeLog][QtWidgets] All widgets with a setReadOnly method now send a ReadOnlyChange event (e.g. for app-specific palette changes) Change-Id: I74719a3e1b7d034d9bfc94305f846f42aae935bd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Extending the inputMethodQuery APIPaul Olav Tvete2014-02-151-3/+10
| | | | | | | | | | | | | | Currently, inputMethodQuery() only provides information about the current paragraph. On some platforms, such as Android, the input method needs information about the global cursor position, and more of the surrounding text. Some queries need to pass parameters. The current inputmethodQuery() implementation does not allow parameters to be passed. Changing this would require new or modified virtual functions, which is not possible until Qt 6. Therefore, a completely new mechanism is needed. Change-Id: Ic64fd90198ade70aa0fa6fa5ad3867dfa7ed763c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-121-2/+2
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qimage.cpp src/gui/text/qtextengine.cpp src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp src/printsupport/kernel/qprintengine_win.cpp Change-Id: I09ce991a57f39bc7b1ad6978d0e0d858df0cd444
| * Fix the docs on when setDocument() deletes the previous documentAndy Shaw2014-02-061-2/+2
| | | | | | | | | | | | Change-Id: I08d162a1c1e1765213205e63183ed75b2491374d Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Q(Plain)TextEdit: Add find() overload with QRegExpChristian Loose2014-01-311-0/+21
|/ | | | | | | | | | | | | | | Add overloads to the find() methods in QPlainTextEdit and QTextEdit that find the next occurrence matching the passed regular expression. These are convenience methods that eliminate the need to use the document() method and the need to handle the QTextCursor return value. [ChangeLog][QtWidgets][QPlainTextEdit] Added find method overload using QRegExp [ChangeLog][QtWidgets][QTextEdit] Added find method overload using QRegExp Change-Id: Ia6139b771e3ae4ca02e4b8ea7fde19e5dc71b9d8 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix typo in QTextEdit documentationSimon Hausmann2014-01-151-1/+1
| | | | | | | | | Task-number: QTBUG-36077 Change-Id: I5cd9ad3fe309e5dd2e5e5d67d6c7561182e65c25 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix placeholder text in QTextBrowserJ-P Nurmi2013-11-051-7/+8
| | | | | | Task-number: QTBUG-34051 Change-Id: Ief55cda861ef293a5fdeb2e5fa287b835c729894 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-7/+7
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Show QTextEdit placeholder even when focusedBenjamin Port2013-06-211-8/+3
| | | | | | | Useful to have the same behavior in QLineEdit and QTextEdit. Change-Id: I02d6ac0a6072403c7aa3e8f76a728c46a9d66b14 Reviewed-by: David Faure (KDE) <faure@kde.org>
* Added a placeholderText property to QTextEdit.Benjamin Port2013-05-281-0/+41
| | | | | | | | This commit adds a placeholder text for text edit. If text edit doesn't have focus and the document() is empty, this placeholder will be shown. Change-Id: I8b51f1a246452b63d6390e94853cf2864a7ff05f Reviewed-by: David Faure (KDE) <faure@kde.org>
* Doc: Zooming inside QTextEditCaroline Chao2013-04-301-0/+2
| | | | | | | | | | | | | One can zoom in/out text inside a QTextEdit when the widget is read-only or when using the zoomIn/zoomOut functions. Zooming inside a HTML document only works if the font-style is not set to a fixed size inside the document though. Adding this information to the documentation. Change-Id: I66a62da53827e1ce3241ba16b91e86926b97c297 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fix license headers stating QtGui for QtWidgets files.Jake Petroules2013-03-191-1/+1
| | | | | Change-Id: I0ca49e3e1f9f603f0b0f7f3553e854b871efe303 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add multi-line input method hintPaul Olav Tvete2013-02-271-1/+1
| | | | | | | | Enabler for input on Android. Change-Id: I44670b95b35f773814125c5d35c67e9713567813 Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Correct QTextEdit detailed description.Mitch Curtis2013-02-011-4/+8
| | | | | | Change-Id: Ie5c4769c864d9dfdc1cb4ed5d2cbfb9951df582b Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Doc: Fix module name formatSze Howe Koh2013-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation QtCore -> Qt Core QtDBus -> Qt D-Bus QtDesigner -> Qt Designer QtGui -> Qt GUI QtImageFormats -> Qt Image Formats QtNetwork -> Qt Network QtPrintSupport -> Qt Print Support QtScript -> Qt Script QtSql -> Qt SQL QtSvg -> Qt SVG QtTest -> Qt Test QtWebKit -> Qt WebKit QtWidgets -> Qt Widgets QtXml -> Qt XML QtConcurrent -> Qt Concurrent (partial) QtQuick -> Qt Quick (partial) Also, distinguish between "module" and "library" Change-Id: Icb8aa695ae60b0e45920b0c8fce4dc763a12b0cd Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Call QAccessible::updateAccessibility when caret moves in QTextEditJosé Millán Soto2012-12-161-1/+14
| | | | | Change-Id: I3b9e5d8e67b4928558b642a4d23aa60ae9dfde60 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Add pointers to the rich text documentation from mentions of rich text.Samuel Rødal2012-11-231-2/+3
| | | | | | | | | The QLabel documentation for instance is quite confusing since it talks about rich text without saying what it actually is. The QTextEdit documentation can also be improved by being more explicit. Change-Id: Ie718d170e18a0b713fe567fb707330d0085fb9e4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Remove documentation for non-existent QTextEdit functions.Mitch Curtis2012-09-131-146/+0
| | | | | | Change-Id: I92b67e676c78c641bfefc636efada22254e0bca3 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Introduce hook for text cursor changes in QTextEdit and QPlainTextEdithjk2012-09-021-0/+11
| | | | | | | | | | | Currently it is hard for Q{Plain}TextEdit subclasses to keep track of changes of the text cursor by direct calls to setTextCursor from arbitrary code. By redirecting the setTextCursor to a virtual function subclasses get the chance to intercept such calls. Change-Id: Id92d9c86928b97285b0f5b7b39790442dfac3e50 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QTextEdit docs: fix qdoc warningsJ-P Nurmi2012-08-201-11/+4
| | | | | | | | qdoc insists picking Q_PROPERTY(T document) instead of the individually documented getter and setter Change-Id: I6f4981db205c5726d70cef4d85b7dfffe2b1fe31 Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* Fixed inputMethodQuery() for Qt::ImHintsTasuku Suzuki2012-06-261-10/+18
| | | | | | | to return QWidget::inputMethodHints() Change-Id: I46735c553e0cb4689cd0c53a69d07ed61ba56bf6 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Doc: Fix \sa usageMarius Storm-Olsen2012-05-111-11/+11
| | | | | | | | | Ensure comma between elements (757 missing), single space and curly- braces around title elements, etc. Change-Id: Id16c3fda7fc47a12a0682f8720214f4990609a97 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Doc: Modularize QtWidgets documentation.Casper van Donderen2012-05-091-7/+7
| | | | | | | | This change moves the snippets and images to the modularized directories. Change-Id: Idec1afb9db7ea6add1ca4cf25ec4019d8bce0c4d Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Merge remote-tracking branch 'origin/master' into api_changesOswald Buddenhagen2012-04-101-13/+0
|\ | | | | | | | | | | | | | | | | | | Conflicts: configure src/widgets/styles/qwindowsxpstyle.cpp tests/auto/gui/kernel/qwindow/qwindow.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
| * Documentation cleanupDebao Zhang2012-03-311-13/+0
| | | | | | | | | | | | | | They are comments of Qt3 support members which have been removed already. Change-Id: I4b3dfaac1e5e1c3c13b83e41d0505dd16a4b6a8e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | Cleanup Q3* itemsDebao Zhang2012-03-231-1/+1
|/ | | | | | | | Cleanup Q3* items from QtCore and QtGui modules. Change-Id: Id214a077a50e99d820c84e96e34866492a0130d8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-021-38/+38
| | | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I519bf9c29b14092e3ab6067612f42bf749eeedf5 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Some small doc fixes, typos and removal of one incorrect paragraphAndy Shaw2012-02-171-1/+1
| | | | | | | | | The QTextStream paragraph that is removed referred to something that is incorrect. This was confirmed for Windows, Linux and Mac. Change-Id: Ibac8f82482f2060308b5b8485d6da228bdf52fe6 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> (cherry picked from commit 80cebfde10cf34dcc0777c24f1b3ff37cad20181)