summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | QHostInfo: Make getaddrinfo() mandatoryThiago Macieira2017-10-184-210/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All systems must implement it by now. If there's any system still without it, that means it has no IPv6 support, so they can disable QtNetwork entirely. [ChangeLog][Deprecation Notice] Starting with Qt 5.10, IPv6 support is mandatory for all platforms. Systems without proper IPv6 support, such as the getaddrinfo() function or the proper socket address structures, will not be able to build QtNetwork anymore. Change-Id: I3868166e5efc45538544fffd14d8c28046f9191b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | Windows: Fix inability to have two topmost windowsMårten Nordheim2017-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-63621 Change-Id: I4ee6885d19907bff553149bef9efcffb209eb1f5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * | Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into ↵Liang Qi2017-10-1738-170/+332
| | |\ \ | | | | | | | | | | | | | | | refs/staging/5.10
| | | * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-1638-170/+332
| | | |\| | | | | | | | | | | | | | | | Change-Id: I3cf73c53cf131d0babfb558c2507bed0e0fc5f08
| | | | * ANGLE: Fix compilation with MinGWOrgad Shaneh2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | /X is transformed into X:. Pass arguments with dash instead. Change-Id: Ib69ce73d9b8e54f4ea4b17fdb0ca43c85977717d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | | * Attach Qt main c++ thread to jvm at the early beginningVyacheslav Koscheev2017-10-161-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need it 1. to be sure, that thread is already attached to jvm when we attach debugger to the process 2. to have a human-friendly name for main native thread Change-Id: I1e572a0f09ec8af24a910835aaa6d302f6f2cb43 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| | | | * QSystemTrayIcon/Windows: Fix position of context menu with High DPI scalingFriedemann Kleint2017-10-161-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apply scale factor of screen. Task-number: QTBUG-63781 Change-Id: I1b5630edbdf6bb356955a7d70458a885af441953 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | | | * Remove some unused, local variablesJędrzej Nowacki2017-10-146-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I453162d2d396bb3427064d3b1593bb6c71376605 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | | * QHostAddress::setAddress - fix an overload taking SpecialAddressTimur Pocheptsov2017-10-131-43/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It must detach, otherwise it overwrites all QHostAddresses that were sharing a given QHostAddressPrivate. This overload was introduced in 5.8 and probably as a result broke some pre-existing code, that previously was using a conversion and the correctly working setAddress. Conveniently, QHostAddress::clear() does: d.detach(); d->clear();, exactly the first thing we do in other overloads of setAddress. Task-number: QTBUG-63764 Change-Id: I63c36e877c9358d3ff26ba1f2e4adf35b771f426 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | | * QPainter: fix invalid pen style when drawing misspelled wordsDavid Faure2017-10-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code asks the platform theme to resolve SpellCheckUnderline to an actual pen style (wave, solid, dash, etc.) but if there's no theme, or if the default implementation in QPlatformTheme is used, the value is still SpellCheckUnderline, which then casted to a PenStyle below in qpainter.cpp: pen.setStyle((Qt::PenStyle)(underlineStyle)); The value 7 is an invalid PenStyle, which leads to random behavior when drawing the underline. Make it WaveUnderline if the platform theme had no opinion on how to draw it. Change-Id: I4f02f9b58f10582cee5aefce7a4d5cd300133140 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | | | * Replace 'an unique' with 'a unique'Kai Koehne2017-10-113-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unique begins with a "y" sound, hence a unique is correct. Change-Id: I9eb6b4d4c9ddab45af931e97c041c24edf163eca Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| | | | * QCocoaWindow: Toggle titlebar transparency to support unified toolbarGabriel de Dietrich2017-10-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is need from macOS 10.13 onwards. See NSWindow related notes on https://developer.apple.com/library/content/releasenotes/AppKit/RN-AppKit/ Change-Id: I4b4653d7342de985d22b128d73940e7163bdb1e8 Task-number: QTBUG-63444 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| | | | * Fix CVE-2017-10989 in sqliteAndy Shaw2017-10-112-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I556a453f386e887abee77a4dc147eae45970a61c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | | * Revert "Do not include qfloat16 tables in arm64 builds"Allan Sandfeld Jensen2017-10-101-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They are needed for older compilers that doesn't support the __fp16 extension. Reverts under the assumptions other compilers will optimize it away. This reverts commit 6dc7e468dfd052dc4cf6187843bcb1a5b82ec6ff. Task-number: QTBUG-63693 Change-Id: If780de001d8c12df0db12caaf62505f16e01b663 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | | * QDockWidget - improve resizeThorbjørn Lund Martsum2017-10-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On high DPI (e.g Apple Retina) user resizes of QDockWidgets (with custom titlebars) could fail. There was a cursor position check in mouse move event bailing out if the cursor pos was not within the widget. The problem was that we could be on the edge (or maybe even cross it?). Furthermore there is (/was) no similar check when setting the cursor to be a resize cursor, so users will obviously expect the resize to occur. This solves a part of QTBUG-63526 [ChangeLog][QtWidgets][QDockWidget] Fixed an issue in QDockWidgets where the widget would not resize despite showing a resize cursor. Task-number: QTBUG-63526 Change-Id: Ifa842a109071552506da3a82822d903dc252c8cd Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | | | * Add support for HTTP status 308 Permanent RedirectMårten Nordheim2017-10-104-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 308 Permanent Redirect was introduced after redirection support was initially added to Qt. [ChangeLog][QtNetwork][QNetworkAccessManager] Added support for HTTP status 308. Task-number: QTBUG-63075 Change-Id: I1c6cda331d776237113ef8854de9abfe7e41ed3e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | | * Fix typo in QKeyEvent docsFlorian Bruhin2017-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I926fc94ae039f03c507149a6d3fc66f4584201e2 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| | | | * Windows font database: Remove clamping of default font sizeFriedemann Kleint2017-10-091-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Partially revert a72513cab7cdfac638ef572838277aa062f1d296. The value is too small for Chinese fonts. Task-number: QTBUG-63654 Change-Id: If020bfc3044258b7abfd9d463bc9b292a9cc0839 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
| | | | * Documentation: Add missing event type for non-client mouse eventsKrzysztof Kawa2017-10-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Documentation is missing the specialized event type names in the non-client mouse event enum description. Task-number: QTBUG-55018 Change-Id: Ica35994e13fc9a637a52eeca361898f8669fdbd1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| | | | * QUdpSocket: make sure receiveDatagram() returns empty on errorThiago Macieira2017-10-071-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the datagram reception failed, we forgot to set the buffer back to empty. The returned QNetworkDatagram did report isValid() == false, but it was possible to get the .data() and check its size, getting nonsense. Tests in the next commit. Change-Id: I638cf58bfa7b4e5fb386fffd14ea91adf2133d47 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | | * Fix deprecated API usageJake Petroules2017-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends c1cece8e54 For some reason, this was missed in the original change. This is now outright prohibited in the watchOS 4 SDK and will cause a compilation error on that platform. Change-Id: Iaa2edf6256a54ca11dec9f1efd8a4d18ba7dc046 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | | * Merge remote-tracking branch 'origin/5.9.2' into 5.9Liang Qi2017-10-062-1/+5
| | | | |\ | | | | | | | | | | | | | | | | | | Change-Id: Iaae1d9efe6b9267e8e8349905811525ff344e00c
| | | | | * Fix crash with clips entirely outside glyph mapAllan Sandfeld Jensen2017-09-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the range to work on is empty just continue to next span. Task-number: QTBUG-63412 Change-Id: Ic5cb77ed438eb9c218f482095aa0cd4e3c2fc6e6 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | | | | * Cups: Check the created QPrintDevice is valid before using itAndy Shaw2017-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-63293 Change-Id: Ibde0e8db955f6f3647b31cef8561d0744754cec1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | | * | Fix zero-length lines with scalingAllan Sandfeld Jensen2017-10-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should calculate the pen width based on the scaling similar to how it is done for normal lines, otherwise we get the scaling applied twice. Task-number: QTBUG-61777 Change-Id: Iba71d55971a1d29537d2c9ff33749223a06160de Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | | | * | Prevent changing the width for layout item's rectMika Salmela2017-10-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For gridlayout items the x position is rounded, but the QRectF changes the width to keep the right edge. The width is yet calculated exactly for the text so we need to preserve it. Task-number: QTBUG-61244 Change-Id: I823ba742c9ab299740232b5d9b4ad5713e1782c4 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| | | | * | XCB platform: Fix crash on X servers with BGR888 displayEirik Aavitsland2017-10-061-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the native visual was BGR888, the XCB plugin would assert as soon as it needed to find the corresponding QImage format. Fix by adding the required mapping in qt_xcb_imageFormatForVisual(). Task-number: QTBUG-62840 Change-Id: Idd9eb01a60f605ad004d5b0c3025ded63ed64271 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | | | * | Windows: Let topmost and bottom windows use raise and lower respectivelyMårten Nordheim2017-10-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 329a029c361bcbaf70f3aa919693f0bef48a152f made ::raise and ::lower do nothing for topmost and bottommost windows. This made it impossible to e.g. raise one topmost window above another topmost window using QWindow::raise. Task-number: QTBUG-62021 Change-Id: I5f60816cbc48d69c0411e3bd68852d8bd8e300bb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | | * | QUrl: re-fix the setPath("//path") case leading to scheme://pathThiago Macieira2017-10-061-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commits aba336c2b4ad8926dc8a000718bbb7f8a6d5a72d (in Qt 5.2) and aba336c2b4ad8926dc8a000718bbb7f8a6d5a72d (in 5.6) both tried to deal with this problem, with different levels of success. This is the third attempt (and hopefully the charm). Instead of modifying the path that the user provides, go straight ahead and declare it invalid. This is supported by RFC 3986, which declares this expansion impossible: relative-part = "//" authority path-abempty / path-absolute / path-noscheme / path-empty path-abempty = *( "/" segment ) path-absolute = "/" [ segment-nz *( "/" segment ) ] path-noscheme = segment-nz-nc *( "/" segment ) The "path-abempty" and "path-noscheme" cases are the two issues we already handle. This commit adds the third one: path-absolute, which requires that the first segment of the path be of non-zero length. That is, it is now possible again to have http://example.com//path constructed piece-wise, without it producing http://example.com/path. Additionally, it catches the case of http://example.com//path parsed from full URL then followed by setAuthority(""). Change-Id: I69f37f9304f24709a823fffd14e67a5e7212ddcd Reviewed-by: David Faure <david.faure@kdab.com>
| | | | * | Doc: Remove unsupported systems out of QNetworkDatagram's listThiago Macieira2017-10-061-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't support Windows versions prior to 7 nor Windows CE anymore. Change-Id: I638cf58bfa7b4e5fb386fffd14ea930155d67689 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | | * | Improve performance in QThreadPoolSvenn-Arne Dragly2017-10-042-31/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When many runnables are executed, this improves the performance by not resizing the queue for each runnable, which was the case in the previous version, because of many calls to QVector::takeFirst(). Also add a test that makes sure tryTake() is safe to call and does not leave the queue in a bad state that tries to use nullptr entries. Change-Id: I608134ecfa9cfc03db4878dcbd6f9c1107e13e90 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | | * | Remove // from license textKai Koehne2017-10-041-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I252b296713e03b749c6e99391a6928c942474378 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * | | | macOS: Defer update request on drawRect: when a real expose event is neededTor Arne Vestbø2017-10-173-22/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The semantics of QWindow::requestUpdate() is that it's used when the window needs updates outside of the normal window invalidation callbacks such as expose and resize events, e.g. when doing animations. As a result, user code might not be prepared to handle window invalidations in the update-request callback, assuming those will still be delivered as normal, so that's what we do. This was exposed by resizing one of the simpler Qt Quick examples, where the resize's expose event was delivered as an update request, but didn't trigger an unconditional draw of the window as it should, as the scenegraph didn't change in response to the resize, which is typical for an update request. Change-Id: Ida8f85f1cf61c332aa9b199520e6854c48d3ab40 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | | | | QNetworkInterface: Use ranged-for in postProcessMårten Nordheim2017-10-261-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ranged-for loops instead of a normal for-loop with iterators. Change-Id: I13ba2001b7eb0fff1a0d9474f615a81d02af62f0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | | | QNetworkInterfaceManager: use ranged-for in interfaceFrom*Mårten Nordheim2017-10-261-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also replace the long template names with auto. Change-Id: Idfaf4493266cf251e85cbf23bcd6bfe74b713cf0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | | | QHstsCache - do not mix const/non-const iteratorsTimur Pocheptsov2017-10-262-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by clazy (clazy-strict-iterators). QMap::find returns 'iterator' and this is what we need, since we need to modify the value referenced by this iterator. But QMap::insert only accepts 'const_iterator' and clazy warns about mixed const/non-const iterators (though actually QHstsCache does not have the original problem this check it trying to find). Since we do not share cache and do not want to try detaching on non-const access, we can use std::map which conveniently has 'insert' taking 'iterator' as its first parameter. As a bonus this will also fix another warning from clazy-range-loop check (when iterating over such a non-const map). Change-Id: Id82991cefce33723d177ed04058d15295e9b71d7 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | | | | HPACK - remove non-trivial ctorsTimur Pocheptsov2017-10-261-17/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They are not needed actually, found by clazy-non-pod-global-static check. Change-Id: Ice70f5065ffe8a39e2478eacff0ed1826806c8a6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | | | HPACK - make Huffman 'CodeEntry' into PODTimur Pocheptsov2017-10-261-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by clazy-non-pod-global-static check. Indeed, it can be a pod, no need in non-trivial ctors. Change-Id: I5f17e322a64f6c8d53b2acd8ea045d8beb1a72f9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | | | QHttp2ProtocolHandler - avoid calls to detach in a range-loopTimur Pocheptsov2017-10-241-1/+2
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by clazy-range-loop check. Change-Id: I45fd03af60c8d15e1288cc8abd81d8532b9a6c45 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | | QSemaphore: Improve waking up on 64-bit LinuxThiago Macieira2017-10-232-27/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By judiciously positioning of the bits, we can optimize for the case of threads trying to acquire a single token, which is what QSemaphore should be mostly used for, as it matches the POSIX Semaphore API (sem_wait, sem_timedwait and sem_trywait). If there are only waiters waiting for a single token, we know that adding n tokens means n threads can wake up. This optimizes for multi-token waiters too. For example, if we have 50 single-token waiters and 50 multi-token waiters, a sem.release(5) will wake up 55 threads instead of 100. Change-Id: I209fcd5dbc2b4e5381cffffd14de5550c75d2600 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | | QWindowsXPStyle: Add debug operators for the theme dataFriedemann Kleint2017-10-192-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This helps to debug style issues. Change-Id: If2c236d6666512bf1658d951f9b304ce4d129357 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | | | Windows QPA: Clean up code checking for the OS versionFriedemann Kleint2017-10-185-18/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use QOperatingSystemVersion for comparisons and remove code for versions < Windows 7. Change-Id: I5a5e3d08a29accd42f170da3ee9c9021ca499f82 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | | | QHostAddress: add more classification functionsThiago Macieira2017-10-173-21/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtNetwork][QHostAddress] Added isGlobal(), isLinkLocal(), isSiteLocal(), isUniqueLocalUnicast(), and isBroadcast() classification functions to complement isLoopback() and isMulticast(). Change-Id: I3868166e5efc45538544fffd14d8fca6e9042c04 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | | | linuxfb/drm: Pick up the format from the config fileLaszlo Agocs2017-10-171-10/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like eglfs, linuxfb (when QT_QPA_FB_DRM=1) can be configured to use a buffer and fb of a format other than the default XRGB8888. Most notably, adding "mode": "rgb565" to the first output in the config file pointed to by QT_QPA_KMS_CONFIG will switch over to using 16 bpp dumb buffers and a QImage::Format_RGB16 wrapping QImage. Note that linuxfb/drm has no multiple output support atm, so only the first output is taken into account. The BGR variants (e.g. xbgr8888) are available but cause no difference when it comes to Qt's painting (still maps to RGB32 etc.). This may need to be revisited later. Has no effect on the regular (fbdev) path in linuxfb. Task-number: QTBUG-63272 Change-Id: Ie7d0b05e3449b336104332d9568dab60b4bedaa8 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | | | Correct QStandardItemModel::setItemData to follow QAbstractItemModelSamuel Gaist2017-10-172-10/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QStandardItemModel::setItemData replaces the content of an item data with the new values rather than updating/inserting which is the behavior for QAbstractItemModel. This patch aims to unify the behavior. [ChangeLog][QtWidgets][QStandardItemModel] Fixed setItemData() incorrectly deleting unmodified data. That behavior is not following QAbstractItemModel's documented behavior which is no modification of data not provided in parameter. Task-number: QTBUG-45114 Task-number: QTBUG-10872 Change-Id: I2be40cee372b68d9f71c976548ecda6dc3011241 Reviewed-by: David Faure <david.faure@kdab.com>
* | | | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-17263-33071/+27371
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/fortuneclient/client.cpp examples/network/fortuneserver/server.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h src/plugins/platforms/cocoa/qcocoabackingstore.h src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoascreen.h src/plugins/platforms/ios/qiosbackingstore.h src/plugins/sqldrivers/oci/qsql_oci.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Ia6dd2c52d4a691b671cf9a2ffca70deccece8f10
| * | | | macOS: Mark the widget's container as embedded when placed into NSMenuItemv5.10.0-beta2Tor Arne Vestbø2017-10-162-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we'll end up creating a NSPanel for the QMacNativeWidget which is never closed, even if the backing NSView is moved to a new superview. Ideally this would be based on [NSView viewDidMoveToSuperview] and [NSView viewDidMoveToWindow], with retain/releases of the corresponding NSWindow, but that needs more research, especially as AppKit on macOS 10.13 will always keep a strong reference to the NSWindow. Task-number: QTBUG-63443 Change-Id: I9eec5ea871373d00dedf154600bf7005898cf37a Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | | | macOS: Add support for non-window backed offscreen surfacesTor Arne Vestbø2017-10-163-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The modern approach to offscreen rendering on macOS is via FBOs, which means there's no reason to allocate an NSView and corresponding NSWindow just for that. In the offscreen case the NSOpenGLContext has a nil-view. Change-Id: I2d1d407069af4d5283e6f56fba83db8eaf694ac6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * | | | HTTP/2 protocol handler: tweak receive window sizesTimur Pocheptsov2017-10-164-25/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were using the default ones, provided by RFC7540. It appears they are way too restrictive and conservative: when downloading something relatively big, a stream keeps spending the whole session/its own 'recv' windows and thus we have to constantly send WINDOW_UPDATE frames. This significantly slows down our HTTP/2 implementation, making it orders of magnitude slower than HTTP/1.1. To fix this: - We send SETTINGS_INITIAL_WINDOW_SIZE in the first SETTINGS frame to inform our peer that per-stream WINDOW is bigger than 64Kb - We increase the session's receive window size. Task-number: QTBUG-63722 Change-Id: I31312fcfd5f0fc0aee6aaa5d3562cc7d1b931adc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | | | configure: make C++11 <random> a required functionalityThiago Macieira2017-10-162-21/+9
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error out if it's missing or broken (Mersenne Twister not present). This ensures that we never have a low-quality random generator in Qt. Change-Id: I0a103569c81b4711a649fffd14ec80649df7087e Reviewed-by: Lars Knoll <lars.knoll@qt.io>