summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qwidgettextcontrol.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-101-0/+6
|\ | | | | | | | | | | | | Conflicts: tests/auto/network/kernel/qnetworkinterface/BLACKLIST Change-Id: I1e8866c63b54bcd95fc2a044276ee15b7f60e79a
| * Fix updating the text cursor position after editingSona Kurazyan2019-12-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | In some cases when editing the text (for example when removing the selected text, or pasting a text block) the text cursor position is updated, but its visual x position is not updated. This causes the next cursor movements to start from a wrong position. Force the update for those cases. Fixes: QTBUG-78479 Change-Id: Ia496be62beec58660f5e1695e5aafae09c79684e Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | Tidy nullptr usageAllan Sandfeld Jensen2019-12-061-6/+6
|/ | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Turn a local QHash into a QMultiHashMårten Nordheim2019-10-311-1/+1
| | | | | | | | | | | | | 972a0402be4d7aed0ebbd0ff56b5018cda01599d was merged before one of its parent patches which changed this QHash into a QMultiHash. So in 5.14 it would overwrite values instead of adding new entries. No idea if it has caused or will cause any regressions. But it was an accident so let's fix it. Amends 972a0402be4d7aed0ebbd0ff56b5018cda01599d. Change-Id: I6623b0b7924024df148d5c83bcbb612f3e595f56 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Set icon on the select-all action in the text edit context menu tooVolker Krause2019-10-171-0/+1
| | | | | | | | | Makes this consistent with the rest of the actions here, and avoids dirty hacks like KIconTheme::assignIconsToContextMenu. Change-Id: I749f4d5f67efdbf595a52185dd507de5f87f6487 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Make QTextBlockFormat::MarkerType an enum classShawn Rutledge2019-10-101-4/+4
| | | | | | | This came up during API review. Change-Id: I9198e1eb96db0c21e46a226a032919bb62d3ca66 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Remove usages of deprecated QApplication::keypadNavigationEnabledSona Kurazyan2019-07-231-5/+6
| | | | | | | | | | Added QApplicationPrivate::keypadNavigationEnabled() as a replacement of deprecated QApplication::keypadNavigationEnabled(), for the internal usage. Task-number: QTBUG-76491 Change-Id: I75f4c628b72d86b5e428e7e285a786d23abbf3f2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix build without features.textmarkdownwriterTasuku Suzuki2019-07-081-1/+1
| | | | | Change-Id: I30b39bb6ac4c24281c7fc87573936f62512ce015 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QtWidgets: Fix static method invocationsFriedemann Kleint2019-06-281-10/+10
| | | | | | | | | | | | | | | | | | | | | Apply fixits by Creator and results of manual search focusing on QCore/Gui/Applicaton(Private) methods and variables to prepare for splitting out some classes. Task-number: QTBUG-69478 Task-number: QTBUG-76497 Task-number: QTBUG-76493 Change-Id: Iaf468166793e0cabb514b51c827b30317bf45a2d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-06-141-0/+12
|\ | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/makefile.cpp qmake/generators/unix/unixmake2.cpp src/corelib/thread/qthread_unix.cpp tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp Change-Id: I1df0d4ba20685de7f9300bf07458c13376493408
| * Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-06-071-0/+12
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/makefile.cpp src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoaintegration.mm Done-With: Jörg Bornemann <joerg.bornemann@qt.io> Change-Id: I5a61e161784cc6f947abe370aab8f2971a9cbe78
| | * Q(Plain)TextEdit: Observe color hints from style sheet depending on focus stateFriedemann Kleint2019-05-241-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ask the style sheet style to adapt the palette in WidgetTextControl::getPaintContext() as is done for QLineEdit. Use the palette color in QPlainTextEdit. Change-Id: I67758716b66feaeac8c2433c2a4d3744cd0d5327 Fixes: QTBUG-72100 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Use insert instead of insertMulti when operating on a QMultiHashLars Knoll2018-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | Change-Id: I96ebf6954d0a137f9f6f9632cdad6e18750519fe Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Support clicking to toggle checkboxes in QTextEditShawn Rutledge2019-05-241-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add QAbstractTextDocumentLayout::markerAt(pos) for hit testing. (Qt Quick TextEdit needs it too.) Finds out whether the position corresponds to a marker on a paragraph. I.e. it finds checkboxes in GitHub-flavored markdown. This enables editor classes to toggle checkboxes by clicking them. Use it in QTextEdit to add the checkbox toggling feature. Also show the "pointing finger" cursor when hovering a toggleable checkbox. Change-Id: I036c967ab45e14c836272eac2cc7c7d652543c89 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-05-131-0/+4
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qstring.cpp Change-Id: I81dbf90fc936c9bf08197baefa071117bddb1c63
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-091-0/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qlocale_data_p.h (Regenerated by running the scripts in util/local_database/) src/gui/opengl/qopengltextureuploader.cpp Done-With: Edward Welbourne <edward.welbourne@qt.io> Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io> Change-Id: I12df7f066ed0a25eb109f61c4b8d8dea63b683e2
| | * QWidgetTextControl: Emit cursorPositionChanged() when handling IM eventVova Mshanetskiy2019-05-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidgetTextControl and consequently QTextEdit did not emit cursorPositionChanged() signal when cursor position was changed by a QInputMethodEvent with a QInputMethodEvent::Selection attribute. This is especially important on Android because QAndroidInputContext uses such events extensively to move the cursor and also relies on cursorPositionChanged() signal being emitted by the focus object. If the signal is not emitted, QAndroidInputContext does not notify the virtual keyboard about cursor position change which results in various glitches. Change-Id: I7edd141258c483e6f103adcd6e40049b49c13387 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Add QTextMarkdownWriter, QTextEdit::markdown property etc.Shawn Rutledge2019-05-011-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A QTextDocument can now be written out in Markdown format. - Add the QTextMarkdownWriter as a private class for now - Add QTextDocument::toMarkdown() - QTextDocumentWriter uses QTextMarkdownWriter if setFormat("markdown") is called or if the file suffix is .md or .mkd - Add QTextEdit::toMarkdown() and the markdown property [ChangeLog][QtGui][Text] Markdown (CommonMark or GitHub dialect) is now a supported format for reading into and writing from QTextDocument. Change-Id: I663a77017fac7ae1b3f9a400f5cd357bb40750af Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | Add QTextMarkdownImporterShawn Rutledge2019-04-171-1/+14
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides the ability to read from a Markdown string or file into a QTextDocument, such that the formatting will be recognized and can be rendered. - Add QTextDocument::setMarkdown(QString) - Add QTextEdit::setMarkdown(QString) - Add TextFormat::MarkdownText - QWidgetTextControl::setContent() calls QTextDocument::setMarkdown() if that's the format Fixes: QTBUG-72349 Change-Id: Ief2ad71bf840666c64145d58e9ca71d05fad5659 Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | QWidgetTextControl: Get rid of dependency on QTextEditPrivateAlexander Volkov2018-10-091-10/+0
| | | | | | | | | | | | | | | | | | QWidgetTextControl is a base class for controls of text widgets and widget-specific code should be used in derived classes, so override loadResource() in QTextEditControl. Change-Id: I6d829ead0837419530094d19e0ca53a964413e92 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Move cursor selection to start when there isn't any previous line in ↵Michal Lazo2018-10-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | selection mode Adding standard behavior for text selection, when user want to select text and there isn't any previous line then selection will end on start [ChangeLog][QtWidgets][QWidgetTextControlPrivate] Move cursor selection to start Task-number: QTBUG-69735 Change-Id: If222d37747772f60774f671ffdd273d63cdaf571 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Implement QRegularExpression overload for QTextEdit::findSamuel Gaist2018-10-081-0/+13
|/ | | | | | | | | | | | This patch adds the missing overload for QRegularExpression to match the QRegExp one for QTextEdit. [ChangeLog][QtWidgets][QTextEdit] Added QRegularExpression find() method overload. Change-Id: Ic7be224dcc59fc8d832daddd1999a713b7f04253 Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: David Faure <david.faure@kdab.com>
* Make sure we can build with -no-feature-draganddropJoerg Bornemann2018-05-291-7/+9
| | | | | | | | | We move QInternalMimeData to a separate file, because this class is used, even if draganddrop is disabled. From now on, include qinternalmimedata_p.h instead of qdnd_p.h for QInternalMimeData. Change-Id: I594e08e2e90d574dc445119091686b4b69e4731b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Fix for input method commit that ends with newlinePaul Olav Tvete2018-04-271-1/+6
| | | | | | | | | | | | | If the input method event contains a commit text that ends with a newline, text, the commit string is inserted first. This changes the current block. This change makes sure that we apply the formatting changes (including removing the old preedit text) to the old block in this specific case. Task-number: QTBUG-67836 Change-Id: Ia83963780fb14b3c571dbbe3eb81fbbe20fbf412 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix typo in code handling Qt::AA_DontShowShortcutsInContextMenusFriedemann Kleint2018-02-141-3/+2
| | | | | | | | | | | | | Use Qt::AA_DontShowShortcutsInContextMenus instead of Qt::AA_DontShowIconsInMenus in the getters and helpers for formatting the action text. Streamline the code and use static method invocation. Amends c2c3452ba5b4c32d0c2d5df9193bf89986623ab5. Task-number: QTBUG-49435 Change-Id: I8827c2dc757e5899e5a26ffbf2d0b5018aa7544a Reviewed-by: David Faure <david.faure@kdab.com>
* QtWidgets: Raise minimum supported MSVC version to 2015Friedemann Kleint2018-01-041-4/+0
| | | | | | | | Remove code for older versions and streamline #ifdefs. Task-number: QTBUG-51673 Change-Id: I2ba95bde2b8bbcca1833dc14c344b9a14394bc1d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Update usage of QFontMetrics::width() to new APIEskil Abrahamsen Blomfeldt2017-12-081-1/+1
| | | | | | | | | | | | | | QFontMetrics(F)::width() has been deprecated and is replaced by horizontalAdvance(). This updates all usage of it in tests and documentation. It is worth noting that many or most of the usages of QFontMetrics::width() probably intended to use boundingRect().width(), but since it currently works, I have not looked into that, just replaced the function name mechanically. Change-Id: Iec382e5bad0b50f37a6cfff841bfb46ed4d4555f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QWidgetTextControl: allow context menu to open for a QTextEdit with ↵Richard Moe Gustavsen2017-10-271-2/+0
| | | | | | | | | | | | | | | | | | Qt::NoFocus set Currently a context menu will only open when right-clicking on a text edit that has input focus. This means that you cannot e.g bring up the context menu to copy text for a text edit that doesn't accept input focus (but you are still allowed to select text with the mouse, which feels a bit contradictory). This is different from how QLineEdit works, and also different compared to how native applications work, at least after testing on macOS and Ubuntu. This patch will change this behavior, so that the context menu always open on both QPlainTextEdit and QTextEdit, even when they don't accept focus. Task-number: QTBUG-63868 Change-Id: Ibc4cbcc900077546828690ddc958820677211a5a Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-201-5/+11
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/util/qcompleter.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmdisubwindow.cpp Change-Id: If0e96981af07ce36ac68f2e69211bc2120f93973
| * Convert features.menu to QT_[REQUIRE_]CONFIGStephan Binner2017-09-191-0/+2
| | | | | | | | | | Change-Id: I031356411294b259ebd2b22c53159c93fd92af6e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.textedit to QT_[REQUIRE_]CONFIGStephan Binner2017-09-191-4/+6
| | | | | | | | | | Change-Id: I0fb0e658796484f374586d8d1f0f1b9167ab30d2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.lineedit to QT_[REQUIRE_]CONFIGStephan Binner2017-09-121-1/+3
| | | | | | | | | | Change-Id: I509977994b11a7fc0c109bfcc83aadeee6c9b0b8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-151-4/+6
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoamenu.h src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/widgets/styles/qstylehelper_p.h Change-Id: I54247c98dd79d2b3826fc062b8b11048c9c7d9bb
| * Convert features.graphicsview to QT_[REQUIRE_]CONFIGStephan Binner2017-08-151-4/+6
| | | | | | | | | | Change-Id: I1083097802772624e5d414678b4612308683a56f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-201-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.h src/corelib/tools/qdatetime.h src/corelib/tools/qstring.h src/corelib/tools/qversionnumber.h src/plugins/platforms/android/qandroidplatformintegration.cpp tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp Change-Id: Iefd92a435e687a76cd593099e40d9a9620a1454d
| * Fix warnings for -no-feature-texthtmlparserStephan Binner2017-04-191-0/+1
| | | | | | | | | | Change-Id: Ie757e4ecb9ced14bd809f56d2d3d09274fc3bc39 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-041-45/+1
|\| | | | | | | | | | | | | | | Conflicts: src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h src/plugins/platforms/xcb/qxcbwindow.cpp Change-Id: Ic747c3c50e68c005b425e7a1ec2a90965527c8bd
| * Introduce QInputControl::isCommonTextEditShortcutJoerg Bornemann2017-03-271-45/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | For handling ShortcutOverride events in text-edit-like controls one must know if a key event matches a common text edit short cut. The code that was formerly in QWidgetTextControl is now moved into QInputControl::isCommonTextEditShortcut to remove duplicated code in QtQuick and to avoid adding adding a third duplicate in QtWebEngine. Task-number: QTBUG-59053 Change-Id: I18723bb0224acd33c8ea4a8d0a601bb5e274a7a9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-281-2/+45
|\| | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro tests/auto/corelib/tools/qchar/tst_qchar.cpp tests/auto/other/qaccessibility/accessiblewidgets.h Change-Id: I426696c40ab57d14dc295b8103152cede79f244c
| * Fix char format of preedit text in empty text blockEskil Abrahamsen Blomfeldt2017-03-201-2/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a text block is empty, and we are adding preedit text to it, we need to merge the format of the preedit text with the current format of the cursor, otherwise we will use a default format and then suddenly switch to the proper one when the text is committed. The reason this becomes a bit complex is that there are no rules preventing someone from using several ime attributes to specify formats for isolated parts of the text, and no rules defining the order of such attributes. So even if the common case is one text format attribute for the entire string, we need to make sure we also handle the other cases gracefully, e.g. when we are setting different formats for different substrings and then providing these out of order. To make sure we have these corner cases covered, we also add a set of autotests. [ChangeLog][Qt Widgets][TextEdit] Fixed initial char format of input method text as it is in pre-edit mode. Task-number: QTBUG-59196 Change-Id: I1e37928e3bd1395fec1b5591908d4c69b84eb618 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Add new API to control whether shortcuts are shown in context menusJake Petroules2017-03-141-1/+4
|/ | | | | | | | | | | | | Shortcuts are universally not shown on macOS or mobile platforms, making applications look very obviously out of place. Windows and GNOME desktop environments almost never use them. Only KDE appears to do so commonly; default accordingly. Task-number: QTBUG-49435 Change-Id: Ieac4cee57b15a02be5258f3d07749af6316af62b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* Accept ZWNJ, ZWJ and PUA characters in input widgetsEskil Abrahamsen Blomfeldt2016-12-121-12/+5
| | | | | | | | | | | | | | | | | | | | Private Use Area characters are quite valid input characters when used in combination with a custom font. Joiners also serve an important language purpose in semitic writing systems. Note that there is a hack where we disregard any character produced using CTRL or CTRL+SHIFT specifically because of German keyboards. I have chosen to keep the hack in this patch to limit the change (though I have made an exception for ZWJ and ZWNJ since both are produced using Ctrl+Shift on Windows), but it will probably have to be reverted. [ChangeLog][QtWidgets][Input] Accept characters in Private Use Area, as well as zero-width joiners and zero-width non-joiners in input in QLineEdit and QTextEdit. Task-number: QTBUG-42074 Task-number: QTBUG-57003 Change-Id: I73f3b7d587a8670de24e902dc52a51f7721dba5a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-081-0/+5
|\ | | | | | | | | | | | | | | 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-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Optimize string usageAnton Kudryavtsev2016-07-151-2/+2
| | | | | | | | | | | | | | | | Use QStringBuilder more. Use QL1S directly, without QString construction. Change-Id: Iad844391367681fc1013b9725403d009e7c346e6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QWidgetTextControl: ensure we listen for changes to cursorFlashTimeChangedRichard Moe Gustavsen2016-05-091-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change 3cdc02d actually "reverted" the behavior of listening for cursorFlashTimeChanged. The reason is that we sat "blinkingEnabled" directly to true in the constructor instead of calling "setCursorBlinking", which was responsible for setting up the connection. And as it turns out, after 3cdc02d, nobody is actually calling "setBlinkingCursorEnabled" anymore. From the widgets point of view, it should always blink when visible (unless QPA sets cursorFlashTime to zero). So we can remove the whole function, and set up the connection in "setVisible" instead. Change-Id: I577a5fbbbd9c56331ac7f8bb38567a684ca8c1df Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | QWidgetTextControl: only show cursor when having focusRichard Moe Gustavsen2016-04-301-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit d3dcc6f introduced a regression to QTextEdit, leaving it to always show the cursor regardless of focus. The reason is that QTextArea used to toggle visibilty by setting the cursor blink rate. What it really wanted to do was to set cursor visibility explicit. This patch implements function setCursorVisible, and updates the places that used to call setBlinkingCursorEnabled to instead call setCursorVisible (where it makes sense). Change-Id: I58ea965178d4faaf5b09f6f6a37a37d5e8b99c97 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | QWidgetTextControl: respect run-time changes to cursorFlashTimeRichard Moe Gustavsen2016-04-251-6/+20
| | | | | | | | | | | | | | | | | | | | | | cursorFlashTime will now change dynamically from QPA while platform controlled text selection (on mobile) is ongoing. This patch will therefore update QWidgetTextControl so that it listens to the cursorFlashTimeChanged signal and changes the blinking rate when triggered. Change-Id: I89bdfaab0e93d1d055baba6b132a7911d2ae84f6 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | QWidgetTextControl: implement support for pos argument to ImAbsolutePositionRichard Moe Gustavsen2016-04-131-4/+10
| | | | | | | | | | | | | | | | Implement support in QWidgetTextControl for the new API that lets you specify a position argument when querying for Qt::ImCursorPosition. Change-Id: I123e2522d33e783e6f3467b81be872e3620d6d15 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | QWidgetTextControl: implement support for Qt::ImAnchorRectangleRichard Moe Gustavsen2016-04-131-0/+2
| | | | | | | | | | | | | | | | Implement support in QWidgetTextControl for the new enum Qt::ImAnchorRectangle. Change-Id: I7978915454a6dd93b2f491ed15619016cda85c7e Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>