summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Direct2D QPA plugin: Use member initializationFriedemann Kleint2016-10-276-31/+15
| | | | | | | | Use C++ 11 member initialization in value-type structs. Task-number: QTBUG-51673 Change-Id: I2e609337cfc057d1de23b3de62b9ed43a4ecec9c Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
* Direct2d: Fix some CLANG warningsFriedemann Kleint2016-10-275-79/+81
| | | | | | | Fix warnings about integer and double to float conversions, mostly. Change-Id: I7c0568051eabea9af9cbdaeb36da0b2affb174e1 Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
* QStringRef: add isRightToLeft()Anton Kudryavtsev2016-10-252-24/+40
| | | | | | | | isRightToLeft() was missing in the API. Change-Id: I49bc30e4c50f5693eb613c200587acba85074f33 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* qsettings_win.cpp: Use qt_error_string()Friedemann Kleint2016-10-241-23/+8
| | | | | | | | Remove the errorCodeToString() which is duplicating the functionality and does apparently not work. Change-Id: Ib1ca2dfed630b10d01c0acf278c42eb851405b46 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Update main/primary screen term usageMorten Johan Sørvig2016-10-241-5/+5
| | | | | | | | | | | | The first screen in the screens array is referred to as the _primary_ screen in Apple documentation. The main screen is the screen with the currently active window. Change-Id: I900a53e6bfb06ed9e42fba1e11d3a583777e9a1d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* qhostaddress.cpp: optimize string usageAnton Kudryavtsev2016-10-241-5/+5
| | | | | | | | Prefer QStringRef methods to avoid allocations. Change-Id: I0a5878f29c93e65feb2ab189b6b316d53ed497bd Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QStringRef: add constBegin() and constEnd()Anton Kudryavtsev2016-10-242-4/+23
| | | | | | | | | | | These methods were missing in the API. constBegin, constEnd are the more Qt-ish names. Also it makes porting client code from QString to QStringRef easier. Change-Id: I3fce1d206073d26259fe0fa44d0f7ca718504ec3 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QRingBuffer::reserve(): remove superfluous assertAlex Trotsenko2016-10-221-1/+0
| | | | | | | | 'bytes' is checked against MaxByteArraySize in the beginning and remains unchanged in the function. Change-Id: Ibd4091b95837db16cf45f845d485bfb189317125 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* macOS: Remove unneeded argument to QCocoaWindow::recreateWindow()Tor Arne Vestbø2016-10-212-6/+8
| | | | | | | The parent window is available through QPlatformWindow::parent(). Change-Id: I2436c001ec18f5abba99db3061acb0edcd8035a2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Add header guard and We-mean-it comment to qoperatingsystemversion_p.hFriedemann Kleint2016-10-191-0/+16
| | | | | | | Amends change 26b2ad5a181eab7ad04ba819004bcc619c24147b Change-Id: I64c3a2338b6fa821f6951edffe6ddc050b513743 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Nitpick: fix style in QtCore codeAnton Kudryavtsev2016-10-191-2/+4
| | | | | Change-Id: I60b3539f6c8cc36e4ad6988799d3cf9c565bdb21 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge branch 5.8 into devTor Arne Vestbø2016-10-189-130/+108
|\ | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm Change-Id: I655e8d04cece341e8b9fb69e94c09335ffa108e1
| * macOS: Remove workaround for including AppKit.h with slots definedTor Arne Vestbø2016-10-135-40/+25
| | | | | | | | | | | | | | | | | | | | The workaround doesn't seem to be needed anymore, and wasn't applied uniformly anyways. If it turns out AppKit still needs this workaround we should add CONFIG += no_keywords to cocoa.pro, instead of trying to wrap every single include of AppKit in a undef slots dance. Change-Id: Ia1b15137c03abcc92f0dd246796622772e99ca68 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * macOS: Remove QNSView member m_window in favor of going via m_platformWindowTor Arne Vestbø2016-10-134-75/+82
| | | | | | | | | | | | | | | | | | | | | | The two should never be out of sync, but by having them as separate members we risk that they do. By going though m_platformWindow for QWindow access, it's also more clear in the callsites that we're dealing with a QWindow instead of a NSWindow, as referenced though self.window. Finally, removing the member slims down memory use of a QNSView, however small. Change-Id: Iec96cebf813fae82d3af339331781419f234c28b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * macOS: Use QPointer to track QNSView -> QCocoaWindowTor Arne Vestbø2016-10-133-15/+1
| | | | | | | | | | Change-Id: I4de581dda03d25e781112eff34de28dfd1797a7f Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | QFileSystemWatcher/Win32: Listen for WM_DEVICECHANGEFriedemann Kleint2016-10-186-4/+369
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a class QWindowsRemovableDriveListener to QWindowsFileSystemWatcherEngine listening to the WM_DEVICECHANGE messages sent to the top level windows to detect insertion and removal of USB drives. In addition, hook into QWindowsFileSystemWatcherEngine::addPaths() when watching on removable drives, registering a notification for a volume-lock-for-removal message on the internal window handle obtained from QEventDispatcherWin32. When a request to lock the volume for removal is received, remove the paths from the watcher, enabling removal. The class instance is set as a dynamic property on the QFileSystemWatcher where it can be retrieved from clients. This is primarily intended for use by QFileInfoGatherer/QFileSystemModel. Task-number: QTBUG-14290 Task-number: QTBUG-18729 Task-number: QTBUG-55459 Change-Id: Ic95b9d9291b1ec6f426c0702bad896bb064b9346 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Add QTextDocument::toRawText() functionEskil Abrahamsen Blomfeldt2016-10-172-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QTextDocument::toPlainText() converts some characters in the text to ASCII, which can be problematic for use cases where you want to save the precise contents of the document, e.g. in Qt Creator. Since we don't want to change the behavior of toPlainText(), we introduce a new function which returns the raw text contents of the document instead, with no modifications. [ChangeLog][QtGui][Text] Added QTextDocument::toRawText() function. Task-number: QTBUG-56538 Change-Id: Ib6c48a16551c4c71c4c431760f993793d1af6806 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QMenuBar: do not gain focus when releasing Alt before X in a Alt+X shortcutGiuseppe D'Angelo2016-10-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It might happen that, when pressing Alt+X to trigger a shortcut for an action in a menubar, that the user releases Alt first, followed by X. When that happens, QMenuBar gains focus as if the user just pressed and released Alt (to focus the menu bar). That's counterintuitive, frustating and not what native Windows seems to do. Fix this by resetting the "altPressed" state whenever a shortcut gets triggered with the Alt key pressed. (In the above discussion, X stands for any key). Task-number: QTBUG-46812 Change-Id: If4b7a47842791894a3a32d09db5de229ed33773e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.8' into dev" into refs/staging/devLiang Qi2016-10-13227-1228/+1671
|\ \
| * | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-10-13227-1228/+1671
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakeevaluator.cpp (cherry picked from commit 1af6dc2c8fb4d91400fddc5050166f972ae57c9a in qttools) src/corelib/kernel/qcore_mac_objc.mm src/gui/painting/qcolor.h src/plugins/platforms/cocoa/qcocoawindow.mm Change-Id: I5b3ec468a5a9a73911b528d3d24ff8e19f339f31
| | * Android: Allow the user to hook into the onCreate methodsBogDan Vatra2016-10-122-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | onCreate methods are very important when you want to add some java code before the Qt application is loaded. Because onCreate must call "super.onCreate(..)" it is impossible for the user to do anything before Qt is loaded. By using the onCreateHooks to load Qt, the user can decided, by overriding the onCreateHook method, when or if Qt is loaded. Change-Id: I15a3dd60b8ae7d314c53ace99faedfbd47d25502 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| | * de-duplicate freetype configure entryOswald Buddenhagen2016-10-121-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | note that the feature is kept private (unlike in the introduced duplicate), as there shouldn't be a need to query this internal variable (that's actually debatable, but this discussion applies to several other features as well). Change-Id: I05c52a8becd5151f7e9e378f0c49499223916053 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * winrt: tcpsocket: Update bytesAvailable when new data is readHarald Meyer2016-10-122-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of calculating the bytesAvailable in place, the value should be stored and only retrieved in the function itself. Otherwise it is possible that bytesAvailable is called between the data having been read and readyRead is emitted. In this case it's possible, that the client reads all the data before the signal is emitted. Triggering readyRead without any data being available will stop the socket. Task-number: QTBUG-44357 Change-Id: I81d6ab094c5fdd71f30b9ceba9d790153cc92439 Reviewed-by: Harald Meyer <dev@meh.at> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| | * winrt: Rework handling of udp datagramsOliver Wolff2016-10-122-12/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We may only emit the readReady signal once for every event loop iteration. The previous implementation lead to the situation that the socket engine stopped reading socket data when bursts of data was received. In this case several readReady signals were fired. The socket engine obtained the pending datagrams (not only the first one) and for the following readReady signal no datagram was present. In this case the socket engine stops reading and the engine stalls. The new approach emits the readyRead signal at the most once every event loop iteration. The list of new pending datagrams is queued to be added to the "real" pending datagram list at the same time as the readyRead signal. Thereby we avoid the situation that a client can read all the datagrams before readyRead is emitted. One more advantage of having the worker handle the pending datagrams is that we no longer have to access the socket engine's members inside the callback. Thus we avoid the situation, where a late callback can make the application crash when the socket engine has already been deleted. Task-number: QTBUG-53472 Task-number: QTBUG-53471 Task-number: QTBUG-55895 Change-Id: Ia6d21cb635a40e7bd9e0213bb3a5c54ebc1220eb Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| | * Fix build with various features disabledLars Knoll2016-10-116-3/+25
| | | | | | | | | | | | | | | Change-Id: I95cb3cf3434306344af3f4c7556f45dbfa0b08d6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * Add configure feature for QUrl::topLevelDomainLars Knoll2016-10-117-1/+29
| | | | | | | | | | | | | | | Change-Id: I237af8c60a9572c707e7004c9a284dd6cd3306ce Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * Add configure feature for QCommandLineParserLars Knoll2016-10-115-5/+22
| | | | | | | | | | | | | | | Change-Id: I78c1159d29e12ad03b9a3c076a40ee533958af8a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * Add configure feature for time zone supportLars Knoll2016-10-117-69/+91
| | | | | | | | | | | | | | | Change-Id: I6ea02dab33e67e7f312a62d94d82eaf1fbe9d9bc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8Liang Qi2016-10-1123-110/+180
| | |\
| | | * Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-10-1123-110/+180
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qpixmap.cpp src/widgets/kernel/qformlayout.cpp Change-Id: I8a8391a202adf7f18464a22ddf0a6c4974eab692
| | | | * Revert "QCocoaKeyMapper - correctly update key layouts"Timur Pocheptsov2016-10-101-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 26961e32f34c06f083fe441c23be6874f03446a3. This patch was apparently a bit ill-considered and while fixed one problem introduced others. Task-number: QTBUG-50865 Change-Id: I2e3569d16c8fc47b4a492d4aed6e747d7ff93a55 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | | * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-0822-101/+173
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttpnetworkconnection.cpp src/network/access/qhttpnetworkconnection_p.h Change-Id: I11f8641ef482efa8cee1b79977d19cc3182814b4
| | | | | * 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>
| | * | | | eglfs: Add Virtual and DSI connector types for DRMLaszlo Agocs2016-10-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example, VMWare's vmgfx exposes a Virtual connector. Recognize this properly instead of falling back to UNKNOWN. Change-Id: Iee4f980ca0dfbbf3433fea1515fab27392250093 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | * | | | Direct2D platform plugin: Fix developer build with MSVC2015Friedemann Kleint2016-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix error: qwindowsdirect2dbitmap.cpp(84): error C2220: warning treated as error - no 'object' file generated qwindowsdirect2dbitmap.cpp(84): warning C4838: conversion from 'int' to 'UINT32' requires a narrowing conversion Change-Id: I191f3300cd22715001eebc113b672ceac49c825d Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| | * | | | Avoid auto-vectorization of epilogues of manual vectorizationAllan Sandfeld Jensen2016-10-118-33/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Defines a structure that tells the compiler in no uncertain terms the maximum number of times a loop can be run. The reduces the size of qdrawhelper_avx2.o from 22kbytes to 11kbytes. Change-Id: Ie3d6281b04b4be3332497c15f3dfe9f185e20507 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>