summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* QVulkanWindow: use QVector, not QSet, for small int setMarc Mutz2017-05-225-9/+9
| | | | | | | | | | Apart from being more efficient to construct and test, for the expected very small number of entries, the example code itself shows that a sorted vector is much more useful than an unordered set. Change-Id: Ic5e38df0176ac4be08eac6a89c2e1cabab2a9020 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Remove a QT_STRICT_ITERATORS ifdefSérgio Martins2017-05-201-6/+1
| | | | | | | | Having special code paths defeats the purpose of QT_STRICT_ITERATORS and is ugly. Change-Id: Ie0bdbf1a9639a0903bcd020f526629ab2e69883b Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QWidgetWindow: Forward incoming events with their original spontaneous stateTor Arne Vestbø2017-05-203-25/+41
| | | | | | | | | | | | | | | The events may come from QPA, as spontaneous events, or from other parts of Qt, as non-spontaneous events. We should keep the state of the original event. Introduces QCoreApplication::forwardEvent() as a wrapper around the opaquely named notifyInternal2. Ideally this would be the behavior of sendEvent, with an enum argument to override the flag, but that ship has sailed. Change-Id: Ib0209f2b99744bd10590c63239ee7a97b60be4fd Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* macOS: Ctrl LMB override can be set on a per window basisMartin Porcelli2017-05-192-8/+4
| | | | | | | | | QNSView instances check the _q_platform_MacDontOverrideCtrlLMB window property along with the QT_MAC_DONT_OVERRIDE_CTRL_LMB environment variable during creation. Change-Id: Id6457fccdce2dff1fa83448dd2bc4d2757a87e9d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* QNSPanelContentsWrapper - call [super layout]Timur Pocheptsov2017-05-181-0/+1
| | | | | | | | | | Docs say that we have to explicitly call [super layout] from the overriding -layout. On macOS < 10.12 missing -layout call results in a noisy debug message. Task-number: QTBUG-58699 Change-Id: I58ce442f1e3640a6b1ec32774078e2385d73f085 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Add QPolygon::intersects() methodsAllan Sandfeld Jensen2017-05-183-0/+89
| | | | | | | | | Corresponds to the similar function QPainterPath::intersects() and is faster than calculating the intersection and then checking if it is empty. Change-Id: I694bb2206ed330a456a41d4118a952a68177b7a2 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* winrt: Skip host lookup for http connectionsOliver Wolff2017-05-181-0/+8
| | | | | | | | | | | | | While QAbstractSocket is already changed in a way that winrt only connects to host names and does not do IP lookups, http connections still do a lookup to check, whether to use IPv4 or IPv6. As this information is not needed on winrt anyways and hostnames are to be preferred over IP addresses on winrt (automatic lookup & proxy handling internally), we skip the lookup for http as well. Task-number: QTBUG-59989 Change-Id: Ibc11f5ac07faf23e7af508fd20ee4880b24f79a8 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* improve docs for qfloat16Glen Mabey2017-05-171-1/+5
| | | | | | | | | added a proper \title, \ingroup, and \brief Change-Id: I85ac845d8e5415793e6de02cd653c60e2712faa5 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Glen Mabey <Glen.Mabey@swri.org> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Add debug operators for QOpenGLVersionProfile QOpenGLContext(Group)Friedemann Kleint2017-05-172-0/+62
| | | | | Change-Id: I2bf06761bc3a19aa1f0973d9b2f32cec4cbdca0c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QMacStyle: Remove unused default button logicGabriel de Dietrich2017-05-162-47/+6
| | | | | | | | The auto-default button part must remain, but the pulsating animation logic can go. Same for the pressed button logic. Change-Id: I0e9a755f86601780a219296fbc02a1eb2b703aea Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Add swap and move operator to QHostInfoJesus Fernandez2017-05-163-0/+51
| | | | | | | | | | Also mark as shared-come-qt6, [ChangeLog][QtNetwork][QHostInfo] Added swap() and move operator. Change-Id: I8f422868f0487a37aeba3bc74685dc4912e9b3a4 Coverity-Id: 168204 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QStringView/QLatin1String: add trimmed()Marc Mutz2017-05-166-1/+71
| | | | | | | | | | | | | | | | | | | ... using the same qt_trimmed(), qTrimmed(), Q..::trimmed() split we've been using for all other out-of-line string-view member functions to avoid forcing string-view objects onto the stack for the passing of 'this'. In the test, had to fix nullness not being propagated from a QByteArray to the QLatin1String constructed from it. Probably worth fixing in QLatin1String(QByteArray), too. [ChangeLog][QtCore] Added qTrimmed() free functions. [ChangeLog][QtCore][QLatin1String] Added trimmed() function. Change-Id: I73c18ef87e203f30f7552c10dd5c84223bcfae0e Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QLatin1String: add constructor from pointer pairMarc Mutz2017-05-162-0/+20
| | | | | | | | | | | | | This is often more natural than (ptr, len), and I need it in the implementation of QLatin1String::trimmed(). [ChangeLog][QtCore][QLatin1String] Added a constructor taking two pointers, complementing the constructor that takes a pointer and a length. Change-Id: I0606fa0e3f820af1c3c1e261a340e5a941443e4f Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QStringView: add constructor from pointer pairMarc Mutz2017-05-163-0/+99
| | | | | | | | | This is often more natural than (ptr, len), and I need it in the implementation of QStringView::trimmed(). Change-Id: I1d99b5ddaf76eee0582150b0233ef6ce9c37d25d Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Move Q_REQUIRED_RESULT to first in line in qstringalgorithms.hMarc Mutz2017-05-161-8/+8
| | | | | | | | Necessary to support C++17's [[nodiscard]] attribute, which needs to be placed at the beginning of a function declaration. Change-Id: I31494d13c7be558e86378782ab8684ef2956730b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* xcb: rename QXcbConnection::{setButton,buttons,m_buttons}Gatis Paeglis2017-05-163-18/+18
| | | | | | | | | | | | ... to {setButtonState,buttonState,m_buttonState}. This is more consistent with the naming from XCB events: xcb_button_press_event_t->state xcb_button_release_event_t->state xcb_motion_notify_event_t->state Change-Id: I51ebb858defbdfee4a2009922178f0e58658e6b6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Simplify code by factoring out brush transformation for gradientsEirik Aavitsland2017-05-154-51/+235
| | | | | | | | | | Emulation of non-logical coordinate mode gradients was implemented by essentially 3 x 2 repetitions of the same manipulation of the QBrush transform. Avoid the code duplication by extracting a common method. Add lancelot test scripts that excersizes these code paths. Change-Id: I7baa921923231ef9e83e443dba996b82b32ad1e7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* tablet example: enable high-DPI renderingShawn Rutledge2017-05-152-16/+25
| | | | | | Change-Id: Ie03867208902fdc9cf794de16d7249c8994351f4 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: Move disclosure triangle into cocoaCell() logicGabriel de Dietrich2017-05-152-11/+11
| | | | | Change-Id: Ica7766dabba57af3107ea275aa48514bc65158fb Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Use NSStepperCell for QSpinBox buttonsGabriel de Dietrich2017-05-152-65/+71
| | | | | | | Includes painting and subcontrol rectangles. Change-Id: I9a4c704bdea4f20f8dca94de24063f3e14dbaf91 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Remove a couple void *, dead codeGabriel de Dietrich2017-05-152-20/+13
| | | | | Change-Id: If05fbdf8cc5ced81adfd75232313969223bf1453 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Move NSScrollers into cocoaControl() logicGabriel de Dietrich2017-05-152-15/+11
| | | | | | | This patch amends b1131074199aae97. Change-Id: Ib305554763457ae4b5a441e41947304cff2853a2 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Refactor NSGraphicsContext setup logicGabriel de Dietrich2017-05-152-24/+30
| | | | | Change-Id: I00d473454bf970ef55f44d6094039b3f02221155 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Remove brushed metal related codeGabriel de Dietrich2017-05-151-70/+17
| | | | | Change-Id: I000d70c7bcc839c04a89cb87052187eeec62243f Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Replace QAquaWidgetSize with WidgetSizePolicyGabriel de Dietrich2017-05-155-242/+229
| | | | | | | | | No need to have two enums for the exact same purpose. qmacstyle auto-test updated as well. Change-Id: Ia601648191e39c0cbbaa7477143441005ae063c2 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Replace HIRect, HIPoint with CGRect, CGPointGabriel de Dietrich2017-05-152-116/+101
| | | | | | | | | We probably changed how rounding is done between CGRect and QRect coordinates, but we expect more things to change in the near future. Change-Id: If961849c46edc5fcfee9aef2acda57f386b2928b Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Remove HITheme for CE_MenuItem, etc.Gabriel de Dietrich2017-05-151-122/+69
| | | | | | | Includes the unlikely non-native menu bar. Change-Id: Ibc36cbdbe5add3798fe65066d87c48e84804ec33 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* macOS: Guard on platform window instead of window delegate in QNSWindowHelperTor Arne Vestbø2017-05-121-2/+2
| | | | | | | | | The platform window is cleared in detachFromPlatformWindow, just like the delegate, but the platform window may be cleared due to other reasons as well, so use that as a guard before calling functions on the pw. Change-Id: Ie0773182073d4932b2bca8bc0fc8af24b8895a9d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* Make relation of currentChildBeingDeleted and isDeletingChildren more obviousBernhard Übelacker2017-05-121-1/+1
| | | | | | | | | | | | | Add a comment, to describe the relation of QObjectPrivate::currentChildBeingDeleted and QObjectData::isDeletingChildren, given that this field is defined in an entirely other file on a base-class, making it severely non-obvious to the reader. Task-number: QTBUG-57714 Change-Id: I7b8b24693c4ccc6192e9f9f34f951202b7fdddb0 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QMacStyle: Remove HIShapeGetBounds hackGabriel de Dietrich2017-05-122-21/+11
| | | | | | | | | | | Link to ApplicationServices since that's where this function is located. Whether this framework may be removed with Carbon is unknown at the moment. It does remove an obscure dependency nonetheless. Change-Id: If6514f70ca434298f1c88457adac51d38a1afa22 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Get rid of GetTheme* metric functionsGabriel de Dietrich2017-05-121-68/+143
| | | | | Change-Id: I88f52db58a57ff8ff9aeee9e475d193186a7abb9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Cocoa QPA: De-Carbonize system palettesGabriel de Dietrich2017-05-121-68/+33
| | | | | | | | | We use the NSColor system/developer palette instead of HITheme brushes. Change-Id: I11b34c7049ca98057eaeca5a0d0b8f64dbe3e5ab Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Add debug operator for QOpenGLTextureFriedemann Kleint2017-05-112-0/+46
| | | | | Change-Id: If87730725d9eba8d4c1e0158056cdeaa7c1bc12f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QOpenGLTexturePrivate::destroy(): Make error messages more verboseFriedemann Kleint2017-05-111-2/+11
| | | | | | | Distinguish missing and non-sharing contexts, output values. Change-Id: If52555098c1b46e6016e00f9dbbfad8e4b5d3a2d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/devFrederik Gladhorn2017-05-1120-490/+559
|\
| * Merge remote-tracking branch 'origin/5.9' into devFrederik Gladhorn2017-05-1020-490/+559
| |\ | | | | | | | | | Change-Id: I172e3e19ddcc5b7665e6c8382d725e7cc4f9794f
| | * Stabilize tst_QApplication::touchEventPropagationFrederik Gladhorn2017-05-102-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CI metrics show that this test was flaky ~38 time in 3 days. The problem is old: after we get a surface, a window manager can still decide to re-position the window. The fix is to simply send the touch event in a position where it is sure to hit the window (usually the offset is the title bar height). The blacklisting seems to not have worked, I could reproduce the failure on a linux/xcb machine. Change-Id: I5229fe020ba75c984fd3b6c322ad00d769707573 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * Fix missing handling of columns when merging selection rangesFilippo Cucchetto2017-05-092-1/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes two bugs: 1) Two ranges should not be merged if they are of different columns. The old code would have merged (0,0) with (1, 1). Tranforming a selection of just two indexes in a rectangle of four indexes. 2) The QItemSelectionRange appended had wrong column and worked only for indexes of the first column. For example if 'tl' was (0, 1) than br was (0, 1) so the QItemSelectionRange would have be ((0,1), (0, 1-1)) so ((0,1), (0,0)). This QItemSelectionRange is invalid because topLeft columns is greater than bottomRight column. The fix take in consideration the bottomRight column. Task-number: QTBUG-58871 Change-Id: I591ef0bcc63926f24a7b1ced002af9b7737a4b6e Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| | * Skip failing autotests with b2qt toolchainTeemu Holappa2017-05-095-5/+36
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-59966 Change-Id: I36d114107187db22841ebfeff8fa8175daff6d03 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * macOS: Add a few more platform window checks in QNSViewTor Arne Vestbø2017-05-081-27/+33
| | | | | | | | | | | | | | | | | | | | | | | | And unify all of them to use regular pointer check syntax, to stay consistent with other uses of non-smart pointers. Change-Id: Ic55d7a16f2010120aaa8eac5b2df8189490671a2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Windows QPA: Call InvalidateRect() for GL windows when Aero is offFriedemann Kleint2017-05-081-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some AMD cards have been reported to not update otherwise. Task-number: QTBUG-60527 Change-Id: I84d57a57eb2b76fb31255ae42b79b96ab7b257c9 Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * QObject: turn the narrowing test into static_assertsGiuseppe D'Angelo2017-05-081-435/+385
| | | | | | | | | | | | | | | | | | | | | | | | | | | The conditions checked are compile-time conditions anyhow. Simplify or strenghten a few conditions while at it. Change-Id: If07f2aedca4c3632d852a8fdb2b3f7eb55a96c93 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
| | * make configure -list-features print the section fieldOswald Buddenhagen2017-05-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | prefix it to the purpose field. this makes the presentation more consistent with the graphical tool, and avoids the need to be redundant in the description. Change-Id: Iea58885637e0518aa1ec2f69ff05090b7e1e77a9 Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * Warn if files are not found because of features.filesystemiteratorStephan Binner2017-05-081-0/+2
| | | | | | | | | | | | | | | | | | Change-Id: Ife3197aa1c56ba3ab6e7f530fbcbcf761f223b16 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * tst_qmessagehandler: fix qMessagePattern for arm with optimizations onSami Nurmenniemi2017-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backtrace logging tests were not passing for arm when -O2 option was used. Set "-fno-inline" on for the app whose backtrace is to be inspected. Task-number: QTBUG-59966 Change-Id: Id1bbf78c31dc524357a30c7d39c239689621b155 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * winrt: Do not add windeployqt dependency for static builds in VSOliver Wolff2017-05-081-1/+1
| | | | | | | | | | | | | | | Change-Id: Iec6ebbfd73741d511008633b5fe0d9975e975729 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| | * Use QNetworkReply::ProtocolFailure in HTTP/2 failuresThiago Macieira2017-05-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | ProtocolInvalidOperationError are meant for actual replies from the server indicating that the operation is not valid (HTTP 400 Bad Request). Change-Id: I9ad33fff8b634979bdbafffd14bbc57e4b21d6bf Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Remove some more register keywordsMarc Mutz2017-05-063-4/+4
| | | | | | | | | | | | | | | | | | | | | They're deprecated since C++11 and removed in C++17. Change-Id: Ia2acd9312707bfee96838743645a04ae1780e5dd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Make QWindow::setVisible() work for widgetsMorten Johan Sørvig2017-05-116-69/+120
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidget has its own setVisible() code that needs to be run in order to correctly transition widget visibility. It is desirable to be able to show and hide (native) widgets also from the QWindow side, for example from the platform plugin, or from generic QWindow handling code in QtGui. Add a new virtual QWindowPrivate::setVisible() and move the QWindow visibility implementation there. Subclasses can now override this function to add custom code. Make QWidgetPrivate::show/hide_sys() call the QWindowPrivate setVisible implementation instead of the QWindow setVisible public API. Change-Id: I082f174b100659e1221d5898b490f8a9f498abdf Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Make qNextPowerOfTwo constexpr when building as C++14Tor Arne Vestbø2017-05-091-14/+8
| | | | | | | | | | | | Change-Id: Ic29dcbf1c4b70516ebb436b90962e3fdeb0e5608 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>