summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add attribution for AGLFNEskil Abrahamsen Blomfeldt2019-08-082-0/+43
| | | | | | | | We were missing attribution for the AGLFN tables. Task-number: QTBUG-70968 Change-Id: Ib84cbd25c9f7c49611761c9eba16624de5b77dd2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix crash in QTextDocument::clearUndoRedoStacks()Eskil Abrahamsen Blomfeldt2019-08-082-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | When calling QTextDocument::clearUndoRedoStacks() with UndoStack, there were two bugs: The first was that we were retrieving the item at "undoState" and deleting this. This is actually the upper limit of the for loop. If the stack does not contain any redos, then it would be == undoStack.size() and we would assert. If there were redos, then we would delete the item at undoState multiple times (actually undoState times). In addition, when the loop exited, we first removed the dangling pointers using remove() and then there was a weird resize() to the new size minus the old undoState. This would either assert because we tried to resize to a negative number, or it would arbitrarily remove items from the stack. [ChangeLog][QtGui][Text] Fixed a crash bug in QTextDocument::clearUndoRedoStacks(QTextDocument::UndoStack). Task-number: QTBUG-69546 Change-Id: I8a93e828ec27970763a2756071fa0b01678d2dcd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Android: Fix QMenu on 64 bitEskil Abrahamsen Blomfeldt2019-08-085-12/+88
| | | | | | | | | | | | | | | | | | | | | The platform menu tags in Qt are actually the pointers, so they are 64-bit values when the build is 64 bit. Since menu IDs in Android are 32-bit ints, we cannot cast back and forth like we do. To fix this, we add a separate hash of menu IDs to allow mapping between Java and C++. For easier book-keeping, we add the hashes to the menu bar and menu classes, so that we can easily recycle old menu IDs when they are no longer in use. Note that overriding the tag on the menus by calling setTag() will not work, since Qt Widgets will later override it again by setting it back to the menu's pointer. [ChangeLog][Android] Fixed an issue where menus would not work on 64 bit builds. Task-number: QTBUG-76036 Change-Id: Icaa1d235d4166331669139251656ea0159e85195 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* tst_http2::connectToHost - fix flakinessTimur Pocheptsov2019-08-072-6/+0
| | | | | | | | | | | some assumptions were incorrect: our test server immediately sends its SETTINGS frame, as a result we have to reply with client preface + SETTINGS(ACK). So QVERIFY(!prefaceOK) was wrong from the beginning and was only passing by pure luck. Change-Id: Ie43f0d4ac41deb0e5339badaae6149a9b2f9d9b3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* eglfs: Fix raster windowsLaszlo Agocs2019-08-078-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | Also sanitize the initial WebAssembly hack. Both eglfs and wasm lack the concept of true raster windows. A QWindow with RasterSurface is rendered with OpenGL no matter what. The two platforms took two different approaches to work around the rest of the machinery: - wasm disabled the QOpenGLContext warning for non-OpenGL QWindows, - eglfs forced the QWindow surfaceType to OpenGLSurface whenever it was originally set to RasterSurface. Now, the latter breaks since c4e9eabc309a275efc222f4127f31ba4677259b7, leaving all raster window applications failing on eglfs, because flush in the backingstore is now checking the surface type and disallows OpenGLSurface windows. (just like how QOpenGLContext disallows RasterSurface windows) To solve all this correctly, introduce a new platform capability, OpenGLOnRasterSurface, and remove the special handling in the platform plugins. Change-Id: I7785dfb1c955577bbdccdc14ebaaac5babdec57c Fixes: QTBUG-77100 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Don't rely on QWidget::internalWinId in QWidgetBackingStoreTor Arne Vestbø2019-08-071-9/+15
| | | | | | | | | | | | | | | | | | QWidget does not handle QWindow and QPlatformWindow being destroyed behind its back, and the QWidget state for internalWinId and the Qt::WA_WState_Created attribute can easily get out of sync with reality. To avoid QWidgetBackingStore mistakenly thinking that a widget does not have a platform window it can operate on we use the QWindow and QPlatformWindow handles directly, instead of relying on the winId. This is a stop gap until we can teach QWidget to deal with dynamic changes to its underlying window handles. Change-Id: Ib09bea2ad62c42e9667a20ca6b5faf0f957288da Fixes: QTBUG-74559 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QMutexPool: fix memory order of atomic operationsMarc Mutz2019-08-052-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | The array of QAtomicPointer<QMutex> can be initialized using relaxed stores of nullptr, since nullptr is the whole data. But once we store an actual QMutex pointer in the array, we need to publish the indirect data thus created. We did this, with testAndSetRelease(); what was missing was a corresponding acquire fence on load, without which there is no happens-before relationship between the writes performed by the QMutex ctor and the reads performed by a subsequent mutex.lock(), say, on the same data. Fix by adding acquire fences to all loads. That includes the dtor, since mutexes may have been created in different threads, and never been imported into this_thread before the dtor is running. As a drive-by, return a new'ed QMutex that was successfully installed directly to the caller, without again going through a load-acquire. Fixes: QTBUG-59164 Change-Id: Ia25d205b1127c8c4de0979cef997d1a88123c5c3 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 65b8f59e045bb41fef99b1a44f462115de65064a) (cherry picked from commit da38f0d691d9d7eacfac5fbcbd47b887bd59bd39)
* Fix race condition on qt_create_tls() on WindowsThiago Macieira2019-08-051-0/+2
| | | | | | | | | | | | | | | | | If this function is called by multiple threads, more than one could reach the mutex locking and call TlsAlloc(), but only the last one would save the data. The others would be leaked and, worse, be used by those other threads. [ChangeLog][QtCore][QObject] Fixed a resource leak caused by a race condition if multiple QObjects were created at the same time, for the first time in an application, from multiple threads (implies threads not started with QThread). Fixes: QTBUG-77238 Change-Id: Ife213d861bb14c1787e1fffd15b63a5818bcc807 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix dependency_libs entry of .la filesJoerg Bornemann2019-08-031-5/+33
| | | | | | | | | Libtool cannot cope with absolute paths in the dependency_libs entry. We split absolute paths into -L and -l here. Change-Id: I30bf11e490d1993d2a4d88c114e07bbae12def6d Fixes: QTBUG-76625 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* macOS: Don't require setting all three color buffer sizes in QSurfaceFormatTor Arne Vestbø2019-08-022-14/+9
| | | | | | Change-Id: Iaa6eb4d64f549a31aa5c53145e8b37facec4ea78 Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix QPainter's ColorDodge and ColorBurn composition modesPavel Artsishevsky2019-08-021-6/+18
| | | | | | | | | | | Added checking corner cases (more specific formulas) in color_dodge_op()/color_dodge_op_rgb64() and color_burn_op()/color_burn_op_rgb64() to produce correct results for any input. Task-number: QTBUG-77231 Change-Id: I274f80b356bd4236a9176a84a95604c2eb01787a Reviewed-by: Konstantin Tokarev <annulen@yandex.ru> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* tst_http2::connectToHost - add a fix for SecureTransport backendTimur Pocheptsov2019-08-011-0/+13
| | | | | | | | | | | One of the tests above was unsetting a variable that enforces the use of a temporary keychain. We have to set it back, otherwise the test is failing. What surprises me though - why I had this problem only locally and not on CI? Apparently, SecureTransport is not covered by our configurations ... Change-Id: I0ff1e3e304632869391ed61213c245b949d8c778 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Add system detection and version defines for macOS Catalina (10.15)Tor Arne Vestbø2019-08-013-4/+19
| | | | | | Change-Id: I127efe752ebb70825f1b31f0d64c4293d1c71820 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Improve screen positioning during window creationTor Arne Vestbø2019-08-011-12/+21
| | | | | | | | | | | | | | | Allow AppKit to resolve screen for NSWindow lazily in the case where the position is outside any known screen. And explicitly set the style mask if detecting the corner case of positioning a window in the unavailable space on a rotated screen. In testing the effect of creating the window with a borderless style mask and then updating the mask did not seem to have any visual consequences, but we try to limit this mode just in case by only enabling it in the corner cases we detect. Change-Id: I4b7fcc6755a1ad5ff2683bec79d80a78226edae0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Pass qmake arguments when creating Xcode project from MakefileTor Arne Vestbø2019-08-011-1/+1
| | | | | Change-Id: I0020273b200465f44a135848b4fd505793e85c30 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* macOS: Don't assume NSWindows will be created on the screen we requestTor Arne Vestbø2019-08-011-7/+14
| | | | | | | | | | | The user may have assigned the application to start up on a specific display, in which case the window's screen is nil after creation, and the resulting screen will be delivered as a normal screen change once the window is ordered on screen. Fixes: QTBUG-77154 Change-Id: Idade6d833e31654db239243f2430166b5d86eca2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Blacklist tst_http2::connectToHostTimur Pocheptsov2019-08-011-0/+3
| | | | | | | Test if flakey. Change-Id: I1f956f47ab4cf0602f3631e4f7908df35f5ce83f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* qlalr: fix compilation with C++20Marc Mutz2019-08-011-2/+8
| | | | | | | | | std::not1 is deprecated in C++17, removed in C++20. Use its replacement, std::not_fn. Change-Id: I37d4929c81c2a5befeb44f954ae77b23960d2ff0 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* QHighDPI: Fix broken scaling of QPoint(F)Friedemann Kleint2019-08-014-3/+103
| | | | | | | | | | | | | | For some reason, the overload resolution of the High DPI scale() functions introduced by b6ded193ee64ffe67df6d22e7a23aa1ea9e02ec7 chose the wrong overloads for QPointF and/or QPoint; it fell back to the generic template intended for qreal, QSize, etc, ignoring the origin. Remove the template and spell out all overloads. Fixes: QTBUG-77255 Change-Id: I5661f16f7326f65156f646f430f5a0c71d5302d2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix hit testing in non-client area of fixed-size windows, don't show resize ↵Volker Hilsheimer2019-07-311-6/+5
| | | | | | | | | | | | | | | | cursors The m_windowState member is never updated regarding active state; isActive is instead reimplemented to query the window manager, so use that. To extend the area where the user can move the window over the entire titlebar of fixed-height windows, just test whether the mouse position is within the titlebar. Change-Id: I6b87aacd0bdab511cfd4959df1114af5c6013852 Fixes: QTBUG-77220 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Plug a memory leak introduced in e24a4976bebd7ca90deac2b40c08900625773Volker Hilsheimer2019-07-311-6/+6
| | | | | | | | | | | | While it is correct not to call the functor when the context object has been destroyed, we still need ot clean up the slotObj. It's a low- probability memory leak: the context object has to disappear while waiting for a host resolution, and for repeated requests for the same host the cache takes over anyway. Task-number: QTBUG-76276 Change-Id: Id9daf391353b8252443f3186a7d504d70c553b24 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* qfsfileengine_p.h: Un-inline processOpenModeFlagsOliver Wolff2019-07-301-1/+1
| | | | | | | | | An inlined exported function does not make sense and will cause a warning. Fixes: QTBUG-77242 Change-Id: I016b93d6b39c4db82148fdc5a8a92bc9d5751885 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* qmake: Keep -force_load with library when merging linker flagsTor Arne Vestbø2019-07-291-3/+6
| | | | | | | | | | | Without treating -force_load as an option with an argument, we end up leaving stray -force_loads in the linker line, resulting in build failures when the following option is a random library then treated as a file path. Task-number: QTBUG-66091 Change-Id: I352c50ab67e32ef6b2b5c6a4f90455b20034e207 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* qmake: Don't allow -framework without second argument when merging flagsTor Arne Vestbø2019-07-291-8/+4
| | | | | | | | The linker doesn't support -framworkFoo, so neither should we. The correct syntax is -framework Foo. Change-Id: I3f39ffc067871ce058542bf0068274b35f7b51f6 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* macOS: Respect QSurfaceFormat color space when creating NSWindowTor Arne Vestbø2019-07-291-0/+3
| | | | | | Task-number: QTBUG-47660 Change-Id: I90a2956bfaa52c361a3eba32f0ea19c0eca8c277 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Move processOpenModeFlags out of QFSFileEngineOliver Wolff2019-07-292-19/+36
| | | | | | | | | | The same logic is needed for QWinRTFileEngine. To be able to reuse the code, it was moved out of the class. Task-number: QTBUG-77095 Change-Id: If52b2fc8a0f3056d32fc693775565a1c3803b7d4 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QWinRTFileEngine: Handle QIODevice::Truncate when opening filesOliver Wolff2019-07-291-1/+14
| | | | | | | Fixes: QTBUG-77095 Change-Id: I45b38fab779518c49b22077c493d8640572d40d9 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* QWinRTFileEngine: Implement setSizeOliver Wolff2019-07-292-0/+24
| | | | | | | Fixes: QTBUG-77132 Change-Id: Ic0410297a2215f1b7b656966cbe84b925706532f Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* QHostInfo: Always post results through the event loop to the receiverVolker Hilsheimer2019-07-263-10/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | Lookups performed via QHostInfoRunnable must not synchronously call the user-code's receiver objects, as that would execute user-code in the wrong thread. Instead, post a metacall event through the event loop of the receiver object, or the thread that initiated the lookup. This was done correctly for the trivial cases of empty host name or cached results, so the code generally existed. By moving it from a global function into a member function of QHostInfoResult, we can simply access the required data to construct and post the event. As we process that posted event, we need to check that the context object (which is already guarded via QPointer) is still alive, if we had one in the first place. If we had one, and it's deleted, then abort. [ChangeLog][QtNetwork][QHostInfo] Functors used in the lookupHost overloads are now called correctly in the thread of the context object. When used without context object, the thread that initiates the lookup will run the functor, and is required to run an event loop. Change-Id: I9b38d4f9a23cfc4d9e07bc72de2d2cefe5d0d033 Fixes: QTBUG-76276 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* macOS: Respect color space set on NSWindow when flushing backingstoreTor Arne Vestbø2019-07-262-13/+28
| | | | | | | | | | | | | | | | | | | | | | | By default Qt tries to avoid potentially costly color matching by not assigning an sRGB color space to our backingstore, even if that's what we in practice fill it with. We used to do this by assigning the display's color space, which effectively opts out of color matching, similar to the old behavior of the device RGB color space (which nowadays implies sRGB). By picking up the color space from the NSWindow instead, we allow the user to override the color space to trigger color matching, for example by explicitly setting it to NSColorSpace.sRGBColorSpace. NSWindow will fall back to the screen's color space if the window doesn't have one set. Task-number: QTBUG-47660 Change-Id: Iac8177e85e86fe9044a41eb2c93fbf26bb83c248 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QMacStyle - another slider fixTimur Pocheptsov2019-07-261-1/+1
| | | | | | | | | | | | As a follow-up to fixed resize handling: the trick Gabriel wanted to use to enforce a specific look on a slider's bar, never actually worked due to misplaced statement which essentially is cancelling the 'magic' before the bar is drawn. Now it's fixed: bar is centered (between the rows of tickmarks above and below) + it's had a nice blue filling back! Change-Id: I3021c2b86e4c25981eeee015e32baa24ccebc3bd Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Android: Fix SSL 1.1 support on API-21BogDan Vatra2019-07-261-0/+17
| | | | | | | | OpenSSL 1.1.x libs must be suffixed otherwise it will use the system ones which on API-21 are OpenSSL 1.0 not 1.1 Fixes: QTBUG-76884 Change-Id: I7d4052be68cf7dc65f74a48da8e1e37182056a5e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QResource: fix nullptr-check gone tautologicalMarc Mutz2019-07-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Amends 136c5b9338f71775eb42528cfc7c23b2b4e5dff9. Before that change, each of the three members was a separate Q_GLOBAL_STATIC, so checking resourceList() for nullptr was the correct thing to do to find out whether the static was already destroyed. After the change, the resourceList() function will never return nullptr. Either resourceGlobalData.isDestroyed(), in which case dereferencing it asserts, or it isn't, in which case resourceList() returns a valid pointer. An explicit isDestroyed() check was added to the unregister function, but the register one was also checking resourceList() for nullptr, and this was left unprotected. Add the check and remove the now-tautological checks for nullptr resourceList(). Change-Id: I41fe66939ce858a77802b8af04c1de6e4fafe048 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QMacStyle: workaround NSSliderCell's cached/stale geometryTimur Pocheptsov2019-07-251-0/+35
| | | | | | | | | | | | It's a bit cheesy solution, but works as I've noticed first on QSlider's with a ticks direction 'both'. Works because we were already using numberOfTickMarks property to trigger a special behavior for HIG non-compliant widgets. Works for our case too - we trigger a geometry update. Fixes: QTBUG-76811 Change-Id: I2cbf00d42d98e78519b281d138a2f74227ef5449 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Enable shader cache for ES2 when GL_OES_get_program_binary is presentMichael Brasser2019-07-253-3/+42
| | | | | Change-Id: I4fb71471a7dd22441def1eb837857d245c3e3c5a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Implement 'preconnect-https' and 'preconnect-http' for H2Timur Pocheptsov2019-07-244-18/+175
| | | | | | | | | | | | | | | | | | | | | | | | QNetworkAccessManager::connectToHostEncrypted()/connectToHost() creates 'fake' requests with pseudo-schemes 'preconnect-https'/ 'preconnect-http'. QHttp2ProtocolHandler should handle this requests in a special way - reporting them immediately as finished (so that QNAM emits finished as it does in case of HTTP/1.1) and not trying to send anything. We also have to properly cache the connection - 'https' or 'http' scheme is too generic - it allows (unfortunately) mixing H2/HTTP/1.1 in a single connection in case an attribute was missing on a request, which is wrong. h2c is more complicated, since it needs a real request to negotiate the protocol switch to H2, with the current QNetworkHttpConnection(Channel)'s design it's not possible without large changes (aka regressions and new bugs introduced). Auto-test extended. Fixes: QTBUG-77082 Change-Id: I03467673a620c89784c2d36521020dc9d08aced7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* winrt: Remove QWinrtScreen::pixelDensity so that the default of 1.0 is usedOliver Wolff2019-07-242-7/+0
| | | | | | | | | | | | Winrt does device independent scaling by default so that overwriting pixelDensity for QWinrtScreen will break the use case of setting Qt::AA_EnableHighDpiScaling. That mode is basically always active on winrt. Task-number: QTBUG-76363 Change-Id: Ib522201850d17757be4a80aa819c3f1245ca7147 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Fix lancebench results oddnessAllan Sandfeld Jensen2019-07-231-10/+10
| | | | | | | | | | | | Imports were expanded in the list of commands every time they were evaluated. This meant any test with imports ran slower and slower the more iterations it got through. Fixed by creating a new PaintCommands object every time and living with initialization of it being part of the benchmark results. Change-Id: Ib53a3a25f1393437452bc5aede04ccb63e8715a6 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Make the warning in QBackingStore::endPaint() a little more helpfulShawn Rutledge2019-07-221-1/+1
| | | | | | | Amends 2aa9908e24611fa6d321e694b8415ba7e8d364b0 Change-Id: I2883ca27b06b2b414b4991b2dab3f84100b4c853 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Make simulator detection work with Xcode 11Mike Krus2019-07-211-2/+8
| | | | | | | | | | | | | Beta version of Xcode 11 changes the format of the json object returned by simctl and used to detect running simulators. While multiple versions of Xcode can coexist on the same system, they share the same simulator infrastructure so installing Xcode 11 Beta affects projects using previous versions. Change-Id: Icf06a794aa5ba3624163ace2ce827c0ecf97c38c Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Properly unpolish font and paletteTor Arne Vestbø2019-07-201-6/+5
| | | | | | | | | Explicitly setting the application font and palette will actually persist the current state of the application font and palette to the widget, and it will stop reacting to system style changes. Change-Id: Ib856fe86cd3edb618b7ee5819d6c6c892c61fd1d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* qmake: fix variable naming conflicts with C++20 keywordYulong Bai2019-07-191-3/+3
| | | | | | | | It conflicts with 'requires' keyword. Fixes: QTBUG-77093 Change-Id: I85e8f530dd1e2bf9a31906dd6c5123b947235b01 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix QCborStreamReader not flushing QIODevices due to internal bufferingThiago Macieira2019-07-193-20/+177
| | | | | | | | | | | | | | | When successfully finishing a parse, it's reasonable to expect that the QIODevice was advanced to the end of the input data. [ChangeLog][QtCore][QCborStreamReader] Fixed a bug that caused the QIODevice that the data was being read from not to show the entire CBOR message as consumed. This allows the user to consume data that may follow the CBOR payload. Fixes: QTBUG-77076 Change-Id: I1024ee42da0c4323953afffd15b23f5d8fcc6f50 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Fix QStorageInfo inability to parse really long mountinfo linesThiago Macieira2019-07-191-2/+12
| | | | | | | | | | | | | | Docker creates really long lines due to the multiple levels of overlays in the overlayfs. Our limit of 1024 bytes was too short. [ChangeLog][QtCore][QStorageInfo] Fixed a bug that caused QStorageInfo to be unable to report all filesystems if the options to mounted filesystems were too long (over 900 characters, roughly), such as those found in Docker overlay mounts. Fixes: QTBUG-77059 Change-Id: I6aed4df6a12e43c3ac8efffd15b1ba4231e60b4a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* macOS: Modernize and clarify transient parent window level inheritanceTor Arne Vestbø2019-07-191-7/+29
| | | | | | Task-number: QTBUG-71480 Change-Id: Ia026427844a674f6b36804571a897dc6f16364fa Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Protect against integer overflow in painting transformed imagesAllan Sandfeld Jensen2019-07-191-5/+22
| | | | | | | | | Makes it safe to sample pixel coordinates above 32767. Fixes: QTBUG-76829 Change-Id: I5965afef1bd65106fcfc130dd37572309eacbe42 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* macOS: Add QCocoaWindowManager for dealing with window levelsTor Arne Vestbø2019-07-194-19/+173
| | | | | | | | | Moves and improves the logic for lowering splash screens to a dedicated window manager, which will learn more tricks in patches to come. Change-Id: I8b8fd1dd78fdaf6f106a59c84d2a59254f3539c3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Allow overriding NSKeyValueObservingOptions for QMacKeyValueObserverTor Arne Vestbø2019-07-182-6/+9
| | | | | Change-Id: I6dc0f7c542ccfb768c1cd8688168c415e2c8a087 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: activate correct object when using multiple QSystemTrayIconsVolker Hilsheimer2019-07-181-3/+8
| | | | | | | | | | | | | | | | | | Since we need to set the delegate on the defaultUserNotificationCenter, which is a gobal object, we have to update the delegate when we show the message. Otherwise, the last delegate created and set will receive the notification, and the last QSystemTrayIcon created will emit the activated signal. Before clearing the delegate upon destruction, make sure that it's the right item first. Also updating coding style in the respective parts of the code, and plugging a memory leak. Change-Id: Ife62ae0776a5a610a6fd735b2959b807c3a410c7 Fixes: QTBUG-77003 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* qmake: fix move semanticsGiuseppe D'Angelo2019-07-181-2/+3
| | | | | | | | | | | ProFunctionDef is move-enabled, meaning its `m_pro` field can become nullptr. Its usage in the assignment operator and the dtor must therefore be protected with a check. Amends 9c63ad562bf0a44807f41ce49e4fe1b5ff181a63. Change-Id: I0c77b07dc83969565480bbb9d9fc80751d4246b1 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>