aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktextedit_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/tqtc/lts-5.15.11' into ↵v5.15.11-lts-lgplTarja Sundqvist2023-06-091-0/+2
|\ | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I7b6e0ef657d1278405738f682b2795f8c345c3d4
| * QQuickText/Edit: fix C++20 -Wdeprecated-enum-enum-conversion warningsMarc Mutz2022-07-211-0/+2
| | | | | | | | | | | | | | | | | | Declare that HAlignment and VAlignment are designed to be mixed. Change-Id: I97663653014856a3391e36dd1847b67603f6aac9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit c34cdee53f81ad0d645468ebae7aa9d8cab79a3f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* | Revert "Update commercial license headers"v5.15.3-lts-lgplTarja Sundqvist2021-03-241-20/+20
|/ | | | | | | | | | | This reverts commit 7b1331c789df0ac12d7cf5aa5f8967b8651a4cfa. Revert of commercial license headers is required for Qt 5.15.3 opensource release. Task-number: QTBUG-91108 Change-Id: I47eb004523bdb3beb16e9fd51e40da6f738f9f34 Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
* Update commercial license headersTarja Sundqvist2021-02-021-20/+20
| | | | | | | | | | | | | | | Updated header.COMM to the files in tqtc-qtdeclarative. Examples, documentation files or tests are not updated. The commercial license header may contain some additional lines so that its line count equals with the earlier license header. Reason for this is that some autotests use hard coded line numbers and a change in the line count causes failures in tests. Task-number: QTQAINFRA-4161 Change-Id: Ic1d011aa01b1fe7242bcbbf72d5ab454d1015cf9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Specify parameters of type registration in class declarationsUlf Hermann2019-09-261-0/+1
| | | | | | | | | | | | | | | | | | | | | Using this technique we can automatically register all necessary revisions and minor versions of a type, using the metaobject system. This greatly reduces the potential for mistakes and resulting incompatibilities between versions of imports. We assume that for each type we need to register all revisions of its super types and its attached type, and that the revisions match. That is, if you import version X of type A, you will also get version X of its attached type and of any super types. As we previously didn't take these dependencies into account when manually registering the types, a number of extra revisions are now registered for some types. Potentially, we can now generate the qmltypes files at compile time, using moc. Change-Id: I7abb8a5c39f5e63ad1a0cb41a783f2c91909491b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add Markdown support to TextEditShawn Rutledge2019-05-291-1/+3
| | | | | | | | | | | | - textFormat can be set to MarkdownText, and markdown can be loaded into the text property - markdown text can be pulled out of the text property - if there are lists with checkboxes, you can click them to change the checkbox state Change-Id: I450115c732d737446ae71806e4abb18e8cc639f3 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* TextEdit: use I-beam cursor by default, pointing cursor for linksShawn Rutledge2019-05-151-0/+1
| | | | | | | | | | But do not interfere with any custom cursor that user code sets: remember and restore it when the mouse is no longer hovering a link. Task-number: QTBUG-14769 Fixes: QTBUG-50482 Change-Id: Ia4633c22d0ad42d07203d4dc3e330b90a5f94a7c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-2/+2
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-251-20/+20
| | | | | Change-Id: I176f91a8c51e81a2df3fe91733118261491223ee Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add tabStopDistance property to QQuickTextEditPaolo Angelelli2017-08-031-0/+5
| | | | | | | | | | | | This change adds a new property to QQuickTextEdit, tabStopDistance, to control the distance between tab stops in the underlying QTextDocument. [ChangeLog][QtQuick][QQuickTextEdit] Added tabStopDistance property Change-Id: Ib75838e9765e44c74e5055a738d2a0464a341509 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-3/+3
| | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add overwriteMode to QML TextEdit and QML TextInputDan Cape2016-03-031-0/+5
| | | | | | | | | | Overwrite mode was added to QML TextEdit and QML TextInput to match the functionality provided by QTextEdit. Tests were updated as well to ensure the mode functions as expected. Task-number: QTBUG-26513 Change-Id: I1769159b298220107b09f9f13dc3af5f274715cc Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-191-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: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QQuickTextEdit: added clear() methodLiang Qi2016-01-191-0/+1
| | | | | | Task-number: QTBUG-50428 Change-Id: Id618616f8d8d50c2a2eba79a2bf6969662e727b8 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* QQuickTextEdit: added preeditText propertyLiang Qi2016-01-131-0/+4
| | | | | | Task-number: QTBUG-49503 Change-Id: I3390e72893e4125e00e8e0835a8d2fae11ea276f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* QQuickTextEdit: Fully qualify enumerations in changed() signals.Friedemann Kleint2015-12-151-4/+4
| | | | | | | | | Fix warnings when running tst_qquicktextedit: QWARN : tst_qquicktextedit::mouseSelectionMode_accessors() QSignalSpy: Unable to handle parameter 'mode' of type 'QQuickTextEdit::SelectionMode' of method 'mouseSelectionModeChanged', use qRegisterMetaType to register it. QWARN : tst_qquicktextedit::textFormat() QSignalSpy: Unable to handle parameter 'textFormat' of type 'QQuickTextEdit::TextFormat' of method 'textFormatChanged', use qRegisterMetaType to register it. Change-Id: I2d41f970777c9ee4d8999acceed9e1b9cf52b0f0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-061-0/+11
| | | | | | Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Export QQuickTextInputPrivate and QQuickTextEditPrivateJ-P Nurmi2015-06-231-0/+2
| | | | | | | ...so that QtQuick.Controls 2 TextField and TextArea can inherit them. Change-Id: I9383927c51a70848753a9f41f374d4161000fbb1 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Port from Q_ENUMS to new macro Q_ENUM.Friedemann Kleint2015-06-191-6/+6
| | | | | | | | | | | Remove Q_ENUMS in favor of the new Q_ENUM macro which provides registration as meta enum and a debug stream operator. QQuickXmlListModel::Status is left unmodified as porting it creates a link error in tst_qquickxmllistmodel. Change-Id: Id5e6192c9f85e7c94332508fbd91873ddda31e1a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Add CONSTANT to Q_PROPERTY textDocumentKari Hautamäki2015-04-211-1/+1
| | | | | | | | | Add CONSTANT keyword to Q_PROPERTY textDocument to remove warning "depends on non-NOTIFYable properties". Task-number: QTBUG-45115 Change-Id: I090870765e8b32bc1438d21d9c1b7ef942c043b5 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* TextEdit: add support for paddingJ-P Nurmi2015-03-051-0/+30
| | | | | | | | | | | | | This makes it possible for TextArea to inherit TextEdit, reserve space for the decoration, and set the desired property defaults without having to create dozens of property aliases. [ChangeLog][QtQuick][TextEdit] Added padding, leftPadding, topPadding, rightPadding and bottomPadding properties. Task-number: QTBUG-41559 Change-Id: I4fa22f86e6151524a63b2b862f17bc9d6a713142 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* TextEdit: add editingFinished signalLiang Qi2015-03-031-0/+1
| | | | | | | | | | | Autotest is included. [ChangeLog][TextEdit] add editingFinished signal Task-number: QTBUG-44734 Change-Id: Ib632e589419758bea09442e6efcf4d977b9a13e8 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix 590 inconsistent override warnings [-Winconsistent-missing-override]Sérgio Martins2015-02-131-1/+1
| | | | | | | | Classes should either use or not use override, otherwise it hurts code readability. Change-Id: Ieb899a3475b0c36ab20285740b2cec2cd1677a54 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-121-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. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-091-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4arraydata.cpp src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4globalobject.cpp src/qml/jsruntime/qv4internalclass.cpp src/quick/items/qquicktext_p.h src/quick/items/qquicktextedit_p.h src/quick/items/qquicktextinput_p.h Change-Id: If07e483e03197cb997ef47a9c647a479cdb09f4c
| * Update plugins.qmltypesKai Koehne2014-12-051-1/+1
| | | | | | | | | | | | Change-Id: I9b6c54b572d4653d609b154000e274b9e64d591f Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Invalidate font caches when switching between threadsv5.4.0-rc1Eskil Abrahamsen Blomfeldt2014-11-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The font caches can only be used from a single thread at a time. QFontEngineFT for instance, uses a global static thread storage which is accessed on releasing and creating engines, and this causes a crash if the font engine is created on one thread and released on another. We use the updatePolish() function to make sure the caches are empty before entering updatePaintNode(), and then we invalidate the cache again after updatePaintNode() is done. [ChangeLog][Text] Fixed uncommon crash in text nodes. Change-Id: I01dbc2ed58aeebd03d77a157c700330334bdb385 Task-number: QTBUG-38800 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | QQuickTextEdit: don't ifdef out propertiesJ-P Nurmi2014-11-011-12/+0
| | | | | | | | | | | | | | | | Take out the implementation body instead. These conditional properties are causing trouble for controls (invalid alias location). Change-Id: I509c6a156b8f6c6fa12488bfc5e301f60346f8a5 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-111-19/+11
|\| | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickpainteditem.h src/quick/items/qquickshadereffectsource.cpp src/quick/items/qquickshadereffectsource_p.h Change-Id: If98096443afe85fc4370cef971eace050006a61b
| * Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* | Add Q_DECL_OVERRIDEAlbert Astals Cid2014-08-141-20/+20
|/ | | | | Change-Id: I2e64950aef710f943c3bc50bc9bf8a1f7fb58d28 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Android: Add support for new input method query APIPaul Olav Tvete2014-05-081-0/+1
| | | | | | | | | Change 93fd268d implemented the new API, but missed the final piece that actually made use of it. Task-number: QTBUG-38824 Change-Id: Iea28f2cbb8c6d749d781dcf7437552597977f9ac Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Invalidate text painting nodes when document text block is updatedSarunas Valaskevicius2014-05-051-0/+3
| | | | | | | | | | | | | The commit fixes text repainting when only formatting of the text is changed by invalidating the affected blocks which will be repainted on the next update. Task-number: QTBUG-36743 Change-Id: I03ba747f9d08a9f49d0a012b8349c89c20dc6b55 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Expose TextEdit::linkAt(x, y)J-P Nurmi2014-01-291-0/+2
| | | | | | | | | | [ChangeLog][QtQuick] Added TextEdit::linkAt(x,y) method. Task-number: QTBUG-18946 Change-Id: Id9d061e6c9d857c2f0283ad5042097828d1ed02d Reviewed-by: Martin Jones <martin.jones@jollamobile.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add QQuickTextEdit::append()J-P Nurmi2013-06-121-0/+1
| | | | | | | | | | | This makes it possible to append text more efficiently than appending to the text -property, and also avoids weird rich text formatting issues with the latter approach. Task-number: QTBUG-31575 Change-Id: Id621773588b94e36f8f0b9eb6b22590e9db62811 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Add QQuickTextEdit::hoveredLinkJ-P Nurmi2013-06-071-0/+8
| | | | | | Change-Id: I9d75a97c86e047742514f942cdb91c70f1d7a9a2 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Optimize QQuickTextEdit for larger documents.Pierre Rossi2013-03-201-2/+4
| | | | | | | | | | | | | | | | | The rationale is to not end up re-processing the whole document on each update Since we know where the editing takes place, we can break down the text edit's contents in several text nodes and only re-create the affected text nodes upon editing. This requires ripping out the SelectionEngine helper class from QQuickTextNode so that QQuickTextEdit can tap into its functionality directly. A positive side-effect of this exercise is that it should be much harder to to come across GlyphNodes packing more than 16300 glyphs or so. Task-number: QTBUG-29596 Change-Id: Id29b0709baa43f5b29c44ab02398ba996be3e28a Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Add TextEdit::selectByKeyboardJ-P Nurmi2013-03-151-0/+5
| | | | | | | | | The main use case is for enabling text selection by keyboard for read-only editors. Change-Id: Ieaa9af366fd0eaf863a104a2fdf33c9ddad38b10 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fix usages of \since for QML itemsThomas McGuire2013-03-131-1/+1
| | | | | | | | | | \since uses the QML import, not the Qt version. When adding a new property, it needs a REVISION argument and the type needs to be registered again for the new version. Change-Id: I2e636e9d26c8e989729eadad2ef73a836c35caa1 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Handle focus events directly in TextEdit.Frederik Gladhorn2013-03-071-2/+1
| | | | | | | | | Instead of relying on the item change where we don't get focus reason, use focusInEvent and focusOutEvent. Change-Id: I2db7d81c67c65595b929fdcedc568af360831c5c Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Add QQuickTextDocumentFrederik Gladhorn2013-02-191-0/+5
| | | | | | | | | | | | | Adding QQuickTextDocument as a way to access the QTextDocument of QQuickTextEdit from C++. This makes it possible to use a QSyntaxHighlighter from C++ without exposing more than one single qml property in the TextEdit. Change-Id: If1790b591493adcb0b68aef0c8ca706e00450657 Reviewed-by: Alan Alpert <aalpert@rim.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-281-4/+0
| | | | | | | | | | | The macro was made empty in qtbase/ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Ia07e99676e0134fde5e32880edb95e57c779a7ff Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* Merge branch 'release' into stableGunnar Sletta2013-01-171-1/+1
|\ | | | | | | Change-Id: I88ecd5f396ecd9a9c910108d1cca832a3087f1d8
| * Exporting required symbols for Qt Quick DesignerThomas Hartmann2013-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These classes are used by qml2puppet. Qml2Puppet is an external process used by the Qt Quick Designer, that builds the interface between the designer and Qt Quick/QML internals. Qml2Puppet is responsible for emulation and rendering. The 2 in Qml2Puppet indicates that it is used for Qt Quick 2.0. This would be nice to have in Qt 5.0.1 to allow testing based on official packages. Also this helps early adaptors. QQmlTimer is used to disable timers. QQuickTextEdit and QQuickTextInput are used to disable the blinking cursor. QQuickBehavior is used to deal with behaviors. QQuickPropertyChanges and QQuickStateGroup are used to emulate states. QQuickTransition is used to disable transitions. Task-number: QTCREATORBUG-8572 Change-Id: I572707d93eda477df945976442efed32ef16df34 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
|/ | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Enable module build with QT_NO_IMTasuku Suzuki2012-11-261-0/+16
| | | | | | Change-Id: I90f8ec7e6357db7b4038bb1646fe9d3835821556 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Alan Alpert (RIM) <aalpert@rim.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove code for unused LinksAccessibleByKeyboard option.Andrew den Exter2012-07-111-3/+0
| | | | | | | | The text interaction flags aren't exposed publicly and the option isn't set by TextEdit itself so there's no need to handle it. Change-Id: I83b98e58e3b8cb8c55752d8eefe3bf36bff75249 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add option to use native rasterizer for SceneGraph textEskil Abrahamsen Blomfeldt2012-07-101-0/+10
| | | | | | | | | | For old-style (desktop components) apps using QML 2 on regular density displays, distance field text will look out of place. We introduce an option to use the native rasterizer instead if you would rather have native look and feel than scalable text items. Change-Id: Idb38e3c89f2deab9ae1963357c6c5fb235ddeab8 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>