aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktextinput_p.h
Commit message (Collapse)AuthorAgeFilesLines
* 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-18/+18
| | | | | Change-Id: I176f91a8c51e81a2df3fe91733118261491223ee Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add TextInput::textEdited()J-P Nurmi2016-12-301-0/+1
| | | | | | | | | | [ChangeLog][QtQuick][TextInput] Added textEdited() signal to distinguish user edits from programmatical text changes. Change-Id: I1d78499e3e11f9f1cab80ce3b0a6d9f2713219f4 Task-number: QTBUG-57203 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-4/+4
| | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-131-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsapi/qjsengine.cpp src/qml/qml/qqmlengine_p.h src/quick/items/qquickanchors.cpp src/quick/items/qquickanimatedimage_p_p.h src/quick/items/qquickitem_p.h tests/auto/qml/qqmlecmascript/testtypes.h tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp tests/benchmarks/qml/creation/tst_creation.cpp Change-Id: I65861e32f16e8a04c7090a90231627e1ebf6ba6f
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-271-4/+4
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickimagebase.cpp src/imports/layouts/plugin.cpp Change-Id: I5f48474df4034a1347ec74795c85d369a55b6b21
| | * QQuickText,QQuickTextInput: Fully qualify enumerations in changed() signals.Friedemann Kleint2016-04-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to change 85b64e701b2eaecdd30a7e0e079e2c80dd846fec. Fixes test warnings: QWARN : tst_qquicktextinput::mouseSelectionMode_accessors() QSignalSpy: Unable to handle parameter 'mode' of type 'SelectionMode' of method 'mouseSelectionModeChanged', use qRegisterMetaType to register it. QWARN : tst_qquicktext::textFormat() QSignalSpy: Unable to handle parameter 'textFormat' of type 'TextFormat' of method 'textFormatChanged', use qRegisterMetaType to register it. Change-Id: I9105eb31ce3d6203602649e24835f4fb0ddb25fd Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | 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>
* | QQuickTextInput: added clear() methodLiang Qi2016-01-191-0/+1
| | | | | | | | | | | | Task-number: QTBUG-50428 Change-Id: I394c2cf1bc397dcbf6d82d3211a6b39519d7582b Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | QQuickTextInput: added preeditText propertyLiang Qi2016-01-131-0/+3
|/ | | | | | Task-number: QTBUG-49503 Change-Id: I803c9fc3bddba81d08e1dd450bc5a5f8a5605720 Reviewed-by: J-P Nurmi <jpnurmi@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-7/+7
| | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-131-0/+1
|\ | | | | | | | | | | | | | | Conflicts: src/quick/util/qquickpixmapcache.cpp tests/auto/quick/qquickwindow/BLACKLIST Change-Id: Ie81612f2884f8ea508c48ba2735ec54ea1c2eca5
| * Honor setFocusOnTouchRelease in QQuickTextInputKai Uwe Broulik2015-03-301-0/+1
| | | | | | | | | | | | | | [ChangeLog][QtQuick][TextInput] SetFocusOnTouchRelease is honored Change-Id: I0c5150465effadb7b1221250875aedf16a83bb2c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* | Move QtQuick validators out of qquicktextinput_p.hJ-P Nurmi2015-03-181-38/+0
| | | | | | | | | | | | | | | | | | TextField (v2) inherits QQuickTextInput, and therefore has to include qquicktextinput_p.h. Move the internal Q_AUTOTEST_EXPORT'd classes out of the header to avoid build problems on Windows due to missing symbols Change-Id: I6f37cf4e112425ff6c4c0a4ccc5e584f26599d8a Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* | TextInput: add support for paddingJ-P Nurmi2015-03-051-0/+31
|/ | | | | | | | | | | | | | This makes it possible for TextField to inherit TextInput, reserve space for the decoration, and set the desired property defaults without having to create dozens of property aliases. [ChangeLog][QtQuick][TextInput] Added padding, leftPadding, topPadding, rightPadding and bottomPadding properties. Task-number: QTBUG-41559 Change-Id: Iaa7697a10a6f66685c7cae454edf4c1984d411bc Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com> Reviewed-by: Alan Alpert <aalpert@blackberry.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/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | QQuickTextInput: don't ifdef out propertiesJ-P Nurmi2014-11-011-14/+1
| | | | | | | | | | | | | | | | Take out the implementation body instead. These conditional properties are causing trouble for controls (invalid alias location). Change-Id: I055e149a4fe2d4d5d0c62d21e5f5368e9973c512 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-19/+19
|/ | | | | Change-Id: I2e64950aef710f943c3bc50bc9bf8a1f7fb58d28 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* TextInput: implement the new input method APIJ-P Nurmi2014-06-021-0/+1
| | | | | | Change-Id: I8a2f66a6cfa346627394705741d2f47affcd0c2b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Introduce TextInput::ensureVisible(int position)J-P Nurmi2014-05-211-1/+2
| | | | | | | | | | | | | | | This is required for TextField to be able to implement text selection handles. TextField needs to be able to ensure that the appropriate character position becomes visible when the handles are moved around. [ChangeLog][QtQuick][TextInput] Added TextInput::ensureVisible(int pos) method to be able to control the scrolling position of a TextInput that has automatic scrolling enabled. Task-number: QTBUG-38934 Change-Id: Id77eafcda6324d10868e0798519e5b712a0d33ed Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-101-4/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/accessible/quick/quick.pro src/quick/items/qquickpincharea.cpp src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp src/quick/scenegraph/qsgthreadedrenderloop.cpp Manually adjusted for TestHTTPServer constructor change: tests/auto/quick/qquickimage/tst_qquickimage.cpp Change-Id: I5e58a7c08ea92d6fc5e3bce98571c54f7b2ce08f
| * Always implement text input "canPaste" propertyBernd Weimer2014-04-241-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This is needed for TextField control for instance. If QT_NO_CLIPBOARD is defined, canPaste will always return false. Fixes dialogs auto test when QT_NO_CLIPBOARD is defined. [ChangeLog][QtQuick][Platform Specific Changes] Added canPaste property to TextInput element also on platforms that don't support a clipboard (QT_NO_CLIPBOARD is defined). Change-Id: Ia85205672ba59c1fce70852458c514b03d332de6 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Makes PasswordMaskDelay configurable through TextInputRisto Avila2014-03-121-0/+6
|/ | | | | | | | | | | Adds a new property to TextInput which can be used to override QPlatformTheme::PasswordMaskDelay. The new property is TextInput.passwordMaskDelay and takes in delay (ms) which time character is shown before masking it. This is only when echoMode is set to TextInput.Password [ChangeLog][QtQuick][TextInput] Added passwordMaskDelay property Change-Id: I52812b883db11fdd21b25154887c51df8a44f69c Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* TextInput: add editingFinished signalLiang Qi2013-11-221-0/+1
| | | | | | | | | | | | | | | Autotest is included. Task-number: QTBUG-34780 [ChangeLog][QtDeclarative][TextInput] add editingFinished signal Change-Id: Ib633daee67cd4e5f15739a6004adbe882ab3d3fc Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Cleanup v8 dependencies from QQmlV8FunctionLars Knoll2013-05-081-1/+1
| | | | | | | ... and rename it to QQmlV4Function Change-Id: Iad72347babf62691e26306877d4f229fda127eb7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* TextInput: Handle focus event directlyCaroline Chao2013-03-071-1/+1
| | | | | | | | | Use focusInEvent and focusOutEvent instead of changeItem to handle focus event. (One benefit is the focus events have the focus reason and changeItem doesn't). Change-Id: I164820f375f0ffddc529d59565a3e448b84c6042 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@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/+14
| | | | | | 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>
* Add option to use native rasterizer for SceneGraph textEskil Abrahamsen Blomfeldt2012-07-101-0/+9
| | | | | | | | | | 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>
* Refresh the TextInput.acceptableInput property when validator changes.Andrew den Exter2012-07-041-0/+4
| | | | | | Task-number: QTBUG-26260 Change-Id: I404640d9a2f000976887dcc2119f971c17a71c7e Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove the open and closeSofwareInputPanel functions.Andrew den Exter2012-06-221-3/+0
| | | | | | | | | Functionality is provided by the global Qt.application.inputMethod object. Task-number: QTBUG-21449 Change-Id: I75c082bcbe44c8834ccaf966a3f9a09ab91ec290 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Defer construction of TextEdit/TextInput delegates.Andrew den Exter2012-05-141-0/+2
| | | | | | | | | | | | | | | Don't create instances of the delegate components until the item gains focus, or the cursorVisible property is set to true. Cursor delegates are typically small and relatively fast to create and so won't have a significant cost during a one off focus in event, but that cost can still add up when creating a number of TextInputs or TextEdits at once. If a delegate that is instantiated immeditately is required it is possible to instead create a child item and bind to the cursorRectangle and cursorVisible properties. Change-Id: I5ec2b5b6a30e534aee3dd5a58c6a5ac0686f5ce2 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix bounding rects of text items.Andrew den Exter2012-04-271-0/+2
| | | | | | | | | | Ensure the rectangles are correctly positioned with right and center aligned text, not just sized correctly. Also add padding to the clip rects so the cursor and styled text aren't clipped at the item boundaries. Change-Id: I03ef140589154ebd49b600b0a4c4fbeff845c10f Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Compile fix if QT_NO_CLIPBOARD definedAndreas Holzammer2012-04-191-0/+4
| | | | | Change-Id: Ic287a89193c98b2405032fe5859782286d4528d0 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Merge master <-> api_changesMatthew Vogt2012-03-051-2/+2
|\ | | | | | | Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
| * Use floating point types for position offsets and cursorRectangle.Andrew den Exter2012-02-241-2/+2
| | | | | | | | | | | | | | | | | | Rounding to align painting to pixel boundaries is no longer necessary are largely removed. Correct the few instances remaining in TextEdit and TextInput. Change-Id: Ic6ec57092d74ec43b23d85cd8868e0190acc3e09 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>