summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* QCborStreamReader: update to the new TinyCBOR zero-copy string APIThiago Macieira2018-06-066-111/+148
| | | | | Change-Id: Iab119b62106d40fb8499fffd1510abe5d8f2722a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QCborStreamReader: use QByteArray directly if possibleThiago Macieira2018-06-062-73/+289
| | | | | | | | | | | | | | | QIODevice represents considreable overhead, even with just QBuffer, for parsing simple things. Benchmarking showed it was spending 25% of the parsing time inside one QIODevice function or another. So this commit accomplishes two things: 1) it increases the buffer size from 9 bytes to up to 256, which should reduce the number of calls into the QIODevice 2) if the source data is a QByteArray, then use it directly and bypass the QIODevice, thus increasing performance considerably Change-Id: I56b444f9d6274221a3b7fffd150c531c9d28e54b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* De-inline QCoreApplication::send(Spontaneous)EventGiuseppe D'Angelo2018-06-062-8/+19
| | | | | | | | There's no clear reason for these functions to be inline; this prepares a tracepoint hook. Change-Id: I3a6110a9333db4850c1d97038d5bfae8ab25d5d8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Handle negative leading in layoutAllan Sandfeld Jensen2018-06-063-21/+27
| | | | | | | | Adjust line positions to deal with negative leading which isn't included in height of QTextLine. Change-Id: Id7918968c0f9d7e65700b9e7a08fc5d761883f22 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix PDF rendering of strokes with cosmetic pensAndre de la Rocha2018-06-061-1/+2
| | | | | | | | | | The PDF backend was ignoring the cosmetic attribute for certain pens, resulting in strokes rendered incorrectly. Task-number: QTBUG-68537 Change-Id: Ib9fd5a510716056c8afe67733f51fc682bbb7354 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Add note about calling invokable functions from QML when returning QObjectsSimon Hausmann2018-06-061-0/+5
| | | | | | | | | | Link to the data ownership section of the QML documentation to elaborate on the special rules that apply for invokable functions that return QObjects. Change-Id: I41ea9089468c9505807cf1fde22be759b397a6d3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* MySQL: Handle TIME types as a string to allow the full range of dataAndy Shaw2018-06-062-1/+58
| | | | | | | | | | | | | | | | As the full range of TIME is '-838:59:59' to '838:59:59' then we cannot use QTime as the object to store this data in. Therefore a QString is used instead for passing the data to and from. This does not impact existing code using QTime already as it will still convert it from the QString to a QTime to give the same result as before. [ChangeLog][QtSql][MySQL] The TIME data type is now treated like a string-based type in order to respect the full range of the TIME data type. Task-number: QTBUG-57028 Change-Id: Ieb7105bff3043b845f76bc873d088e6bac1e4f10 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Skip tst_QWindow::modalDialogClosingOneOfTwoModal without activationJohan Klokkhammer Helsing2018-06-061-2/+2
| | | | | | | | | The test doesn't make much sense on platforms that don't support window activation. Task-number: QTBUG-66849 Change-Id: I875314d026d666173ec345d0864ad41d66179783 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Don't skip tst_QWindow::isExposed on WaylandJohan Klokkhammer Helsing2018-06-061-3/+0
| | | | | | | | The test is actually passing, so just enable it. Task-number: QTBUG-66849 Change-Id: Ie1566b9e5e19f5ab6d919624aa14662a1d4483ec Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* tst_QWindow: Don't skip tests on Wayland without explanationJohan Klokkhammer Helsing2018-06-061-2/+2
| | | | | | | | | | Link to a bug report so we can track the failures and figure out how to fix it in Qt Wayland or if we should skip the tests in a proper way. I.e. with platform capabilities or similar. Task-number: QTBUG-66849 Change-Id: I7a16333c7d2284eb9da6efd4515891438e9976b3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add support for _q_platform_qnxWindowType QWindow propertyJames McDonnell2018-06-051-3/+12
| | | | | | | | | | | | | | | | | This dynamic property can be used to specify an explicit QNX window type for a QNX platform window. The _q_platform_ prefix makes it possible to place the property on QWidget objects instead. Existing functionality ensures that any QWidget property whose name begins with _q_platform_ is copied to the underlying QWindow object prior to creation of the platform window. Add _q_platform_ aliases for the dynamic qnxInitialWindowGroup and qnxWindowId properties so that these properties can be also be specified on QWidget objects. Change-Id: Ia37a965dd25de333307b2bb5ae81446db271af1f Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Dan Cape <dcape@qnx.com>
* QSslSocket - bail out early if TLS initialization failsTimur Pocheptsov2018-06-051-0/+23
| | | | | | | | | | No need to start with 'connectToHost' from 'connectToHostEncrytped' - we will fail to start client encryption later anyway. This can happen if we, for example, fail to resolve some symbols or libraries are missing. Task-number: QTBUG-65142 Change-Id: I0614d5cdf875aaf5b992d8ab6024bcaf3f84b915 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* macOS: Make sure QNSPanel also gets a debug descriptionTor Arne Vestbø2018-06-051-0/+1
| | | | | Change-Id: I5de08c3493b02a8e98ba3c4fe3922f5f9fd6e2c2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Deliver screen changes synchronouslyTor Arne Vestbø2018-06-051-2/+2
| | | | | Change-Id: Iea8fcb69b6c05c4f81fedb4ec423aed89d9d2d3c Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* testlib: Mark unused member variable for future removalKari Oikarinen2018-06-051-4/+1
| | | | | | | | | inLoop is only set, never read and it is private. Since the class is public, it can't be removed yet, but add a comment so that it will be removed when possible. Change-Id: I5e212194cb65626fce2b4c7b68801a73dbe3f500 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* tst_Http2 auto-test: stop sending DATA frames if test failedTimur Pocheptsov2018-06-043-6/+34
| | | | | | | | | | | | | | Unlike QNAM, our toy http2 server sends payload as one big chunk as soon as it fits in the receive window's size. Internally, 'frame writer' splits this payload into many DATA frames of the appropriate size (imposed either by the default value or the one from the client's SETTINGS frame). If some test fails, we can end up with a server waiting for the writer to send all the DATA frames though it is not needed anymore - there is nobody to receive them after a failure. This patch moves such a loop into the test server instead and stops the loop early if needed. Change-Id: Iea2dcd718d8f83386fd16004807f6447bf999435 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Improve std::tuple handling in testsSamuel Gaist2018-06-0313-0/+279
| | | | | | | | | | | | | Currently when doing comparison with std::tuple the fallback toString method is called which returns a Q_NULLPTR thus not allowing proper diagnostic of the values that triggered an error. This patch adds support for std::tuple to improve the tests output readability. [ChangeLog][QtTest][QCOMPARE] Now outputs contents of std::tuple on failure. Change-Id: I046a55e2ce44c3f7728d51e4745120d38aa5e007 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Examples: use CBOR in the network-chat broadcast messageThiago Macieira2018-06-023-19/+39
| | | | | | | | | | | | | | | Instead of sending one @-separated message, send one CBOR message. The message structure is, using the CBOR Data Definition Language: broadcast = [ username: tstr, port: 0..65535 ] Change-Id: Ic38ec929fc3f4bb795dafffd150ac2614d18c6bf Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Examples: change the main network-chat protocol to CBORThiago Macieira2018-06-023-146/+138
| | | | | | | | | | | | | | This complements the previous commit, which changed the broadcast datagram to CBOR. This commit changes the TCP protocol too. The protocol is an infinite array of commands, each of which is a map from an integer (the DataType enum) to either a string or null. The entire state machine for the connection is rewritten, relying on QCborStreamReader's ability to deal with incomplete data. Change-Id: Ic38ec929fc3f4bb795dafffd150ac674c32fac87 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QLineEdit: Add an inputRejected() signal for when a key is not allowedAndy Shaw2018-06-016-1/+61
| | | | | | | | | | [ChangeLog][QtWidgets][QLineEdit] Added inputRejected() signal for when a key press is not accepted by the QLineEdit. For instance, when an invalid key is pressed for a validator set. Task-number: QTBUG-57448 Change-Id: I39182a78b07b37c6da01905b8da4c57930e3454b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* doc: Document Qt namespace in multiple modulesMartin Smith2018-06-014-47/+29
| | | | | | | | | | | | | | | | | | | | | | qdoc didn't handle this. This update fixes most of what was wrong, but tuning the details of the namespace reference pages might follw. We have namespace Qt as an exaqmple. Most of the elements in the Qt namespace are in QtCore, but a few functions are declared in QtGui. Before this update, qdoc used the hack of using #ifdef to remove the declarations from qtextdocument.h in QtGui and .cpp and then added them back into qtnamespace.h and .cpp in QtCore. Now that hack is no longer necessary. The functions in the Qt namespace that are declared in QtGui are documented there, but the documentation is linked to from the namespace reference page, which remains in QtCore. That is, only one \namespace command is used to document the Qt namespace, and it appears in qnamespace.qdoc where it always did, but the documentation for the Qt namespace functions declared in QtGui is now appears in qtextdocument.cpp where it belongs. Change-Id: Ic5888875c3b8310a3dba244475e2a6c3bc0c1808 Task-number: QTBUG-67267 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix warning about tautological comparison in 32-bit modeThiago Macieira2018-06-011-1/+1
| | | | | | | | | qwaitcondition_unix.cpp:209:14: error: comparison of constant 9223372036854775807 with expression of type 'unsigned long' is always false Task-number: QTBUG-68568 Change-Id: Icc2c231dc2c44abdb087fffd1533c70ae68060dd Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix clang develop buildAllan Sandfeld Jensen2018-05-311-1/+1
| | | | | | | | A mismatch of enums after a rename. Change-Id: Ib28e4607f20583afcb9210fdef7f52d95c63e3dd Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Eliminate an un-needed #includeEdward Welbourne2018-05-311-1/+0
| | | | | | | Nothing in this test references date-times. Change-Id: I4005cda550d54abe46370963b1e91fab9829298d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* glextensions.h: simplify #if-ery to avoid conflictEdward Welbourne2018-05-311-12/+4
| | | | | | | | The prior #if-ery was needlessly confusing; and most of it was redundant anyway. Change-Id: I82da1b38c08b93b9dc2220dd7b15ecb7dcc002af Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Provide presets for QGradientTor Arne Vestbø2018-05-3117-3/+1645
| | | | | | | | | | | | | Similar to Qt::GlobalColor, the presets allow the user to create brushes based on predefined gradients, quickly getting pretty pixels on screen. The presets are based on the linear gradients from WebGradients, a free collection of gradients, hosted at https://webgradients.com/. The few radial and blended gradient presets have been excluded. Change-Id: I1ce8f2210a6045c9edb8829ab3eddcc313549127 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Make layer-backed mode the defaultTor Arne Vestbø2018-05-311-2/+2
| | | | | | | | | | | | | | | | | | QWindows are still backed by NSViews, but these views render to a CoreAnimation layer instead of directly to the top level NSWindow. This is the direction Apple is going (and is the only available option on iOS/tvOS), so we want to move away from the existing code path as soon as possible. The default can be reversed by setting QT_MAC_WANTS_LAYER=0, or the _q_mac_wantsLayer property on QWindow. [ChangeLog][macOS] Layer-backed mode is now the default for QWindow. Change-Id: Ibb9cc7541b179cad215d0daee14aeb1b54be614c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* tst_qstandardpaths: #if-out a function only used within #if-eryEdward Welbourne2018-05-311-0/+2
| | | | | | | | Avoids an unused function warning. Change-Id: Id221595920e9a34eb83b66fe123d664f60fcae05 Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: minor refactoring in mouse handlers for nsview/systemtrayiconMikhail Svetkin2018-05-313-23/+33
| | | | | | | Use new helper functions for mouse events Change-Id: I01e83a228deb16cbdb1d7c8c628a92d48055ee2b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove LGPL_EXCEPTION.txtEdward Welbourne2018-05-311-22/+0
| | | | | | | | It became obsolete when we switched to LGPL3, as discussed on the developer mailing list in April 2017. Change-Id: I8445a0e6febba8b31a95fbc140343c2013776b48 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Windows QPA: Fix release button event type after moving windowsFriedemann Kleint2018-05-311-9/+16
| | | | | | | | | | | | | | | | Check whether the mouse is inside the window and report MouseButtonRelease or QEvent::NonClientAreaMouseButtonRelease, respectively. The inside case is triggered by programmatically starting a size move via QPlatformWindow::startSystemResize() (QSizeGrip) and was overlooked in 7c3ecf85a770cd7fef01ece935f88d8894de09b2. Complements 45894408913f62f6f25a302d8ed07af57ac7db5d, 7c3ecf85a770cd7fef01ece935f88d8894de09b2. Change-Id: I8f714dc768a163878c2b4a075470bcee2dfbd802 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
* QCborStreamReader: rewrite read{String,ByteArray}()Thiago Macieira2018-05-301-39/+14
| | | | | | | | | This rewrites _readString_helper() in terms of _readByteArray_helper() (the helper version doesn't do type-checking) and rewrites _readByteArray_helper() in terms of readStringChunk(). Change-Id: Iab119b62106d40fb8499fffd1510aa404d9f3611 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix missing override warning for androidLiang Qi2018-05-301-1/+1
| | | | | | | This amends 8447f5f0062. Change-Id: Idd25c13735539682f6034724df4c79fcf10a1810 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* macOS: Minor metal support nits/cleanupsTor Arne Vestbø2018-05-301-3/+2
| | | | | | Change-Id: I840426ebf35b0fec64e92386fc3e1cabd91ced25 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Show the display role inside the editor for the relation in a QComboBoxAndy Shaw2018-05-293-1/+197
| | | | | | | | | | | | | | | When a QComboBox is used as the editor for a relation inside a view then it could end up showing the contents of the EditRole. This would be the field which is used to represent the entry as opposed to the DisplayRole which is what the user would expect to see is. Therefore, setEditorData() is overridden to ensure that it is showing the right data to the user. When the model gets updated, it will take the corresponding EditRole value as before to ensure it is updated correctly. Task-number: QTBUG-59632 Change-Id: Ibbccc3e9477de1cdefb654051b97dd111df36382 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* QCborStreamReader: remove the documentation on the validation APIThiago Macieira2018-05-291-7/+0
| | | | | | | It's not present in this version. Change-Id: I6a540578e810472bb455fffd1532ac4d49d4b994 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-2911-25/+63
|\ | | | | | | Change-Id: I8d8b03ea46c537b091b72dc7b68aa6aa3a627ba6
| * Doc: Update Echoplugin ExampleNico Vertriest2018-05-281-0/+0
| | | | | | | | | | | | | | | | | | | | - screenshot - connect syntax Task-number: QTBUG-60635 Change-Id: I18c3e1fef5c623565bbf6cf33bf88e9d8135d8be Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * Doc: Update Fetchmore exampleNico Vertriest2018-05-282-3/+5
| | | | | | | | | | | | | | | | | | | | - minor edit - updated screenshot Task-number: QTBUG-60635 Change-Id: I988ad28723131127eee0a93671b0562d8f446139 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * QSortFilterProxyModel: don't assert when old model gets destroyedChristian Ehrlicher2018-05-262-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a new model was set with setSourceModel() and the mapping was built up, the destruction of the old model caused a reset in the QSortFilterProxyModel which lead to an empty view or an assertion. Now we properly disconnect the old model again and also clean up the old mapping/persistent indexes when a new source model is set. Task-number: QTBUG-44962 Task-number: QTBUG-67948 Task-number: QTBUG-68427 Change-Id: I2e0612899c210bde3ac0cfa59aefd78269deee5b Reviewed-by: David Faure <david.faure@kdab.com>
| * Fix build for Android with android-clangLiang Qi2018-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | kernel/qnetworkinterface_linux.cpp:204:17: error: comparison of integers of different signs: '__u32' (aka 'unsigned int') and 'qsizetype' (aka 'int') [-Werror,-Wsign-compare] if (NLMSG_OK(hdr, len)) ^~~~~~~~~~~~~~~~~~ This amends 09cb23f342fd2eae7ca85a99fa0a10b7ab103443. Change-Id: Ib966a60b7a7117d63ed758cba7b556abd90eca0c Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Add translation for unsupported_android_version for fr and deSamuel Gaist2018-05-252-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | More recent versions of Android lint triggers an error when a translation is missing. The solution is to either provide translations for all languages supported or add translatable="false" as property to the strings that are not yet fully translated. Task-number: QTBUG-63952 Change-Id: I5afa8a23d3e2285b5c93ee493d9b02397c328f2d Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * Fix build if openssl is configured with no-des or no-rc2André Klitzing2018-05-243-16/+37
| | | | | | | | | | | | | | | | | | A custom build of openssl can disable DES or RC2. This allows to build Qt against those builds. Change-Id: I9b91c943fab4d217a791381e81a7d87a9ff5031a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Tests: replace deprecated QDesktopWidget::screenGeometry()Christian Ehrlicher2018-05-287-36/+28
| | | | | | | | | | | | | | | | QDesktopWidget::screenGeometry() and similar was deprecated in 5.11 and replaced by QScreen::geometry() Change-Id: Ic630d022bc6461af78f49684c8ac9d1836d738bc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | QToolTip: replace deprecated QDesktopWidget::screenGeometry()Christian Ehrlicher2018-05-281-1/+1
| | | | | | | | | | | | | | | | QDesktopWidget::screenGeometry() was deprecated in 5.11 and replaced by QScreen::geometry() Change-Id: I23f5b6a4ed6b76cf558cd8d3ad49bc8029c16f61 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Example: add a simple CBOR dumper toolThiago Macieira2018-05-284-1/+806
| | | | | | | | | | | | | | | | This is useful as well when trying to figure out what a CBOR file contains or how it may fail to parse. Change-Id: Ic38ec929fc3f4bb795dafffd150ad7c0bd8e9887 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | winrt: Skip/blacklist failing opengl testsOliver Wolff2018-05-283-3/+3
| | | | | | | | | | | | Task-number: QTBUG-68297 Change-Id: I1396b658b49baf5a8d4b97e35c22ddc25727b68a Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | winrt: fix tst_QFocusEventOliver Wolff2018-05-281-2/+3
| | | | | | | | | | Change-Id: Ib2e82554c09a88a20fd789213a3040d6c6e42383 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | winrt: Make tst_qfocusevent pass in CIOliver Wolff2018-05-281-0/+1
| | | | | | | | | | | | Task-number: QTBUG-68297 Change-Id: I72d668103b86e26b15c0b818f87a58ae2ffe2d31 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | Fix tst_qtextedit for configurations with builtin testdataOliver Wolff2018-05-281-0/+2
| | | | | | | | | | Change-Id: Ic692acd8053a02270416deb1be3d58a5f0424526 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>