summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
Commit message (Collapse)AuthorAgeFilesLines
* widgets: Re-calculate focus frame style option after setting new geometryTor Arne Vestbø2020-03-241-0/+2
| | | | | | Fixes: QTBUG-83019 Change-Id: I75d3d93732cb0c5a5b7350f19f0227998bda4791 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* 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>
* Documentation: correctly use see-also tags to link to related membersVolker Hilsheimer2020-02-261-4/+5
| | | | | Change-Id: I764eb4730067cd704866191516dc4e8dd1820760 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
* Set the size of the buffer so it is big enough to hold the contentsAndy Shaw2020-02-251-1/+1
| | | | | | | | | | This will prevent a crash later on when it tries to assign to an index in a QString that has not been allocated. Fixes: QTBUG-81950 Change-Id: Ia0b5648a18f15594eeca07d234bedadcfeb266ac Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix wrong DPI used by QStyle::pixelMetric()Friedemann Kleint2020-02-2210-19/+25
| | | | | | | | | 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>
* Fix RollEffect misplacements in High DPI setupsFriedemann Kleint2020-02-181-5/+11
| | | | | | | | Pass the correct screen as parent of the roll effect widget. Fixes: QTBUG-82011 Change-Id: I25c163cb2e4c038e60ceced702a1ea6c18aa5424 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* QComboBox: send font change event to popup menu when font changedWang Chuan2020-02-071-1/+3
| | | | | | | | | | | | The font change in QComboBox might cause incorrect appearance of popup menu since it doesn't notify popup menu to relayout itself Fixes the issue by send font change event to the item view of popup menu when received a font change event in QComboBox Fixes: QTBUG-75846 Change-Id: I4821015cca95a7e233a22262596a6fbf27f10aef Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Add missing \since for QTextEdit::markdownFriedemann Kleint2020-01-301-0/+1
| | | | | | | | | The property was introduced by 23c2da3cc23a2e04a0b3b3c8ad7fa9cc6126ff23. Task-number: PYSIDE-1208 Change-Id: I2b9c5f116ffb154458de88d0efa0ac81f625121b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QScrollArea: fix off-by-one error in ensureWidgetVisibleIndiana Kernick2020-01-251-2/+2
| | | | | | | | | | | | | | | If focusRect was 5 pixels past the right side of the viewport, then the scroll area would need to be scrolled by 5 pixels. The error arises because of this: focusRect.right() - d->viewport->width() == 4 focusRect.right() is still inside the rectangle but width is not. So one has to be added. Likewise for focusRect.bottom() and height. Change-Id: Ice47a7758d136b2e4bdcbe25a33a015b37f500c1 Fixes: QTBUG-80093 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Prepare callers for QChar-to-QString change in some QLocale returnsEdward Welbourne2020-01-231-19/+29
| | | | | | | | | | | | | | The assorted characters making up numbers can potentially need surrogate pairs for their encoding, so Qt6 shall make the methods returning them return QString instead of QChar. Prepare callers of these methods to cope when that happens. This follows up on commit f91af791cc3be1dfb9645ed4ebba10a7d9f74134, which announced the intent to change the return type. Task-number: QTBUG-81053 Change-Id: I99896c1d4fc2e24758c6486eaca32fd915b9a673 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix ButtonRole enum docs for QMessageBox and QDialogButtonBoxTopi Reinio2020-01-171-1/+2
| | | | | | | | | | | Multiple topic commands (in this case, \enum) do not work across different classes. Reuse the documentation comment via an \include statement instead. Fixes: QTBUG-78910 Change-Id: Ife83bdc9bbad650835fafc072180d10037648d0a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QScrollBar: allow scrolling any scrollbar with any mouse wheelChristian Ehrlicher2020-01-131-2/+8
| | | | | | | | | | | | | | | The most common mouse wheel movement corresponds to angleDelta().y(). We have previously allowed the user to use either wheel to scroll either a horizontal or a vertical scrollbar when the mouse is hovering over it; but 7d29807296cb7ccc7f3459e106d74f93a321c493 changed it so that the vertical mouse wheel could no longer scroll a horizontal scrollbar. The behavior is now restored as it was in 59cc316620a2169d48e00822c97a96bd03079eed. Task-number: QTBUG-81007 Change-Id: Ieacdce539d5311499a86af645bbe0d5098e16be6 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: Correct qdoc compilation errors qtbaseNico Vertriest2020-01-092-17/+18
| | | | | | Task-number: QTBUG-79824 Change-Id: I4be365d92b1adfde09efd04d088f75c506666a95 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix some issues of a clang-cl developer buildFriedemann Kleint2020-01-061-0/+4
| | | | | | | | | | | | | | - qeasingcurve.cpp: Add a cast, fixing: qeasingcurve.cpp(1515,25): error: implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension [-Werror,-Wmicrosoft-cast] - Disable copy and move of QMainWindowLayoutSeparatorHelper, fixing: qbasictimer.h(59,5): note: 'QBasicTimer' has been explicitly marked deprecated here QT_DEPRECATED_X("copy-construction is unsupported; use move-construction instead") Task-number: QTBUG-63512 Change-Id: I4d12a29cb1dcd68da9f9316c9e42992f218e6045 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QPlainTextEdit: make sure firstVisibleBlock() is validChristian Ehrlicher2020-01-051-1/+2
| | | | | | | | | | | | | Under some circumstances it's possible that firstVisibleBlock() returns an invalid block within QPlainTextEditPrivate::_q_textChanged() which results in a nullptr access later on. Therefore add a check similar to other places and test the validity of the returned block before accessing it. Fixes: QTBUG-80929 Change-Id: I1fd4643b10b842acfe1c356048379f0ba225dddf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix some qdoc warningsFriedemann Kleint2020-01-021-4/+3
| | | | | | | | | | | | | | | | | | | | | | src/corelib/tools/qhash.cpp:2596: (qdoc) warning: clang found diagnostics parsing \fn template <class Key, class T> template <class InputIterator> QMultiHash::QMultiHash(InputIterator begin, InputIterator end) error: 'QMultiHash' is not a class, namespace, or enumeration src/corelib/kernel/qobject.cpp:4593: (qdoc) warning: Undocumented parameter 'EXPORT_MACRO' in QObject::Q_NAMESPACE_EXPORT src/corelib/global/qfloat16.cpp:129: (qdoc) warning: Cannot tie this documentation to anything src/corelib/text/qlocale.qdoc:1204: (qdoc) warning: Overrides a previous doc src/corelib/text/qlocale.qdoc:1187: (qdoc) warning: (The previous doc is here) src/network/kernel/qhostinfo.cpp:597: (qdoc) warning: clang found diagnostics parsing \fn QHostInfo(QHostInfo &&other) src/printsupport/dialogs/qabstractprintdialog.cpp:346: (qdoc) warning: clang found diagnostics parsing \fn int QAbstractPrintDialog::exec(): error: out-of-line definition of 'exec' does not match any declaration in 'QAbstractPrintDialog' src/testlib/qsignalspy.qdoc:101: (qdoc) warning: clang found diagnostics parsing \fn QSignalSpy(const QObject *obj, const QMetaMethod &signal): error: expected unqualified-id src/testlib/doc/src/qttest-best-practices.qdoc:28: (qdoc) warning: Can't link to 'Q_VERIFY2()' src/widgets/kernel/qactiongroup.cpp:291: (qdoc) warning: Undocumented parameter 'b' in QActionGroup::setExclusive() src/widgets/kernel/qactiongroup.cpp:305: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text src/widgets/kernel/qshortcut.cpp:542: (qdoc) warning: No such parameter 'context' in QShortcut::QShortcut() src/widgets/widgets/qdatetimeedit.cpp:632: (qdoc) warning: No such parameter 'minimumTime' in QDateTimeEdit::setTimeRange() src/widgets/widgets/qdatetimeedit.cpp:632: (qdoc) warning: No such parameter 'maximumTime' in QDateTimeEdit::setTimeRange() src/widgets/widgets/qdatetimeedit.cpp:632: (qdoc) warning: No such parameter 'less' in QDateTimeEdit::setTimeRange() Change-Id: I9799b5135e84c4d811674b2d114ef27315bc12df Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Check platformNativeInterface pointer before dereferencingShawn Rutledge2019-12-312-0/+4
| | | | | | | | | QApplication::platformNativeInterface() returns null if started with -platform offscreen. Fixes: QTBUG-80946 Change-Id: I3ad03ad27148c8576bd3fab0b136827bb8d171ae Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Doc: Clarify ownership of added menu for QMenuBar::addMenu(QMenu *)Alexander Volkov2019-12-091-1/+2
| | | | | | Change-Id: Iaafba9557ece36607c86d5be4fbb5e4ac2e459d3 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Avoid crash in menu that was previously shown as submenuAlexander Volkov2019-12-091-0/+2
| | | | | | | | | | Reset sloppyState for the previous submenu, so that if it will be shown as a menu, it will not use an incorrect pointer. Fixes: QTBUG-80528 Change-Id: If2ba8c3a664983ee76eb90d2c9a8096e2bd0a4e6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix updating the text cursor position after editingSona Kurazyan2019-12-061-0/+6
| | | | | | | | | | | | | In some cases when editing the text (for example when removing the selected text, or pasting a text block) the text cursor position is updated, but its visual x position is not updated. This causes the next cursor movements to start from a wrong position. Force the update for those cases. Fixes: QTBUG-78479 Change-Id: Ia496be62beec58660f5e1695e5aafae09c79684e Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Tell the truth about QDateTimeEdit's range-of-values propertiesEdward Welbourne2019-12-061-85/+115
| | | | | | | | | | There were factual errors. Important details were omitted. The \sa blocks were haphazard and cluttered. Change-Id: I76ceb00830c36699c48529b64808844faf09391e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QPlainTextEdit: update internal palette on QEvent::EnabledChangeChristian Ehrlicher2019-12-051-0/+1
| | | | | | | | | | | | | QEvent::EnabledChange did not update the palette of the internal QPlainTextEditControl which lead to a wrong text color when the QPlainTextEdit was disabled e.g. due to a QGroupBox. Fix it the same way it is done in QTextEdit - set the new palette also to the internal control when QEvent::EnabledChange is received. Fixes: QTBUG-80150 Change-Id: Icbeddf3d6cd4877a3d8d4a06b2da69383dd776d2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Doc: Improve explanation of QLineEdit input maskEirik Aavitsland2019-11-261-9/+24
| | | | | | | | | | The explanation of the input mask syntax and behavior was somewhat unclear. Task-number: QTBUG-76320 Change-Id: I45dc4a883c491d3dc08125b0f7efad46f2a9a33f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QLineEdit: Fix End key for input masksDaniel Teske2019-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | Consider this simple example: QLineEdit edit; edit.setInputMask( "9-9-9-9-9-9" ); edit.show(); Without any input, m_text will contain: " - - - - - ". text() removes the input mask's mask characters from that and returns " ". A string with 6 spaces. Thus currently the End key jumps to position 6, which is in the middle of the string. Using m_text the End key jumps to the actual end. [ChangeLog][QtWidgets][QLineEdit] Fixed End key in combination with certain input masks. Task-number: QTBUG-16187 Task-number: QTBUG-20414 Change-Id: Ibb30a1dfa2f78103611b5afc9971dc43e8bdcc4a Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix rendering of markdown in QLabelEike Ziller2019-11-132-14/+25
| | | | | | | | | | | | | | Since 65314b6ce88cdbb28a22be0cab9856ec9bc9604b there is a TextFormat for MarkdownText, and QWidgetTextControl supports that, but QLabel does it in its own way and sets plain text or rich text on the text document itself. Add a code path for MarkdownText there. [ChangeLog][QtWidgets][QLabel] Markdown is now a supported textFormat for QLabel. Fixes: QTBUG-79766 Change-Id: Ib9370ef300089af2c4d6070e545c5470f32833a8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Turn a local QHash into a QMultiHashMårten Nordheim2019-10-311-1/+1
| | | | | | | | | | | | | 972a0402be4d7aed0ebbd0ff56b5018cda01599d was merged before one of its parent patches which changed this QHash into a QMultiHash. So in 5.14 it would overwrite values instead of adding new entries. No idea if it has caused or will cause any regressions. But it was an accident so let's fix it. Amends 972a0402be4d7aed0ebbd0ff56b5018cda01599d. Change-Id: I6623b0b7924024df148d5c83bcbb612f3e595f56 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Specify year in month name lookups for QCalendarWidgetEdward Welbourne2019-10-251-14/+21
| | | | | | | | | | | | | | | | | | The compiler didn't complain at a QLocale::FormatType values being passed for the int year parameters of the month-name functions, which all have a default for their final QLocale::FormatType parameters. So we didn't notice that the year parameter was missing until the bug was reported. Removed some code duplication by giving QCalendarModel a monthName() method. Reworked QCalendarMonthValidator::text() to avoid repeated calendar calculations (and use fewer braces). This commit amends commit 2dee00621632ab8acd0b3d59bdba264afe2f32c1 Fixes: QTBUG-79495 Change-Id: Iad48c3b648a0139ab43511e6fb4e6a8f63a0495f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Set icon on the select-all action in the text edit context menu tooVolker Krause2019-10-172-0/+2
| | | | | | | | | Makes this consistent with the rest of the actions here, and avoids dirty hacks like KIconTheme::assignIconsToContextMenu. Change-Id: I749f4d5f67efdbf595a52185dd507de5f87f6487 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Remove usages of deprecated APIs of QDesktopWidgetSona Kurazyan2019-10-131-1/+1
| | | | | | | | | | | | | | | | | - Replaced the usages of the following deprecated APIs: * QDesktopWidget::screenCount() -> QGuiApplication::screens().size() * QDesktopWidget::screenGeometry(int) -> QGuiApplication::screens().at() * QDesktopWidget::screenNumber(QPoint) -> QGuiApplication::screenAt(QPoint) - Added notes for the QWidget *QDesktopWidget::screen(int), which currently has no replacement. - Fixed the tests to build conditionally, only when these APIs are enabled. Task-number: QTBUG-76491 Change-Id: I2fdec96d0a6a4fc782c53549b05a5556412b8305 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QGroupBox: always disable children in a checkable, unchecked groupboxVolker Hilsheimer2019-10-111-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | The childEvent handler sets the enabled property of children as they are added to the groupbox, but applications might later enable children and check/uncheck the groupbox's checkbox in undefined order. In that case, we would end up with enabled children inside a conceptually disabled groupbox (the groupbox's checkbox represents the logical "disabled" state), which breaks documented QWidget::enabled rules. To make sure that all children are disabled as per the state of the groupbox, we need to run that logic once the UI has been set up, and before it becomes visible. This is what polishing is for, so listen for that event in addition and handle it the same way as adding (which duplicates things, but keeps existing code that might depend on things being updated as they are added working). Adds the case to the existing enabledChildPropagation test case. [ChangeLog][QWidget][QGroupBox] Always disable children of a checkable, unchecked group box before showing. Change-Id: I978bd27b6f1a3f54ec745faeea529a98d0d93619 Fixes: QTBUG-25938 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QAbstractScrollArea: when used as a popup, apply regular popup behaviorVolker Hilsheimer2019-10-101-1/+4
| | | | | | | | | | | | | QWidget::mousePressEvent is documented to implement the closing of popups if the widget is a popup. QAbstractScrollArea is one of the QWidget subclasses that might be used as a popup as well, so instead of just ignoring mousePressEvents, pass the event on to the QWidget implementation for regular popup handling. Change-Id: I05f77a334945f3c167f729f30bc022599230379b Fixes: QTBUG-60885 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Make QTextBlockFormat::MarkerType an enum classShawn Rutledge2019-10-102-5/+5
| | | | | | | This came up during API review. Change-Id: I9198e1eb96db0c21e46a226a032919bb62d3ca66 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-10-101-0/+1
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbscreen.h src/src.pro Change-Id: I4e1981e69a1ddcbe4078ec6ab2a64b0da6a445de
| * Fix text not rendering properly after setAlignment callKari Hormi2019-10-081-0/+1
| | | | | | | | | | | | | | | | | | | | Sometimes when setAlignment is called, the text stops rendering correctly at some point. Adding relayoutDocument call to setAlignment fixes the problem. Fixes: QTBUG-78728 Change-Id: Iab1cf161f0c8d700804448733338c813b5bf9762 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | QAbstractSpinBox css: properly honor spincontrol-disable-on-boundsChristian Ehrlicher2019-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The css style 'spincontrol-disable-on-bounds' was not properly honored within QAbstractSpinBox::initStyleOption() because the affected widget was not passed to QStyle::styleHint(). Therefore QStyleSheetStyle did not find the correct render rule. Fix it by passing 'this' as third argument to QStyle::styleHint(). Fixes: QTBUG-18008 Change-Id: Iabcebf0b83143f45309b4e7066bccb8d20bd0419 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | widgets: Remove use of deprecated activated(const QString &) APITor Arne Vestbø2019-09-142-15/+10
| | | | | | | | | | | | Change-Id: I71c6a10f6593ac28bf8f60d9db8d167cf88715cb Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | QMenu::popup(): don't change the menu's screen if called from exec()Shawn Rutledge2019-09-101-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since b3fc5e1ea3eb4fe838ac716aaca4efaa5de5a814, topData()->initialScreenIndex has always been short-lived: it only remembers the screen in case the widget parent is a QDesktopScreenWidget (gotten from QDesktopWidget::screen()), only until the window is created. Then it is reset. In the case of exec() we need to avoid calling setScreen() twice, because that would set the screen once, then forget which screen it was supposed to be on, then set the screen again when exec() calls popup(). This is achieved by using the stored eventLoop pointer to detect that popup() is being called from exec(), and avoid calling setScreen() a second time in popup(), because exec() already needed to call createWinId() before it created the event loop. Amends 82da8306bc1313b85632eee0faf858239261a092 Task-number: QTBUG-76162 Change-Id: I70da517b9d530630e59d103cb2a1ce11c897b2c8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Joni Poikelin <joni.poikelin@qt.io>
* | QComboBox: add documentation for textHighlighted/textActivatedChristian Ehrlicher2019-09-091-2/+19
| | | | | | | | | | | | | | | | The documentation for textHighlighted/textActivated was not added within bdf1c4f671c706832cea84269e91995e85eb9f07 so add it now. Change-Id: Ifa7ad72af4490d4ce1d6de00d0963c0e76013f42 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Rename calendar methods from m{in,ax} to m{in,ax}imumEdward Welbourne2019-09-041-2/+2
| | | | | | | | | | | | | | | | | | Words should not be abbreviated. Split a long line and reflowed some comments in the process. Fixes: QTBUG-78008 Change-Id: I52d75409f02e2cecbed3e94d424617ad594c275b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-041-1/+1
|\| | | | | | | | | | | | | | | | | | | | | 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
| * QToolBarLayout: fix position calculationChristian Ehrlicher2019-08-261-1/+1
| | | | | | | | | | | | | | | | | | Fix a bug introduced in d493f676a38f000dd9c22dee6eea2b5ae4291e0a while calculating the size / position of the layout item. Fixes: QTBUG-77115 Change-Id: I20ad1685659da7225009734e25287e590367aa9e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Pass QDate, QTime as value classes, rather than by const referenceEdward Welbourne2019-08-303-62/+62
| | | | | | | | | | | | | | | | | | This can, of course, only be done in private APIs - but comment on public APIs to do the same at Qt 6. Change-Id: I3c79951572be3c37b0b0c5b1b05bced051a40964 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Merge remote-tracking branch 'origin/dev' into 5.14Liang Qi2019-08-272-19/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qwidget.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetrepaintmanager.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp Change-Id: Ifae457d0427be8e2465e474b055722e11b3b1e5c
| * | Long live QSize(F)::grownBy/shrunkBy()Marc Mutz2019-08-222-19/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These functions tighten the integration of QMargins(F) with the rest of the geometry classes by providing a way to apply margins to sizes (and later, rects). Apply them in a few obvious cases across QtWidgets. [ChangeLog][QtCore][QSize/QSizeF] Added grownBy(QMargin(F))/shrunkBy(QMargin(F)). Change-Id: I8a549436824cdb7fb6125a8cde89d5bf02826934 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Adapt QCalendarWidget and QDateTimeEdit to support choice of calendarSoroush Rabiei2019-08-225-158/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtWidgets][QCalendarWidget] Allow choice of calendar, with Gregorian remaining the default. [ChangeLog][QtWidgets][QDateTimeEdit] Allow choice of calendar, with Gregorian remaining the default. Change-Id: Ia11dd895032393543aee534b177324e643dcfb20 Done-with: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Remove dead code from Qt 4 timesTor Arne Vestbø2019-08-2024-477/+42
|/ / | | | | | | | | | | | | | | | | | | The benefit of keeping this code around was to inspire or inform changes in the areas to take into account possibly missing features in Qt 5, but at this point that benefit is questionable. We can always use the history to learn about missing pieces if needed. Change-Id: I87a02dc451e9027be9b97554427bf8a1c6b2c025 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Fix build without features.proxymodelTasuku Suzuki2019-08-171-0/+4
| | | | | | | | | | Change-Id: I9e51ed78d783da999187e7df58ddb83d76e3c7b7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Fix build without features.shortcutTasuku Suzuki2019-08-151-0/+2
| | | | | | | | | | Change-Id: I56ccf104c57e24824e8d09951bb27415307d5abc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Remove the unused includes for QSignalMapperSona Kurazyan2019-08-051-1/+0
| | | | | | | | | | Change-Id: I13f19fadc7ad3fed8eb0a6718244cc8880e91be9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QWidget/QLineEdit: deprecate get{Contents,Text}Margins()Marc Mutz2019-07-305-15/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have contentsMargins() and textMargins() methods since 4.6 which are much more efficient and easier to use. [ChangeLog][QtWidgets][QLineEdit] The getTextMargins() member function has been deprecated in favor of textMargins(). [ChangeLog][QtWidgets][QWidget] The getContentsMargins() member function has been deprecated in favor of contentsMargins(). Change-Id: Ifdb890af6198fc682b94701786c67a5b945a4b4c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>