summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-041-0/+4
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/codecs/qicucodec.cpp src/dbus/qdbusserver.cpp src/gui/painting/qbezier.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp src/plugins/printsupport/cups/qppdprintdevice.cpp Change-Id: I2703128bb64baf5580fbc2c2061b55b0f0611d2a
| * Make the inputRejected test compatible with -no-feature-clipboardJames McDonnell2019-08-151-0/+4
| | | | | | | | | | | | | | | | | | Qt for QNX is, by default, built without the clipboard feature. Change-Id: Ie8a36ceb0c0f0a695ae7d0fcf6f0bd70d2a43e0c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Dan Cape <dcape@qnx.com> Reviewed-by: Rafael Roquetto <rafael@roquetto.com>
* | Port users of get{Contents,Text}Margins() missed first time aroundMarc Mutz2019-08-011-0/+8
| | | | | | | | | | | | Done-with: Sona Kurazyan <sona.kurazyan@qt.io> Change-Id: I5b584cbe468429c53c2d661a0d7957d74e7ad691 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QtCore: mark obsolete enumerations as deprecatedChristian Ehrlicher2019-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following enumerations were obsolete for a log time but not marked as deprecated: - WA_NoBackground - WA_MacNoClickThrough - WA_MacBrushedMetal - WA_MacMetalStyle - WA_MSWindowsUseDirect3D - WA_MacFrameworkScaled - AA_MSWindowsUseDirect3DByDefault - AA_X11InitThreads - ImMicroFocus mark them as deprecated and remove the usage inside QtBase so they can be removed with Qt6 Change-Id: Ia087a7e1d0ff1945286895be6425a6cceaa483fb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | QLineEdit: don't emit editingFinished if nothing was doneSamuel Gaist2019-02-121-0/+10
|/ | | | | | | | | | | | | | | | | | | When a modal dialog is called from a slot connected to the editingFinished signal, the chain of events resulting from the focus returning to this widget will make the editingFinished signal emitted again. This patch uses a new variable to keep track of the fact that there was a modification. Once editingFinished was emitted, that flag is cleared so next time the signal will be emitted again only if a modification was made to the line edit content. [ChangeLog][QtWidget][QLineEdit] Behavior change: now the editingFinished signal is emitted only once after the line edit content was edited. Fixes: QTBUG-40 Change-Id: Ia4760bad8717f1758c3939132c446b4b4c6cd498 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix calculation of text margin if line edit contains side widgetsVitaly Fanaskov2018-11-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation leads to infinite chain of showing/hidden line edit under circumstances described in QTBUG-54676. We basically got the situation when size hint were calculated differently depending on the line edit visibility state. In this case toolbar layout have to show/hide extension button and line edit a lot of times and can never leave this "loop" (please note, that the chain is much more complicated in reality): Resize toolbar -> Set layout geometry -> Size is OK to display line edit -> Set layout geometry -> Hide extension button -> Set layout geometry (wrong size is calculated here, so "run out of space") -> Hide line edit -> Set layout geometry -> Show extension button -> Set layout geometry - > Size is OK to display line edit ... And we're in the "loop" Clear button is hidden if there is no text in a line edit. In the previous implementation, the button was always visible, only opacity was changing in order to "hide" the button. It resulted to incorrect size hints (regular and minimum). In the current implementation the button is really hidden/shown, and size hints calculated correctly. Also updated unit test for line edit. Remove code duplication in functions for calculation text margin Fixes: QTBUG-54676 Change-Id: I4549c9ea98e10b750ba855a07037f6392276358b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QIntValidator: Intermediate for number if digits equal or less than maxTuomas Heimonen2018-06-291-4/+4
| | | | | | | | | | | | | | Input value which is over the highest acceptable value, but consisting of a number of digits equal to or less than the max value should be considered intermediate. [ChangeLog][QtGui][QIntValidator] Input value with over the highest acceptable value, but with equal or less amount of digits than the maximum value is now considered intermediate. Task-number: QTBUG-59650 Change-Id: I71a77c9c266f0f3b62c71ac6cb995019385c1cf5 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* winrt: Make widgets/widgets auto tests passOliver Wolff2018-06-221-0/+3
| | | | | | Task-number: QTBUG-68297 Change-Id: I64d6e89e515a6284fbd8625cded22511de783481 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QLineEdit: Emit inputRejected() when part of the input is rejectedAndy Shaw2018-06-061-0/+12
| | | | | | | | | | | When pasting text, it is possible that part of the text is still pasted but part of it is not. For example, if there is a maximum length set then only the first part of the text is pasted and the rest is dropped. In this case it should still emit inputRejected() as not all of the input was accepted. This amends c901cdadc0a6ec65eddfe4f181274e56567f9973. Change-Id: If7906767be27e88ed9914c50bf0427833de5b8fa Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QLineEdit: Add an inputRejected() signal for when a key is not allowedAndy Shaw2018-06-011-1/+40
| | | | | | | | | | [ChangeLog][QtWidgets][QLineEdit] Added inputRejected() signal for when a key press is not accepted by the QLineEdit. For instance, when an invalid key is pressed for a validator set. Task-number: QTBUG-57448 Change-Id: I39182a78b07b37c6da01905b8da4c57930e3454b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-021-7/+17
|\ | | | | | | Change-Id: Ia082e20e2eb4b76afd4c1a1584ff4e5514655d7a
| * tst_QLineEdit: Use correct keys to move to Start/End of LineDaniel Teske2018-04-301-7/+17
| | | | | | | | | | | | | | | | | | Home/End don't actually work on macOS. The "select all and delete" key was not actually testing anything at all. Change-Id: I44d3e9dd27da418afd699bf8720d5369325d20df Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-04-261-4/+0
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm src/plugins/platforms/cocoa/qcocoawindow.mm Change-Id: Ideea96d1b43d47b1d9b34e11c9986a88e240aa71
| * tests/auto/widgets/widgets: Avoid unconditional qWait()sKari Oikarinen2018-04-251-4/+0
| | | | | | | | | | | | Task-number: QTBUG-63992 Change-Id: I7b0c259800082284ddae4e25d139ad3adc858467 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-02-211-0/+1
|\| | | | | | | Change-Id: I9c90d71fde002544fd97df7e8a2690953cf9f817
| * QLineEdit: Clear input context commit string after test functionsKari Oikarinen2018-02-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the PlatformInputContext is shared between test cases, the set commit string from inputMethod() was otherwise saved and could pollute other tests. For example on Windows PlatformInputContext::commit() was called when the QLineEdit was first clicked onto in tst_QLineEdit::testQuickSelectionWithMouse() and inserted "text" in the middle of the text, rather than starting selection as intended. This led to tst_QLineEdit::testQuickSelectionWithMouse() failing on Windows at first in CI, but then always passing the repeats when it was tested alone. Task-number: QTBUG-66499 Task-number: QTBUG-66216 Change-Id: Id6bdd263d57fd6d08fb48f013542b55b132907ea Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
* | Ensure textEdited() is emitted if the input is changed by a validatorBenjamin Terrier2018-02-121-0/+27
|/ | | | | | | | | [ChangeLog][QtWidgets][QLineEdit] The textEdited() signal is now emitted even if the QValidator has changed the user input. Task-number: QTBUG-44046 Change-Id: Ife287269c7dcbb644cb03a291bf96f7db384ed56 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QLineEdit: implement quick text selection by mouseElvis Angelaccio2018-02-031-1/+88
| | | | | | | | | | | | | | | | | | | | | | | | This is a standard feature in GtkEntry widgets or HTML <input type="text"> elements. During a normal text selection by mouse (LeftButton press + mouse move event), it's now possible to quickly select all the text from the start of the selection to the end of the line edit by moving the mouse cursor down. By moving it up instead, all the text up to the start of the line edit gets selected. If the layout direction is right-to-left, the semantic of the mouse movement is inverted. This feature is only enabled if the y() of the mouse move event is bigger than a fixed threshold, to avoid unexpected selections in the normal case. This threshold is set by the QPlatformTheme and a value smaller than zero disables this feature. The threshold is updated whenever the style or the screen changes. [ChangeLog][QtWidgets][QLineEdit] Implemented quick text selection by mouse in QLineEdit. Change-Id: I4de33c2d11c033ec295de2b2ea81adf786324f4b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Update usage of QFontMetrics::width() to new APIEskil Abrahamsen Blomfeldt2017-12-081-2/+2
| | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-231-25/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttp2protocolhandler_p.h src/network/kernel/kernel.pri src/network/ssl/qsslkey_qt.cpp src/plugins/platforms/cocoa/qcocoascreen.mm src/plugins/platforms/windows/accessible/iaccessible2.cpp src/plugins/platforms/windows/accessible/iaccessible2.h src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h src/widgets/widgets/qmenu_p.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-091-10/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qwindow.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowssystemtrayicon.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ifa515dc0ece7eb1471b00c1214149629a7e6a233
| | * testlib: start sharing common helper functionsGatis Paeglis2017-11-041-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... by moving them in QTestPrivate namespace (qtesthelpers_p.h). This header file is a convenient staging area for helper APIs, eventually some could be moved to public QTest API. This header file utilizes the same pattern as other qtestlib header files - wrapping functions with QT_${LIBNAME}_LIB to automatically enable certain APIs based on what is in the projects dependencies, e.g. QT += widgets. Change-Id: Ic0266429939c1f3788912ad8b84fc6e0d5edd68b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | Change almost all other uses of qrand() to QRandomGeneratorThiago Macieira2017-11-081-15/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vast majority is actually switched to QRandomGenerator::bounded(), which gives a mostly uniform distribution over the [0, bound) range. There are very few floating point cases left, as many of those that did use floating point did not need to, after all. (I did leave some that were too ugly for me to understand) This commit also found a couple of calls to rand() instead of qrand(). This commit does not include changes to SSL code that continues to use qrand() (job for someone else): src/network/ssl/qsslkey_qt.cpp src/network/ssl/qsslsocket_mac.cpp tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-171-3/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/fortuneclient/client.cpp examples/network/fortuneserver/server.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h src/plugins/platforms/cocoa/qcocoabackingstore.h src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoascreen.h src/plugins/platforms/ios/qiosbackingstore.h src/plugins/sqldrivers/oci/qsql_oci.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Ia6dd2c52d4a691b671cf9a2ffca70deccece8f10
| * | Ensure result of all QTest::qWaitFor are verifiedTor Arne Vestbø2017-10-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The qWaitFor functions themselves can not trigger a test failure, as that will not result in the test function exiting early, so every single call to qWaitFor needs to be wrapped in a QVERIFY. Change-Id: Id15a1549f31d06cdbf788e1d84ea431c28636ec8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-261-3/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h src/plugins/platforms/cocoa/qcocoawindow.h src/testlib/qtestsystem.h Change-Id: I5975ffb3261c2dd82fe02ec4e57df7c0950226c5
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-061-3/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/qopenglwidget/main.cpp src/3rdparty/pcre2/src/pcre2_printint.c src/plugins/platforms/cocoa/qnsview.mm src/widgets/widgets/qcombobox.cpp Change-Id: I37ced9da1e8056f95851568bcc52cd5dc34f56af
| | * Convert features.completer to QT_[REQUIRE_]CONFIGStephan Binner2017-09-041-3/+3
| | | | | | | | | | | | | | | Change-Id: If45a46c08b37d245229a39f3d6ffbb34154934f2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-151-0/+13
|\| | | | | | | | | | | | | | | | | | | 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
| * Widgets: Fix ImSurroundingText query for a QLineEdit with maskJarkko Koivikko2017-08-111-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QLineEdit with a mask does not return empty fields with the ImSurroundingText query. This is a problem for the input context that is not aware of the mask and relies on the fact that the cursor position never exceeds the boundaries of the surrounding text. This change fixes the issue by returning unmasked text with the ImSurroundingText query. [ChangeLog][QtWidgets][QLineEdit] Fixed behavior of the ImSurroundingText query. Previously, it returned a masked text whose length may be less than the cursor position. Now it returns unmasked text, so the text length is always greater than or equal to the cursor position. Task-number: QTBUG-60319 Change-Id: I1c8009164836a1baa2e3a45958bf1ea5fa9be38d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devOswald Buddenhagen2017-08-021-0/+32
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/widgets/qdockarealayout.cpp src/widgets/widgets/qmainwindow.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmainwindowlayout_p.h tests/auto/corelib/tools/qlocale/tst_qlocale.cpp tests/auto/other/macnativeevents/BLACKLIST tests/auto/widgets/widgets/qmenu/BLACKLIST Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
| * QLineEdit: Don't move the cursor after internalInsert() has done soAndy Shaw2017-07-241-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | internalInsert() will set the cursor to the right position which accounts for any input mask set on the control as well. Therefore it will already be placed at the next correct position and should not be changed again after that. Task-number: QTBUG-40943 Change-Id: Ic0f5fad6999ddd367e435ec4409a5db5b9eacb7b Reviewed-by: Daniel Teske <qt@squorn.de> Reviewed-by: David Faure <david.faure@kdab.com>
* | Fix warning about self assignFrank Meerkoetter2017-07-231-3/+2
| | | | | | | | | | | | | | | | | | | | ...tst_qlineedit.cpp:1938:9: warning: explicitly assigning value of variable of type 'Qt::Key' to itself -Wself-assign] key = key; ~~~ ^ ~~~ Change-Id: I18a46f61e13f6e2c74edce869a1c36a7f3a0fb70 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QLineEdit: Add selectionEnd() and selectionLength()Daniel Teske2017-07-201-0/+13
|/ | | | | | | | | | Getting the end position of the selection was not possible. [ChangeLog][QtWidgets][QLineEdit] Added selectionEnd(), selectionLength(), complementing selectionStart(). Change-Id: Iaecc624063d7c043f9502351f07eb76f869e86f1 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QLineEdit: Fix length calculation for input mask "\\\\"Daniel Teske2017-07-131-1/+10
| | | | | | | | | | | Consider the raw string \\\\. The previous algorithm would consider the last 3 \ to be escaped because the previous character is a \ and thus calculating a maxLength of 3. But this should be treated as two escaped \ with a maxLength of 2. Change-Id: I6c4b8d090a2e1c6e85195d5920ce8b80aea1bc2d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix tst_QLineEdit for offscreen and minimal platformsSami Nurmenniemi2017-04-261-11/+27
| | | | | | | | | Unselecting with offscreen and minimal platforms behave similarly as in Windows and QNX. If left or right key is used for unselecting, cursor position is changed. Change-Id: I022cd2fec80ad1875fec983e1e3536a105e18bb2 Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
* QLineEdit: fix broken testElvis Angelaccio2017-04-191-0/+4
| | | | | | | | | Commit 288bfb0bbd added a test that uses QLineEditIconButton, which requires QT_BUILD_INTERNAL to be defined in order for the findChild() call to work as expected. Change-Id: Ieda18f4e26a91322e8a83c14f8d1fbbe4313ecf0 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QLineEdit: Make the clear button always the leftmost buttonElvis Angelaccio2017-04-191-0/+23
| | | | | | | | | | | | | | QLineEditIconButton currently draws a fully transparent pixmap in its paintEvent() function, when the line edit is empty. This does not work when there is another trailing QAction that is visible even when the line edit has no text, as reported in QTBUG-59957. To fix this issue, make sure the clear button is always the leftmost button. Task-number: QTBUG-59957 Change-Id: I8a4f96aae07856aa0e1053ebb338ba9bdf052a16 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Deprecate QString::nullMarc Mutz2017-03-121-5/+5
| | | | | | | | | | | | | | | | | | | | | It's a Qt 3 compatibility vehicle, and as such inherits the now-alien property to distinguish empty and null strings. Particularly worrisome is the following asymmetry: QString("") == QString::null // false QString("") == QString(QString::null) // true Instead of fixing this behavior, recognize that people might use it as a weird way to call isNull(), albeit one that once was idiomatic, and simply deprecate everything that deals with QString::null. [ChangeLog][QtCore][QString] QString::null is now deprecated. When used to construct a QString, use QString() instead. When used to compare to a QString, replace with QString::isNull(). Change-Id: I9f7e84a92522c75666da15f49324c500ae93af42 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
* Widgets: Update micro focus in QLineEdit and friendsJarkko Koivikko2017-02-171-0/+53
| | | | | | | | | | | | QLineEdit, QAbstractSpinBox and QComboBox did not notify micro focus changes to the input context. In particular, the updates were missed during pre-edit stage. This change adds the missing bindings to QWidget::updateMicroFocus(). Change-Id: I9a7fff962f46dbabd8fb02836c206bace115793b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Remove tests/auto/qtest-config.h.Friedemann Kleint2016-04-121-4/+2
| | | | | | | | | | The header defined a macro QTEST_NO_CURSOR depending QT_NO_CURSOR or obsolete platforms Windows CE and Meego. Replace usages by QT_NO_CURSOR in the tests. Change-Id: I3edac88e684d1f932dd3b721bb1c1b3fe9144237 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-211-17/+12
| | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-181-0/+24
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/painting.pri src/plugins/platforms/xcb/qxcbconnection.cpp tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro tests/auto/corelib/tools/qlocale/test/test.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp tools/configure/environment.cpp Change-Id: I9c40f458b89b2c206de2d2c24e90b5f679c93495
| * QLineEdit: a validator fixup() should keep it modified; add failing testGiuseppe D'Angelo2015-12-121-0/+24
| | | | | | | | | | | | | | | | | | I still have no idea how to fix this properly given the absolute mess of QWidgetLineControl. For now add a failing test. Change-Id: Ieb5ad6994c8ce7deb0cd0f2f47d51073d042244e Task-number: QTBUG-49295 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Tests: Remove empty init/cleanup slots, constructors and destructors.Friedemann Kleint2015-12-101-7/+2
| | | | | | | | | | | | | | | | Move some code (like registrations of meta types) from init() to initTestCase() in the process. Change-Id: I57db5156647cfadab554fbed853b2e68b2815f3b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | QLineEdit: fix the shortcut override events on a readonly line editGiuseppe D'Angelo2015-12-091-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a QLineEdit is readonly there's a discrepancy between key press events and shortcut override events. For instance, presses Ctrl+C copies the text unless there's also a shortcut for the same key sequence. In this case, the shortcut override event is not handled, and no text is copied. Fix it by splitting the handling of shortcut override events between "read only" access (copy, select, etc.), which still makes sense on a read only line edit, and write access (paste, ...) which doesn't. [ChangeLog][Important Behavior Changes][QLineEdit] QLineEdit will now accept certain shortcut override events even if it is read only. Change-Id: Ie5b048259b99a1eff0581129e3ad97f27a88fe86 Task-number: QTBUG-21217 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-041-17/+41
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/ptrsize.test configure src/corelib/global/qnamespace.h src/network/socket/qabstractsocket.cpp tests/auto/other/networkselftest/networkselftest.pro Change-Id: Ic78abb4a34f9068567cea876861d4220f5a07672
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-231-17/+41
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qcfsocketnotifier.cpp src/tools/qdoc/qdocindexfiles.cpp Change-Id: Iae365b23afc611de8794f22cceae8b210d25aa8a
| | * QLineEdit: Fix visibility handling of side widgets.Friedemann Kleint2015-10-221-17/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compare against isVisibleTo() in QLineEditIconButton::actionEvent() so that action events received before show() are handled correctly. Fix a regression introduced by change 4dccb2ca674e9eafca65da0775254932102c7f4b for handling action events causing side widgets to overlap when added before the widget was shown. Use QAction::isVisible() to determine visibility. Task-number: QTBUG-48806 Task-number: QTBUG-48899 Task-number: QTBUG-39660 Change-Id: I7a39a3b9a094f2c74cde09544f1158deb2b81cf2 Reviewed-by: David Faure <david.faure@kdab.com>