summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2019-09-17129-1959/+3177
|\ | | | | | | Change-Id: Ic1fd51143f903b7e9086fc19ca960dfd9654ee00
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-09-1717-600/+543
| |\ | | | | | | | | | Change-Id: I4d7f0e35f4a6ccb6d5494f947fd82fc276feadd3
| | * Fix mis-handling of actual TLD in qIsEffectiveTLD()Edward Welbourne2019-09-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the domain passed down is an actual TLD that's the subject of a * rule, e.g. "ck" subject to *.ck, then we were finding no dot in it and concluding that it couldn't be the subject of a * rule. Added a test for the specific .ck case and commented on where we could get some canonical test data that I tripped over while researching this. Cross-reference the cookie-jar test from the QUrl test, too. Fixes: QTBUG-78097 Change-Id: Id858a9dae22e6b306a68df3fc199e0160f537159 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Reflow documentation after indentation changeEdward Welbourne2019-09-164-111/+117
| | | | | | | | | | | | | | | | | | | | | | | | Combining this with the indentation would be counted as mixing space changes with non-space changes, so they're separate. Change-Id: Iac57050717b1c4c86a253866c9a6cd5ea7add8f7 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * Standardize indentation of calendar code's documentationEdward Welbourne2019-09-164-263/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a haphazard mix of 4-space and 2-space indents. Use four spaces throughout. This commit includes no reflow (which is needed), as the inanity-bot will complain about the mixing of space changes with "non-space" changes if I do that. Change-Id: If55ab035da02d0770471e77ecfe00eb168a3da15 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * doc: Remove ifndef Q_QDOCMartin Smith2019-09-161-4/+0
| | | | | | | | | | | | | | | | | | | | | qdoc needs to see these declarations now because... clang. Change-Id: I93264125db5bcea6adb1a4636e5459ec80702de1 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * CoreText: Modernize style hint fallback lookupTor Arne Vestbø2019-09-162-129/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DefaultFontFallbacks.plist system file that we used for looking up style fallbacks does not exists in macOS 10.15, nor did it ever exists on iOS. Instead of relying on this file, we hard-code a set of default families, that we then look up the fallbacks for. The result of QFont::defaultFamily() on macOS is now: QFont::Helvetica --> "Helvetica" QFont::Times --> "Times New Roman" QFont::Courier --> "American Typewriter" QFont::OldEnglish --> "" QFont::System --> "Lucida Grande" QFont::AnyStyle --> "Lucida Grande" QFont::Cursive --> "Apple Chancery" QFont::Monospace --> "Menlo" QFont::Fantasy --> "Zapfino" And on iOS: QFont::Helvetica --> "Helvetica" QFont::Times --> "Times New Roman" QFont::Courier --> "American Typewriter" QFont::OldEnglish --> "" QFont::System --> "Helvetica" QFont::AnyStyle --> "Helvetica" QFont::Cursive --> "" QFont::Monospace --> "Menlo" QFont::Fantasy --> "Zapfino" Fixes: QTBUG-78240 Change-Id: Ie9bc13c9c1031d89f024199e4736a046c568a48d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * Windows style: Fix size of controls in multimonitor-setups with scaling disabledFriedemann Kleint2019-09-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function calculating a correction for the size of windows metrics depending on screen would bail out when high DPI scaling was disabled. This is wrong since the correction is also needed in that case, delete the clause. Task-number: QTBUG-64890 Change-Id: Idef22e18fc616a211ccac48400490fc52393a338 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * Brush up the Windows stylesFriedemann Kleint2019-09-167-187/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - use range-based for loops where possible - use nullptr - use member initialization - remove a lot of C-style casts - use override - fix some signedness warnings - add some missing break statements Task-number: QTBUG-76493 Change-Id: Ica6ed65ec29e958406e54d816b8a679ed81bd177 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * QPSQL: Fix crash when a prepared statement is deleted after the db was removedChristian Ehrlicher2019-09-161-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a prepared statement is still alive after the database was removed with QSqlDatabase::removeDatabase(), the cleanup routine is trying to access the driver which is no longer alive which results in a crash. Fix it by checking if the driver is still alive similar to 5f66486cc254e1483f776d3058f96db493fd26e5. Fixes: QTBUG-43889 Change-Id: Ib466a76d014e32c055d203bda15b075ad3dff3d9 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
| | * Revert "Revert "Deprecate QAtomic::load() / store()""Giuseppe D'Angelo2019-09-161-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5859f7d0d9440f82086486639a707f3935696cf4. Reason for revert: the blocker for qtdeclarative has been merged (in qtdeclarative/c060f6e765a2f155b38158f2ed73eac4aad37e02). Change-Id: Ie69cb1567417173f543e88f659658fe03ba28830 Reviewed-by: Liang Qi <liang.qi@qt.io>
| * | Add support for UTC[+-]\d+(:\d+){,2} time zone IDsEdward Welbourne2019-09-163-9/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We presently only support the UTC-based offset timezones that are listed in the CLDR; and it doesn't make sense to list more than these in the list of available zones. However, if someone sets their TZ environment variable to a conformant UTC-offset string, we should make sense of it even if CLDR doesn't mention it. Only do so as final fall-back, as backends may handle the givne name better (some such IDs appear in the windows-compatibility list, for example). Added tests for the new UTC-offset time-zone names. Removed one test that relied on them not being supported. [ChangeLog][QtCore][QTimeZone] The constructor can now handle general UTC-offset zone names. The reported id() of such a zone shall be in canonical form, so might not match the ID passed to the constructor. Fixes: QTBUG-77738 Change-Id: I9a0aa68281a345c4717915c8a8fbc2978490d0aa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-09-1652-729/+1309
| |\| | | | | | | | | | Change-Id: Ie24be82ee70bf103c2664de1a42741979262b10c
| | * widgets: Remove use of deprecated activated(const QString &) APITor Arne Vestbø2019-09-142-15/+10
| | | | | | | | | | | | | | | | | | Change-Id: I71c6a10f6593ac28bf8f60d9db8d167cf88715cb Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * macOS: Keep default NSWindow background unless window is framelessTor Arne Vestbø2019-09-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic was changed in ee82f8661 to only draw a window background when the window was textured, and otherwise ask for a clear window background. This has an unfortunate side-effect on macOS 10.15 that the window's title bar will be partially transparent and reflect the content under the window, with a blur effect. It also inadvertently broke the use-case of setting the NSWindow background color explicitly. With this patch we're back to the behavior before ee82f8661, and users who still want to have a non-borderless window with a clear background can still do this by setting the background color to the clear color manually. Task-number: QTBUG-77637 Change-Id: I8a11bc46e6393b29a37f002ea123a987048106b9 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * QDpi: divide the forced DPI by the scaling factor, as Qt 5.13 didDavid Faure2019-09-131-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When setting a DPI in xrdb, it should have the same effect on apps that enable scaling and apps that don't (including Qt4 and GTK applications). That's what happened in Qt 5.13, while the recent changes removed that division, and as a result the fonts were huge in Qt5 apps compared to Qt4/GTK/kwin/plasmashell/krunner (which don't scale, but do honor the font DPI). Change-Id: Icd7be2d15a9b50982ae624e41bd9e546f315d58b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * Doc-fix: correct some misinformation about QDateTime's handling of DSTEdward Welbourne2019-09-131-23/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tidy up QDateTime::offsetFromUtc's doc, in the process. We don't take DST into account for dates before the epoch; that should be mentioned when saying we take DST into account. Also, referring to *this as the "current" time begs to be misunderstood. The \class comment also misleadingly claimed that we don't take into account any changes to time-zone before DST; where, in fact, we only ignore DST changes before 1970, not changes to standard offset. Change-Id: I090e668edf0338c825f5afcc67f894579a129c46 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * MS TZ data: avoid calculating a date in year 0Edward Welbourne2019-09-131-13/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no year 0 in the proleptic Gregorian calendar, so QDate() won't be happy if asked for a date in it. Tweak scanning of the data we get from MS-Win so as to avoid a date calculation that could otherwise happen in year 0 when constructing QDateTime(QDate(1, 1, 1), QTime(0, 0, 0), QTimeZone("Australia/Sydney")). Added a test for this case, which Oliver Wolff has kindly verified does reproduce the assertion failure. However, Coin is unable to reproduce, as all its MS builds are configured with -release, so Q_ASSERT() does nothing. (The relevant code then skips over year 0, albeit for the wrong reasons, and gets the right results, albeit inefficiently, leaving no other symptom by which to detect the problem.) Fixes: QTBUG-78051 Change-Id: Ife8a7470e5bd450bc421e89b3f1e1211756fc889 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * rhi: gl: Pick up context lossLaszlo Agocs2019-09-1313-31/+76
| | | | | | | | | | | | | | | | | | | | | | | | ...and change the return value of makeThreadLocalNativeContextCurrent() to a bool since we expect this to mirror QOpenGLContext::makeCurrent(). Change-Id: I339507152e461fe28fcf7fe777165e6d0072f055 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * qnetconmonitor_win: Mark destructors virtualMårten Nordheim2019-09-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After these two classes were no longer marked final clang started complaining because their dtor is not marked virtual. Amends 9dc594b2bf3572aa5df3ec3ad2b9842c96e8290d Change-Id: I42b78c0b444935d3e0cb4d476d3881fd5fb5c3cb Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * QWinRTUiaValueProvider: optimize SetValue()Marc Mutz2019-09-131-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code followed a pattern used elsewhere whereby a return value is transmitted out of a task executed on a separate thread by way of shared ownership of the value using QSharedPointer. In the present case, however, the pattern was applied to an argument of the task, not its return value, so remove all the sharing machinery and just copy the argument (a QString) into the task (a lambda). Change-Id: Ib997322ed70201781b6012c7e4f945b124b05868 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * Eliminate the last QList<QPoint> in QtBase production codeMarc Mutz2019-09-132-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | QList<QPoint> is horribly inefficient™ (on 32-bit platforms). Fix by using a QVector instead. Change-Id: Id85cb71404f329049c3e9997e51113035569e1b4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * QReadWriteLock: replace (QWaitCondition, QMutex) with ↵Marc Mutz2019-09-132-22/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | std::(condition_variable, mutex) It turns out that QWaitCondition is a std::condition_variable_any. The _any variant works with any mutex type, but requires a native mutex for the native condition variable. So, QWaitCondition and std::condition_variable_any both require two different mutexes: the one the user passes in, and an internal one. std::condition_variable, however, only works with std::mutex, and since both are backed by the native API, condition_variable can use the mutex passed in by the user instead of having to use an internal one. So, port from 2 × QWaitCondition + QMutex (2 × native cond + 2 × native mutex + Qt mutex) to std::condition_variable + std::mutex (2 × native cond + native mutex), shaving the overhead of two additional mutexes (one Qt, one native) as well as the memory allocation performed by QWaitCondition (for its Private). Speeds up the writeOnly case by ~1/8th: PASS : tst_QReadWriteLock::writeOnly(QReadWriteLock) RESULT : tst_QReadWriteLock::writeOnly():"QReadWriteLock": - 39,703 msecs per iteration (total: 39,703, iterations: 1) + 34,950 msecs per iteration (total: 34,950, iterations: 1) Change-Id: I196cb13a27242fc1cb99723dfab5b2e5f8522143 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * Port QReadWriteLock from QMutexLocker to qt_unique_lockMarc Mutz2019-09-131-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Most of these are unique_locks because they call QWaitCondition::wait() and it doesn't feel right to use qt_scoped_lock if the lock is dropped within the scope. Change-Id: I506eede63008dad135c21112e578da4f7684e528 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * QPointer: some simplificationsMarc Mutz2019-09-131-12/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - don't write explicit meta functions, use std::conditional - = default the default ctor The class is already not trivially-copyable, so making the default ctor trivial doesn't change the ABI. Change-Id: I8e35bbbb35973c9ff8fc48dfbfc10061de4bfd30 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"Qt Forward Merge Bot2019-09-137-24/+44
| | |\
| | | * Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-137-24/+44
| | | |\ | | | | | | | | | | | | | | | Change-Id: Idcf8fc1d79bcd84b494d7f43308e6fe82d60e1a4
| | | | * QHttpThreadDelegate - remove unneeded codeTimur Pocheptsov2019-09-121-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found while cleaning up SPDY remains: I've noticed that for H2 case I never check if incomingSslConfiguration is nullptr or not, but the code several lines below - does it, which looks kind of moronic. This configuration is initialized when the delegate is created, so no need to have this if-statement. Instead, assert, making this behavior a requirement. Change-Id: I90fb84337be925a3288252aa2491b4c23d6c6cbb Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | | | * Cocoa: Set the accepted action to be the one from the responseAndy Shaw2019-09-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By setting the accepted action to be the one from the response it will enable the user to set the drop action in their code and this will be reflected at the platform level. Change-Id: I7b9459b228c00ef01d91649b3405316729713164 Fixes: QTBUG-77427 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | | * Handle robustness with OpenGL < 4.0Allan Sandfeld Jensen2019-09-111-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to have the right idea of robustness, so check for extension. Fixes: QTBUG-78107 Change-Id: I26987269e5c50bee20e2e3cc6d75f91a6c9af25e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | | | * Add a missing ConnectionTypeHttp2Direct in several if statementsTimur Pocheptsov2019-09-112-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found while preparing SPDY retirement. Change-Id: I30f923fdeb0f6f0b5e808a3e7b7d81ddb9c4ef12 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | | * Schannel: handle SEC_E_INCOMPLETE_DATA in acceptContextMårten Nordheim2019-09-101-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not a failure state, we just need more data. It is handled properly in other functions. Change-Id: I9450a78c71a3f4fe9506a7a79de6efa2db08697c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | | * Schannel: unbreak renegotiation (and likely gracious shutdown)Mårten Nordheim2019-09-092-16/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reason it wasn't working before was a couple of things: 1. Due to an extra 'else' it would not process the SEC_I_RENEGOTIATE or SEC_I_CONTEXT_EXPIRED branch. 2. The peerCertVerified boolean was not only wrong, but also broke renegotiation even if the 'else' wasn't there. My previous attempt to fix it ended up being a noop, so: Reverts e21fa577dde32849fdaa744f30ad3b23d63b7214 Change-Id: Ifbad55d4bb066b7566bb88cead48e329cbd574f9 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * | | macOS dark mode: set the link colorShawn Rutledge2019-09-121-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-71740 Change-Id: I49f49338c7f3a28845de63c2a6bf2dc8495dd108 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * | | QTranslator doc: use QCoreApplication::installTranslator()Christian Ehrlicher2019-09-121-2/+2
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The example snippet was using app.installTranslator() even installTranslator() is a static function. And since app is a QApplication instead a QCoreApplication this could lead to the assumption that a QTranslator can only be used for gui applications. Therefore use the correct static invocation QCoreApplication::installTranslator(). Change-Id: Ia3ce00f25230c2fe2bdc159ec14c88c961924651 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * | rhi: metal: Configure the layer's opaque property as appropriateLaszlo Agocs2019-09-121-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-78089 Change-Id: I6cd95e24d38562cf1931c107bb6b719e340583a8 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * | rhi: Add a flag to indicate preferring a software adapterLaszlo Agocs2019-09-124-4/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ...if there is one and the concept is applicable in the first place. Change-Id: Iab202c1c1cdd229f4910159de4cae7ce30805ea9 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * | rhi: vulkan: Report device lostLaszlo Agocs2019-09-122-30/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Typically caught in vkQueueSubmit(). The WaitIdles that can be hit upon cleanup must be guarded by !deviceLost because they inexplicably cause an infinite blocking wait when the device was already reported as lost. (with NVIDIA at least) Change-Id: I7142e2461e1aed9ee3068b2b963cdf2c678ca4e0 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * | rhi: Better handling of device lossLaszlo Agocs2019-09-1213-3/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting with D3D11. The other backends will follow later. Change-Id: I4f165c9f1743df0fb00bdce1e898917575bf5f6e Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * | rhi: Clarify the swapchain alpha flag docsLaszlo Agocs2019-09-121-2/+10
| | | | | | | | | | | | | | | | | | | | Change-Id: Iff0edf0ae40b830af0209403d899def922e6088c Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * | rhi: gl: Avoid crash when reading back the swapchain backbufferLaszlo Agocs2019-09-121-1/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: I9a632c06d8b9e666d99d0f135d3396d2de03f92a Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * | rhi: d3d11: Fix enabling alpha compositingLaszlo Agocs2019-09-121-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-78089 Change-Id: I4e33665947debe007abcb976641e515224fa8451 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * | rhi: Make the clang code model happy as much as we canLaszlo Agocs2019-09-127-464/+470
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When interfacing with reality (i.e. native platform APIs provided in C, ObjC, or COM), each of the APIs has its own idea of what types it likes to use for sizes, points, rects, etc. Out of the hundreds of warnings Qt Creator throws at us with the default clang check level when opening one of the rhi backends not a single one is useful. Regardless, let's try getting rid of what we can. This mostly involves throwing in int/uint conversions in order to get the signedness change warnings to shut up. The things that are either unacceptable to change or are beyond our control are left untouched. Change-Id: I6e4cb7cd373bf48dc990eaf83344242bbf30bd66 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * | Simplify QColorSpacePrivate initializationTor Arne Vestbø2019-09-124-22/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QColorVector and QColorMatrix are default-constructed following the Qt philosophy of types always being well-defined. The corner-case where we need uninitialized versions of these types for performance reasons is handled explicitly. Change-Id: I629334d1ffc63563ec9fd1298c623946e0799d1d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | rhi: d3d11: Add the device lost testing machineryLaszlo Agocs2019-09-125-1/+290
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The device can be lost when physically removing the graphics adapter, disabling the driver (Device Manager), upgrading/uninstalling the graphics driver, and when it is reset due to an error. Some of these can (and should) be tested manually, but the last one has a convenient, programmatic way of triggering: by triggering the timeout detection and recovery (TDR) of WDDM. A compute shader with an infinite loop should trigger this after 2 seconds by default. All tests in tests/manual/rhi can now be started with a --curse <count> argument where <count> specifies the number of frames to render before breaking the device. Qt Quick will get an environment variable with similar semantics in a separate patch. Change-Id: I4b6f8d977a15b5b89d686b3973965df6435810ae Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * | QCoreApplication: work towards replacing a QRecursiveMutex with a QMutexMarc Mutz2019-09-122-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At first glance, libraryPathMutex is only recursive because setLibraryPaths(), addLibraryPath() and removeLibraryPath(), all of which lock libraryPathMutex, may call libraryPaths(), which does, too. This is easily fixed by splitting libraryPaths() into public libraryPaths() and private libraryPathsLocked(), the latter expecting to be called with the libraryPathMutex already held. And this is what this patch does. However, on second glance, the building of the initial app_libpaths calls a monstrous amount of code, incl. QLibraryInfo, and some of that code probably re-enters one of the library-path functions. So while this patch is a step towards making libraryPathMutex non-recursive, it's probably not the end. Change-Id: I3ed83272ace6966980cf8e1db877f24c89789da3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * | QReadWriteLock: use NSDMI to simplify the Private ctorMarc Mutz2019-09-121-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I7267dedb152186ad8c74cbf2eddd863c3bc0845f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * | QtGui: replace some QMutexLockers with (new) qt_{scoped,unique}_lock()Marc Mutz2019-09-125-17/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QImageReader, also replace a QMutex with a QBasicMutex, making the code similar to the corresponding code in QPicture. Change-Id: Ia1cd546eccd3662837762e506235e350b7a08647 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * | Add qt.core.filesystemwatcher logging categoryShawn Rutledge2019-09-111-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFileSystemWatcher has open bugs, so users should be able to help troubleshoot. Change-Id: I6b703e25f294944469d20fd36012b6a55133732a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | | QNetworkRequest: deprecate SPDY-related attributes for 5.15Timur Pocheptsov2019-09-122-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As they will be removed in Qt 6. Also, two H2-related attributes will be replaced by the new ones with their names corrected. Docs updated. Change-Id: I14eeb5fc077a101ca5d177c9369a088bdcb8297e Task-number: QTBUG-78255 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>