summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QListView: Speedup handling of hidden itemsChristian Ehrlicher2018-09-172-16/+27
| | | | | | | | | | | | | | | | Instead iterating through all rows to get the number of hidden items, iterate over the hidden items which are fewer items. Also don't create a temporary vector with visible flow positions by remembering the count of hidden items before the working index and adjusting them appropriately which gives a significant performance boost when working with a large data set. [ChangeLog][QtWidgets][QListWidget] Speedup handling of hidden items when working with large data sets Task-number: QTBUG-68977 Change-Id: I599b6e97945c245f02229145baad8363ec2bf2f5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QTableView: fix calculating cells to drawChristian Ehrlicher2018-09-171-2/+2
| | | | | | | | | | | | | | | | | The width of the bitarray which should avoid redraws of already drawn cells is sometimes calculated with other parameters then the actual drawing. This can lead to cells which are not drawn. The reason for the discrepancy is that for the initial calculation the headers viewport width is taken which can be smaller than the real width due to a css border. Since all other QHeaderView operations do not take the border into account the problem arises. This will not fix the visual glitch (the header separators are not painted at the same position as the grid) but will at least draw all needed cells. Task-number: QTBUG-20316 Change-Id: I4a1e35ee3ea51b1b458ad3497aab0a34af680cb8 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.12' into dev" into ↵Liang Qi2018-09-1614-23/+108
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-1614-23/+108
| |\ | | | | | | | | | Change-Id: Ic3ffc44d61448a44353c004b9f6703786cc1b213
| | * Fix binary compatibility with old generated moc filesOlivier Goffart2018-09-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 1c623bc6d1c0a7ca52d81ca72c64f36898b3e12c introduced a new QMetaObject revision, which change the size of the QMetaEnum data. When looking up QMetaEnum in a QMetaObject, this size need to be checked for every different QMEtaObject from the hierarchy, not just the first one. Change-Id: I6f0d3982329822e15e284aef9b141d4c9ab351b9 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Windows QPA: Dispatch skipped touch/pen events if compression is offRomain Pokrzywka2018-09-145-6/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the hardware produces events faster than the app can consume between two updates, Windows automatically coalesces them into a single message with the latest touch/pen pointer state and coordinates, effectively compressing those events. But the pointer API also supports querying and retrieving the skipped individual touch and pen frames. There are cases where keeping all the events generated by the hardware is desired, especially for pen events where having the most sampled points available is critical to precisely rendering curves. Qt already defines application attributes to control event compression for general high frequency events and for tablet events in particular. Use them on Windows also to control whether to retrieve skipped frames. [ChangeLog][Windows] The application attributes AA_CompressTabletEvents and AA_CompressHighFrequencyEvents are now supported on Windows 8 and above for touch/pen input, with the same defaults as on X11 (compress touch events, don't compress tablet events) Task-number: QTBUG-44964 Task-number: QTBUG-60437 Change-Id: I1b11a043e2d71ee502895971fafb3a46306a89d8 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Doc: Remove extra \a command causing QDoc macro expansion errorPaul Wicking2018-09-141-1/+1
| | | | | | | | | | | | | | | Change-Id: I453a68a579e4fd519616cd1a9f934501b01ef44c Reviewed-by: Martin Smith <martin.smith@qt.io>
| | * Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-144-9/+30
| | |\ | | | | | | | | | | | | Change-Id: Ic4c1a8041dcfd143861c39e0014fbdaaa3fb25c6
| | | * sqlite: Fix QSqlError handling when opening/closing databaseFlorian Bruhin2018-09-131-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both sqlite3_open_v2 and sqlite3_close are documented to return an error code: https://www.sqlite.org/c3ref/open.html https://sqlite.org/c3ref/close.html However, those were ignored (other than checking whether the operation succeeded), causing QSqlError::nativeErrorCode() to always be "-1" when there was an error while opening/closing the database. Additionally, the error string needs to be read (via sqlite3_errmsg16) in qMakeError *before* d->access is set to 0, or the databaseText() will always be "out of memory" no matter what error actually happened. Task-number: QTBUG-70506 Change-Id: I75cbf178c9711442e640afd26c4502214d20c598 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * Detect when we are at the sentence boundaryAndy Shaw2018-09-131-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Samsung devices this would cause it to always to captalize each word even if it was not a new sentence. Therefore we use QTextBoundaryFinder to determine if it is a new sentence or not. Task-number: QTBUG-69398 Task-number: QTBUG-66531 Change-Id: I24bf36f09a2570acfefd4343551cb1720ddc6279 Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | | * Fix XCB on endian mismatched client and server with SHM offAllan Sandfeld Jensen2018-09-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If SHM is disabled, that code path already does its own bswaping. Change-Id: I6c17f6c5c5502c8f89098d38d931b6b8f50b2640 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | * bmp image handler: check for out of range image sizeEirik Aavitsland2018-09-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the decoder fail early to avoid spending time and memory on attempting to decode a corrupt image file. Change-Id: I874e04f3b43122d73f8e58c7a5bcc4a741b68264 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | ODBC: Correctly check if the field is within the fieldCache rangeAndy Shaw2018-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was found while running the ODBC tests. tst_QSqlQuery::isNull() accounts for this already. Change-Id: Idf99a85396d7aa4e69b89467f873b105ef946f7f Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | Fix spelling mistake in qimage.hTor Arne Vestbø2018-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2138318894587cc0b5f03af14a57b2a39509f0da Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * | macOS: Clarify what static mutex in QCocoaGLContext is used forTor Arne Vestbø2018-09-131-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I4af0b78dbecad40b2a73cdbdb09a8eb60efdb013 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | stylesheets: Don't fail silently with invalid background-imagesSergio Martins2018-09-161-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Print a qWarning, otherwise this is very hard to notice Change-Id: I882f97583071e786d5aa06f6eeb485da4fc646db Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* | | | Fix return value of GLib event dispatcher socketNotifierSourceCheckAndreas Hartmetz2018-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The wrong return value didn't seem to result in observable bugs. Change-Id: Iaba74d0acd4352af9be70498a7d5556bb1e02f5f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | GLib event dispatcher: fix iteration in source check in error caseAndreas Hartmetz2018-09-161-2/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | It was accessing the deleted current element in a potentially reallocated container. Change-Id: I81d86410907b7b0c20c2edc62ad256315606bc96 Reviewed-by: Andreas Hartmetz <ahartmetz@gmail.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QOffsetStringArray: fix compilation error with ICC18Mikhail Svetkin2018-09-141-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | error: expression must have a constant value static constexpr const auto messages = qOffsetStringArray( Change-Id: I80a6bf5b83f99a8325511ac8a14e0c9819e3d2b7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-1313-22/+122
|\| | | | | | | | | | | Change-Id: Icd201bf6b634e44e0e2ab05eaf91a7d8588d7f05
| * | SQL PostgreSQL/SQlite: Properly decode default varchar parameterChristian Ehrlicher2018-09-122-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | The default values for varchar columns were not decoded properly. Task-number: QTBUG-46968 Change-Id: Ie13d48c316cd694240f7e287010b97afc8c6c341 Reviewed-by: Robert Szefner <robertsz27@interia.pl> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * | Texture file support: add mipmap reading to ktx handlerv5.12.0-alpha1Eirik Aavitsland2018-09-121-10/+20
| | | | | | | | | | | | | | | Change-Id: Ic2c10b3e64d63d2272a8a3922d2b3f99dfd45bdb Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * | QVulkanWindow: Fix some load/store ops in the default renderpassLaszlo Agocs2018-09-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Stencil is - very likely - cleared just like depth. Also, switch to STORE_OP_STORE for the multisample buffer, for correctness. Change-Id: I31b56658286205af8551018115ca2abbe541be67 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * | QVulkanWindow: Fix bogus stage masks in readbackLaszlo Agocs2018-09-121-1/+1
| | | | | | | | | | | | | | | Change-Id: I08882a02204c95272b100647923c9903f825912c Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * | Fix device local alloc in hellovulkantextureLaszlo Agocs2018-09-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running with QT_VK_FORCE_STAGE_TEX does not work at all with recent NVIDIA drivers due to QVulkanWindow's and the example's naive way of picking the memory index. Enhance this and add a warning note to the QVulkanWindow docs as well. Change-Id: I7f200e11d982b56e3da3b71ee3915bd7bfca5cc1 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * | Add optimized fetch ARGB32 routines for NEONAllan Sandfeld Jensen2018-09-122-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | After convert and fetch were split, only convert was still NEON vectorized, while fetch is the more commonly used version. Change-Id: Iea2af7ccee6589b3d6e9908afeaae2d1ad2753be Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * | Doc: Fix typo and add precision to method descriptionPaul Wicking2018-09-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | As transform() returns worldTransform(), point out that it is an alias in its description. Fixes: QTBUG-18117 Change-Id: I0eb1f78c6955b499906024105f9969cdccf13303 Reviewed-by: Martin Smith <martin.smith@qt.io>
| * | ODBC: Remove the trailing \0 in the case of a non unicode stringAndy Shaw2018-09-111-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some ODBC drivers, such as old Informix ODBC drivers will incorrectly include a trailing \0 in a string when this should not exist. For unicode strings this was already accounted for, but for non-unicode ones this was not covered. The change also fixes up the comments a bit to make this clearer and also added one for the unicode case. Task-number: QTBUG-62406 Change-Id: Id932a58d9e5fdff2f4d1aacf8cc9fdaeb34f95f4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | macOS: Prevent flickering when resizing window rendered to by separate threadTor Arne Vestbø2018-09-111-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a window is resized AppKit groups all updates to the view frames and corresponding layer bounds, so that the result of the resize is visually atomic, but this only works for the main thread. http://openradar.appspot.com/radar?id=4990815088672768 When a separate thread renders to one of the views in the window, it may result in the view and its layer updating its bounds visually before the resize has been visually reflected for the window itself and its border. To ensure visually atomic updates, we disable all screen updates for the process during resizing. This is the same workaround used by e.g. the NSOpenPanel class, which renders the content of the view out of process, and by Chromium for a similar use-case: https://chromium-review.googlesource.com/c/chromium/src/+/798774 Ideally we'd do this only for the window that is being resized, but there's no known API to do that. The deprecated [NSWindow disableScreenUpdatesUntilFlush] is a no-op these days, and used NSDisableScreenUpdates internally anyways). Fixes: QTBUG-69321 Change-Id: I84de714782278f2e0b2b2e1eb245c30810cb3023 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Windows: Disable shader disk cache for Intel HD Graphics 620Friedemann Kleint2018-09-114-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set Qt::AA_DisableShaderDiskCache when the feature "disable_program_cache" (modeled after the Chromium driver bug list) is present and set it for the Intel HD Graphics 620 card. Task-number: QTBUG-64697 Change-Id: Ibba588d2ab296b5c959ab8ee9712b47ec7cc906e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Make updateSystemPrivate() local to qlocale.cppEdward Welbourne2018-09-113-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not thread-safe so should only be used within systemData()'s locked code. This eliminates the last callers of it by making it a local function of the compilation unit, exposing a method from QSystemLocale() to get round its use of private parts. Make the constructor for QSystemLocale only stomp its _systemLocale global if previously unset, but let instantiation still clear globalLocaleData.m_language_id, so that it can be used as a way to trigger an update to system locale data. Change-Id: I908dca9fd30bbf20f42321ab8f9094f2fa37b7b0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-1117-110/+99
|\| | | | | | | | | | | Change-Id: I1df9adea124326ef7c7802839eb93efc4302b287
| * | macOS: Use dark gradients for title and status bar in dark modeMorten Johan Sørvig2018-09-101-18/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were hardcoded to light colors, which made the QMainWindow status bar look out of place and made the (light) text hard to read. Hardcode to dark colors for DarkAqua which more or less match the native look. Keep the optimization where the Gradients are stored in static variabless. Change-Id: I3e75b42c41d3e2d18e4bc0f17d950a702ccad662 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Gabriel de Dietrich (DO NOT ADD TO REVIEWS) <gabriel.dedietrich@gmail.com>
| * | QStringList: restore binary compatibility with Qt 5.11David Faure2018-09-102-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 8b6100d512 removed bool QtPrivate::QStringList_contains(const QStringList *that, const QString &str, ...) (in favor of a QStringView overload). However this was used inline in qstringlist.h, so apps were referencing that symbol directly. As a result, upgrading to Qt 5.12 gave errors like libKF5ConfigCore.so.5.50.0: undefined reference to `QtPrivate::QStringList_contains(QStringList const*, QString const&, Qt::CaseSensitivity)@Qt_5' collect2: error: ld returned 1 exit status Change-Id: I862263a9b06157052df894a201dfd86df8c3f4fe Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
| * | Merge "Merge remote-tracking branch 'origin/5.11' into 5.12" into ↵Liang Qi2018-09-106-27/+15
| |\ \ | | | | | | | | | | | | refs/staging/5.12
| | * | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-09-106-27/+15
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/common/macx.conf Change-Id: I8576493b417912fa5e5501bc2c1b935d186ac209
| | | * Merge remote-tracking branch 'origin/5.11.2' into 5.11Qt Forward Merge Bot2018-09-097-32/+46
| | | |\ | | | | | | | | | | | | | | | Change-Id: I2fa26fa061cbf5d2bded203a299a19b7d1c31d0a
| | | | * Revert "macOS: Force light theme on macOS 10.14+"Morten Johan Sørvig2018-09-031-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does not really work: as soon as you build with the 10.14 SDK you opt-in to having updated palette management, which the Qt 5.11 series does not have. This leaves app developers with two ways to opt-out of dark mode: - Build with the 10.13 (or earlier) SDK. - Set NSRequiresAquaSystemAppearance in Info.plist This reverts commit 04671a80db32bd7fce470c50934cf60f2e8ffa70. Change-Id: I5c01b9965da45de914f699526ba0723837f36e1d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
| | | | * Make QMacCocoaViewContainer work againMorten Johan Sørvig2018-09-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The widget visibility state was set to explicitly hidden, which was preventing it from working correctly when its parent widget was shown. This regression was introduced by commit d7a9e08, which made QWindow::setVisible() call QWidget::setVisible(). QWindow::destroy() calls QWindow::setVisible(false), which means that the destroy() call in setCocoaView() would set the CoocaViewContainer to be explicitly hidden. Clear WA_WState_Hidden to work around this behavior. Task-number: QTBUG-67504 Change-Id: I77438fcd01f165f058eea178c214838bd4f27084 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | | * QMacStyle: Make helper-NSViews layer-backedTor Arne Vestbø2018-08-281-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This prevents the view from triggering display of its superview when being temporarily added, which is both inefficient and causes issues when those dirty-rects are wrong due to the wrong frame position of the added view. The additional drawRect: calls and corresponding expose events resulting from the needsDisplay calls also caused repaint issues in Qt Widgets. QWidgetBackingStore doesn't seem to take the exposed region into account for an expose event, and will try to flush all dirty regions. Some of those may be outside the exposed region, and will be clipped away by the window system, never ending up on the screen, but with Widgets still thinking it has flushed all dirty regions. This is a separate issue, possibly solvable by setting the wantsDefaultClipping property on NSView to NO, but this needs further testing, so applying this commit as workaround makes sense, even if it's just hiding the real bug. Task-number: QTBUG-67998 Task-number: QTBUG-68023 Task-number: QTBUG-69990 Task-number: QTBUG-69740 Task-number: QTBUG-69292 Task-number: QTBUG-69332 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 38979332d0a66666ebd178bccd7e7a2b300a7e42) Change-Id: I4ef3fef29f749daa4f3a11fe9186ae77b359f966 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | | * Doc: Fix typos in QRectF documentationPaul Wicking2018-08-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing 's'. Fixes: QTWEBSITE-823 Change-Id: I1acd3b7ae18982248bf3402fa5943ee95c1efdbe Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| | | | * Doc: Remove non-reentrant from QDomDocument::setContentPaul Wicking2018-08-271-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following QTBUG-40015, QDomDocument::setContent is reentrant. This change updates the documentation accordingly. Fixes: QTBUG-69920 Change-Id: Id09e3541156f52d1a976afd02b410c263d3b3352 Reviewed-by: David Faure <david.faure@kdab.com>
| | | | * Merge 5.11 into 5.11.2Frederik Gladhorn2018-08-275-22/+21
| | | | |\ | | | | | | | | | | | | | | | | | | Change-Id: I672bc167de3801c944315d92120c5e03da69e9c7
| | | | * | Fix crash when combining QOpenGLWidget, QStaticText and Qt QuickEskil Abrahamsen Blomfeldt2018-08-242-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under certain circumstances, if you had a widget with a QOpenGLPaintEngine, and drew QStaticText into this, and then later had Qt Quick access the same cache and try to resize it, we would get a crash because the resize function would have a pointer to the paint engine and try to access its shader manager (which would now be null, since this is outside the begin()/end() phase of the paint engine. The solution is to reset the paint engine pointer to null on the cache once it has been populated and it is no longer needed. [ChangeLog][QtGui][Text] Fixed a possible crash when combining QStaticText, QOpenGLWidget and Qt Quick in the same application. Task-number: QTBUG-70096 Change-Id: I7383ad7456d1a72499cfcd2da09a5a808d4b3eff Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | | macOS: Release surfaces straight away when reconfiguring QCocoaGLContextTor Arne Vestbø2018-09-101-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling setView or update on NSOpenGLContext results in recreating the internal GL surfaces of the view. Unfortunately there seems to be a fixed amount of these surfaces available, so if we spin a loop where we for some reason end up recreating them, we'll easily run out, and lock up the whole window system: thread #6, name = 'SwapThread' frame #0: 0x00007fff7b45220a libsystem_kernel.dylib`mach_msg_trap + 10 frame #1: 0x00007fff7b451724 libsystem_kernel.dylib`mach_msg + 60 frame #2: 0x00007fff751c1675 SkyLight`SLSBindSurface + 247 frame #3: 0x00007fff5d9c4328 OpenGL`___lldb_unnamed_symbol29$$OpenGL + 255 frame #4: 0x00007fff6bf42c33 libGPUSupportMercury.dylib`gldAttachDrawable + 364 frame #5: 0x00007fff5d9e61e7 GLEngine`gliAttachDrawableWithOptions + 257 frame #6: 0x00007fff5d9c4bb0 OpenGL`___lldb_unnamed_symbol38$$OpenGL + 969 frame #7: 0x00007fff5d9c8b0e OpenGL`___lldb_unnamed_symbol57$$OpenGL + 82 frame #8: 0x00007fff5d9c8e55 OpenGL`CGLSetSurface + 330 frame #9: 0x00007fff50d0eb2c AppKit`NSOpenGLContextAttachOffScreenViewSurface + 352 This can happen e.g. when resizing the application, where AppKit itself spins a loop where we don't end up back in QCocoaEventDispatcher::processEvents() for each pass (where we do have a local pool). Or it can happen in the render-loop of a render-thread that doesn't use the event dispatcher. Change-Id: Iaf2f879dd01e3d807d0f35705ccc978dbc89036b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | | QDtls and QDtlsClientVerifier - add destructorsTimur Pocheptsov2018-09-102-0/+16
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While these destructors are essentially trivial and contain no code, the classes inherit QObject and thus have virtual tables. For such classes -Wweak-vtable generates a warning: "'Class' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit." Noticed this after updating QtCreator to the latest version. Change-Id: Iacb5d0cd49353bd35260aff736652542bb1ef197 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | | | moc: Fix compilation of text strings containing non-ASCIIThiago Macieira2018-09-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On platforms where char is signed, like x86, the following is an error (narrowing conversion): unsigned char x[] = { '\xc3' }; Change-Id: I495bc19409f348069f5bfffd15518f9ef4e43faf Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | | macOS: Use NSOpenGLContext's drawable directly to track active drawableTor Arne Vestbø2018-09-095-64/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need a separate QWindow pointer to keep track of the active window, it's recorded already by the NSOpenGLContext's drawable. And we don't need to juggle the drawable when the window is hidden, the drawable is still valid after the window is re-shown, and we call update on every frame (for now) anyways, which will reconfigure the drawable if needed. Change-Id: I199b6c027226dd239c13ecc4aba86986ca09a1eb Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-1011-26/+55
|\| | | | | | | | | | | | | | | | | | | Change-Id: If1baf48f0f396fb223672d14f0e1847ac42ca1a6
| * | | | QTableView: Fix PageUp not getting to top when first row is hiddenChristian Ehrlicher2018-09-091-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the first row(s) of a QTableView is hidden, PageUp could not reach the first visible row because logicalRow(0) is taken without checking if the row is visible. Task-number: QTBUG-70215 Change-Id: Ic7820352b8988accb685ea7d16908d3fa8bf2847 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>