summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-043-6/+10
|\ | | | | | | Change-Id: I31c1c469c00016f1bd21ecfab39794df372e56f2
| * QTreeWidget: Don't assume the selected indexes include the first columnAndy Shaw2019-10-031-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | If the first column is hidden in a QTreeWidget then when doing a drag then the selected indexes will not include any that have a column of 0. Therefore it has to account for this use std::unique to ensure that there is only one instance of the selected items represented by the selected indexes. Fixes: QTBUG-35511 Change-Id: I39dff596959f30db7378ff946735ee2866778524 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * Remove the unregistered recognizer from the main listAndy Shaw2019-10-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | This amends 1320b2f64412f0d86bd09c66c22df845e13a94a1 to keep the behavior of removing from the main list but without re-introducing the memory leak. Fixes: QTBUG-77770 Change-Id: I91fa6cb71fab8d60baa35417fdb34322af11dbbb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * Always update the pressed position when pressing on an itemAndy Shaw2019-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If there is an item already selected then the pressed position needs to be updated regardless when selecting a new one even if it is not made current as this will be used to determine the drag distance. Otherwise it will start a drag within one pixel of moving due to the fact it is doing it relative to the first item to be pressed rather than the last. Fixes: QTBUG-78797 Change-Id: I853041b278b2e92ccf20660f7ced945fef72527a Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | Quiet several more warnings about QWheelEvent deprecationsShawn Rutledge2019-10-021-0/+6
| | | | | | | | | | | | | | | | | | | | We want to ensure that the qt4D and qt4O members are still initialized the same way whenever deprecated constructors are used; and we want to be able to verify it using qDebug. So we merely suppress these warnings. Change-Id: Ic2e5f0dd6feeabe81f06f9c31693c550ac0781e3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-302-106/+76
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qrandom.cpp src/corelib/io/qfileinfo.cpp src/corelib/kernel/qeventdispatcher_win.cpp src/corelib/kernel/qeventdispatcher_win_p.h src/gui/text/qfontdatabase.cpp src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm src/plugins/platforms/windows/qwindowsglcontext.cpp src/testlib/qtestcase.cpp Done-With: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-With: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4893212471aa24be804c989a581810e2f714545c
| * QWidget::setFocusProxy: adjust focus widget properlyDavid Faure2019-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | My commit 3e7463411e adjusted the focus widget by setting QApplicationPrivate::focus_widget directly, while there is a method for doing this properly, including setFocus_sys() and emitting signals. Fixes: QTBUG-77364 Change-Id: I218acf7a9de39173d282ced46def4f65594f80b4 Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * QWizard/Aerostyle: Fix "&Next" shortcutFriedemann Kleint2019-09-251-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | The fix for QTBUG-35203 set the Alt+Right shortcut on the next button, clobbering the Alt+N shortcut from parsing the text (similar for other languages). Add a separate shortcut for Alt+Right since a button may not have several shortcuts. Amends 6714196f45fbae755b26a4b2406a7bbe066084dc. Fixes: QTBUG-78604 Change-Id: I1367da739c35fbd011d11f850c9bc3915113c644 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * QWizard: Use member initialization in private classesFriedemann Kleint2019-09-241-101/+57
| | | | | | | | | | | | | | | | Remove superfluous constructors. Task-number: QTBUG-78604 Change-Id: I8a422cfeaaedf89ce310e06d5db80907cd1102d4 Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
* | QCommonStyle: Add SP_DialogNoButton case in standardIconKai Uwe Broulik2019-09-281-0/+1
| | | | | | | | | | | | | | | | It is present in standardPixmap but missing from standardIcon resulting in QMessageBox using the fallback PNG provided by Qt for the "No" button. Change-Id: If4f14c7de26eb32277cd19a7be75360dba4f4e29 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | 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>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-231-0/+5
|\| | | | | | | | | | | | | Conflicts: src/widgets/styles/qstylesheetstyle.cpp Change-Id: If11da7799075cc2d5768da5603c5fc46773c4eae
| * Ensure all children of a widget get updated when a stylesheet changesAndy Shaw2019-09-211-0/+5
| | | | | | | | | | | | | | | | | | Before, only the direct children would get an update when the stylesheet changed, any children below that would be unchanged. Fixes: QTBUG-77006 Change-Id: Id668eaae74a8289d78d66644f077e6a3302960cd Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Joerg Bornemann2019-09-201-3/+7
|\| | | | | | | | | | | | | | | Conflicts: qmake/generators/makefile.cpp qmake/generators/makefile.h Change-Id: I4c2deac4f6376c85f5e4fe7fb0ccc9ab9a013cd7
| * QWizard/AeroStyle: Fix condition introduced by previous fixFriedemann Kleint2019-09-191-3/+4
| | | | | | | | | | | | | | | | | | | | | | Set the variables within the condition introduced by 6c0e1dba403ce65285e089bf281319de36d29235, as otherwise, the code might not be executed. Task-number: QTBUG-78300 Change-Id: Ia83db6fce197ebf16783f3b0c6d6fad7ebd2ba52 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * QWizard/AeroStyle: Fix crash when Qt::AA_NativeWindows is setFriedemann Kleint2019-09-181-1/+4
| | | | | | | | | | | | | | | | | | Prevent recursive platform window creation from the events received during window creation (WM_POSCHANGING, etc). Fixes: QTBUG-78300 Change-Id: Ie2bb4308af645c30e556666589e2dd08f14d4035 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* | QStyleSheet: Resolve the rule font before it is usedThorbjørn Lund Martsum2019-09-181-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The styleSheet font cannot know about e.g dpi or other settings (e.g from the current screen) so we should resolve font settings from the original font. This patch ensures that the stylesheet font is resolved with a relevant font before it is used. This likely fixes many dual/triple screen issues. [ChangeLog][QtWidgets][QStyle] Style sheets now only use the part of the stylesheet font that it knows about. The remaining will be resolved/inherited from the context. Fixes: QTBUG-77502 Change-Id: I3b1f821e1be9707506a6c1d1e93f76eeac4007e0 Reviewed-by: Morten Kristensen <me@mortens.dev> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit b68ade8282274c2d4ee1e4f861d34ea0655c1eab) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | QGraphicsScene: register ItemIndexMethod enum for propertyFabian Kosmale2019-09-181-1/+1
| | | | | | | | | | | | Fixes: QTBUG-57903 Change-Id: I2b2725bceb5189dd21102bbacb10e9775740cf5d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Windows style: Fix size of controls in multimonitor-setups with scaling disabledFriedemann Kleint2019-09-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | The function calculating a correction for the size of windows metrics depending on screen would bail out when high DPI scaling was disabled. This is wrong since the correction is also needed in that case, delete the clause. Task-number: QTBUG-64890 Change-Id: Idef22e18fc616a211ccac48400490fc52393a338 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Brush up the Windows stylesFriedemann Kleint2019-09-162-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - use range-based for loops where possible - use nullptr - use member initialization - remove a lot of C-style casts - use override - fix some signedness warnings - add some missing break statements Task-number: QTBUG-76493 Change-Id: Ica6ed65ec29e958406e54d816b8a679ed81bd177 Reviewed-by: Oliver Wolff <oliver.wolff@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>
* | Fix qdoc warningsFriedemann Kleint2019-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | src/corelib/global/qnamespace.qdoc:3279: (qdoc) warning: Can't link to 'QGuiApplication::setHighDdpiScaleFactorRoundingPolicy()' src/corelib/time/qislamiccivilcalendar.cpp:49: (qdoc) warning: Can't link to 'QJijriCalendar' src/network/ssl/qsslsocket.cpp:1510: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCaCertificates()' src/network/access/qhttp2configuration.cpp:49: (qdoc) warning: '\brief' statement does not end with a full stop. src/gui/text/qtextformat.cpp:532: (qdoc) warning: Undocumented enum item 'TableBorderCollapse' in QTextFormat::Property src/gui/text/qtextdocument.cpp:2066: (qdoc) warning: Undocumented enum item 'UnknownResource' in QTextDocument::ResourceType src/gui/kernel/qguiapplication.cpp:3500: (qdoc) warning: Undocumented parameter 'policy' in QGuiApplication::setHighDpiScaleFactorRoundingPolicy() Change-Id: I3573ef98cf9b58d16525c356270fe009fdffcf45 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | QFileDialog: Fix volume name display on WindowsFriedemann Kleint2019-09-101-11/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | The volume names displayed did not match those of Windows Explorer; for example "New Volume (X:)" would be displayed for mapped network drives. Replace GetVolumeInformation() and manual formatting by the normal display name of IShellItem. Fixes: QTBUG-78043 Change-Id: Ia742b7733e8ddc31e9506f15d90d065b985a111d Reviewed-by: André de la Rocha <andre.rocha@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>
* | Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"Friedemann Kleint2019-09-091-4/+2
|\ \
| * | Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-09-091-4/+2
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp Change-Id: Idd3ca5cb9a2b95a4c3513b2a4c8966e6f56193f1
| | * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-09-081-4/+2
| | |\ | | | | | | | | | | | | Change-Id: I371c5ae1af6f58e32e579671f485b92b586e0b76
| | | * QShortcut: call base class implementation in event()Christian Ehrlicher2019-09-051-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QShortcut::event() did not call the base class implementation QObject::event() which caused that e.g. QEvent::DeferredDelete was not handled. Fix it by calling QObject::event() when the event was not handled. Fixes: QTBUG-66809 Change-Id: Ideebc980bc658f8f2b9ec4417e738bccda5eeab5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@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>
* | | QGraphicsView: mark obsolete flag DontClipPainter as deprecatedChristian Ehrlicher2019-09-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The enum OptimizationFlag::DontClipPainter is deprecated and not used in the code since Qt4 times. Therefore also mark it as deprecated so it can be removed with Qt6 Change-Id: I318a55cf42e7a233d13d4ec0144e1977251f5c92 Reviewed-by: Oliver Wolff <oliver.wolff@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>
* | | Fix some qdoc warnings in 5.14Friedemann Kleint2019-09-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark QCalendarBackend as internal since it is in a private header and fix some issues in the QCalendar related classes. src/corelib/time/qcalendar.cpp:201: (qdoc) warning: clang found diagnostics parsing \fn int QCalendarBackend::daysInMonth(int month, int year) const error: incomplete type 'QCalendarBackend' named in nested name specifier (repeats) src/corelib/time/qdatetime.cpp:1426: (qdoc) warning: Unknown command '\override' (repeats) src/corelib/time/qcalendar.cpp:642: (qdoc) warning: Undocumented enum item 'Last' in QCalendar::System src/corelib/time/qcalendar.cpp:642: (qdoc) warning: Undocumented enum item 'User' in QCalendar::System src/corelib/time/qcalendar.cpp:744: (qdoc) warning: Undocumented parameter 'year' in QCalendar::isLeapYear() src/corelib/time/qcalendar.cpp:923: (qdoc) warning: Can't link to 'dateTimeString()' (repeats) src/corelib/time/qcalendar.cpp:893: (qdoc) warning: No such parameter 'year' in QCalendar::partsFromDate() src/corelib/time/qcalendar.cpp:893: (qdoc) warning: No such parameter 'month' in QCalendar::partsFromDate() src/corelib/time/qcalendar.cpp:893: (qdoc) warning: No such parameter 'day' in QCalendar::partsFromDate() src/corelib/time/qdatetime.cpp:1425: (qdoc) warning: Undocumented parameter 'nmonths' in QDate::addMonths() src/corelib/time/qdatetime.cpp:1467: (qdoc) warning: Undocumented parameter 'nyears' in QDate::addYears() src/corelib/statemachine/qstatemachine.cpp:2522: (qdoc) warning: Undocumented enum item 'StateMachineChildModeSetToParallelError' in QStateMachine::Error src/corelib/kernel/qtimer.cpp:602: (qdoc) warning: Undocumented parameter 'connectionType' in QTimer::callOnTimeout() src/corelib/time/qcalendar.cpp:159: (qdoc) warning: Undocumented parameter 'name' in QCalendarBackend::QCalendarBackend() src/corelib/time/qcalendar.cpp:159: (qdoc) warning: Undocumented parameter 'id' in QCalendarBackend::QCalendarBackend() src/corelib/time/qcalendar.cpp:529: (qdoc) warning: Can't link to 'registerCalendar()' src/corelib/time/qcalendar.cpp:529: (qdoc) warning: Can't link to 'fromName()' src/corelib/time/qcalendar.cpp:178: (qdoc) warning: Can't link to 'QCalendar::fromEnum()' src/corelib/time/qcalendar.cpp:405: (qdoc) warning: Undocumented parameter 'jd' in QCalendarBackend::dayOfWeek() src/corelib/time/qcalendar.cpp:405: (qdoc) warning: Can't link to 'weekDayName()' src/corelib/time/qcalendar.cpp:405: (qdoc) warning: Can't link to 'standaloneWeekDayName()' src/corelib/time/qcalendar.cpp:268: (qdoc) warning: Can't link to 'daysInMonth()' src/corelib/time/qcalendar.cpp:268: (qdoc) warning: Can't link to 'isLeapYear()' src/corelib/time/qcalendar.cpp:295: (qdoc) warning: Can't link to 'daysInMonth()' src/corelib/time/qcalendar.cpp:313: (qdoc) warning: Can't link to 'isLuniSolar()' src/corelib/time/qcalendar.cpp:313: (qdoc) warning: Can't link to 'isSolar()' src/corelib/time/qcalendar.cpp:313: (qdoc) warning: Can't link to 'isLunar()' src/corelib/time/qcalendar.cpp:340: (qdoc) warning: Can't link to 'daysInMonth()' src/corelib/time/qcalendar.cpp:357: (qdoc) warning: Can't link to 'daysInMonth()' src/corelib/time/qcalendar.cpp:544: (qdoc) warning: Can't link to 'fromName()' Change-Id: Ia2fabefb917f8e4cfa361044d9b754717276f4aa Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | QFileSystemModel: Fix naming of Option enumerationFriedemann Kleint2019-09-022-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Fix an API review finding in 5.14, amending 6b9d319b26da2e4b6f939ee92a176f8604c1c539. Change-Id: I6c67ebde91021b87a43a86ff831b724f098019aa Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@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>
* | | QTree/TableView: Don't emit clicked when releasing after double clickVolker Hilsheimer2019-08-292-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an item is double clicked, then without this fix, the views emit the clicked() signal when the mousebutton is released after the double click event. This is unexpected and wrong. QAbstractItemView keeps track of the item the mouse was pressed on, to verify that the release occurred on the same item before emitting clicked, and to make sure we have a valid pressed item before initiating drag'n'drop. By resetting d->pressedItem when a double click has been handled, we can prevent the emission of a clicked signal in the next release event. [ChangeLog][QtWidgets][QTreeView] Don't emit clicked signal after a doubleClicked signal. Fixes: QTBUG-77771 Change-Id: I05988e9e2222157f4216cebc40c22507e8d83b82 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
* | | widgets: Mark widgets as needing flush during paintingTor Arne Vestbø2019-08-282-15/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Except for the case of syncing in response to an expose event, where the platform asked us to flush a specific region, we should strive to only flush parts that have been repainted. And we should flush those parts to their nearest native child, instead of unconditionally flushing the root/top level widget as well. By allowing drawWidget to schedule the flush we automatically flush the minimal region, to the right widgets. Change-Id: I73c143761d4a0da6991433b41dea0a0bc83a448a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | widgets: Add logging for widget paintingTor Arne Vestbø2019-08-284-1/+36
| | | | | | | | | | | | | | | Change-Id: I551ec290812369e3848c1096fed7e813cd9e1cd6 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | QGraphicsItem: mark GraphicsItemChange::ItemMatrixChange as deprecatedChristian Ehrlicher2019-08-282-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The enum GraphicsItemChange::ItemMatrixChange is deprecated since Qt4 times. The corresponding matrix functions were also marked as deprecated in 5.13 but the enum was forgotten. Therefore also mark it as deprecated so it can be removed with Qt6. Change-Id: I39bec89af14aaefe2e504f5a890ef314574766a1 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | | widgets: Simplify QWidgetRepaintManager::flushTor Arne Vestbø2019-08-282-10/+5
| | | | | | | | | | | | | | | Change-Id: Icba88fa068aac2ac5d8bb04e46a3e3f34e279a48 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | widgets: Simplify markNeedsFlush in QWidgetPrivate::drawWidgetTor Arne Vestbø2019-08-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | QWidgetRepaintManager::markNeedsFlush already ignores paintOnScreen widgets. Change-Id: I8b5d6f79c8fd60115f77d65aef05cc4baf840bdd Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | widgets: Clarify QWidgetRepaintManager::sync of specific widgetTor Arne Vestbø2019-08-281-3/+6
| | | | | | | | | | | | | | | Change-Id: Ifa2a8245decfcb2b36c1952a39ec60b7eeca6e43 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into 5.14Liang Qi2019-08-2710-46/+85
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | wasm: Add saveFileContent()Morten Johan Sørvig2019-08-203-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Saves a file by file download, where the user can choose the file name and location using a file dialog. Change-Id: I4d2ecc76fc33bb65fdf3d7ca3fcd9566c62547dd Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * | | QWidget: replace manual memory management with unique_ptr [6/N]: extraMarc Mutz2019-08-205-27/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Had to port a lot of caching temporaries, too. Decided to leave them as crefs to unique_ptr to catch any mischief users may be doing with the raw pointer instead (like deleting it). Also fixed a use of 0 as nullptr (by standardizing on pointer-to-bool conversion, as is done everywhere else in qwidget.cpp), and made one impregnable if condition readable. Change-Id: Ifdc240bf352c52de0bc3c186fa7a5f4cb2882dd0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * | | Get rid of QWidgetBackingStoreTrackerTor Arne Vestbø2019-08-194-152/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was added for Symbian almost 10 years ago (d7057e7c1f1a), for a somewhat dubious use-case. The Symbian code is since long gone (ae30d7141), so the remaining pieces are just adding complexity to the already intricate workings of the QtWidgets backingstore/painting logic. Task-number: QTBUG-8697 Change-Id: I82af610a8ac26719c588ac63f06b4501f59b400d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | | widgets: Rename QWidgetPrivate::repaint_sys to paintOnScreenTor Arne Vestbø2019-08-255-13/+13
| | | | | | | | | | | | | | | | | | | | Change-Id: Ic853e42cbed9b770bef0e1d7c7376c861bceb891 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | | widgets: Handle all flush tracking via markNeedsFlushTor Arne Vestbø2019-08-251-2/+5
| | | | | | | | | | | | | | | | | | | | Change-Id: I3652c09012e36468ef90870637988b3fe8c5e735 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>