summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* cups: Take conflicts for duplex and page size into accountAlbert Astals Cid2018-03-277-53/+244
| | | | | | | | | | | | | | Duplex and Page Size are not shown in the "Advanced" options tag since they are more important options, this means we were not taking them into account for ppd conflicts since we never set their values in the ppd, we do use the new-style cups options for them when printing With this patch we add m_pageSizePpdOption and m_duplexPpdOption to set the values to the ppd struct behind the scenes. Change-Id: I48bd9fe93d0c08b7b8dd9620a07c56fc79cce13b Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Fix build issue on macOSFilipe Azevedo2018-03-261-0/+2
| | | | | Change-Id: Ib3aa37242e9bf66c3fc3d232ead1e6ef4d4bc485 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Initialize m_cupsCodecJesus Fernandez2018-03-261-1/+1
| | | | | | | | | | Ensure initialization of m_cupsCodec to nullptr. The codec is checking the value of m_cupsCodec; but the initialization was conditional before this patch. Change-Id: I81751b7743e9956f31f17cead01dc05e268db7eb Coverity-Id: 188700 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Cocoa: Deliver window activation events synchronouslyMorten Johan Sørvig2018-03-261-2/+2
| | | | | | | | | This prevents delivering queued activation events to windows that have been hidden or destroyed. Task-number: QTBUG-66536 Change-Id: I4edf86b6c8592751130f836876725c786452933c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add QTimer::connectTo(), a shorthand way of connecting to timeout()Sergio Martins2018-03-253-0/+82
| | | | | | | | | | | | | | | | | | | | | | There are a couple of Qt classes where you almost always use the same signal, for example QTimer::timeout, QPushButton::clicked, and QAction::triggered. Simply doing timer.connectTo([]{}) is much more convenient, less tedious and even fun. Not overloading connect() as it would be confusing to see the receiver as first argument. And not naming it onTimeout, as that's a popular way of doing it in other frameworks. People would assume you could use on* with any signal. If we ever have on* it should be all or nothing. [ChangeLog][QtCore] Added QTimer::connectTo(), a shorthand way of connecting to the timeout() signal. Change-Id: Ida57e5442b13d50972ed585c3ea7be07e3d8e8d2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Update READMEs for the bundled xcb sources and the xcb pluginAlexander Volkov2018-03-232-18/+3
| | | | | | | | | | | | Mention that the current minimal supported version of libxcb is 1.9.1, amend 1f5d791708d5d256a76872f254251dac66e82cdb. Remove the specific package requirements for the xcb plugin: these lists are unmaintained and besides there are build instructions in wiki: https://wiki.qt.io/Building_Qt_5_from_Git Change-Id: I4d5b0583a1ba8a355ee1649022845f6c8d520e7c Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Move QWindowsCaRootFetcher to its own fileMårten Nordheim2018-03-235-131/+251
| | | | | | | In preparation for its usage in QDtls. Change-Id: I7b28ac060e350228839461dc027c809af9ff73a4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Benchmark/QImageReader: remove unused dependenciesChristian Ehrlicher2018-03-233-6/+0
| | | | | | | | QImagereader benchmark does neither depend on network nor widgets. Therefore those two dependencies can be removed here. Change-Id: Ic127b2668e22608774ce5878454f4a96ef591f6b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Add a legacy-free QWheelEvent constructorShawn Rutledge2018-03-232-2/+43
| | | | | | | | | | | qt4Delta and qt4Orientation have been "deprecated" ever since Qt 5.0 (even though widgets continue to depend on those properties). This is mainly for use in Qt Quick right now, but can be used everywhere later on. Change-Id: If0b163766c8ad8efa268edaa4f1ac1e8926f9003 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Unify QPlatformPrintDevice constructorsAlbert Astals Cid2018-03-232-19/+1
| | | | | Change-Id: I01714a626e204c73456ebed987055662331d6a3a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Remove unused QPpdPrintDevice constructorAlbert Astals Cid2018-03-232-8/+0
| | | | | Change-Id: I19a6cddebfbd1b72f01feae8873a634348cdc926 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Update gradle filesBogDan Vatra2018-03-235-12/+11
| | | | | Change-Id: I7324082ef9eb19cb0851a0a53e8e41ee8f174210 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Allow adaptive decimal stepping for QSpinBox and QDoubleSpinBoxHarald Nordgren2018-03-227-1/+358
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the feature of adaptive decimal step sizes for the QSpinBox and QDoubleSpinBox. By performing a calculation in QAbstractSpinBox::stepBy() we continuously set the step size one power of ten below the current value. So when the value is 1100, the step is set to 100, so stepping up once increases it to 1200. For 1200 stepping up takes it to 1300. For negative values stepping down from -1100 goes to -1200. It also works for all decimal values. 0.041 is increased to 0.042 by stepping once, and so on. The step direction is taken into account to handle edges cases, so that stepping down from 100 takes the value to 99 instead of 90. Thus, a step up followed by a step down -- or vice versa -- lands on the starting value; 99 -> 100 -> 99. Setting this property effectively disregards singleStep, but preserves its value so that it takes effect again when adaptive decimal step is disabled. Adaptive decimal step allows values to be easily set to reasonable levels. If the spin box value is 12000, changing to 13000 often makes more sense than to 12001. The feature is turned off be default, when single stepping is desired. The accelerated property allows values to be changed quickly, as well, but it is imprecise. Holding down the button makes it hard to land on an even thousand, like 12000 or 13000. Often you end up somewhere nearby and would need a second adjustment to get to an even hundred or thousand. [ChangeLog][QtWidgets] Add option of adaptive decimal step size for QSpinBox and QDoubleSpinBox. Change-Id: I9f286479b821e240c8ea05c238932fc128c582bb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* xcb: Use XCB instead of Xlib for XInputAlexander Volkov2018-03-2211-456/+375
| | | | | | | | | | | | | | | | | | | | | | | - Replace xinput2 feature by xcb-xinput, which doesn't depend on xcb-xlib - Remove xi2PrepareXIGenericDeviceEvent() that was used to fix incompatibilty between XCB and libXi structs - Drop XCB_USE_XINPUT21 and XCB_USE_XINPUT22 defines that were needed with libXi Although xcb-xinput was released in version 1.13 of libxcb, it was quite stable in version 1.12, and the parts that we use did not change between versions, so require system xcb-xinput 1.12. [ChangeLog][X11] The xcb plugin was ported to use libxcb-xinput instead of libXi for XInput2 support. The -xinput2 configure option was replaced by -xcb-xinput. Task-number: QTBUG-39624 Change-Id: I37475b09b2bd7057763345c3f33d8c7751a4e831 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Avoid destStore64 when pixels are just repeatingAllan Sandfeld Jensen2018-03-221-0/+57
| | | | | | | | | | The destStore64 operation can be expensive, so when the pixels are just repeating, avoid using it and the composition, and just repeat the first generated part. Change-Id: I6e21594a9abecdc245010b956acbaa60e3fb21a3 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Cocoa: Remove m_viewIsEmbedded and m_ViewIsToBeEmbeddedMorten Johan Sørvig2018-03-214-30/+31
| | | | | | | | | | | | Implement QCocoaWindow::isEmbedded() which detects this property based on parent view and window type. This avoids having to use a setter function to set the state. The detection can’t handle all cases, but should be sufficient for our use case. Change-Id: I12a5b90b4e4a7e10714f7275ae001e99c9361e2c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-2163-1022/+724
|\ | | | | | | Change-Id: I35a6555e3885e489f88aa9b4b0142e1017f7a959
| * Fix subpixel rendering on Windows/FreeTypeSergio Martins2018-03-201-4/+0
| | | | | | | | | | | | | | | | | | | | FT_LCD_FILTER_H wasn't defined because we weren't including the header. To fix it just remove the checks, as was done for Linux and assume sub-pixel is there. If it's not then no harm done, it won't use any. Change-Id: I76f50cb17e41621c45c03cb7d5c75c110557ea68 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Expose gdb-index as configure argumentAllan Sandfeld Jensen2018-03-202-0/+3
| | | | | | | | | | | | | | | | We report it in the overview, but left no way of controlling it Change-Id: I1d31f2e31bb32566f47069c3776e41033ffb1891 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Switch lancelot from QRegExp to QRegularExpressionsAllan Sandfeld Jensen2018-03-202-283/+288
| | | | | | | | | | | | | | | | They are faster, and using them makes it paint commands be the most CPU intensive part of lancelot instead of regular-expression matching. Change-Id: Ifabf1081c48a83ce089660049051428fd3a43042 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * Modernize the "regularexpression" featureUlf Hermann2018-03-2028-117/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | Use QT_CONFIG(regularexpression), disentangle it from QT_BOOTSTRAPPED, switch it off in the bootstrap build, remove the #ifdefs from qregularexpression.{h|cpp}, and add QT_REQUIRE_CONFIG(regularexpression) to the header. qregularexpression.{h|cpp} are already correctly excluded in tools.pri if !qtConfig(regularexpression). Change-Id: I21de154a6a118b76f99003d3acb72ac1e220d302 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Gui: Properly use the standarditemmodel featureUlf Hermann2018-03-204-13/+6
| | | | | | | | | | | | | | | | Require it in the headers and exclude the implementation from the build if disabled. Change-Id: Ida3303f8595f47b469e92d68e8bccc3957d943b6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Fix infinite recursion on stack trying load empty glyhsLars Knoll2018-03-201-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Loading empty glyphs in some fonts would cause the application to crash with an infinite recusion on the stack between qfontengine and qfontengine_ft: 12 0x00007ffff6954395 in QFontEngine::alphaMapForGlyph (this=0x7fb0c0, glyph=50, subPixelPosition=..., t=...) at text/qfontengine.cpp:877 13 0x00007fffee7d104e in QFontEngineFT::alphaMapForGlyph (this=0x7fb0c0, g=50, subPixelPosition=..., t=...) at freetype/qfontengine_ft.cpp:2096 14 0x00007fffee7d0ea8 in QFontEngineFT::alphaMapForGlyph (this=0x7fb0c0, g=50, subPixelPosition=...) at freetype/qfontengine_ft.cpp:2078 15 0x00007ffff6954395 in QFontEngine::alphaMapForGlyph (this=0x7fb0c0, glyph=50, subPixelPosition=..., t=...) at text/qfontengine.cpp:877 16 0x00007fffee7d104e in QFontEngineFT::alphaMapForGlyph (this=0x7fb0c0, g=50, subPixelPosition=..., t=...) at freetype/qfontengine_ft.cpp:2096 17 0x00007fffee7d0ea8 in QFontEngineFT::alphaMapForGlyph (this=0x7fb0c0, g=50, subPixelPosition=...) at freetype/qfontengine_ft.cpp:2078 18 0x00007ffff6954395 in QFontEngine::alphaMapForGlyph (this=0x7fb0c0, glyph=50, subPixelPosition=..., t=...) at text/qfontengine.cpp:877 ... Fix this by trusting the freetype fontengine that it could load the glyph, as the base class anyway can't do better. Task-number: QTBUG-62331 Task-number: QTBUG-66617 Change-Id: I6c7c24d24ec0f71a66fa519c04a336f276e418f6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * Fix display recognition for IBUSLars Knoll2018-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | The parsing of the DISPLAY environment variable was wrong, and only worked by accident for DISPLAY=':[0-9]'. Task-number: QTBUG-62068 Change-Id: I6860e3907c9b1ad6e538d1b5d08628cd306b4aa1 Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * widgets: Add a QT_CONFIG(style_stylesheet) guardMikhail Svetkin2018-03-201-3/+7
| | | | | | | | | | | | | | for isWindowsStyle in QDockWidget Change-Id: Id471b91a415f1a677ced6022bdd05b7e1b72aad2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * Fix CONFIG+=qtquickcompiler and immediate resources with shadow buildsSimon Hausmann2018-03-201-2/+2
| | | | | | | | | | | | | | | | | | Generated files should be added to RESOURCES with an absolute path. Task-number: QTBUG-67011 Change-Id: Ief82b576824df9abd0901970f076e30dfe57b7d0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Windows QPA: Fix potential crash in leave event handlingFriedemann Kleint2018-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | Add a check for window != nullptr. Amends af5c8d04fb0c9ddda58925e4862e857c78a5e563. Task-number: QTBUG-67101 Task-number: QTBUG-57864 Change-Id: I2bbbbe514fc494fd569d0932d508c53c0544f665 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * QSharedDataPointer: use swap-and-move in the move constructorThiago Macieira2018-03-191-2/+10
| | | | | | | | | | | | | | | | | | | | This makes the pointer that was in the moved-into object be destroyed before the return of this function (if the reference count was 1), instead of letting it live in the moved-from object. Task-number: QTBUG-66322 Change-Id: I3debfc11127e4516b505fffd151209292bd3adaa Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * QSemaphore: add minor optimization for 64-bit Linux systemsThiago Macieira2018-03-191-0/+7
| | | | | | | | | | | | | | | | Since we won't use the high bit of the low 32-bit word at all, we don't need the AND with 0x7fffffff either. Just cast. Change-Id: I72f5230ad59948f784eafffd151aa5a7dee995db Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * QSemaphore: fix deadlock when the woken up thread wakes up anotherThiago Macieira2018-03-192-43/+157
| | | | | | | | | | | | | | | | | | | | | | | | When the thread that got woken up by release() is supposed to release() to wake up another thread, we were deadlocking. This happened because we cleared the bit indicating that there was contention when the first release(). Instead of storing a single bit, we now store the number of threads waiting. Task-number: QTBUG-66875 Change-Id: I72f5230ad59948f784eafffd15193873502ecba4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Remove src/corelib/arch, merging with src/corelib/threadThiago Macieira2018-03-195-6/+4
| | | | | | | | | | | | | | There is no more architecture-specific code. Change-Id: Ie9d9215342d449c48a11fffd151d11411cd73fc7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Atomics: remove qatomic_msvc.hThiago Macieira2018-03-193-501/+2
| | | | | | | | | | | | | | | | | | No longer needed. The comment about missing constexpr support is incorrect: MSVC 2015 does have constexpr issues, but they don't affect our use of std::atomic. Change-Id: Ie9d9215342d449c48a11fffd151d11208137f00d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Atomic: silence MSVC warning in the generic fetchAndSubThiago Macieira2018-03-191-0/+3
| | | | | | | | | | | | | | | | | | MSVC atomics still use the generic version, instead of qatomic_cxx11.h. The implementation of fetchAndSub is implemented on top of fetchAndAdd, but produced a warning with unsigned types. Change-Id: I72f5230ad59948f784eafffd151aa53435b75298 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * tst_QOpenGLWindow: Move resizing to separate testJohan Klokkhammer Helsing2018-03-191-2/+23
| | | | | | | | | | | | | | | | | | | | Resizing is broken on Wayland EGL on Intel Mesa. Move resizing into a separate test and skip it on Wayland it until it's fixed in Mesa. Task-number: QTBUG-66848 Change-Id: I9450a5a588b0f5d8f0bd0210aae2dc72aa48d622 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * QPixmap don't assume QPlatformScreen::format is opaqueJohan Klokkhammer Helsing2018-03-194-19/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QRasterPlatformPixmap::systemOpaqueFormat returned QPlatformScreen::format without checking that the format was actually opaque. This caused several QPixmap tests to fail on Wayland because Wayland compositors don't communicate the native format of the screen, just a list of supported pixel formats, so we just return ARGB32_premultiplied in QWaylandScreen::format(). Rename the method systemOpaqueFormat to systemNativeFormat since that's how it's used most of the time. And do a conversion when we actually care whether the format is opaque or not. Task-number: QTBUG-51748 Change-Id: I47dc1c3f185fb802016ca361206d47d02e8d3cf1 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Fix QPageLayout() not initializing unitsAlbert Astals Cid2018-03-191-8/+1
| | | | | | | | | | | | | | | | by using the other QPageLayout constructor Task-number: QTBUG-47551 Change-Id: I9c3635d4a460437febefdfb9d259d508b61c1f29 Reviewed-by: David Faure <david.faure@kdab.com>
| * q{,Utf8}Printable: avoid creating a copy of a QStringThiago Macieira2018-03-182-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have this QString() constructor call to permit things that convert to QString but aren't QString to be used in qPrintable, like a QStringBuilder-powered fast operator+ expression, like: qPrintable(string1 + ": " + string2) Unfortunately, it meant that we unnecessarily created a QString copy if the input was already QString. Change-Id: Iecab8770aa5840aba8edfffd1516bc94cec791a9 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * MySQL: Fix testsAndy Shaw2018-03-172-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following: - tst_QSqlDatabase::recordMySQL() to account for performance improvements done for small integral types - tst_QSqlQuery::nextResult() so that NUMERIC results are seen as doubles - tst_QSqlQuery::timeStampParsing() so that MySQL accepts the CREATE TABLE statement Change-Id: I68fb1d06dac12d500bb4596463f5bdd65cc9c226 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * XCode: Fix the output paths for extra compilers with fileFixify()Andy Shaw2018-03-171-1/+2
| | | | | | | | | | | | | | | | | | This ensures that the generated XCode project can correctly find any files that are referenced via a path containing "..". Task-number: QTBUG-35131 Change-Id: I049bc2279b4c515a82acd61142d25b8c240e8f6e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * sqlite: Prevent a crash when sqlite does not detect any parametersAndy Shaw2018-03-172-1/+45
| | | | | | | | | | | | | | | | | | | | | | | | When using a virtual table inside a SQLite database it is possible that it does not report the right number of parameters. Therefore we need to account for this case to prevent it from crashing when trying to bind parameters it thinks does not exist. Task-number: QTBUG-66816 Change-Id: I3ff70bb1fe73091f43c3df53616f75858e451cfd Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | macOS: Make [QNSView wantsLayer] declarativeTor Arne Vestbø2018-03-212-3/+12
| | | | | | | | | | Change-Id: Ib5dc8178293d13542a54d51484181debd57580f5 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | Add xcb-xinput to 3rd party libsAlexander Volkov2018-03-204-2/+23467
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The added xcb-xinput code was produced by build of libxcb 1.13 with xcb-proto 1.13. The following parts were removed from it: - Pointer Barriers API (requires xcb-xfixes 1.9 with xcb-proto 1.9) - SendExtensionEvent API (requires definition of xcb_raw_generic_event_t from libxcb 1.13) [ChangeLog][Third-Party Code] Sources of xcb-xinput 1.13 were bundled and are available via -qt-xcb. Change-Id: I43d2f43bee0ba874d099c9fb858e74b0e3edc970 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Bump up the required libxcb version to 1.9Alexander Volkov2018-03-2018-714/+4109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...and update bundled xcb sources to libxcb 1.9.1 with xcb-proto 1.8. These are the minimal versions of libxcb and xcb-proto available on officially supported platforms (they are present on RHEL 6.6). Remove support_libxcb_versions_where_xcb_sumof_not_available.patch and revert it for xkb.c, because libxcb 1.9 implements xcb_sumof(). This change makes it easier to bundle xcb libs from newer versions of libxcb (e.g. xcb-xinput). [ChangeLog][Third-Party Code][X11] The minimal required version of libxcb is now 1.9. Bundled xcb sources were updated to libxcb 1.9.1 built with xcb-proto 1.8. Change-Id: Iebcd05656c4a5ed5dd95e898d497acef857423f0 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | macOS: Provide helper property for resolving the display ID of a screenTor Arne Vestbø2018-03-203-3/+15
| | | | | | | | | | Change-Id: I144bd33a2c122d53ea1435a53483a3d8b46fd093 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | macOS: Remove stray qDebug in [QNSView setNeedsDisplayInRect:]Tor Arne Vestbø2018-03-201-1/+0
| | | | | | | | | | Change-Id: Ia253edf84bc0c890f291499ed2635d8287b18327 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | Update rasterwindow example to not render in resizeEventTor Arne Vestbø2018-03-202-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The resize event should not be used to draw, as there will be a follow-up exposeEvent delivered just after, and we don't want to draw twice. This is how QRasterWindow operates too, except it defers the backingstore resize to beginPaint() instead of resizing in the reizeEvent. It's also how QOpenGLWindow operates, which also has a note for the virtual resizeGL method saying: "Scheduling updates from here is not necessary. The windowing systems will send expose events that trigger an update automatically." Change-Id: I2a9740018508c2eb129149f53237ee8e378c03b1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Clarify that QExposeEvent/exposeEvent handles any invalidation of the windowTor Arne Vestbø2018-03-202-7/+9
| | | | | | | | | | Change-Id: Ib6f649213e3268c6946c7fa973ce970e896a46a0 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | macOS: Do layer updates via the CALayerDelegate protocolTor Arne Vestbø2018-03-202-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The updateLayer function is only called when the layer is a _NSViewBackingLayer instance, which is what the default implementation of [NSView makeBackingLayer] returns. Once we move to optionally returning a CAMetalLayer, we need to use the more generic displayLayer: API, so we do that now as a first step. This matches the way we draw and send expose events on iOS. Change-Id: I49721ff005ca9dfddebff645705f96b5ab46abb4 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | macOS: Move QNSView drawing related functionality to its own fileTor Arne Vestbø2018-03-203-117/+172
| | | | | | | | | | Change-Id: Iaeaa5c57368445a1fd67d110823c919aa7173a7a Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Share and cache QRegExp engines where possibleLars Knoll2018-03-201-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | QRegExpEngine is immutable once created, so we can easily share them between different QRegExp instances. This requires a QHash for engines that are currently in use in addition to the cache for currently unused engines. Task-number: QTBUG-65710 Change-Id: I165c12a7b065c488ecd14258a7cdfe0e62666632 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>