summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* tslib plugin: remove debug print on old tslib versionsv5.14.0-beta1Rolf Eike Beer2019-10-011-0/+2
| | | | | | | | | | | | This introduces a dependency on ts_get_eventpath(), which is only available in tslib 1.15 and newer. This raises the required version to an unneeded level, so just drop the debug message if the API is not available. Change-Id: I4a1cd7abec8d139e70555506d9d21edacf0f4d71 Fixes: QTBUG-78867 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Fabian Vogt <fabian@ritter-vogt.de>
* Android: Fix plugins namingBogDan Vatra2019-10-014-12/+14
| | | | | | | | | | | | | | Android 5 doesn't extract the files from libs folder unless they are prefixed with "lib". This patch sets a proper name for the plugin which will make gdb happy and it will also avoid any name clashes. If we rename the plugins when we copy them, gdb won't find them, therefore it can't load their symbols. On Android all the libs are in a single folder, so to make sure we don't have any name clashes, we are prefixing the plugin name with it's relative path to qt folder (we replace / with _). Fixes: QTBUG-78616 Change-Id: I7e0e67d65448532769d69f46b1856c029e2cf5cb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* rhi: Speed up buffer and texture trackingLaszlo Agocs2019-09-304-32/+30
| | | | | | Task-number: QTBUG-78862 Change-Id: If278bd55530081cbbdbab8dd6e14d86e28da558e Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Remove QVector in the API of QRhiResource subclassesLaszlo Agocs2019-09-308-27/+58
| | | | | | | | | | | | | | | | | | | | | | | | | Forcing users to go through a QVector, when in practice they almost always want to source the data from an initializer list, a QVarLengthArray, or a plain C array, is not ideal. Especially since we can reason about the maximum number of elements in the vast majority of use cases for all the affected lists. QRhiResource is also not copyable so we do not need the usual machinery offered by containers. So switch to a QVarLengthArray. Note that a resource is not a container. The only operations we are interested in is to be able to source data either via an initializer list or by iterating on something, and to be able to extract the data, in case a user wishes to set up another resource based on the existing one. In some cases a QVector overload is kept for source compatibility with other modules (Qt Quick). These may be removed in the future. Also do a similar QVector->QVarLengthArray change in the srb-related data in the backends. Change-Id: I6f5b2ebd8e75416ce0cca0817bb529446a4cb664 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* De-d-pointer QRhiShaderResourceBindingLaszlo Agocs2019-09-307-190/+118
| | | | | | | | | | | | | | | | | Sad to see this go since the d pointer pattern with implicit sharing would have been perfect for this class, had this been a public API. However, as binary compatibility will not be a concern for QRhi classes, it is wasteful to allocate memory on every QRhiShaderResourceBinding. This allows users, such as Qt Quick, to use QRhiShaderResourceBinding as a cheap, simple, value class, without having to invent their own alternatives in performance critical places. The change brings a not insignficant improvement in certain qmlbench scenes (the ones with thousands of unbatched geometry nodes). Change-Id: I6d1dced6498d9ad625f90ead78bc0a417ea99ed8 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Share and enable shader disk cache in QRhi OpenGL backendLaszlo Agocs2019-09-305-120/+271
| | | | | | | | | | | | | | | The expectation for it is to function identically to what we get with QOpenGLShaderProgram. (same environment variables, same logging categories, etc.). QOpenGLProgramBinaryCache is now shared between the QOpenGL convenience classes (like QOpenGLShaderProgram) and QRhi. To achieve more modularity and to prepare for QOpenGLShaderProgram and friends moving out of QtGui, this class cannot depend on QOpenGLShader* anymore. This involves adding some minor conversions between QRhi and QOpenGL enums for example. Change-Id: I2f4664e074823ea536281aea8006a6db159a7381 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"Liang Qi2019-09-3022-3329/+4425
|\
| * Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-3022-3329/+4425
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qrandom.cpp src/corelib/io/qfileinfo.cpp src/corelib/kernel/qeventdispatcher_win.cpp src/corelib/kernel/qeventdispatcher_win_p.h src/gui/text/qfontdatabase.cpp src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm src/plugins/platforms/windows/qwindowsglcontext.cpp src/testlib/qtestcase.cpp Done-With: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-With: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4893212471aa24be804c989a581810e2f714545c
| | * QVarLengthArray: Avoid int vs. size_t warnings in operator=Laszlo Agocs2019-09-291-1/+1
| | | | | | | | | | | | | | | Change-Id: I879b62c55e4211d3e4e1a18f6699f26e3f5de1f8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Windows/MinGW: Fix posted events timer not stoppingFriedemann Kleint2019-09-272-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specify the type of the enum value SendPostedEventsWindowsTimerId to be UINT_PTR to work with the g++ interpretation of enumeration signedness and use the correct type for the returned timer id. Fixes: QTBUG-78491 Change-Id: I7b3f306d3f60da7a21500ece5243ac90854ccf1a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Fix robustness detection for windowsAllan Sandfeld Jensen2019-09-272-32/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes detecting requested robustness for OpenGL < 4.0. Fixes: QTBUG-78781 Change-Id: I6a10f3ed925dd05d5caa7d6b6e12935e27eed3e9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * Fix QRandomGenerator initialization on AMD CPUsDmitry Kazakov2019-09-264-51/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some AMD CPUs (e.g. AMD A4-6250J and AMD Ryzen 3000-series) have a failing random generation instruction, which always returns 0xffffffff, even when generation was "successful". This code checks if hardware random generator generates four consecutive equal numbers. If it does, then we probably have a failing one and should disable it completely. Change-Id: I38c87920ca2e8cce4143afbff5e453ce3845d11a Fixes: QTBUG-69423 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * iOS: Fix fallback fonts on iOS 13+Eskil Abrahamsen Blomfeldt2019-09-262-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since iOS 13, the cascade list for the default UI font contains meta-families for several writing systems, such as CJK. Since these font families were never populated to the database, we ignored them in Qt, and thus got missing glyphs for the characters in question. The fix is to make sure these fonts are populated in the database. It contains a partial backport of 922d195020d54d7e599d135f6a5e0338100e08f1, which adds the qt_isFamilyPopulated() accessor to allow us to check if the family has been populated in the font database. In Qt 5.14, there is public API for this in QPlatformFontDatabase, so this is a temporary resolution until then. Fixes: QTBUG-77467 Change-Id: Ia9ebb8a19ad2367eb764ae1496a52966b465336b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * QWidget::setFocusProxy: adjust focus widget properlyDavid Faure2019-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | My commit 3e7463411e adjusted the focus widget by setting QApplicationPrivate::focus_widget directly, while there is a method for doing this properly, including setFocus_sys() and emitting signals. Fixes: QTBUG-77364 Change-Id: I218acf7a9de39173d282ced46def4f65594f80b4 Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * QWizard/Aerostyle: Fix "&Next" shortcutFriedemann Kleint2019-09-251-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix for QTBUG-35203 set the Alt+Right shortcut on the next button, clobbering the Alt+N shortcut from parsing the text (similar for other languages). Add a separate shortcut for Alt+Right since a button may not have several shortcuts. Amends 6714196f45fbae755b26a4b2406a7bbe066084dc. Fixes: QTBUG-78604 Change-Id: I1367da739c35fbd011d11f850c9bc3915113c644 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * Fix CVE-2019-16168 in SQLiteAndy Shaw2019-09-252-1/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v3.29.0 is the latest and there is no indication as to when the next release is so we will apply this separately for now and it can be reverted once it is in a release that we ship with. This patch is taken from https://www.sqlite.org/src/info/98357d8c1263920b Change-Id: I82d398b093b67842a4369e3220c01e7eea30763a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * sqlite: Update to v3.29.0Andy Shaw2019-09-253-3112/+4062
| | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtSQL][sqlite] Updated to v3.29.0 Change-Id: Ibf61c829dcd24dc8cdf00f5b57078255b0ad5ef1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * QFileInfo: clarify documentation about handling of symlink attributesThiago Macieira2019-09-251-11/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, shortcut ".lnk" files are treated as symlinks, and attribute queries on a shortcut file return the results for the shortcut target. Fixes: QTBUG-77523 Change-Id: I907a43cd9a714da288a2fffd15bada7eba37d3ba Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * Doc: Q_FLAG should be applied to the enum, not the QFlagsThiago Macieira2019-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | moc extracts he name that is inthe Q_FLAG macro and that gets used in qDebug(). As the documentation described, qDebug would have printed: QFlags<LoadHints>(QLibrary::ResolveAllSymbolsHint) which doesn't compile (though we could have partially specialized QFlags<QFlags<E>> to be QFlags<E>). The semantically correct output is: QFlags<LoadHint>(QLibrary::ResolveAllSymbolsHint) which is what this change gets. The ideal output would be: LoadHints(QLibrary::ResolveAllSymbolsHint) But that's not a doc change. Fixes: QTBUG-77216 Change-Id: I0635172f4f2a4c51a435fffd15b59a859886e90c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * Filesystem: avoid crashes on exit in case the locale codec is nullThiago Macieira2019-09-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On exit, QLocale::codecForLocale() can return null as the codec may have already been destroyed. In that case, pretend that Latin1 was the locale, so any file name is acceptable. This matches QString: QTextCodec *codec = QTextCodec::codecForLocale(); if (codec) return codec->toUnicode(str, size); #endif // textcodec return fromLatin1(str, size); Note that if we're wrong and the locale was *not* Latin1, files that you had a name to may not be encoded or decoded the same way. Fixes: QTBUG-78446 Change-Id: Iece6e011237e4ab284ecfffd15c54077728a17ca Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * Ensure that QFont::fromString() doesn't parse empty font specificationsShawn Rutledge2019-09-241-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-78236 Change-Id: Iba060e7a24080cdc8f317ecb6dc616b2cd918acb Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * QWizard: Use member initialization in private classesFriedemann Kleint2019-09-241-101/+57
| | | | | | | | | | | | | | | | | | | | | | | | Remove superfluous constructors. Task-number: QTBUG-78604 Change-Id: I8a422cfeaaedf89ce310e06d5db80907cd1102d4 Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
| | * Fix connection string code snippet for ODBC on WindowsAndy Shaw2019-09-241-1/+1
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-15133 Change-Id: I86d77aec039fdfaf262ad056c944c7cfc30e0041 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | * Move DialogButtonBoxLayout case to be before MouseDoubleClickDistanceAndy Shaw2019-09-241-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This amends 9be66cb282dee1ce4380602a2f3caf5abfd144cf so that the DialogButtonBoxLayout case is moved to be before the MouseDoubleClickDistance one in case the fallthrough is triggered. Change-Id: I843dad6b55ccffe6b6c275cd75587f04659e512f Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| | * Windows QPA: Fix close button not working on Windows 7Andre de la Rocha2019-09-231-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A previous change modified hit testing in the non-client area of fixed-size windows, in order to prevent showing a resize cursor when the windows are not resizable (QTBUG-77220). The change assigned HTCAPTION for any point over the entire title bar, including the top bar buttons, which on Windows 7 classic or basic desktop caused these buttons to become unresponsive. The present fix changes this behavior to redefine only the outer sizing frame, while letting the rest of the title bar be handled by DefWindowProc(). Fixes: QTBUG-78262 Change-Id: Id6e821a805c8333a67988f87c3727bed0c93290e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Do not pass nullptr as '%s'Allan Sandfeld Jensen2019-09-231-2/+5
| | | | | | | | | | | | | | | | | | | | | Fixes GCC 9 warning. Change-Id: I2a21d863267b444a29697aa026c21b47e3ac8382 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Featurize support for signaling NaNEdward Welbourne2019-09-304-3/+10
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of our compilers for emscripten coerces all signaling NaNs to quiet ones, so won't do any actual signaling. Anyone relying on them to do so shall be disappointed, so it's better that they know about it at compile-time - or, at least, have the ability to find it out. Put the signaling NaN producers (and remaining (test) code using them) under the control of a feature that's disabled when numeric_limits claims double has no signaling NaN. Assume the bootstrap library doesn't need signaling NaNs. Sadly, until C++20 <bit>, there's no contexpr way to test that alleged signalling and quiet NaNs are actually distinct. Added some auto-tests for signaling NaN, including that it's distinct from quiet NaN. Any platform on which the last fails should disable this feature. Task-number: QTBUG-77967 Change-Id: I57e9d14bfe276732cd313887adc9acc354d88f08 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Ensure drawable size atomicity within a frameLaszlo Agocs2019-09-295-75/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert surfacePixelSize() to be a getter only. With Metal this will mean returning the "live" layer size (and so not the layer.drawableSize), which is in line with what we expect with other backends. Instead, we leave it to the swapchain's buildOrResize() to "commit" the size by setting drawableSize on the layer. With typical application or Qt Quick logic this ensures that layer.drawableSize is set once and stays static until we get to process the next resize - on the rendering thread. This of course would still mean that there was a race when a client queries surfacePixelSize() to set the depth-stencil buffer size that is associated with a swapchain. (because that must happen before calling buildOrResize() according to the current semantics) That can however be solved in a quite elegant way, it turns out, because we already have a flag that indicates if a QRhiRenderBuffer is used in combination with (and only in combination with) a swapchain. If we simply say that setting the UsedWithSwapChainOnly flag provides automatic sizing as well (so no setPixelSize() call is needed), clients can simply get rid of the problematic surfacePixelSize() query and everything works. Task-number: QTBUG-78641 Change-Id: Ib1bfc9ef8531bcce033d1f1e5d4d5b4984d6d69f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | rhi: gl: Remove fake uniform buffer offset alignment requirementLaszlo Agocs2019-09-281-1/+3
| | | | | | | | | | Change-Id: I5408e53f90c1c19836c400659bac15a8690c6ae8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | macOS: Avoid automatic resizing of layers by fixing them to top-leftTor Arne Vestbø2019-09-281-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a layer is resized, e.g. during a window resize, the contents of the layer may lag behind if the client doesn't fill the layer in response to the window resize and corresponding expose event. The default behavior is for Core Animation to stretch the content to fill the layer, but this results in the content "jumping" back and forth when the content then picks up the new size and fills the layer. Instead we tell Core Animation to fix the content to the top left corner. If a layer is sized up without a corresponding layer contents update this will result in missing/transparent pixels in the bottom or right part of the layer, explicitly showing what the result of the missing paint is. During debugging we also highlight this area by adding a magenta background color to the layer. Conversely, if the layer is sized down we don't need to resize it, we can just keep the fixed top left position, and the content will stay in place during the resize. This allows for optimizations during window resizing, where we don't need to allocate new buffers if the old buffer is larger than the new one. Change-Id: I265b57e3a0ddff8bbcda3af5d670cd8c3b00b181 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | macOS: Resolve layer contents scale based on DPRTor Arne Vestbø2019-09-281-2/+30
| | | | | | | | | | Change-Id: I32de4610a2aebbc7e0adcad9bb3440683cae5906 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | macOS: Improve layer delegate setupTor Arne Vestbø2019-09-281-1/+7
| | | | | | | | | | | | | | | | We should detect the cases where there's already a delegate, and setting up the delegate before the layer is added makes sense. Change-Id: I67896cbc96d11ce9a3826fd8aa0e5e104a83a21c Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | macOS: Flesh out and clarify layer setupTor Arne Vestbø2019-09-281-18/+50
| | | | | | | | | | Change-Id: I10d972254c02de8789e64c8503861d51764a1633 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | macOS: Propagate drawRect: dirty bounding rect as fallbackTor Arne Vestbø2019-09-281-3/+4
| | | | | | | | | | Change-Id: I333e2bfe4a25bfbfebef7b2ec30a600fd441c9a9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | macOS: Gather QNSView draw callbacks togetherTor Arne Vestbø2019-09-281-39/+51
| | | | | | | | | | | | Change-Id: I29881b379481287b4938e47fc06405c918aa39a3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | QCommonStyle: Add SP_DialogNoButton case in standardIconKai Uwe Broulik2019-09-281-0/+1
| | | | | | | | | | | | | | | | It is present in standardPixmap but missing from standardIcon resulting in QMessageBox using the fallback PNG provided by Qt for the "No" button. Change-Id: If4f14c7de26eb32277cd19a7be75360dba4f4e29 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | rhi: d3d11: Make tdr header privateLaszlo Agocs2019-09-282-2/+18
| | | | | | | | | | | | | | Forgot the _p suffix. Change-Id: I48225418fd40d45020b016b59578fcc1944d15c0 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | Replace use of deprecated API in macOS event dispatchersTor Arne Vestbø2019-09-282-2/+2
| | | | | | | | | | | | Change-Id: I077ba12b406f662ba22b2f2cddf0171963335739 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | doc: Fix variable name in QDBusArgument snippetAlexander Volkov2019-09-271-1/+1
| | | | | | | | | | Change-Id: I751802d3f9f389e80cbb9aabcdb637d4742d3832 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix documentation of qfloat16Edward Welbourne2019-09-271-3/+44
| | | | | | | | | | | | | | Various methods were undocumented and even one that was lacked a \since 5.14 Change-Id: I1e65ed1bb9c5b9de06210d7e18af36539aafc4ec Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix doc of QDateTime::YearRange; include its \since 5.14Edward Welbourne2019-09-271-0/+1
| | | | | | | | | | Change-Id: I2e6c27953ecce95df3ac4868a6d953596ba115f2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | rhi: gl: Fix not resetting color write bits when switching pipelineLaszlo Agocs2019-09-261-0/+1
| | | | | | | | | | | | | | | | | | | | This was visible in the triquadcube test when enabling transparent window background: the cube on the left was rendered incorrectly because alpha was not written out due to not setting glColorMask() back to the defaults when switching to another pipeline. Change-Id: I7a8c94072e0b68a58fffcc8c1a200e3940dcad44 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | Move cache key calculation to QOpenGLProgramBinaryCacheLaszlo Agocs2019-09-263-6/+12
| | | | | | | | | | | | | | | | This class will likely be used by the OpenGL backend of QRhi as well. Therefore, we need to make it more self-contained and independent. Change-Id: If046ed41e25c70cc9abb45219b451f9179feaa1c Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | rhi: metal: Eliminate redundant setCullMode and setFrontFaceWinding callsLaszlo Agocs2019-09-262-2/+18
| | | | | | | | | | | | Task-number: QTBUG-78605 Change-Id: Icc3a9636055b5f45418da28cc05aa02e19370c02 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | rhi: Unify handling of special cases for scissor and viewport rectsLaszlo Agocs2019-09-263-21/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With OpenGL a scissor (or viewport) rectangle is not allowed to have a negative width or height. Everything else is allowed. This is also the semantic we wish to keep for QRhiViewport and QRhiScissor. This raises some problems. For instance, when we do bottom-left - top-left rectangle conversion, the case of partially out of bounds rects needs to be taken into account. Otherwise, Qt Quick ends up in wrong scissoring in certain cases, typically when the QQuickWindow size is decreased so the content does not fit because that will then start generating negative x, y scissors for clipping (which is perfectly valid but the QRhi backends need to be able to deal with it) Then there is the problem of having to clamp width and height carefully, because some validation layers for some APIs will reject a viewport or scissor with partially out of bounds rectangles. To verify all this, add a new manual test, based on the cubemap one. (cubemap was chosen because that is an ideal test scene as it fills the viewport completely, and so it is visually straightforward when a scissor rectangle is moving around over it) Fixes: QTBUG-78702 Change-Id: I60614836432ea9934fc0dbd0ac7e88931f476542 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | Fix QCalendar::isValid(): make it constEdward Welbourne2019-09-262-2/+11
| | | | | | | | | | | | | | | | Spotted in API change review, thanks to Albert Astals Cid. Also added documentation of this method. Change-Id: I2ef2c526a98b571a3cb3bb5f93d1952b1b0d63a9 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
* | Windows: QSysInfo::prettyProductName(): Improve version formattingFriedemann Kleint2019-09-251-13/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Windows 10 and higher, the SP version and major/minor versions are not relevant any more; the release id (displayed by the winver tool as "Version" should be displayed instead. Add helpers and change the output accordingly. For Windows 7, output the build number. [ChangeLog][QtCore][Windows] QSysInfo::prettyProductName() now returns a version including the Windows 10 release id or Windows 7 build number respectively, resembling the version string displayed by the winver tool. Change-Id: Ia783272a0da234d2f7ff35c4a9a6fc296da277e0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Handle returned bitmap glyph when not requestedAllan Sandfeld Jensen2019-09-251-7/+23
| | | | | | | | | | | | | | | | | | | | Add back code to handle bitmap glyphs returned when we did not request a bitmap glyph. This is a can happen on some configurations where bitmaps are not suppressed. Fixes: QTBUG-78116 Change-Id: Ie0c6cfbf9c50456431b0e3a23e568f3399e5a879 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QAbstractSpinBox css: properly honor spincontrol-disable-on-boundsChristian Ehrlicher2019-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The css style 'spincontrol-disable-on-bounds' was not properly honored within QAbstractSpinBox::initStyleOption() because the affected widget was not passed to QStyle::styleHint(). Therefore QStyleSheetStyle did not find the correct render rule. Fix it by passing 'this' as third argument to QStyle::styleHint(). Fixes: QTBUG-18008 Change-Id: Iabcebf0b83143f45309b4e7066bccb8d20bd0419 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | doc: add a note to QFileSystemWatcher about files saved by re-creationShawn Rutledge2019-09-231-0/+6
| | | | | | | | | | | | | | Fixes: QTBUG-46483 Fixes: QTBUG-53607 Change-Id: I434f177b35689d55aa1deea360bf7e6ae009ad68 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>