summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix DBus compilationhjk2016-10-181-1/+1
| | | | | | | | Don't use C++11 nullptr in 5.6. Change-Id: I57e9595b2e1cede995eed09878bf02ee30482659 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net>
* Fix QtGui compilation without OpenGLhjk2016-10-161-0/+2
| | | | | Change-Id: I2a9f8bde7d2ba672e4e664ff731a3272a6def516 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* iOS: Report correct physical DPI for iPhone 7 PlusTor Arne Vestbø2016-10-141-2/+2
| | | | | | Task-number: QTBUG-56509 Change-Id: Ibae94262c2a4c917aeca00cb1a1c28e5ae60f0c4 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Doc: Fix typo in QtStyledItemDelegate::paint() docsLeena Miettinen2016-10-141-1/+1
| | | | | | | Task-number: QTBUG-56399 Change-Id: Iaace0ed05098ab6d880b06a40d8e13aa9288c5ec Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Specify timeout is in millisecondsAlbert Astals Cid2016-10-141-3/+3
| | | | | Change-Id: I465b343b6fe64c8d1ce17e34be5f864e8556d374 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QMimeXMLProvider: add missing out-of-line destructorJ-P Nurmi2016-10-132-0/+5
| | | | | | | | Fixes build with the latest GCC 7. Change-Id: I4900a256ed1c6cb177d7f94d54e5b07c06ddad08 Task-number: QTBUG-56514 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Doc: add notes about validator and completer in QComboBoxFrederik Gladhorn2016-10-131-0/+7
| | | | | | | | | | | When setting the editable property to false, we delete the internal QLineEdit used by QComboBox. Add comments that this results in the loss of validator and completer. Task-number: QTBUG-56035 Change-Id: Ife04ac2b9bb3f32fae5328f1ec73b1d5d769d52c Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Nico Vertriest <nico.vertriest@theqtcompany.com>
* Unset qgl_current_fbo when the default FBO is boundAlexandru Croitor2016-10-131-0/+1
| | | | | | | | | | | | | | | | | | | Previously when a new QOpenGLFramebufferObject was bound, the QOpenGLContextPrivate::qgl_current_fbo member was also updated to point to this new object. But if a user called QOpenGLFramebufferObject::bindDefault(), qgl_current_fbo was not unset, meaning that if the FBO object would be deleted at some point, qgl_current_fbo would be a dangling pointer. This patch makes sure to clear the value of qgl_current_fbo when bindDefault() is called. It is cleared, and not set to point to another object because the default platform OpenGL FBO is not backed by a QOpenGLFramebufferObject. Task-number: QTBUG-56296 Change-Id: I68b53d8b446660accdf5841df3d168ee2f133a90 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Show warning when setting new default QSurfaceFormatAlexandru Croitor2016-10-131-0/+6
| | | | | | | | | | | | If a global shared context is created, and afterwards a new default QSurfaceFormat with a different version or profile is set, it can lead to issues with context sharing. The documentation for QSurfaceFormat::setDefaultFormat mentions this. It would be helpful to actually show a warning in case it happens. Change-Id: I71f7ce95496e1ecbfc6a0c7d7bed146ef8dc351e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Document that am/pm in QDateTime::toString are locale-specificKai Koehne2016-10-131-3/+6
| | | | | | Change-Id: I28382b25ac94cbfbad4acff1308ddd8baf5ca693 Task-number: QTBUG-55632 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNetworkSession: make sure that "interface" isn't #definedThiago Macieira2016-10-131-0/+5
| | | | | | | Depending on #include order isn't a good idea. Change-Id: Ief935e1fcc5d40ecb510fffd147c08dffe6cba2d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QIconLoaderEngine: add missing Q_DECL_OVERRIDEsAlexander Volkov2016-10-121-8/+8
| | | | | Change-Id: I7671b05f2e3c218870dca04f3ed52c231dbe4a9d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix illegal memory access on simple image rotatesAllan Sandfeld Jensen2016-10-121-0/+2
| | | | | | | | | | Clip the transformed and rounded sourceClip to the source rectangle, so we don't try to rotate pixels outside the source. Task-number: QTBUG-56252 Change-Id: Ib9cb80f9856724118867aea37ead0b02a6c71495 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Remove unused static member QIconLoaderEngineEntry::countAlexander Volkov2016-10-121-1/+0
| | | | | | | | | It was introduced in Qt 4 by the commit 13a31fe82845f8b1f4d86919080d3b2a87c4d061 and was unused even there. Change-Id: I5f3861918ea1f443f7e13439fafa067f2b28a91a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Android: Ministro updatesBogDan Vatra2016-10-121-2/+2
| | | | | | | | - bump minimum required Qt version - use market://details instead which opens Ministro's page directly Change-Id: I3d879503625fe29e7b23149402217337fee6a863 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Android: Don't update offscreen windowsChristian Strømme2016-10-121-1/+6
| | | | | | | | Offscreen windows should not be handle by the platform plugin. Task-number: QTBUG-50973 Change-Id: I719a24b9bbcaad460d78fdc4095e86d615357cd2 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Don't resize windows that aren't attached to a platform windowChristian Strømme2016-10-121-0/+4
| | | | | | | | | | | | | QWindows that aren't created, and therefore don't have a platform window attached, should not be treated as "normal" windows. The expectation, in our code, is that these windows won't get their geometry updated by the platform plugin, and that the geometry is only changed by the owner. In QQuickWidget's case this was causing the scene to be rendered incorrectly. Task-number: QTBUG-50973 Change-Id: Iea62dfb7fa90cbe450a662c5792c7c4f49c991fd Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QXcbShmImage: don't use shmget()'s return unless it succeedsEdward Welbourne2016-10-121-7/+9
| | | | | | | | | | | | | | | When shmget() failed, we didn't set m_shm_info.shmid (not even to the -1 failure id) but did pass it (i.e. uninitialized noise) to shmat(), among other related functions. Guard against this; handle failure gracefully. Task-number: QTBUG-56419 Change-Id: Ie823c36c2ede03af6cb5d94ce7b4b5cd543c1008 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Joni Poikelin <joni.poikelin@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QToolBarAreaLayoutInfo: add missing break statements in switch in distance()Marc Mutz2016-10-121-1/+6
| | | | | | | | | | | | | | | | | | | A fall-through here is logically non-sensical, because of symmetry (or lack thereof). Thus, a break must have been intended. Add it. While we're at it, also replace the default case label with the non-functional enum value QInternal::DockCount, so that -Wswitch can warn us if ever there should be a new DockPosition. Found independently by both GCC 7 and Coverity. Coverity-Id: 11145 Coverity-Id: 11146 Coverity-Id: 11147 Change-Id: I6bb31c1517e40f0cb06ceaee5aeb6fa78b84a523 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* harfbuzz: compile with GCC 7Marc Mutz2016-10-121-0/+8
| | | | | | | | | | | | GCC 7 warns about implicit fall-throughs now. Fix by adding the missing comment. Didn't send a patch to upstream, because upstream harfbuzz-old hasn't seen a commit in four years, and this code is no longer in harfbuzz-ng. Change-Id: Ic97efbe01edd37738dcdf43528e82511197d7fb2 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* QtOpenGl: compile with GCC 7Marc Mutz2016-10-121-0/+11
| | | | | | | | | | GCC 7 warns about implicit fall-throughs now. Fix by adding the missing comments. Change-Id: I081d4db07c7f2b30ee6344a166aaec34ac639ee5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QtDBus: compile with GCC 7Marc Mutz2016-10-121-0/+14
| | | | | | | | | GCC 7 warns about implicit fall-throughs now. Fix by adding the missing comments. Change-Id: I629fb3aced9296c81496f19f6ff78c7a5a12e991 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QComboBox: add missing break in switch in keyPressEvent()Marc Mutz2016-10-121-0/+1
| | | | | | | | | | | | | | | If the Key_Space case falls through, it does because !d->lineEdit, which makes the following case dead code, because it is guarded by the same condition. Fix by adding the break, which ensures that if those two cases ever diverge, the code stays working by intention, not chance. Independently discovered by GCC 7 and Coverity. Coverity-Id: 11157 Change-Id: Id14114b4157549d0f6fa036e8aa2bf0fa5a863cf Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QFusionStyle: add missing break in switch in drawControl()Marc Mutz2016-10-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | The old code fell through into from the CE_RubberBand case into the CE_SizeGrip case if the cast of the the QStyleOption to a QStyleOptionRubberBand failed. Quite obviously, the drawing of a rubber band was requested by the caller, drawing a size grip instead must be considered a bug, regardless of any additional guards employed by the size grip case. So, fix by removing the conditional return in the success case and adding an unconditional break. The function ends after the switch, and all other cases also break instead of return, so consider the switch from return to break a contribution to the internal consistency of the function. Discovered independently by GCC 7 and Coverity. Coverity-Id: 11182 Change-Id: I2158f03b9eb018b952716ffa5e615c7b3cc49132 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QCalendarWidget: fix misleading if-else cascade in QCalendarDayValidator::text()Marc Mutz2016-10-121-2/+1
| | | | | | | | | | | | By the time we hit the last else, its if condition is trivially true, so don't check it (but leave it as a comment). Consequently, remove the trailing (dead) return of a default- constructed QString. Coverity-Id: 62766 Change-Id: I47e1a49f40e6ec95d29c5052c78bfadb63af3b84 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QCalendarWidget: fix a missing break statementMarc Mutz2016-10-121-0/+1
| | | | | | | | | | | | | GCC 7 warns about implicit fall-throughs, and here it looks like a break was indeed missing. It surely isn't catastrophic that the other update code is executed, too, but it's also useless. Turns out Coverity knew it all along... Coverity-Id: 11162 Change-Id: I88fc0174a66ec337b2d93c006e70be8d5f3bbc33 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QFileDialog: add missing break statements in switch in labelText()Marc Mutz2016-10-121-0/+2
| | | | | | | | | | | It is of course wrong to potentially return the text of the Cancel button if the text of the Accept role button was asked for. Found independently by GCC 7 and Coverity. Coverity-Id: 11150 Change-Id: Ie30f7875daee16a78eeff4b314ce17cbd7cd3aa8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix gradient race condition / read-after-freeAllan Sandfeld Jensen2016-10-122-26/+27
| | | | | | | | | A gradient table may be deallocated while in use because we don't keep track of references. To fix it we now reference count the cache entries. Task-number: QTBUG-14614 Change-Id: I772ebf565ccf41d476811ca9a51b721f10de8aeb Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QtSql: compile with GCC 7Marc Mutz2016-10-101-0/+1
| | | | | | | | | | GCC 7 warns about implicit fall-throughs now. Fix by adding the missing comments. Change-Id: I7383f47e690b6334ef69c9df745c2205247ca7d0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix QPixelFormat::typeInterpretation() for Format_RGB888Allan Sandfeld Jensen2016-10-101-1/+1
| | | | | | | | RGB888 is byte oriented like the RGBA8888 formats. Task-number: QTBUG-56250 Change-Id: Idbd496e4913e5d168decdd41557e28a71574a85b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QDateTimeEditPrivate:: only ask for fieldInfo() if section index is realEdward Welbourne2016-10-101-1/+3
| | | | | | | | | | | On construction, currentSectionIndex has the fake value FirstSectionIndex, which upsets fieldInfo(), leading to a qWarning(). Make interpret(), when deciding whether to delegate to base or handle the value itself, treat fake index value as an invalid state. Task-number: QTBUG-54654 Change-Id: I6d0f71874839abfafcbfaaa0018362288f32a3cd Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* QEvent: fix typo in apidocFrederik Schwarzer2016-10-081-1/+1
| | | | | Change-Id: I43911d781024b5e76ff5065964a570663de6e33c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* dbustray: Support replacing menu on QDBusTrayIconDmitry Shachnev2016-10-073-8/+16
| | | | | | | | | If a new menu is set via the updateMenu() method, properly unregister the old menu and register the new one. Task-number: QTBUG-53676 Change-Id: I8c1ea2d171caec01488f0fe8a565bc9b2f7e431e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QAbstractItemView: use only a 1x1 QRect for selecting on mouse pressFrank Reininghaus2016-10-071-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Before commit f1e90768095be37419ba4bf3c69ec5c860bdbcb6, mousePressEvent called the virtual method setSelection(const QRect&, SelectionFlags) with the 1x1 rectangle which contains only the clicked QPoint, unless the SelectionFlag "Current" was set because Shift was pressed during the mouse press. Since that commit, the behavior has been changed such that the rectangle is the one that is spanned by the center of the clicked item and the clicked pixel. In theory, the result should be the same (i.e., only the clicked item should be selected), but * the code path in QListView::setSelection for 1x1 QRects is more efficient, and * using a larger QRect can cause problems with custom views, see the comments in QTBUG-18009 This commit ensures that the 1x1 QRect is used again, unless the SelectionFlag "Current" is used. Change-Id: I70dd70c083c20a3af6cd6095aa89a489756b505f Task-number: QTBUG-18009 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Fix multimedia print key mappingAllan Sandfeld Jensen2016-10-071-1/+1
| | | | | | | | Qt::Key_Print is the PrintScreen key-mapping. Instead use Qt::Key_Printer which is also what VK_PRINT is mapped to. Change-Id: I60a0181ed118253b6681ae0e5847812f73d63119 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Darwin: correct state restore when FSEventsStream starting failsErik Verbruggen2016-10-072-45/+77
| | | | | | | | | | | | | The previous state was not restored completely when adding/removing paths resulted in a stream start failure. It also removes an autoreleasepool in restartStream, because both stopStream and startStream do already create an autoreleasepool of their own. (So, this pool will always be empty.) Change-Id: Idc674e9c040f346703ab3ec256957e787a0ade73 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Link to topLevelChanged() in the docs of QDockWidget::floatingSergio Martins2016-10-071-1/+3
| | | | | | | | topLevelChanged() is emitted when the floating property changes. It's not very well named, it's easy to miss. Change-Id: Iabaa4fb3dc6190df43d719ed7565f0586816c6de Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* QTemporaryFile's setFileTemplate operates not only on XXXXXX in the endSune Vuorela2016-10-061-1/+1
| | | | | | | Is even covered by unit tests. Change-Id: I7b22da2a338868fdb99c6238925f944bfea88190 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QPixmap::load: ensure QBitmap stays a QBitmap even on failureMarc Mutz2016-10-061-26/+24
| | | | | | | | | | | | | | | | | | | | ... and avoid detach()ing potentially large data for just preserving the QPlatformPixmap::pixelType(). A QBitmap differs from a QPixmap (its base class, urgh) by always having a data != nullptr and a Bitmap pixel type, yet load() was unconditionally setting 'data' to nullptr on failure, turning a QBitmap into a non-QBitmap. Fix by move-assigning a null QBitmap instead of resetting 'data'. Add some tests. Change-Id: Ida58b3b24d96472a5f9d0f18f81cc763edcf3c16 Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QGraphicsWidget: Fix UB (invalid member calls) in destruction sequenceMarc Mutz2016-10-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by UBSan: qgraphicswidget_p.h:72:5: runtime error: downcast of address 0x2ab6a8021400 which does not point to an object of type 'QGraphicsWidget' 0x2ab6a8021400: note: object is of type 'QGraphicsObject' 00 00 00 00 70 93 5c 91 b6 2a 00 00 f0 c0 01 a8 b6 2a 00 00 e8 81 5c 91 b6 2a 00 00 10 bf 01 a8 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QGraphicsObject' #0 0x2ab68f2fdd7c in QGraphicsWidgetPrivate::q_func() qgraphicswidget_p.h:72 #1 0x2ab68f2fdd7c in QGraphicsWidgetPrivate::fixFocusChainBeforeReparenting(QGraphicsWidget*, QGraphicsScene*, QGraphicsScene*) qgraphicswidget_p.cpp:775 #2 0x2ab68f020d2a in QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem*, QVariant const*, QVariant const*) qgraphicsitem.cpp:1181 #3 0x2ab68f024f73 in QGraphicsItem::setParentItem(QGraphicsItem*) qgraphicsitem.cpp:1781 #4 0x2ab68f168401 in QGraphicsScenePrivate::removeItemHelper(QGraphicsItem*) qgraphicsscene.cpp:620 #5 0x2ab68f02c166 in QGraphicsItem::~QGraphicsItem() qgraphicsitem.cpp:1555 #6 0x2ab68f02ebb8 in QGraphicsObject::~QGraphicsObject() qgraphicsitem.cpp:7766 #7 0x2ab68f2d8888 in QGraphicsWidget::~QGraphicsWidget() qgraphicswidget.cpp:231 #8 0x4bce62 in SubQGraphicsWidget::~SubQGraphicsWidget() /tst_qgraphicswidget.cpp:175 #9 0x4bce62 in SubQGraphicsWidget::~SubQGraphicsWidget() /tst_qgraphicswidget.cpp:175 #10 0x2ab68f02c9ec in QGraphicsItem::~QGraphicsItem() qgraphicsitem.cpp:1550 #11 0x2ab68f02ebb8 in QGraphicsObject::~QGraphicsObject() qgraphicsitem.cpp:7766 #12 0x2ab68f2d8888 in QGraphicsWidget::~QGraphicsWidget() qgraphicswidget.cpp:231 #13 0x4bce62 in SubQGraphicsWidget::~SubQGraphicsWidget() /tst_qgraphicswidget.cpp:175 #14 0x4bce62 in SubQGraphicsWidget::~SubQGraphicsWidget() /tst_qgraphicswidget.cpp:175 #15 0x2ab68f128da4 in QGraphicsScene::clear() qgraphicsscene.cpp:2388 #16 0x2ab68f12936c in QGraphicsScene::~QGraphicsScene() qgraphicsscene.cpp:1682 #17 0x44d44c in tst_QGraphicsWidget::focusWidget() /tst_qgraphicswidget.cpp:435 qgraphicswidget_p.cpp:805:24: runtime error: member call on address 0x2ab6a8021400 which does not point to an object of type 'QGraphicsWidget' 0x2ab6a8021400: note: object is of type 'QGraphicsObject' 00 00 00 00 70 93 5c 91 b6 2a 00 00 f0 c0 01 a8 b6 2a 00 00 e8 81 5c 91 b6 2a 00 00 10 bf 01 a8 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QGraphicsObject' #0 0x2ab68f2fdc68 in QGraphicsWidgetPrivate::fixFocusChainBeforeReparenting(QGraphicsWidget*, QGraphicsScene*, QGraphicsScene*) qgraphicswidget_p.cpp:805 #1 0x2ab68f020d2a in QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem*, QVariant const*, QVariant const*) qgraphicsitem.cpp:1181 [... identical lines omitted ...] qgraphicswidget_p.cpp:806:23: runtime error: member call on address 0x2ab6a8021400 which does not point to an object of type 'QGraphicsWidget' 0x2ab6a8021400: note: object is of type 'QGraphicsObject' 00 00 00 00 70 93 5c 91 b6 2a 00 00 f0 c0 01 a8 b6 2a 00 00 e8 81 5c 91 b6 2a 00 00 10 bf 01 a8 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QGraphicsObject' #0 0x2ab68f2fdb6b in QGraphicsWidgetPrivate::fixFocusChainBeforeReparenting(QGraphicsWidget*, QGraphicsScene*, QGraphicsScene*) qgraphicswidget_p.cpp:806 #1 0x2ab68f020d2a in QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem*, QVariant const*, QVariant const*) qgraphicsitem.cpp:1181 [... identical lines omitted ...] qgraphicswidget_p.cpp:827:26: runtime error: member call on address 0x2ab6a8021400 which does not point to an object of type 'QGraphicsWidget' 0x2ab6a8021400: note: object is of type 'QGraphicsObject' 00 00 00 00 70 93 5c 91 b6 2a 00 00 f0 c0 01 a8 b6 2a 00 00 e8 81 5c 91 b6 2a 00 00 10 bf 01 a8 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QGraphicsObject' #0 0x2ab68f2fdf91 in QGraphicsWidgetPrivate::fixFocusChainBeforeReparenting(QGraphicsWidget*, QGraphicsScene*, QGraphicsScene*) qgraphicswidget_p.cpp:827 #1 0x2ab68f020d2a in QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem*, QVariant const*, QVariant const*) qgraphicsitem.cpp:1181 [... identical lines omitted ...] Fix by moving the setParentItem(nullptr) call up the call stack into ~QGraphicsWidget(), ensuring that the object is still a QGraphicsWidget when these calls are made. Change-Id: I264779e33098e9752de9a312a146fb203578a3cc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Plug leak in QFormLayout::setWidget()Marc Mutz2016-10-061-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike layouts and spacer items, a QWidget is-not-a QLayoutItem. QWidgetItem simply wraps the QWidget, so in QFormLayout::setWidget(), we allocate a widget item for the widget passed, and hand that down to Private::setItem() for adding to the various data structures. Private::setItem() has a bunch of guard clauses, though, that return without deleting the item. A test triggered this code path and made asan complain. This is just one part of a larger problem: QFormLayout::setLayout() normally takes ownership of the layout passed, because QLayouts own their QLayoutItems, and QLayout is-a QLayoutItem. But setLayout() fails to live up to the owner role when it fails to add a layout, and there's no easy way for the API user to check for success. A fix for this breaks tst_qformlayout, and while those checks that break deserve to be broken, I'll refrain from proposing the larger fix for 5.6 LTS, but will propose it for 5.8 or 5.9 instead. This fix here only fixes the leak in setWidget() by adding a bool return to Private::setItem() informing Private::setWidget() of the need to manually delete the item it allocated for the widget. Change-Id: I81409c260f9bee2e95c9a98542d8c60bc19a1332 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QDBusDemarshaller: use RAII in duplicate()Marc Mutz2016-10-061-2/+5
| | | | | | | | | | | | | QtDBus is compiled with exceptions disabled, but checkers don't know that, and it's not 100% certain it will stay that way until eternity. So do the simple change and hold the new'ed pointer in a QScopedPointer until handing it off to create(). Coverity-Id: 154477 Change-Id: I91a763ca4e93585c97cb9e794312b53046971161 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use the same object in description as in described codeFrederik Schwarzer2016-10-061-1/+1
| | | | | | Change-Id: If52ecfc8d29a83cb2949fbbf4672ae386ae5d739 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* QTextEdit: don't show placeholder text while composing textRichard Moe Gustavsen2016-10-063-1/+8
| | | | | | | | | | | | | If using IM to compose text in QTextEdit, the placeholder text will show underneath until the text is committed. This patch will additionally check if the user is currently composing preedit text before deciding whether or not to draw the placeholder text. Task-number: QTBUG-55758 Change-Id: If7943c6c94fb96d46514a81caa118829e6e6a0f9 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Doc: Document that by default, QTimer is not single-shotKai Koehne2016-10-061-0/+2
| | | | | Change-Id: I586997ddb5ed55d68f53ddfe9302b961296cc4eb Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* Make sure SSL configuration is correct in QNetworkReply::encrypted.Vladimir Prus2016-10-053-6/+13
| | | | | | | | | | | | | | | | | | In some cases, when QNetworkReply::encrypted is emitted, QNetworkReply::sslConfiguration is not yet initialized, in particular certificate chain is empty, which breaks the documented usage of 'encrypted' to perform additional checks on certificate chain. It looks to be caused by the fact that QHttpNetworkReply is originally associated with 0th QHttpNetworkConnectionChannel, and this association is not updated if HTTP pipelining is not used. Therefore, a reply on channel >0 might arrive before reply on channel 0, and then using ssl configuration from channel 0, which not made it through handshake, is not usable. Task-number: QTBUG-49554 Change-Id: Ie5d4b5a0c503d5bdc44761ce8581f6ffe4e3bac2 Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
* Fix some typos and minor sentence structure issues in docsFrederik Schwarzer2016-10-056-8/+8
| | | | | Change-Id: Ibede1aeb046e2df6723e3041152bfae22a9fde32 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* winrt: Fix compilation for projects using C++/CX extensionsMaurice Kalinowski2016-10-051-4/+4
| | | | | | | | | In case a project uses C++/CX extensions via /ZW compile flag including qfunctions_winrt.h resulted in a compile error about duplicate definition of Started due to namespace usages. Change-Id: I8913522eafbabae77dd7d17187f202e555b0275f Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* docs: Don't mark qDrawBorderPixmap() as overloadSergio Martins2016-10-051-1/+0
| | | | | | | Because it doesn't overload anything. Change-Id: I871df10b4a0a46da238a5d1061cfb1aa34ccee03 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QCocoaEventDispatcher: Save interrupt state between embedded callsGabriel de Dietrich2016-10-041-1/+1
| | | | | | | | | | | | | | | | Since QCocoaEventDispatcher::processEvents() resets the interrupt state, this may prevent a higher level event loop from returning. For example, calling QMenu::exec() and, as a result of an action being triggered, the application calls QCoreApplication::processEvents() after QMenu::hideEvent(). In this case, the menu event loop can be stuck until we run another event loop. Task-number: QTBUG-53947 Change-Id: If7efe1c3c07f7222c695195cbb4f41715e49b02e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Wayne Arnold <wayne.arnold@autodesk.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>