summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Liang Qi2018-08-086-27/+53
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-086-27/+53
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoabackingstore.mm src/plugins/platforms/cocoa/qcocoascreen.mm Change-Id: Iac965aea4867059dbf7bc401b71e8e8b5b259afb
| | * macOS: Don't blend the backingstore unless the window has a backgroundTor Arne Vestbø2018-08-071-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there's no background, we should copy the backingstore, so that the backingstore is not blended with the result of the previous flush. The unified toolbar case is covered by the window having a textured background. Task-number: QTBUG-69773 Change-Id: I2f4eed9f44a60ebe7495ce68cf5a54d3d2424b0c Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * macOS: Update window geometries after screen properties changeTor Arne Vestbø2018-08-071-0/+14
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-69794 Task-number: QTBUG-68140 Change-Id: I4d33bc2136478d779cc4ae8170c3421d9a7557cc Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| | * Add QPlatformScreen::windows() helper to return all windows on screenTor Arne Vestbø2018-08-062-9/+17
| | | | | | | | | | | | | | | Change-Id: Ib55b37b64ed0890ca777dfea8c4d702e267c34bf Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| | * Use consistent naming of QPA screen change callbacks in QGuiApplicationTor Arne Vestbø2018-08-062-12/+12
| | | | | | | | | | | | | | | | | | Change-Id: I76be8a993e5d71e472faf9a5770b4c1128e8a4c6 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Windows QPA: fix transientParentHwndMauro Persano2018-08-081-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindowsWindow::updateTransientParent retrieves the handle of the topmost owner window, not that of the immediate owner window (which corresponds to the handle of transient parent window). Task-number: QTBUG-69620 Change-Id: I1433098e8e93832d97508ee1782f88ccc000ee3a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Initialize variableJesus Fernandez2018-08-081-1/+1
|/ / | | | | | | | | | | | | | | | | dstZone.offset was being used without initialization. Coverity-Id: 178898 Change-Id: I8eabef3b4386c3ebfea5d1caffff9add6264bfce Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* | QStringLiteral: remove the wchar_t fallback for WindowsThiago Macieira2018-08-071-17/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This isn't necessary anymore, since MSVC 2015 does have Unicode string support and MinGW (GCC) has had it for a long time. More importantly, we must remove this macro: # define QT_UNICODE_LITERAL_II(str) L##str As the updated MSVC preprocessor will no longer support it. See "Behavior 2" in [1] [1] https://blogs.msdn.microsoft.com/vcblog/2018/07/06/msvc-preprocessor-progress-towards-conformance/ Change-Id: Id59bdd8f1a804b809e22fffd15401099a67175d3 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | macOS: Don't call [NSOpenGLContext update] for every frameTor Arne Vestbø2018-08-075-76/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling update has a cost, and should only be done when the drawable object changes size or location. Instead of calling update each time makeCurrent is called, we listen for the appropriate notifications, limiting the number of update calls significantly. The code has also been refactored to get rid of the m_activeWindow member, as the active window can be tracked through the context's drawable object property. There is also no need to clear the drawable when a window is hidden, so the hook into QCocoaWindow can be removed. The QPlatformNativeInterface hook is internal and can safely be removed. Task-number: QTBUG-63572 Change-Id: I70e3267f47882e151144bd36a50abe906164429a Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Liang Qi2018-08-0740-291/+416
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-0740-291/+416
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/doc/src/objectmodel/signalsandslots.qdoc src/plugins/platforms/cocoa/qcocoamenuloader.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp tests/auto/gui/image/qimage/tst_qimage.cpp Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I9bd24ee9b00d4f26c8f344ce3970aa6e93935ff5
| | * Windows QPA: Fix UIA-to-MSAA accessibility bridgeAndre de la Rocha2018-08-062-16/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to MS sample code, MSAA requests should be replied with UI Automation providers to enable the use the UIA-to-MSAA bridge, in order to support MSAA-only clients. Also changing the mapping of QAccessible::Client from UIA_CustomControlTypeId to UIA_GroupControlTypeId, as it seems more appropriate and avoids an incorrect mapping to a push button type in the UIA-to-MSAA conversion. Change-Id: I5149d250da2d1bd7b14b44ca46e856a81c9be045 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * QString: Fix documentation for toDouble() and toFloat()Andre Hartmann2018-08-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The character 'g' is only a valid format when converting numbers to strings, but not other way round. Change-Id: Ie772886e7a45a5067c0a3e4eaa3a6ccef8e69426 Reviewed-by: Martin Smith <martin.smith@qt.io>
| | * Check for QImage allocation failure in qgifhandlerEirik Aavitsland2018-08-061-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Since image files easily can be (or corrupt files claim to be) huge, it is worth checking for out of memory situations. Change-Id: I635a3ec6852288079fdec4e14cf7e776fe59e9e0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * QObject: do allow setProperty() to change the type of the propertyThiago Macieira2018-08-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QObject] Fixed a bug in setProperty() that caused a property change not to take effect if the old value compared equal using QVariant's equality operator, but the values were not strictly equal. Task-number: QTBUG-69744 Change-Id: I00e04a465fcf4fc1a462fffd1547885861a07a64 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Remove the src/sql/README.module fileThiago Macieira2018-08-041-37/+0
| | | | | | | | | | | | | | | | | | | | | | | | It's stale. Thanks to Olivier B. for pointing out. Change-Id: Ie01831ddac5446fdbdeefffd15463530818cff9e Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * Doc: Update out-of-date image in QColorDialog documentationPaul Wicking2018-08-031-0/+0
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-58420 Change-Id: Ib5c7a3f681b082182cf6ec9aa62028b7040e81bf Reviewed-by: Martin Smith <martin.smith@qt.io>
| | * Doc: Clean up Qt::ApplicationAttribute docsPaul Wicking2018-08-031-33/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove () from links to QGuiApplication link names. The link targets QGuiApplication, and the syntax Q(Gui)Application to suggest both QGuiApplication and QApplication seems unnecessary, as QApplication derives from QGuiApplication anyway. * Move added in version line to the bottom of each entry that contains said line for consistency. * "was added in" > "has been added in" Task-number: QTBUG-56077 Change-Id: Ife93acb7936ff9f0d3af2f2f456ad0db95419797 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
| | * Doc: Fix wrong link in QFont documentationPaul Wicking2018-08-031-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-62072 Change-Id: I587534fc5723b3d198fe2065fbcf1bee4871a768 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Fix conversion from transparent indexed8 to RGB32Allan Sandfeld Jensen2018-08-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | A typo meant the color-table was not fixed. For safety fallback colors are also made opaque. Change-Id: I3e609882177604910c4343c86f00221a89af9078 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * Optimize blits of any compatible formatsAllan Sandfeld Jensen2018-08-032-2/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fast image blending is only used for SourceOver composition, but several of our embedded backends make heavy use of Source composition which doesn't have a short-cut. This patch adds a blitting short cut that works in those cases. Task-number: QTBUG-69724 Change-Id: Icc61a67cc27bc83863153d69cae60dd986d26f69 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Doc: Increase precision in description of convenience typedefsPaul Wicking2018-08-031-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-53856 Change-Id: I57917bb311d1d93e0903f2b3e021cc4db0f0d05e Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
| | * Add missing optimization for loading RGB32 to RGBA64 using NEONAllan Sandfeld Jensen2018-08-031-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rest of the RGB64 routines were optimized, but the loading of RGB32 was not as it was originally not used much, but with ARGB32 using the RGB64 backend, it is essential for decent performance. Task-number: QTBUG-69724 Change-Id: I1c02411ed29d3d993427afde44dfa83689d117e0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Windows: Implement Qt::WindowStaysOnBottomHintFriedemann Kleint2018-08-032-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the Z-order to HWND_BOTTOM in that case. Add a doc note stating that it only works for frameless or full screen windows. Task-number: QTBUG-53717 Change-Id: I7abf219a88aac715c51d27d925504da9e91b56f1 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * QProcess::startDetached: Fix behavior change on WindowsJoerg Bornemann2018-08-032-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Do not overwrite stdout/stderr by default, but only if requested. This restores the behavior of QProcess::startDetached of Qt 5.9. Task-number: QTBUG-67905 Change-Id: Idccf7b0da7bd80f88a0624286ddf2851bc974fb1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Fix crash in qppmhandler for certain malformed image filesEirik Aavitsland2018-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ppm format specifies that the maximum color value field must be less than 65536. The handler did not enforce this, leading to potentional overflow when the value was used in 16 bits context. Task-number: QTBUG-69449 Change-Id: Iea7a7e0f8953ec1ea8571e215687d12a9d77e11c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * SecureTransport - disable lock on sleep for the custom keychainTimur Pocheptsov2018-08-021-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It appears that by default our keychain auto-locks when the system sleeps. This makes the keychain totally useless, since its password is a random 256 bytes our user never has a chance to know. Thanks to Mårten for the hint about SecKeychainSetSettings, the way to properly fix it. Task-number: QTBUG-69677 Change-Id: I2603c26b8422a1bcace3336e9b4ebe0381c952d7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * QCommonStylePrivate::viewItemSize: Fix text width bounds calculationAles Erjavec2018-08-021-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The width of the icon was subtracted out of the available text area width even when the value of the `decorationPosition` was Top/Bottom. Task-number: QTBUG-69404 Task-number: QTBUG-30116 Change-Id: I501ffc0dab0cff25e525c26adf9bdb060408927b Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * HiDPI: Fix calculating window mask from pixmap on drag and dropBłażej Szczygieł2018-08-021-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use platform window directly for setting a mask to prevent bitmap scaling if pixmap and window DPR are the same. Amends: 42f788ffe26d67864d569c3a3044619d49fc693a Task-number: QTBUG-61948 Change-Id: I5eec85c01f20bdefff7343e83ff10cbcb2c79508 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * QLabel: Use nullptr in documentationAndre Hartmann2018-08-011-5/+5
| | | | | | | | | | | | | | | Change-Id: Idc3a5a40e33ddb4257e46d7b6f3279ca14241911 Reviewed-by: Martin Smith <martin.smith@qt.io>
| | * QCocoaMenuLoader - ensure that ensureAppMenuInMenu indeed, ensuresGabriel de Dietrich2018-08-011-18/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic seems to be incorrect (or the naming is misleading): it only adds 'appMenu' if it was found in the previous 'mainMenu', failing otherwise. Consider the following example: while (true){ QApplication app(a,b); MainWindow w; w.show(); app.exec(); } It's quite a contrived but apparently allowed API use (OP claims they have to switch languages in their app). The main window and the app are destroyed, so is the menu bar. Then a new main window is created, with a new menu bar. Now the current [NSApp mainMenu] (the one set after we deleted the previous) does not have 'appMenu' anymore (we removed it when initializing the first menu bar). So as a result we have app menu missing and add new menus/items to a wrong menus/at wrong index. Change-Id: I64fce766d6c12ebf7ae12bb94af41c8c1de3d78b Task-number: QTBUG-69496 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Improve documentation of QString::indexOf that take QRegExpAlbert Astals Cid2018-08-011-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They said "By default, this function is case sensitive" but this makes no sense when you're using a regexp for searching, the regexp is case sensitive or not by itself, QStringList does not influence that. Change-Id: I7446cb52a9f915c6551af6046ce89cbc8bab96ed Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * xcb: partly revert 3bc0f1724ae49c2fd7e6d7bcb650350d20d12246Gatis Paeglis2018-08-014-101/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After trying to fix (work around) system resize/move issues in various ways from within the platform plugin, it has been concluded that it is a bug at widget layer and should be fixed there instead: QTBUG-69716. This patch reverts parts of 3bc0f1724a and disables system move / resize on XCB plugin. Meaning, QSizeGrip will use its own implementation for resizing a window. Task-number: QTBUG-68501 Task-number: QTBUG-69628 Change-Id: Ib4744a93fb3e3c20f690a8f43713103856cb7d1a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * QWidget: Add note about fixPosIncludesFrame not supporting window statesTor Arne Vestbø2018-08-011-0/+6
| | | | | | | | | | | | | | | Change-Id: Iee841e7e6552e24f2b62b0c2df5df3c432680eef Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| | * Fix conditions for dup2 in QProcess::startDetachedJoerg Bornemann2018-08-011-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The channel pipes are only set up if the channel's type is Redirect. Fix the conditions accordingly. This amends commit 7ad55ca6. Change-Id: Ie8a800fbe2bf9f5f6709b14ba03133b80e9b4bef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * QDeadlineTimer: Fix documentation typoAndre Hartmann2018-08-011-2/+2
| | | | | | | | | | | | | | | Change-Id: If8f7766ca0698a3defdf9c59c44fb02a8a5b3b62 Reviewed-by: Martin Smith <martin.smith@qt.io>
| | * Windows QPA: Fix override cursor being cleared when crossing window bordersFriedemann Kleint2018-07-313-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Override cursors can be modified externally when for example crossing window borders. Add helper function to enforce the cursor again to QWindowsWindow::applyCursor() which is called for enter events. Task-number: QTBUG-69637 Change-Id: Ibea4da9f2aac81377002b626daae64b1102f6c2b Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * Doc: Remove reference to QTestEventPaul Wicking2018-07-311-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTestEventList refers to QTestEvent, which is an implementation detail that should not appear in documentation. Task-number: QTBUG-68109 Change-Id: Id132889427b757ea17165c8b15ed47bcfb9e1c3f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Doc: Update signals and slots introduction pagePaul Wicking2018-07-311-22/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use this as context in connect to functors/lambdas. Add description of the use of context in connects. Update the simple example to make it slightly less confusing for (new) readers. Task-number: QTBUG-69483 Change-Id: Ibbbe98c4282cea4ebd860b1d174871559b7f195b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| | * Link from QLocale to where date-time formats are explainedEdward Welbourne2018-07-312-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QLocale has various methods that deal in date-time formats, which may be supplied as strings; but does not document the form of a format string. That's documented in QDate, QTime and QDateTime, so link to them for the details. Task-number: QTBUG-23307 Change-Id: I6347d80a87dc03f6a4065e3d5bf4d535f05af93f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Return to eventloop after emitting encryptedMårten Nordheim2018-07-312-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the connection has been encrypted we will, in QHttpNetworkConnectionChannel::_q_encrypted, emit 'reply->encrypted' in which user slots can be called. In the event that the user calls abort it will, however, not abort until the next time it goes back to the event loop (which might not happen until after the request has already been sent). Task-number: QTBUG-65960 Change-Id: I96865f83c47f89deb9f644c86a71948dbb0ec0d0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * QJsonDocument: Make emptyObject an objectJüri Valdmann2018-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A default-constructed QJsonObject has no data payload, it is only a pair of null pointers. So, when it becomes necessary to 'materialize' such an object, a special global emptyObject constant is used as the substitute payload. There is a small problem with this global constant though, namely that it's is_object flag is unset. In other words, the emptyObject is not an object, but an array. Fix by setting the is_object flag on emptyObject. The example code in the bug report QJsonObject parent; QJsonObject child; parent["child"] = child; // 1 child = parent["child"].toObject(); // 2 child["test"] = "test"; // 3 runs into this problem on line 1. Inserting the default-constructed child means inserting a copy of emptyObject. On line 2 a pointer to this copy of emptyObject is retrieved and cast to an object. But it's not an object, it's an array, so things go wrong hereafter. Specifically, on line 3, two inserts are performed, one from operator[] and one from operator=. Each insert increments a compaction counter. The second insert triggers compaction (QJsonObject::insert calls Value::requiredStorage calls Data::compact) and compaction branches based on the is_object flag. Replacing line 3 with child.insert("test", "test"); causes the example to appear to work since compaction is not triggered and the JSON serializer does not look at the is_object flag. Still, any further insert() calls would trigger compaction and memory corruption. Task-number: QTBUG-69626 Change-Id: I8bd5174dce95998bac479c4b4ffea70bca1a4d04 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QTimer: Add const to some singleShot methodsThiago Macieira2018-08-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QTimer] Fixed singleShot() methods that lacked proper "const" qualification to QObject context receivers. Task-number: QTBUG-69800 Change-Id: Ia741b559c24d46c78fb2fffd154865a9cb762473 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Doc: Fix QByteArray::toFloat snippetAndre Hartmann2018-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | | Amends dc133765ec47e9625c49701f0ffd762b0ee1ad48 Change-Id: I0550e94651dcf2434a7b57b7ae845a5b40cb5cc4 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | | Specify to call QLocalSocket's close in dtorMårten Nordheim2018-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specify that we're calling QLocalSocket::close in dtor. While it's virtual it will not call any overloads at this time. From cppcheck. Change-Id: I7b8030ab96e1568cbb2a378ceaf07b2ecabf054f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | NeworkAccessBackend: Remove duplicated/shadowed memberMårten Nordheim2018-08-074-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QNetworkAccessBackend has a QSharedPointer called uploadByteDevice. QNetworkAccessDebugPipeBackend and QNetworkAccessFileBackend both duplicated the member, by taking a copy of the raw pointer, while also shadowing the QNetworkAccessBackend's member by reusing the name. Change-Id: I91f4e8d43d95c5f30c5bc2571393804209b7a843 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Remove forward declaration of non existing classJędrzej Nowacki2018-08-071-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | QUnixEventDispatcherQPA has no private class, there is no need to declare a fake one. Change-Id: I615304709fbbea83f6747bb6202dbfd2cc03256d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Guard QGL2PaintEngineEx/QGLPaintDevice against using unset contextTor Arne Vestbø2018-08-072-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QGL2PaintEngineEx::end() calls endPaint() on the device, which may end up calling QGLContext::swapBuffers() on the context, a call which we have documented to require makeCurrent() for any further GL commands: Call this to finish a frame of OpenGL rendering, and make sure to call makeCurrent() again before issuing any further OpenGL commands, for example as part of a new frame. QOpenGLContext also documents that: To be able to support certain platforms, QOpenGLContext requires that you call makeCurrent() again before starting rendering a new frame, after calling swapBuffers(). As a consequence, we need to guard the GL usage in QGLPaintDevice::endPaint(), as well as the GL reset in QGL2PaintEngineEx::end(). Change-Id: Ib66e91cce12fbaea32ed3c30141150fa15907187 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Fix ASAN error about new-delete-size-mismatch in QVariantSimon Hausmann2018-08-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We allocate the variant's PrivateShared for custom types with space for the actual custom type right after that, using operator new to allocate the memory and a new calls for the constructors. However to free the memory we merely call delete on the private shared, which upsets ASAN because the size passed to operator delete is the size of the private shared, which is not the same as the size that was provided for the returned address. This is easily fixable by calling the destructor explicitly and calling operator delete with just the pointer. Change-Id: I50afbe0e8afc875c0876e85e02689dcbdc152633 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>