summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QDateTimeParser: de-duplicate calls and cache resultsAnton Kudryavtsev2016-05-111-7/+9
| | | | | | Change-Id: I0d6065fbdd19acff14072ff626585e8a12a3e073 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* eglfs: Fix DRM+KMS backendsLaszlo Agocs2016-05-1010-14/+17
| | | | | | | | The native display was simply invalid. Task-number: QTBUG-53225 Change-Id: I682fb1d91dbea3dab971a079060d181fc313da46 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Make it an #error if we failed to detect the ARM architecture versionThiago Macieira2016-05-101-0/+2
| | | | | | | | ... or if it is less than ARMv5. The last ARMv4 Qt supported was Windows CE 7, which was dropped for Qt 5.7 alongside MSVC 2008. Change-Id: Ifc817705441a4aab9469ffff141dcfe491464efa Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* QEglFSKmsIntegration: use new QJsonObject::value(QLatin1String)Marc Mutz2016-05-101-5/+5
| | | | | | | | | Allows to get rid of some QStringLiterals. Change-Id: I546aace6876cf373b1cb67269fcc3d042dfd3aac Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QImageWriter: use new QJsonObject::value(QLatin1String)Marc Mutz2016-05-101-3/+3
| | | | | | | | Allows to get rid of some QStringLiterals, reducing QtGui text size by ~200b. Change-Id: I0f3a84c1c8ee6771d8e1f2c6284d314b3fc0c28a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QFactoryLoader: use new QJsonObject::value(QLatin1String)Marc Mutz2016-05-101-27/+11
| | | | | | | | Allows to get rid of some QStringLiterals, reducing QtCore text size by ~800b. Change-Id: I8f7e57927163eaaf628e42020f83f053faea6bf8 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QJsonObject: add some overloads taking QLatin1StringMarc Mutz2016-05-104-2/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QXmlStreamReader also has QLatin1String overloads, which greatly benefits parsers, since the vast majority of keys in both JSON and XML are US-ASCII. This patch adds such an overload to the JSON parser. The value() function is all typical parsers need, so even though many more QJsonObject functions taking QString could benefit from the same treatment, value() is the single most important one for read-only JSON access. Add some more overloads, too, for functions that don't need more internal scaffolding than value(). Requires adding a dummy op[](QL1S) (forwarding to the QString overload) so as not to make QJsonObject json; json[QLatin1String("key")]; // mutable ambiguous between const op[](QL1S) and mutable op[](QString). [ChangeLog][QtCore][QJsonObject] Added value(), op[] const, find(), constFind(), contains() overloads taking QLatin1String. Change-Id: I00883028956ad949ba5ba2b18dd8a6a25ad5085b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Prospective MSVC 2013 build fixSimon Hausmann2016-05-101-2/+4
| | | | | | | MSVC 2013 does not like QStringLiteral between brackets. Change-Id: Ic42f80b7a3abbb48df3d0e222bd5c868045a0ded Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix build on WinRTMaurice Kalinowski2016-05-101-1/+2
| | | | | | | | a63ca3fa106f4b0f9776bf2004661ef6dec2c0c6 caused a build breakage for WinRT as GetModuleHandleEx does not exist on that platform. Change-Id: I143d9cad5f32d98a4d86292dfa73f94a4acdf305 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* QUrl: enable (N)RVO for gccAnton Kudryavtsev2016-05-091-37/+37
| | | | | Change-Id: Ie0fba08ce55a3c60a5b1565986c4280f065c7b2f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDateTimeParser: proper construction of QStringAnton Kudryavtsev2016-05-091-1/+1
| | | | | | | | | | ... with known size and known char by corresponding ctor. Don't use fill() for this case. Change-Id: I475a0655132ecbb40b1eac919309597b2560e71b Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QWidgetTextControl: ensure we listen for changes to cursorFlashTimeChangedRichard Moe Gustavsen2016-05-092-15/+3
| | | | | | | | | | | | | | | | | Change 3cdc02d actually "reverted" the behavior of listening for cursorFlashTimeChanged. The reason is that we sat "blinkingEnabled" directly to true in the constructor instead of calling "setCursorBlinking", which was responsible for setting up the connection. And as it turns out, after 3cdc02d, nobody is actually calling "setBlinkingCursorEnabled" anymore. From the widgets point of view, it should always blink when visible (unless QPA sets cursorFlashTime to zero). So we can remove the whole function, and set up the connection in "setVisible" instead. Change-Id: I577a5fbbbd9c56331ac7f8bb38567a684ca8c1df Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* Fix ANGLE glGetUniform*v functions to work properly with arraysMiikka Heikkinen2016-05-092-1/+32
| | | | | | | | | | glGetUniform*v functions are supposed to return just a single array element, so returning the whole array is always incorrect. Task-number: QTBUG-53072 Change-Id: I22f05d420082d4d9de06d975b3d0f5e64d3e0c41 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Be more specific what is in Core and what is notJędrzej Nowacki2016-05-091-2/+5
| | | | | | | | !isComplex is quite good heuristic, but we know for sure which types should be included. Change-Id: I609d021b8a668e6c1945ed2b11d69f5a82b5e2bf Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QJsonValue: don't create a temporary QString on every toString() invocationMarc Mutz2016-05-092-1/+18
| | | | | | | | | | | | | | The vast majority of users call toString() without the optional defaultValue. So do it like the toArray() and toObject() methods and split toString() into two overloads, so the common case no longer needs to pass a temporaray QString. Saves ~1.4 and ~1KiB in QtCore and QtGui text size, resp., on optimized GCC 6.0 Linux AMD64 builds, even though we added a new function to QtCore, too. Change-Id: Ibe02397ca49ce11fdb58f5c5fc69e909bf94c1c6 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add a QMutex::isRecursive() const noexceptThiago Macieira2016-05-092-9/+15
| | | | | | | | | | | This is source- and binary-compatible, including the marking of the existing function as noexcept. [ChangeLog][QtCore][QMutex] Made the isRecursive() method be a const function so that it can be called in const QMutex objects too. Change-Id: Ifea6e497f11a461db432ffff1448bead97c08f92 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Work around ICC's bug in making std::atomic a literal typeThiago Macieira2016-05-081-2/+8
| | | | | | | | | | | | | ICC 15.x and 16.0 (beta, at least) are missing the "constexpr" and "noexcept" keywords in the definition of the std::atomic constructors. The lack of constexpr makes std::atomic a non-literal type, which in turn makes QBasicAtomicInteger's constructor (which is constexpr) fail to compile. Reported as Intel issue 6000117277. Change-Id: I4a88bcca48bf0ce51557d809ef32a4545edcafee Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Mark QThread::currentThreadId() as a pure functionThiago Macieira2016-05-081-1/+1
| | | | | | | | | | | It always returns the same information for each thread it is called in. But since it's different per thread, we don't think it's const. pthread_self() on Linux is marked const, though we think it really ought to be pure. On other OSes, the annotation isn't present, but the we can assume function is so. Change-Id: Ifea6e497f11a461db432ffff1448c2b37d94d5f3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Implement QLibrary::PreventUnloadHint for WindowsThiago Macieira2016-05-082-2/+10
| | | | | | | | | | | | It's interesting that the HMODULE/HINSTANCE pointer points to something in the actual module that got loaded, so we can use its value as "address of something in the module" for GetModuleHandleEx. The "PIN" flag tells the Windows DLL loader to never unload. Change-Id: Ifea6e497f11a461db432ffff1449a2169eb6293e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Remove includes to qdatetime_p.h that aren't necessaryThiago Macieira2016-05-082-2/+0
| | | | | | | | Since I'm changing QDateTime's privates, it's easier to know what may be depending on it or not. Change-Id: Id5480807d25e49e78b79ffff144a53018d057e19 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Mark QTimeZone constructor nothrow.Thiago Macieira2016-05-082-2/+2
| | | | | Change-Id: Id5480807d25e49e78b79ffff144a9eead3fc9597 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Liang Qi2016-05-0641-190/+296
|\
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-0641-190/+296
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/qtestlib/tutorial5/containers.cpp examples/widgets/tools/tools.pro src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/network/kernel/qdnslookup_unix.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp tools/configure/configureapp.cpp Change-Id: I838ae7f082535a67a4a53aa13a21ba5580758be8
| | * QFileSystemMetaData: do not treat block devices as sequentialAlex Trotsenko2016-05-041-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows handling of special block devices in random-access mode that restores a Qt4 behavior. Can not be tested because requires root privileges in the system. Task-number: QTBUG-51666 Change-Id: Iaa56355f1be343c0d05b292e3c7d2e1c88724529 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Andrius Štikonas <andrius@stikonas.eu> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| | * Avoid use of v4-mapped QHostAddress::AnyIPv4 local address on WindowsAlex Trotsenko2016-05-041-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some Windows kernels return a v4-mapped QHostAddress::AnyIPv4 as a local address of the socket which bound on both IPv4 and IPv6 interfaces. This address does not match to any special address and should not be used to send the data. To allow handling of the local addresses properly, replace it with QHostAddress::Any. Already tested by tst_qudpsocket. Task-number: QTBUG-52714 Change-Id: Icb7cb75f48cd7ec9b0a9dfaf861ffe0d3093e20d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QSplitter: Add note about ownership transfer to addWidget() and insertWidget()Stephan Binner2016-05-041-1/+5
| | | | | | | | | | | | | | | Change-Id: I971db2c25e4e667a416f58d148e18c4f11c349f1 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * Fix segfault when exiting app running under eglfsElena Zaretskaya2016-05-041-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In function QWindow::destroy() the platformWindow is destroyed (QEglFSWindow in this case), but after that the QSurface destructor is called (qsurface.cpp:127), where access to the opengl context is performed (QOpenGLContext::currentContext()->doneCurrent()). Therefore the surface pointer is deleted earlier (gbm_surface_destroy) than the working with it (eglMakeCurrent) is finished. But the event QPlatformSurfaceEvent, that is sent before deleting platformWindow, isn't processed (qwindow.cpp:1665), though we can perform doneCurrent() in the handler of QPlatformSurfaceEvent. The full description with valgrind stacks on bugreports. Task-number: QTBUG-52399 Change-Id: I69035dfd8ba5b5eeec243bc0edd3f571dc9525f9 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| | * Fix FPE under EGLFS_KMS if mesa-10.2.7Elena Zaretskaya2016-05-041-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If mesa-10.2.7 is installed, gbm_bo_create returns NULL (QEglFSKmsCursor ctor, qeglfskmscursor.cpp:80), but after that the pointer m_bo is used in function QEGlFSKmsCursor::changeCursor without verification. Task-number: QTBUG-52404 Change-Id: I5b1b15d751e46a5200248e7a8642f7917dedd220 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| | * doc: Clarify how to remove a QTextFrameEskil Abrahamsen Blomfeldt2016-05-041-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation wrongfully recommended deleting QTextFrames directly. This would cause a crash, since the destructor didn't update the document's layout at all. The correct way is the same as when removing other aspects of the document. Task-number: QTBUG-53082 Change-Id: I64f0ad08f1d063626456fa51d03611871ce6aa45 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| | * Revert "egl: Reshuffle headers to help less fortunate systems with X11"Liang Qi2016-05-0418-83/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ecf127505effbbf4dbfd1e7cb9561de5dae51bf2. ecf12750 breaks the build of qtwayland. Change-Id: If8bf04f035aa47e4e867d201ec7d95b0d3e18317 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| | * xcb: don't compress tablet motion eventsShawn Rutledge2016-05-043-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7edd10e6c added this compression feature, but it's not a good idea for drawing-tablet applications, because smooth drawing depends on receiving every movement of the stylus. Also show the device ID in qt.qpa.input.devices category logging. [ChangeLog][X11] The new X event compression feature that was added in 5.6.0 no longer applies to motion events from drawing tablets. Task-number: QTBUG-44964 Change-Id: Icd2ca8ca77d8f80c2f39160c74208db10e382501 Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
| | * Cocoa: Enable skipping Ctrl+LMB to RMB overrideGabriel de Dietrich2016-05-031-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can be enabled with QT_MAC_DONT_OVERRIDE_CTRL_LMB=1 environment variable. The goal is to provide consistent cross-platform input when it's more desirable than full platform comformance. Change-Id: I3b96733077bd1c0367edeef21a98a44b15425807 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| | * egl: Reshuffle headers to help less fortunate systems with X11Laszlo Agocs2016-05-0318-21/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EGL headers including X headers has traditionally been problematic due to getting macros for Status, None, etc. In most cases this is not an issue anymore because on embedded one will almost always use a driver targeting the framebuffer or DRM/KMS and therefore the EGL headers do not pull in X dependencies. Furthermore, Mesa supports MESA_EGL_NO_X11_HEADERS which we set, avoiding the problem altogether with Mesa regardless of targeting X11 or KMS. However, other drivers do not have this option. On i.MX6 for instance, targeting X11 is problematic due to not having EGL_API_FB defined, which in turn means the EGL headers pulls in X headers in order to be able to define the native display and window types as Display and Window. Try to play nice with this use case by reshuffling the includes and undefining the problematic names. Task-number: QTBUG-52928 Change-Id: I059f26b340b6e442e7296055915d18f5a1ce7a7f Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
| | * QLinuxFbScreen: fix uninitialized member warningsEdward Welbourne2016-05-031-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prompted by Coverity CID 11720 (allegedly recently new in dev but long-standing in 5.6). Even assuming the class is used correctly - test initialize() and only use if that succeeded - the destructor would have passed uninitialized arguments to munmap() and ioctl(). Noticed a double close along the way: it's been fixed on dev but should have been fixed in 5.6, too. Documented why ioctl() failure in switchToGraphicsMode() should at least do no harm. Change-Id: Ie26a9eefa435b5ff5b1a02e03e29469b8db72d3c Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| | * Added a missing comma to the comment.Jesus Fernandez2016-05-031-1/+1
| | | | | | | | | | | | | | | Change-Id: Ia32c9b298dc35ccdd95d92550c06cff52f918ea1 Reviewed-by: Nico Vertriest <nico.vertriest@theqtcompany.com>
| | * Fix grammar in QSKIP documentationMitch Curtis2016-05-031-1/+1
| | | | | | | | | | | | | | | Change-Id: Ia57dd2c859ae5b025515c45593a7f89a1b7f28ff Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| | * normalize structure of plugandpaint exampleOswald Buddenhagen2016-05-032-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | as in other examples which come with plugins, use an additional hierarchy level which contains the app and plugin subdirs. Change-Id: I2487755967aa3474c337c8c8af10be49627b63d0 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| | * QOpenGLCustomShaderStage - fix a memory leakTimur Pocheptsov2016-05-032-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Coverity found a memory leak - CID-10995. Fix a dtor + make copy constructor / assignment operator private (Q_DISABLE_COPY). Change-Id: I4f046d075b60fbfb69f350e4a4d8b07ea1643914 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| | * Workaround Windows DLL unload issue with threads runningThiago Macieira2016-05-021-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't know why it happens, so let's apply a workaround. See the comment for more details. Task-number: QTBUG-53031 Change-Id: Ifea6e497f11a461db432ffff144972e892fbbda5 Reviewed-by: Roland Winklmeier <Roland.M.Winklmeier@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * remove redundant OTHER_FILES assignmentsOswald Buddenhagen2016-05-021-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | newer versions of qt creator understand QMAKE_EXTRA_COMPILERS and INSTALLS, so there is no need to list the files twice. Change-Id: Iccf3cc3248daf3422b8c366c2eb2d2f46c5f08d1 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| | * QNativeSocketEngine: fix build in debug mode under WindowsAlex Trotsenko2016-05-021-7/+9
| | | | | | | | | | | | | | | Change-Id: Id9b42f3d40b82ae6a8d581b0fbf6fd0b2ae589aa Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| | * iOS: Report correct physicalSize and physicalDotsPerInch for iPhone6+Tor Arne Vestbø2016-05-022-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On iPhone 6(s) Plus devices, or when display zoom is enabled in an iPhone 6, the render buffer is scaled before being output on the physical display. We have to take this into account when computing the physical size. Task-number: QTBUG-50941 Change-Id: I318f3a866d039fccf0ba08f381fc9d8bcd676acd Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
| | * Fix underline position on Liberation MonoAllan Sandfeld Jensen2016-05-021-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure we don't round a underline position beyond the descent in our eagerness to avoid underlines too close to baseline. Task-number: QTCREATORBUG-15851 Change-Id: I9a29447bbcb938b7e9fb29d52fd392a1340d07c5 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * Fix QFile::copy() on WinRT.John Preston2016-05-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implementation of QFileSystemEngine::copyFile() uses CopyFile2() as if it is CopyFile() function, but CopyFile2() returns HRESULT, not BOOL. So the success should be checked by "SUCCEEDED()" instead of "!= 0". Current implementation does exactly the opposite because S_OK == 0. Change-Id: I0677d54447d22366fb2031e0b928a3d10e24c0ed Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| | * QWindowsPipeWriter: Fix developer build with MinGW.Friedemann Kleint2016-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix signedness in comparion: io\qwindowspipewriter.cpp: In member function 'void QWindowsPipeWriter::notified(DWORD, DWORD)': io\qwindowspipewriter.cpp:134:65: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] Q_ASSERT(errorCode != ERROR_SUCCESS || numberOfBytesWritten == buffer.size()); Amends change a4d26cf522b966056e47e47a004b7e4d668e3a2d. Task-number: QTBUG-52401 Change-Id: If0c0e2107342408675fa00b93f28c9de339080f6 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| | * xcb: Fix drag and drop to Emacs.Urs Fleisch2016-05-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately, the improved patch for QTBUG-45812 fixed things for Chromium, but did no longer work for Emacs. This fixes commit [269fdb] to make it work for both Emacs and Chromium. Task-number: QTBUG-45812 Change-Id: I2fca708503f27679681bc6959de1ad94943a063e Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| | * Fix UB (data race) in Q_GLOBAL_STATICMarc Mutz2016-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The store to guard in the inner function's critical section was not synchronized-with the load at the start of the function: T1 T2 guard.load() mutex.lock() guard.load() d = new Type guard.store() guard.load() // use d mutex.unlock() The use of d in T2 does not synchronize with the write to d in T1 -> data race -> UB. Fix by storing with release memory ordering, so that the guard.load() in T2 synchronizes with the guard.store() in T1. Change-Id: I5c1cd1fa097c6397cb0b48b0d8e8012f95978558 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * QWindowsPipeWriter: ensure validity of the write bufferAlex Trotsenko2016-04-3010-73/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindowsPipeWriter uses asynchronous API to perform writing. Once a cycle has been started, the write buffer must remain valid until the write operation is completed. To avoid data corruption and possibly undefined behavior, this patch makes QWindowsPipeWriter::write() take a QByteArray, which it keeps alive for the duration of the write cycle. Autotest-by: Thomas Hartmann Task-number: QTBUG-52401 Change-Id: Ia35faee735c4e684267daa1f6bd689512b670cd2 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| | * Remove the use of QMutexPool in QHostInfo and QDnsLookupThiago Macieira2016-04-303-32/+16
| | | | | | | | | | | | | | | | | | | | | | | | Q_GLOBAL_STATIC does the thread-safe protection for us. And who said we could only use non-POD types? We can just use a boolean! Change-Id: Ifea6e497f11a461db432ffff1449b0a88d75d194 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Remove the use of QMutexPool from QtDBus loading of libdbus-1Thiago Macieira2016-04-301-2/+3
| | | | | | | | | | | | | | | | | | Change-Id: Ifea6e497f11a461db432ffff1449b013c2302d38 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>