summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qlineedit.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Makes QPlatformTheme::PasswordMaskDelay themable using QStyleRisto Avila2014-03-141-0/+1
| | | | | | | | | | | | | | Creates new themable setting SH_LineEdit_PasswordMaskDelay which can be used to override QPlatformTheme::PasswordMaskDelay. SH_LineEdit_PasswordMaskDelay defines number in ms which the password character is visible when echoMode is set to Password [ChangeLog][General][QStyle] Creates a new themable variable SH_LineEdit_PasswordMaskDelay Change-Id: I26f0ddfda2b49bc293e00e8fcf62260cf4896ab2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@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>
* Android: Enable text selection only when ImhNoPredictiveText is set.Christian Strømme2014-02-211-2/+10
| | | | | | | | | | Mouse selection does not work well with Android and text will be randomly copied, pasted or deleted. This behavior is especially bad when predictive text is enabled. Task-number: QTBUG-34616 Change-Id: I732ad7db52169bfb5735c237cf24597a3d6d64ba Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* QLineEdit: hide placeholder text when h-centered & focusedJ-P Nurmi2013-12-111-1/+6
| | | | | | | | | | | | [ChangeLog][QtWidgets][QLineEdit] A blinking cursor in the middle over horizontally centered placeholder text looks bad. Thus, horizontally centered content is now considered as an exception and the placeholder text is hidden when the line edit is focused. Task-number: QTBUG-31669 Change-Id: I17aa1e6656673f81545a8437f90814b188ad484a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix QLineEditPrivate::shouldShowPlaceholderText()J-P Nurmi2013-12-051-1/+1
| | | | | | | | | | | | | | As stated in commit 46106c4, placeholder text should not be shown when an empty QLineEdit has visual preedit text fed by a composing input method. The same condition applies to setPlaceholderText() in the sense that there is no need to call update() when the placeholder text is not even shown. Change-Id: I2521a119b160e16ae0738d3575fea6d9939d6d2a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QLineEdit: Extract Method shouldShowPlaceholderText()Marc Mutz2013-11-281-2/+2
| | | | | | | | | | | The condition under which the placeholder text should be shown changed recently, so refactor the code to centralize the condition. It turns out that setPlaceholderText() and paintEvent() disagree on the condition already. Change-Id: Id193a9a138042ab0690082dcf634cf7487a5276e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Disable clear button in read-only QLineEdit.Friedemann Kleint2013-11-051-0/+2
| | | | | | Task-number: QTBUG-34315 Change-Id: I6c318879aee907c080e871a541da4ba5eadd71ed Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QLineEdit: Fix potential crash when removing the clear button.Friedemann Kleint2013-11-051-2/+2
| | | | | | | | Remove it from the side actions list. Task-number: QTBUG-34315 Change-Id: I70063351193b504f8656e903896d155ac74f73a6 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-8/+8
| | | | | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-071-2/+1
|\ | | | | | | Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
| * Update QLineEdit::placeholderText property documentationGiuseppe D'Angelo2013-08-291-2/+1
| | | | | | | | | | | | | | | | | | | | eeb31ad10a1c1b26233f383de6d1b2b217cde08f changed the behavior and allowed the placeholder text to stay visible even if the lineedit has focus. Task-number: QTBUG-33237 Change-Id: I733331be1d3225eb28390b21eb9a7e4971bfdc31 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Add clearButton-property to QLineEdit.Friedemann Kleint2013-08-081-0/+39
| | | | | | | | | | | | | | | | Based on addAction-API. Change-Id: Ie6c3d2d728b23a85cdd80428c92ee8208ae0a65c Done-with: Kevin.Ottens@kdab.com Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Add side widgets to QLineEdit via QAction.Friedemann Kleint2013-08-061-5/+65
| | | | | | | | | | | | | | | | | | | | | | | | Add QLineEdit::addAction() overloads, allowing for a variable number of icons or user-defined widgets. Change-Id: Id298f18c2f47cc998170357e65cc6098df851aab Done-with: Kevin.Ottens@kdab.com Reviewed-by: Thomas Zander <zander@kde.org> Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Assign icons to actions of QLineEdit context menuAurélien Gâteau2013-07-301-0/+13
| | | | | | | | | | | | | | | | Icons are only set if they are valid. Change-Id: If2398cdc977a3882e7738ef1bcf5519bd7053449 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Laszlo Papp <lpapp@kde.org>
* | Merge branch 'stable' into devSergio Ahumada2013-07-111-3/+3
|\| | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/json/qjsonwriter.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
| * Fix the cursor position of an empty QLineEdit with a placeholder textJ-P Nurmi2013-06-291-3/+3
| | | | | | | | | | | | Task-number: QTBUG-32061 Change-Id: I43b689d8d7bc3c93036de48518f7a0f9f2aa33cf Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-201-1/+1
|\| | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp tools/configure/configureapp.cpp Change-Id: I3092bd3276af14304b7ab3ae1e1cc05d11cdede0
| * hide placeholder text when QLineEdit has preedit textTasuku Suzuki2013-06-191-1/+1
| | | | | | | | | | | | Change-Id: Ica84e9ce715702b690906ef748970e16d9162c4b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Aurélien Gâteau <agateau@kde.org>
* | Fix setPlaceholderText in QLineEditBenjamin Port2013-06-111-1/+1
|/ | | | | | | | | Since we don't use focus to show/hide place holder text, we don't need to check widget focus but if text is empty. Change-Id: I37f2fdb9e20a64ca38c61e60190f95635695c613 Reviewed-by: Aurélien Gâteau <agateau@kde.org> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Refer to setDragEnabled in QLineEdit's detailed description.Mitch Curtis2013-05-301-1/+2
| | | | | | | | | It's currently not obvious how to drag text from a QLineEdit. Task-number: QTBUG-22413 Change-Id: I5b92ce5c7425a1cb8ee6f401c685424eb9396592 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Make password mask characters themeable.Mitch Curtis2013-04-191-6/+7
| | | | | | | | Task-number: QTBUG-29871 Change-Id: I3cf739a321d7917f8f8431992e29bba0871b1934 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Automatically hide the SIPBogDan Vatra2013-02-111-1/+1
| | | | | | Change-Id: I4d63a883941842aed9a9c3806479d7aeeebb9f56 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Keep QLineEdit placeholder text visible when focusedAurélien Gâteau2013-02-011-2/+1
| | | | | | | | | | | | This is useful when the widget is focused by default, and also gives another opportunity to the user to read the message before typing, removing the need for workarounds like clicking in another text entry to bring back the placeholder message. Change-Id: I4a2981a6656a87934b5c8ed4a8a2dc13b748c94d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@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>
* QtWidgets docs: use WinVista screenshots instead of obsolescent WinXPJ-P Nurmi2012-12-061-2/+2
| | | | | Change-Id: Ic7fd291d4ce4468ae12cf5dd102fbcc45387dd87 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QtWidgets docs: use Fusion screenshotsJ-P Nurmi2012-11-281-2/+2
| | | | | | | | The Plastique style no longer exists in QtBase. All the references have been updated to Fusion, and the obsolete screenshots have been removed. Change-Id: I771a9ecf23b82965c7b3c41a40945cf051cb5f3a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add feature to enable rounded line edit on macJens Bache-Wiig2012-11-151-2/+1
| | | | | | | | This will not currently be exposed in the widget API but we can make use of it for qt quick components. Change-Id: I08300a3bcd58e68df633fe9b36a988eb6176ef9c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Remove CDE and Motif styles from qtbaseJens Bache-Wiig2012-09-271-2/+2
| | | | | | | | | | | | | | | | | It is time to clean up some of our legacy code. These styles have not been actively maintained for a long time and I think it is safe to say that they should no longer belong as part of the default distribution of Qt. We dont support any platforms based on CDE with our source packages. Note that even if we are removing these styles from the default distribution of Qt, applications that depend on them will still be able to bundle the existing (and unmodified) styles along with their own source code as we are not breaking compatibility. Change-Id: I1709630c20ba8e8088cd01628628d86856db57a4 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@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 QLineEdit functions.Mitch Curtis2012-09-121-156/+0
| | | | | | | | | | Several functions in qlineedit.cpp are documented but don't exist. QDoc was complaining... e.g.: "Cannot find 'repaintArea(...)' in '\fn' void QLineEdit::repaintArea(int a, int b)". Change-Id: I56ca0dbc8e7b4da5f23ad2ca8d8280cdf91c2dc2 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Correct QLineEdit::inputMask documentation.Mitch Curtis2012-07-231-2/+1
| | | | | | | | | | | | | | | The documentation says: "Unset the mask and return to normal QLineEdit operation by passing an empty string ("") or just calling setInputMask() with no arguments." However, the parameter for setInputMask is a const QString&, so calling it with no arguments will result in a compile error. The documentation should not advise calling setInputMask() without arguments. Change-Id: Icd8e063dcd3d745bd4bf0c6851a38f63481957ae Task-number: QTBUG-24803 Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Doc: Fix typoSergio Ahumada2012-07-161-1/+1
| | | | | | Task-number: QTBUG-23657 Change-Id: I3115f45f743da5699aa13f31a0f2de013d428aba Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Add stylehint to use querying RTL keyboard support.Friedemann Kleint2012-07-111-9/+2
| | | | | Change-Id: Ic58ed7cb64cc7fe60b4d431e9f29e389c62265fc Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* QtWidgets: remove \link usagesGiuseppe D'Angelo2012-05-291-9/+6
| | | | | Change-Id: I9887a24485233f29d07054b3110d4db9e499b9f4 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QTBUG-16850: QLineEdit::setSelection removes blank charactersTarja Sundqvist2012-05-251-1/+1
| | | | | | | | | Changed checking of the start position so that it does not call d->control->text() because this removes blank characters when an input mask is used. Thus the selection fails. Instead d->control->end() is used for checking the start position. Task-number: QTBUG-16850 Change-Id: I62992fb81bd47d432bade9f219782d48eb309956 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Fixed QLineEdit::inputMethodQuery() for Qt::ImHintsTasuku Suzuki2012-05-231-1/+1
| | | | | | | It should return QWidget::inputMethodHints() instead of QVariant() Change-Id: I01f5de8f2087ac67d125f54f08abed523653eb92 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Doc: Fix \sa usageMarius Storm-Olsen2012-05-111-10/+10
| | | | | | | | | 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-1/+1
| | | | | | | | This change moves the snippets and images to the modularized directories. Change-Id: Idec1afb9db7ea6add1ca4cf25ec4019d8bce0c4d Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Reverted use of tentative commit use in QWidget editorsPekka Vuorela2012-03-271-2/+1
| | | | | | | | | Feature to be reimplemented simplified. Cases when input method needs to be reset with possibility to commit use QInputMethod::commit() again. Change-Id: Ibfe7aecc0799e7a76c7ac4f5d860971cfe6e97ca Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-021-52/+52
| | | | | | | | | | | 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>
* Remove use of deprecated conversion from QKeySequenceOlivier Goffart2012-02-271-1/+2
| | | | | | | Note: UNICODE_ACCEL is Qt3 compatibility and is equal to 0 Change-Id: I808a66772abceb3822d515d69386728264eb1b40 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Renamed QInputPanel as QInputMethodPekka Vuorela2012-02-021-3/+3
| | | | | | | | | | | QInputMethod better describes what the class is about, input methods in general, be they panels or just composing input from key events. Compatability headers added for old name. Not bulletproof but should be enough to get transition done. Change-Id: Iefde6e7ccb1ec4a3b226cef3469089e751c60fc1 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | 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: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QLineEdit to use Qt::ImhSensitiveData input hint on password echo modesPekka Vuorela2012-01-031-2/+2
| | | | | Change-Id: I6922e41e7e57563f1190f46e0890b71e5c4b7ef4 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Remove input context action support from editorsPekka Vuorela2011-12-201-13/+0
| | | | | | | | Relying on obsolete QInputContext API. Change-Id: I954ccf57204cbb24ff5cec622384fa3b9932a079 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* QWidget text editors to commit text on their own on losing focusPekka Vuorela2011-11-101-0/+1
| | | | | Change-Id: I3b907661e8a24a6dbdaabf607c5c528b1b471c98 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>