summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qlineedit.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Implement Qt::ImEnabled by isEnabled() and isReadOnly()Yansheng Zhu2024-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, querying Qt::ImEnabled only returned the value of isEnabling(), which is incorrect for edit widgets with read-only properties set, as Qt::ImEnabled indicates whether text can be *input* through the input method, which results in the IM being able to insert text into read-only edit widgets. The fixed version uses both isEnabling() and isReadOnly() values to determine whether input methods need to be enabled. For some platforms (like iOS and Android) that rely on IM to select text, a check for ImReadOnly has been added to their QPA plugins to enable handles on read-only input boxes. At the same time, the imEnabledNotImplemented function in the test file tst_qwidget was modified, since ImEnabling should give a _false_ value when a lineedit is read-only. Task-number: QTBUG-105009 Task-number: QTBUG-110838 Task-number: QTBUG-119182 Pick-to: 6.7 6.6 6.5 Change-Id: Ia2abcdb3200826d567f90447d4f8b71d0ef1fbf0 Reviewed-by: Yansheng Zhu <670429759@qq.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QLineEdit: disable cursor blinking on hideGiuseppe D'Angelo2024-02-021-0/+2
| | | | | | | | | | | | | | | QLineEdit activates the blinking cursor timer when it's shown, but never deactivates it, resulting in constant wakeups even for hidden line edits. Note that this is a workaround. Qt is supposed to send a focus out event to line edits that get hidden. In some corner cases, it doesn't, and only a hide event is sent. Change-Id: Ic0645512051466ca9b1e84c54cef34c22287338b Task-number: QTBUG-52021 Pick-to: 6.7 6.6 6.5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Widgets: pass widget to QStyle::pixelMetric()Christian Ehrlicher2024-01-161-1/+1
| | | | | | | | | | | | Make sure to pass the widget to QStyle::pixelMetric() as some styles might use this (e.g. the new windows styles) to determine the correct pixel metric. Pick-to: 6.7 6.6 6.5 6.2 Task-number: QTBUG-1857 Change-Id: I5c32f5af8b284749732b610e56b4e3d8c8ed1946 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* QLineEdit: Use pmf-style connectsChristian Ehrlicher2024-01-101-22/+18
| | | | | | | | Port all string-based signal/slots connections to pmf-style connects. Pick-to: 6.7 Change-Id: I975232a3fedf82cd3327638a0ee119d1f2a90d84 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Doc: Improve QLineEdit documentationEsa Törmänen2023-12-151-178/+193
| | | | | | | | | | | Edited the text based on MS Style Guide, added a few new sections under Detailed Desccription and a link to the Line Edits Example topic. Task-number: QTBUG-119552 Pick-to: 6.6 6.7 Change-Id: Iecaa142628019118e271e392a3e332841a7b5af2 Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* QWidgetTextControl: share setActionIcon() with QLineEditMarc Mutz2023-07-051-7/+0
| | | | | | | | | ... unbreaking -unity-build-batch-size 103. Task-number: QTBUG-115031 Pick-to: 6.6 6.5 Change-Id: I004163000a422b05ee0c882f065286c043d58206 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QLineEdit: ignore key release eventsVolker Hilsheimer2023-06-201-1/+2
| | | | | | | | | | | | | | | | Amends 55fe46fd58c73a7a22374694a1b45ec2a0e6fdc5. Before that change, key release events were ignored as the QLineEdit::event reimplementation continued to call QWidget::event, and as QLineEdit didn't override keyReleaseEvent, the default implementation in QWidget got called to ignore the event. Restore that behavior by explicitly calling the QWidget implementation after updating QLineEdit-specific states, and add a test case. Fixes: QTBUG-114654 Pick-to: 6.5 6.6 Change-Id: Ic8aa35a1c915b446aece47aaf03ef5cf1884b936 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Android: Set EnterKeyNext as default type for QLineEditBartlomiej Moskal2022-12-211-0/+16
| | | | | | | | | | | | | | | | | Behavior of EnterKey for virtual keyboard need to be changed for QLineEdit. Before this commit, ImeOption was set to IME_ACTION_DONE. Because of that, setting any text in QLineEdit automatically accept QDialogs. That was annoying, when more than one QLineEdit need to be set. [ChangeLog][Widgets][Android] EnterKey type is now changed from EnterKeyDefault to EnterKeyNext for virtual keyboard in QLineEdit. It is done only if the focus can be moved to widget below. Fixes: QTBUG-61652 Change-Id: I98a7686f9f675fccf0112b8d27d48ad8fd7a887f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Port from container.count()/length() to size()Marc Mutz2022-10-041-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QWidget: use WA_InputMethodEnabled when ImEnabled is not implementedRichard Moe Gustavsen2022-07-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt 6.3, a check for WA_InputMethodEnabled was removed in QWidget, to support IM queries also for read-only widgets (7c6e4af48). This caused a regression on iOS, which made the input panel open for widgets that didn't support IM at all. A patch was merged that solved the regression (3b12305575), but it didn't take the widget attribute into account. Since not doing so has the potential to cause regressions, this patch will modify the affected code once more, so that we instead fall back to test WA_InputMethodEnabled when ImEnabled is not implemented. This will match closely to the way ImEnabled was implemented in Qt 6.2. Since we, with this change, now require that either ImEnabled or WA_InputMethodEnabled is set, our own input widgets will fail to support IM text selection when they're read-only, since they actually don't implement ImEnabled. This patch will therefore also make sure that we do so. Task-number: QTBUG-104527 Pick-to: 6.4 6.3 Change-Id: I70ad910aec38d0a74f4dd7d3115d3c45c16d2b3b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Replace QT_NO_ACCESSIBILITY with QT_CONFIG(accessibility)Allan Sandfeld Jensen2022-06-151-2/+2
| | | | | | | Pick-to: 6.4 Change-Id: Iee4bd8970810be1b23bdba65a74de912401dca65 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QtWidgets: replace remaining uses of QL1String with QL1StringViewSona Kurazyan2022-05-021-3/+3
| | | | | | | Task-number: QTBUG-98434 Change-Id: If20e217e6e4fecd18c7707bf94650f5ba856893f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QtWidgets: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-05-021-2/+4
| | | | | | Task-number: QTBUG-98434 Change-Id: I310ea8f19d73a79d985ebfb8bfbff7a02c424360 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QtWidgets: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-04-261-2/+2
| | | | | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Change-Id: I133b80334b66e0a5ab9546dd8e1ff0631e79601e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Remove mentioning of Fowler bookKai Köhne2022-01-171-1/+1
| | | | | | | | | It is out of print since years, and probably quite dated by now (released 1997). Pick-to: 6.3 Change-Id: I1653eb404713c15d70b8a15858e8c7d12b2e71cb Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* QLineEdit: always process an input method eventRichard Moe Gustavsen2021-11-121-4/+0
| | | | | | | | | | | | | | | | | | | | | If a line edit is read-only, it only means that the _user_ should not be able to change the text. Qt itself (or the application, by e.g calling setText()) should not have this restriction. For the QPA plugins to be able adjust the current selection from selection handles, we should always process input method events. It's the callers responsibility to ensure that the focus object supports the actions it sends to the focus object (like ImReadOnly, or ImhNoPredictiveText), and not QLineEdit. This patch will therefore remove the check for shouldEnableInputMethod() before processing the event. This will allow us to adjust the selection from the QPA plugin (iOS/Android). Task-number: QTBUG-91545 Change-Id: Id664ac3605a3fa0bf207635ed31d24c045d29a07 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* widgets: Fix typos in source code commentsJonas Kvinge2021-10-151-1/+1
| | | | | | Pick-to: 6.2 Change-Id: I22f71a53b0f7f0698450123343e25548c889c3e2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QLineEdit: account for the placeholderText when computing lineRectZhang Hao2021-08-231-3/+10
| | | | | | | | | | | | | | | If in a QLineEdit the placeholderText uses e.g. Tibetan language, then the height of font as reported by QFontMetrics might be less than the height of the boundingRect calculated for the placeholderText. This can cause the placeholderText to display incompletely. Fix this by using QFontMetrics::boundingRect instead of QFontMetrics::height when computing lineRect. Fixes: QTBUG-95341 Pick-to: 5.15 6.1 6.2 Change-Id: I9eef35fd89c5c1d79f6dd703355634d6905ca967 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Report ImAbsolutePosition for QLineEditTor Arne Vestbø2021-08-181-0/+1
| | | | | | | | | | | ImAbsolutePosition was added in f8dbed12266c42785c1e4758eed05833ec035f33, based on requirements on Android, but without an implementation for QLineEdit. It would seem sensible to fall back to the cursor position in this case, as QLineEdit doesn't support multiple blocks. Pick-to: 6.2 Change-Id: Iff1255270ceef069f03ce457df633d7b675f1a28 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Always update the input method when QLineEdit receives focusTang Haixiang2021-07-201-0/+3
| | | | | | | | | | | | | | | The line edit receiving focus might require different input method capabilities (e.g. be a password edit), so the input method needs to be refreshed when focus is received. This implicitly happens on tab focus when the text is selected or the cursor is moved within an input mask, but neither of those might happen, and for click-focus it never happened. Fixes: QTBUG-86846 Pick-to: 5.15 6.1 6.2 Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io> Change-Id: I47c5275d3a9d4d190ebce64269a345431346c17c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QLineEdit: don't change layout direction on keyboard inputVolker Hilsheimer2021-07-131-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | QLineEdit was the only widget in Qt that flips the widget's layout direction if a key press changes the document's layout direction. This resulted in inconsistent behavior: setting text to RTL content programmatically didn't set the widget's layout direction to RTL, but the first key press (even if just a cursor key or a latin1 character) did. Clearing the text with keyboard shortcuts changed the layout direction, doing the same using the clear button or context menu actions didn't. In addition, the automatic changing overrode whatever the UI developer set, or what Qt detected as the global layout direction based on the active translation. Remove the automatic flipping. [ChangeLog][QtWidgets][QLineEdit] QLineEdit used to change the layout direction on each key press, based on the text content. This feature resulted in an inconsistent and erratic user experience, and has been removed. Fixes: QTBUG-95011 Pick-to: 6.2 Change-Id: Ib653350d35e25ce431cca1abe9b45bdf33d035fe Reviewed-by: Fan RuiJie <fanruijie@uniontech.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* macOS: allow Qt::AA_DontShowShortcutsInContextMenus overridesVolker Hilsheimer2021-06-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Following the discussion in QTBUG-69452, the resulting change in cc33dd079796437bafed8f42de7fbf8f17d19ec8, and the documentation of QAction::shortcutVisibleInContextMenu, the intention is that the attribute allows the overriding of the platform default. However, QAction did ask both the attribute and the platform integration, making the override impossible. Instead, ask only the attribute, but default the value of the attribute to what the platform integration provides. [ChangeLog][QtGui][QAction] The shortcutVisibleInContextMenu property defaults to the value of the Qt::AA_DontShowShortcutsInContextMenus attribute, which in turn defaults to the platform integration. To override the default, set the application attribute after instantiating QApplication, or override the default for each QAction instance. Task-number: QTBUG-73990 Pick-to: 5.15 6.1 Change-Id: Iaba330913555d93d05efe1b3965a6aea39db5554 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Clarify the QLineEdit document of editingFinished signalZhang Hao2021-06-071-1/+2
| | | | | | | | | | | | QLineEdit gets focus and don't type any character when QLineEdit lost focus, document say QLineEdit will issue editingFinished signal. In fact,QLineEdit doesn't issue editingFinished signal. Fix this by clarify the document. Fixes: QTBUG-94057 Pick-to: 6.1 Change-Id: I88eed2ec7a28823598dc46f1df26fd305eb99c1f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QWidgets: show SoftwareInputPanel for key releaseBartlomiej Moskal2021-05-051-0/+2
| | | | | | | | | | | | Virtual keyboard should be shown when editable widget get focus by key (like Tab or BackTab). Before this change SoftwareInputPanel was handled only for mouseKeyRelease event Task-number: QTBUG-61652 Pick-to: 5.15 Change-Id: I85f80422b596592a04c2f9af214f991c471485c8 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
* Android: Add select and copy capability to read-only text widgetsPiotr Mikolajczyk2021-03-301-1/+15
| | | | | | | | | | | | | | | | In case of a read-only text editing widget it was imposibble to copy text from it. In QtWidgets you could not even see the selection handless. Text selection in QtWidgets module was filtered depending on readOnly property of the widget. Additionally, in InputMethod the read-only state was translated into disabled. Patch also makes the edit menu to be aware of the read-only status of the control - the menu items are different for rw and ro controls. Task-number: QTBUG-91417 Change-Id: Ic7b27f78678eeaa87a38607af787f254db1383b8 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* QLineEdit Cursor show white areaZhang Hao2021-01-281-2/+4
| | | | | | | | | | | | fix QLineEdit Cursor Rect and InputMask area overlapping, the cursor rect area is white. when inputMask is set,we don't need draw cursor. Fixes: QTBUG-89578 Pick-to: 5.15 6.0 Change-Id: Ibec7f8f1f7331a12438fd821c2002903260da10a Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Adjust code format, add space after 'if'Zhang Sheng2020-11-161-1/+1
| | | | | | Change-Id: Ice081c891ff7f4b766f49dd4bd5cf18c30237acf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Fix redundant emission of editingFinished from QLineEdit with Return keyChristian Heimlich2020-09-231-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation of QLineEdit uses the "edited" bit-field flag to prevent unnecessary emissions of editingFinished() when a line edit loses focus but its contents have not changed since the last time the signal was emitted; however, this flag is only cleared when the signal is fired due to focus loss and not when the Return/Enter key is pressed. This causes an unexpected double emission of the signal when focus is lost following a press of the Return/Enter key if the line edit's text was not further altered between the two actions. This change includes the Return/Enter press as a trigger for clearing the "edited" flag to make editingFinished()'s behavior more consistent and expected. Prevents slots in user code from triggering twice in situations where the line edit's current contents have already been handled, but still allows the end-user to force an emission of the signal via Return/Enter. The effect of the "edited" flag on the signals behavior has also been noted in the signal description as it was previously omitted. [ChangeLog][QtWidgets][QLineEdit][Behavior Change] Pressing the Return/Enter key in a QLineEdit will now also prevent editingFinished() from firing due to focus loss if the contents of the line edit have not changed since the last time the signal was emitted. See - https://forum.qt.io/topic/116902/ Change-Id: I11aadd45341337b7852da8cf5802c7c9efdd614d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move event-response code into dedicated event handlersVolker Hilsheimer2020-09-021-14/+27
| | | | | | | Address ### Qt 6 comments. Change-Id: I4c90265293ddf539f860630901ab6d9487e2a1b5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Properly deprecate Qt::MidButton in favor of Qt::MiddleButtonEdward Welbourne2020-08-221-1/+1
| | | | | | | | | | | | MidButton had its // ### Qt 5: remove me upgraded to Qt 6 at 5.0; but it dates back to 4.7.0 Replace the many remaining uses of MidButton with MiddleButton in the process. Pick-to: 5.15 Change-Id: Idc1b1b1816673dfdb344d703d101febc823a76ff Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QLineEdit: Fix cursor drawing issuesLu YaNing2020-07-231-0/+1
| | | | | | | | | | | | | | | | Entering Chinese in some fonts in an English environment causes the cursor drawing coordinates to exceed the updated coordinates, leaving behind stale pixels at the top. Keep the refresh and draw area calculation methods the same when rendering the contents in QLineEdit::paintEvent, and when calculating the update area in QLineEditPrivate::adjustedControlRect. Fixes: QTBUG-85569 Pick-to: 5.15 Change-Id: I978cb56f24f961086b1271e56d07ad1ced16f8ff Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use QList instead of QVector in widgetsJarek Kobus2020-07-021-1/+0
| | | | | | Task-number: QTBUG-84469 Change-Id: I3007734f8e4f164ece9dd8850ef007cbef9e12ef Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Replace calls to deprecated QEvent accessor functionsShawn Rutledge2020-06-081-14/+14
| | | | | | | Many of these were generated by clazy using the new qevent-accessors check. Change-Id: Ie17af17f50fdc9f47d7859d267c14568cc350fd0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QtWidgets: fix a few more int/char -> QChar conversionsMarc Mutz2020-04-301-1/+1
| | | | | | | | | | They were masked by all QChar ctors being made explicit, except the char16_t one, which was left as the only viable choice. Change-Id: I210d50dc243391ad2c7dd353ba9ae40147585d04 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Remove deprecated members from QtWidgets/widgets classesVolker Hilsheimer2020-04-171-24/+0
| | | | | | | | | | | | | | | | | | | Cleaning up those that are trivial to remove because they have direct replacements. The QLabel changes to the pixmap/picture getters provide the following migration path: QPixmap *ppix = l->pixmap(); // up to 5.15, warns in 5.15 QPixmap pval = l->pixmap(Qt::ReturnByValue); // new in 5.15, works in 6 QPixmap pixmap = l->pixmap(); // from Qt 6 on The overload with argument can be deprecated after the first LTS or so. Change-Id: I8494ceeea55b2aeda0bd340640ad95cb7c91f7d6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QApplication: remove obsolete globalStrut functionalityVolker Hilsheimer2020-04-101-4/+2
| | | | | | Change-Id: If56873f86f5291264cac720f8db7dbd4db756f49 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-081-6/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/doc/src/cube.qdoc src/corelib/global/qlibraryinfo.cpp src/corelib/text/qbytearray_p.h src/corelib/text/qlocale_data_p.h src/corelib/time/qhijricalendar_data_p.h src/corelib/time/qjalalicalendar_data_p.h src/corelib/time/qromancalendar_data_p.h src/network/ssl/qsslcertificate.h src/widgets/doc/src/graphicsview.qdoc src/widgets/widgets/qcombobox.cpp src/widgets/widgets/qcombobox.h tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro tests/manual/diaglib/debugproxystyle.cpp tests/manual/diaglib/qwidgetdump.cpp tests/manual/diaglib/qwindowdump.cpp tests/manual/diaglib/textdump.cpp util/locale_database/cldr2qlocalexml.py util/locale_database/qlocalexml.py util/locale_database/qlocalexml2cpp.py Resolution of util/locale_database/ are based on: https://codereview.qt-project.org/c/qt/qtbase/+/294250 and src/corelib/{text,time}/*_data_p.h were then regenerated by running those scripts. Updated CMakeLists.txt in each of tests/auto/corelib/serialization/qcborstreamreader/ tests/auto/corelib/serialization/qcborvalue/ tests/auto/gui/kernel/ and generated new ones in each of tests/auto/gui/kernel/qaddpostroutine/ tests/auto/gui/kernel/qhighdpiscaling/ tests/libfuzzer/corelib/text/qregularexpression/optimize/ tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/ tests/libfuzzer/gui/text/qtextdocument/sethtml/ tests/libfuzzer/gui/text/qtextdocument/setmarkdown/ tests/libfuzzer/gui/text/qtextlayout/beginlayout/ by running util/cmake/pro2cmake.py on their changed .pro files. Changed target name in tests/auto/gui/kernel/qaction/qaction.pro tests/auto/gui/kernel/qaction/qactiongroup.pro tests/auto/gui/kernel/qshortcut/qshortcut.pro to ensure unique target names for CMake Changed tst_QComboBox::currentIndex to not test the currentIndexChanged(QString), as that one does not exist in Qt 6 anymore. Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
| * QLineEdit: clarify the impact of using validatorsVolker Hilsheimer2020-04-011-4/+12
| | | | | | | | | | | | | | | | | | | | Values that are validated as Intermediate are possible to enter, but returnPressed and editingFinished signals are not emitted. Fixes: QTBUG-82915 Change-Id: I3e194cd6ee93b3402090117b67044cf3663a232e Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * QLineEdit: Include the horizontal margin in minimumSizeHintVolker Hilsheimer2020-03-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The margin is respected in the sizeHint, but not in the minimumSizeHint. Since the latter should be the former for a single character (as per the documentation promising enough space for one character), the margin calculation needs to be identical. Adjusting the documentation nevertheless, as there are characters that won't fit either way. As reported, the permyriad character doesn't fit even with this fix on macOS, as the core graphics API we are using doesn't report a glyph-index for U+2031 (so our existing assumption that 'W' is the widest character is still the best we can do). Change-Id: I30573960c316cc7b8c9bbe3c3f4c6351792bed36 Fixes: QTBUG-82970 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Remove some leftovers of QRegExpValidatorLars Knoll2020-03-301-1/+1
| | | | | | | | | | | | | | Amends dee55af0a5359bb3b57a89cf3065ffca9d8506da Change-Id: I59c02c6c289028abb86cdab1b2f2b3efdcea7821 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* | Merge remote-tracking branch 'origin/5.15' into devLars Knoll2020-02-281-12/+16
|\| | | | | | | Change-Id: I469b0501cc65fc5ce4d797a69ae89405cc69c7f8
| * Merge remote-tracking branch 'origin/5.14' into 5.15Lars Knoll2020-02-271-12/+16
| |\ | | | | | | | | | Change-Id: I4212d070d5752275085e754b96f0392113604dba
| | * Document the behavior of QLineEdit::inputMask correctlyVolker Hilsheimer2020-02-261-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QLineEdit is unicode, and uses QChar::isLetter and QChar::isNumber to evaluate whether an input character is valid. There is no test for ASCII ranges, or converting of input characters to ASCII, so the documentation was wrong. [ChangeLog][QtWidgets][QLineEdit] the inputMask property has allowed any Letter or Number category character for the respective mask characters, not just ASCII. The documentation has been updated accordingly. Change-Id: Ied93cf6ddd334ac91bfbc275107a8eb83d231d80 Fixes: QTBUG-82291 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-261-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/bearermonitor/CMakeLists.txt examples/network/CMakeLists.txt src/corelib/tools/qlinkedlist.h src/sql/kernel/qsqldriver_p.h src/sql/kernel/qsqlresult_p.h src/widgets/kernel/qwidget.cpp src/widgets/kernel/qwidget_p.h tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp tests/auto/tools/moc/allmocs_baseline_in.json Change-Id: I21a3c34570ae79ea9d30107fae71759d7eac17d9
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Friedemann Kleint2020-02-241-1/+1
| |\| | | | | | | | | | Change-Id: Ibe5b4aa249863a54007180f3684dc5ce1b23cb7b
| | * Fix wrong DPI used by QStyle::pixelMetric()Friedemann Kleint2020-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Pass on the option or the widget in order to ensure usage of the correct DPI for High DPI scaling. Task-number: QTBUG-82356 Change-Id: I5df903a83f88adebd143e514e2fead367d39f015 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-111-2/+2
|\| | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp Change-Id: I6b82507bf9a80a374c40393e72f4843f1557de89
| * | Make inputmask 'X' mask character require non-blank inputEirik Aavitsland2019-12-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation for the X mask would accept any printable character. Since that includes the blank character, there was no difference in behavior between the requiring X and optional x: both would allow the input to be unset, i.e. blank. This change should be seen in conjunction with the doc improvement da0af1e. [ChangeLog][QtWidgets][QLineEdit] Inputmask X character now requires non-blank input. Fixes: QTBUG-76320 Change-Id: I3e0363e9be5c13373a157cce69c99379615b5829 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-091-7/+7
|\| | | | | | | | | | | Change-Id: Ia24cc8b86def0d9d9c17d6775cc519e491b860b1