summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Ensure styles always get to polish the application paletteTor Arne Vestbø2020-07-212-18/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before 0a93db4d82c051164923a10e4382b12de9049b45 we would polish the application palette even when it was the default palette, as we always recreated the system palette each time a style was set. After the change we skipped polishing the palette unless it was set by the user, under the assumption that the style would set its own default palette if it wanted to override the system palette. This turned out to break the style's ability to slightly tweak the palette via polish (versus the more full on standardPalette approach). We now polish both the default palette and user palettes, and we do so as part of the normal palette update logic. This ensures that the style also gets a chance to polish the palette when the platform theme changes. The polish will not have an effect on the resolve mask of the palette, as the polish is conceptually the same as a base palette, and should not affect e.g. Qt::AA_SetPalette. Fixes: QTBUG-85469 Fixes: QTBUG-85188 Pick-to: 5.15 Change-Id: I869e9c442b177de4f1dc49eb75220709306f4d12 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix SSE4 instruction leak in GCC10 debug buildsAllan Sandfeld Jensen2020-07-211-2/+2
| | | | | | | | toArgb32 was leaking an SSE4 instruction when not inlined. Pick-to: 5.15 Change-Id: I5df87bc7343f4ec40881a0aedd6f066323143817 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix some qdoc warningsFriedemann Kleint2020-07-213-3/+3
| | | | | | | | | | | | | | | | | | src/corelib/text/qstringconverter.h:160:54: error: no matching constructor for initialization of 'QStringConverterBase::State' src/corelib/text/qstringconverter.h:72:19: note: candidate constructor not viable: no known conversion from 'QFlags<QStringConverter::Flag>' to 'QFlags<QStringConverterBase::Flag>' for 1st argument src/corelib/text/qstringconverter.h:75:9: note: candidate constructor not viable: no known conversion from 'QStringConverter::Flags' (aka 'QFlags<QStringConverter::Flag>') to 'QStringConverterBase::State' for 1st argument src/corelib/text/qstringconverter.h:108:24: note: candidate constructor not viable: no known conversion from 'QStringConverter::Flags' (aka 'QFlags<QStringConverter::Flag>') to 'const QStringConverterBase::State' for 1st argument src/corelib/text/qstringconverter.h:159:32: warning: constexpr constructor that does not initialize all members is a C++20 extension [-Wc++20-extensions] src/corelib/text/qstringconverter.h:187:11: note: member not initialized by constructor src/corelib/kernel/qproperty.h:403:14: error: deduction guide must be declared in the same scope as template 'QProperty' src/corelib/kernel/qproperty.h:202:7: note: template is declared here src/corelib/kernel/qproperty.h:403:14: error: deduction guide declaration without trailing return type src/gui/painting/qregion.h:139:5: error: unknown type name 'HRGN' src/gui/painting/qregion.h:140:29: error: unknown type name 'HRGN' Change-Id: I3c195a60ceeb51664368a4aeef90c70c31954fc3 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add fixme note to QWindowPrivate::setVisible about visibility during createTor Arne Vestbø2020-07-201-1/+7
| | | | | Change-Id: I71cb5b560538887f85d92178ff17eaaecaf06904 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add QEvdevKeyMapper platform interfaceTor Arne Vestbø2020-07-2014-283/+66
| | | | | | Task-number: QTBUG-84220 Change-Id: I4f3a54415c5509b4bde486b54c56b0e05976bac6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add QXcbWindow platform interfaceTor Arne Vestbø2020-07-2017-565/+136
| | | | | | Task-number: QTBUG-84220 Change-Id: I8bb4288f1ac06d77fb4f43ae091fa1712f694eeb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Move private platform interfaces to private QPA headersTor Arne Vestbø2020-07-2012-44/+109
| | | | | | | | | They should not clutter the "public" QPA headers that clients use to implement new platforms, and having them in the private headers allows us to check for private configure features. Change-Id: Ib4b4db96c086d81bb5810392c7c8922fc5b4950d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add QXcbScreen platform interfaceTor Arne Vestbø2020-07-209-92/+25
| | | | | | Task-number: QTBUG-84220 Change-Id: I6c166409fbaf50627dea65a6256764e08ab36a59 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QBasicTimer: purge deprecated APIEdward Welbourne2020-07-202-34/+2
| | | | | | | Since 5.14, copy constructor and assignment. Change-Id: Id569968ee3879caea2f69e373d392881901965f2 Reviewed-by: David Faure <david.faure@kdab.com>
* QAbstractEventDispatcher: purge deprecated APIEdward Welbourne2020-07-201-11/+1
| | | | | | | | | Since 5.0, registerTimer() without a timer type; and filterEvent(void *) Change-Id: Id50c2daaf7b144ec403351d0fc50111272b34521 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QRegularExpression: Purge deprecated PatternOption membersEdward Welbourne2020-07-202-10/+5
| | | | | | | | | They've been no-ops since (at least) 5.12. At the same time, save future readers the need to git blame to find out how long the other deprecated enum name is. Change-Id: I2081ba2859c6540651b6f6807cc6bd59890bfce5 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QCommandLineOption: purge deprecated APIEdward Welbourne2020-07-202-38/+2
| | | | | | | | Since 5.8: setHidden(), isHidden() Part of the QCommandLineParser test also used setHidden(). Change-Id: I05a1c63ff3beb1167ed75632c1b71d7fff17f09e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QTemporaryFile: purge deprecated APIEdward Welbourne2020-07-201-7/+1
| | | | | | | Since 5.1: createLocalFile() Change-Id: I6743df58281d6ba7d90cc6735362e8b654565588 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QUrl: purge deprecated APIEdward Welbourne2020-07-202-133/+2
| | | | | | | | Since 5.0: QUrl's image of the QUrlQuery API Remove deprecation-suppression from tst_qurl.cpp, too. Change-Id: Ide826283cb4e177fb34fb4080502f5a4620bd5d7 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QChar: purge deprecated APIEdward Welbourne2020-07-202-82/+1
| | | | | | | | Since 5.3 joining() and old Joining type Replaced by JoiningType joiningType() Change-Id: Iefee50aaf94cec6d67b5fc004b3e68357b2015c5 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* cmake: Slience bening warnings in 3rdparty codeTor Arne Vestbø2020-07-202-2/+11
| | | | | Change-Id: I1a47695abd6d6ea1527e2803dde0ed29aca014cc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Update sql-driver to reflect current minimum versions neededAndy Shaw2020-07-202-24/+13
| | | | | | Fixes: QTBUG-85172 Change-Id: I82a8e008deec29dd217097b8427cb84b80c3a1c9 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix some MSVC int conversion warningsFriedemann Kleint2020-07-178-20/+22
| | | | | | | | | | | | | | | | | | | | | | | kernel\qmetaobjectbuilder.cpp(1279): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data kernel\qmetaobjectbuilder.cpp(1432): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data sax\qxml.cpp(1275): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data text\qfontsubset.cpp(920): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qfontsubset.cpp(920): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data text\qtextengine.cpp(2664): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qtextengine.cpp(2665): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qtextengine.cpp(2706): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qtextengine.cpp(2707): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data itemviews\qbsptree.cpp(60): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) kernel\qprintengine_win.cpp(1558): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data qsql_odbc.cpp(804): warning C4267: 'argument': conversion from 'size_t' to 'SQLINTEGER', possible loss of data qsql_odbc.cpp(822): warning C4267: 'argument': conversion from 'size_t' to 'SQLINTEGER', possible loss of data qsql_odbc.cpp(1585): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data qsql_odbc.cpp(1602): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data qwindowsmime.cpp(770): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data windows\qwindowsmime.cpp(770): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data Change-Id: I04fbe17b9782f4c2704933fc005449b1e992475e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix OCSP-Stapling error if identity cannot be verifiedAndré Klitzing2020-07-171-0/+5
| | | | | | | | | | | | | | | If QSslConfiguration::setCaCertificates is set to empty list openssl cannot verify the OCSP-Response. Qt will provide it as QSslError::OcspResponseCannotBeTrusted that can be ignored. But the openssl error is still in the error queue and prevents a successful reply in QNetworkReply::finished. So let's clear the queue after OCSP checking to avoid side affects. Change-Id: I44a7f45a2eebd20ea86a235a0534f80986c40a26 Fixes: QTBUG-85638 Pick-to: 5.15 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QSslCertificate: remove manual parsing code for ASN.1 (on OpenSSL)Giuseppe D'Angelo2020-07-172-104/+8
| | | | | | | | OpenSSL 1.1.1 has a convenient function for parsing ASN.1 times; use that instead of the hand-rolled code. Change-Id: Ic0aecc915f362c02b220819305f3f3c347a75297 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix handling of Suzhou numbering systemEdward Welbourne2020-07-175-18/+46
| | | | | | | | | | | | | | | | This only arises when the system locale tells us to use its zero as our zero digit, since no CLDR locale uses it by default. Adapt an MS-specific QLocale::system() test to use Suzhou numbering, so as to test this. While updating the locale-restoration code to also restore the digits being set in that test, add restore code for the long time format, where previously only the short time format was restored. Add a comment to make it less likely one of those shall be missed in future. Fixes: QTBUG-85409 Change-Id: I343324bb563ee0e455dfe77d4825bf8c3082ca30 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDomNode: Add namespaceURI parameter to browse methodsLinus Jahn2020-07-172-24/+34
| | | | | | | | | | | | | | | | | This adds a namespaceURI parameter to the following methods of QDomNode: firstChildElement(), lastChildElement(), nextChildElement() and previousChildElement() Those methods can now be used to filter for elements with a specific namespaceURI without the need to use QDomNodeList. [ChangeLog][QtXml][QDom] Added namespaceURI parameter to browse methods like firstChildElement() to filter for elements with certain namespaces without the need of QDomNodeList. Change-Id: Ic2cfe8c6d5d5f6b5fcf27165df15bce54ad0f23a Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* CMake: Get tests/auto/cmake tests workingAlexandru Croitor2020-07-173-63/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests/auto/cmake project can be configured separately as a standalone project with qt-cmake, or as part of the overall qtbase standalone tests. To do that a bunch of things were done - Ported all Qt5 strings to Qt6 - Replaced in all projects the use of add_definitions and include_directories with a target based approach, except for 2 tests where we check that the old-style approach works, otherwise the tests would file - Removed some (possibly unneeded) EGL / OpenGL tests - Fixed some C++ code - Added setup code to tests/auto/cmake/CMakeLists.txt to figure out which modules are available and should be tested - Fixed Qt6CTestMacros.cmake to be loaded by Qt6Core - Removed the CMake tests to not be run in qmake builds of Qt because they would fail anyway - Enabled the CMake tests to be part of standalone tests - Disabled auto-passing of the C and CXX compiler cache vars when cross-compiling so that the tests can somewhat pass on boot2qt. This is the issue we encountered in e2b2cd9397c76e91ac1ebe493bcac7696767c02e - Ultimately disabled tests for boot2qt, because the -rpath-link flag is not generated by CMake for some reason. - Added code to setup the environment when running an executable that was built as part of the test, so that the proper Qt libraries are found. This handles both the standalone tests case and separate project case. The remaining unported tests are test_import_plugins which requires quite a bit of work to get some modules and plugins built that were done as part of the qmake .pro files, test_plugins that checks some Network plugins which I'm not sure about, and test_add_big_resource which doesn't work with namespaced builds and there's no good way of detecting those at the moment either. Change-Id: Ic8809c72817d1db81af6c6014c11df6473ad8c75 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QWizard/Windows: Fix deprecation warnings about old mouse event APIFriedemann Kleint2020-07-171-3/+10
| | | | | | | | | | | | Fix: src/widgets/dialogs/qwizard_win.cpp:515 C4996: 'QMouseEvent::globalX': Use globalPosition() src/widgets/dialogs/qwizard_win.cpp:529 C4996: 'QMouseEvent::globalX': Use globalPosition() src/widgets/dialogs/qwizard_win.cpp:544 C4996: 'QMouseEvent::globalX': Use globalPosition() and add missing High DPI scaling for the native event on this occasion. Change-Id: Ib9a8ab0b3419fa0435eba38401b91c445acdb7bf Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix syntax error in containers documentation codeSander Visser2020-07-161-1/+0
| | | | | Change-Id: Ie15f5a43cb97422b30c8be884ff6b0d2d8647ea5 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix QXmlStreamPrivateTagStack uninitialized memberSander Visser2020-07-161-0/+1
| | | | | | | | Make sure to init tagsDone from constructor. Avoid relying on QXmlStreamReaderPrivate::init(). Change-Id: I40c08dd370b0ad519e2d6ebc23b8a906c836508e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix missing member in QXmlStreamReaderPrivate::initSander Visser2020-07-161-0/+1
| | | | | | | Add missing lastAttributeIsCData Change-Id: I66429d35da0451eefe8d14e031306b16df910d0f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Suffix qt_pluginMetaData with class nameTor Arne Vestbø2020-07-162-7/+8
| | | | | | | Allows defining multiple static plugins in the same translation unit. Change-Id: I175fd4980b21a461a18c23ed1a62a3cea73e67a0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Deprecate QTimeLine's curveShape in favor of its easingCurveEdward Welbourne2020-07-163-28/+43
| | | | | | | | | | | | | | QEasingCurve has a richer variety of curves and curveShape was already implemented by changing the easingCurve property. [ChangeLog][QtCore][QTimeLine] Deprecated QTimeLine's curveShape property in favor of the easingCurve property. Pick-to: 5.15 Change-Id: I7261c0f24d7e02bc94624f0b74d699df62de1a52 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QtGui: Rename all QEvent members according to the m_ conventionFriedemann Kleint2020-07-163-166/+169
| | | | | | | | | | | As they are protected, they need to be excluded from the Python bindings, which is best done by a pattern. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I667aa3b8e229e11b3b46635adfddbd62ce4747c1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QtGui/Windows: Move the QRegion conversion functions into QtGuiFriedemann Kleint2020-07-162-0/+71
| | | | | | Task-number: QTBUG-81876 Change-Id: I2297291a4157e7015f499b0a6127301d9cb58526 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* sqlite: Upgrade to 3.32.3Andy Shaw2020-07-163-82/+255
| | | | | | | | | [ChangeLog][QtSQL][sqlite] Upgraded to v3.32.3 Pick-to: 5.15 Pick-to: 5.12 Change-Id: I3c00fb6b0bd7daa3465b38ac6536b82d0b16596f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Android: Don't treat gradle.pro as a buildable targetAndy Shaw2020-07-161-0/+2
| | | | | | | | | | | | | | When installing gradle it can conflict as it will treat it as the target and therefore install it as an executable although it is a directory inside this one. As this does not build anything but is really an installation target, we can mark it as aux template and change the target name to avoid any conflicts with the existing directory. Pick-to: 5.15 Task-number: QTBUG-80938 Change-Id: I000ee57521818b6d4d30d770362ff4700846e576 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Avoid warnings regarding bit-field signednessDimitrios Apostolou2020-07-164-5/+5
| | | | | | | | | | | Up to (including) C++11, integral bitfields of unspecified signedness have implementation dependent signedness. Detected by LGTM.com static analyzer. Pick-to: 5.15 Change-Id: Ibaa0fdc6e443495a3cd40330c4573c9cc6ccdf5b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use qsizetype instead of int in QByteArrayMatcherSona Kurazyan2020-07-152-8/+7
| | | | | Change-Id: Id32dc567fa0359ad281d34fcf88c46484f87ce2c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Don't test for equality if types can't be comparedVolker Hilsheimer2020-07-152-6/+12
| | | | | | | | | For types that don't have an operator==(), always trigger the binding and the changed notification. Task-number: QTBUG-85578 Change-Id: I41374f6d13c88106f4de83864e82172f3a248150 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Allow Windows accessibility backend to receive focus updatesAndre de la Rocha2020-07-151-5/+0
| | | | | | | | | | | | | | | | The removed code no longer applies to the current Windows accessibility backend, and was causing it to miss focus change events when the application UI contained one or more widgets associated with native window handles, or when the Qt::AA_NativeWindows application attribute was set. This caused accessibility tools like Narrator to miss changes in the focused widget. Fixes: QTBUG-81862 Pick-to: 5.15 Change-Id: I6e42d09c54e9e1338fc4b103eba8a0b2c4309e7f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Un-deprecate QMouseEvent::flags() and QGraphicsSceneMouseEvent::flags()Shawn Rutledge2020-07-154-7/+0
| | | | | | | | | | | | | | | | On one hand it looks like API clutter: a whole Qt namespace enum just to track whether an individual mouse click is about to geenerate a MouseButtonDblClick event. On the other hand, we should not remove it without replacing it somehow, so that users don't lose the workaround for QTBUG-25831 that it provides. That would be an invasive change because this flags property exists in QMouseEvent, QGraphicsSceneMouseEvent and in MouseArea { onClicked: doSomethingWith(mouse.flags) } Reverts a small part of 4e400369c08db251cd489fec1229398c224d02b4 Task-number: QTBUG-25831 Change-Id: I9a3b4f6cc6b858012186f10ed57689f8c0f5fd79 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Set QEventPoint::state properly in QSinglePointEventShawn Rutledge2020-07-151-0/+6
| | | | | | | | | | | | | | | | | | State was Unknown by default, and that is OK in widgets so far, because widgets pay attention to the event type, not QEventPoint::state(). But Qt Quick cares about that, because QEventPoint turns into QQuickEventPoint, in which state() has long been important, due to the semi-unified handling of mouse and touch events. If it was not a button that caused the event, state is Updated (the mouse is hovering or dragging, or it's an enter event, wheel event etc.) If more buttons are now held than before, state is Pressed. If fewer buttons are now held than before, state is Released. Amends 4e400369c08db251cd489fec1229398c224d02b4 Change-Id: I926d268982449e46e7ca713c4a6ee2014c28c645 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* moc: Accept NAME attribute for any propertiesUlf Hermann2020-07-151-2/+0
| | | | | | | | At the time when we parse it we don't know if the property will be a QProperty. Change-Id: I720afa6d5ec284c727328db92c791771def82f41 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Work around compiler problems on MSVC 16.6.XLars Knoll2020-07-151-1/+2
| | | | | | | | | | | The compiler apparently doesn't resolve the emplace overload correctly to the rvalue version, leading to infinite recursion in the overload that takes a const Key & as argument. Take a copy to make it explicit. Change-Id: I22039d6ca1e2176c81e51b181c72f511dab662f7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Compare the showDecorationSelected variable when caching the optionAndy Shaw2020-07-151-1/+2
| | | | | | | | | | | | Since the size of the display rect can change if showDecorationSelected is set then this should be included when seeing if the item is already cached. Change-Id: Ied6182337de5894d879c5ba5d1125b4869a11cc9 Pick-to: 5.15 Fixes: QTBUG-85451 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Update documentation of Qt::TextDateEdward Welbourne2020-07-151-1/+1
| | | | | | | | | This follows up on commit 5ba66c5622e9e0da87a5037399b375d7e8cee554, which removed all locale-dependence from QDateTime; I neglected the doc of the DateFormat enum. Change-Id: I244db9c6e1ab47892162c7f441c2b4202662e6e4 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QSystemLocalePrivate::substituteDigits(): change to move semanticsEdward Welbourne2020-07-151-6/+6
| | | | | | | | | | Rather than passing an in-out reference parameter and ignoring the return (of that parameter) use an actual rvalue ref parameter and move the value through the function, to make it easier for compilers to see how to optimize it. Change-Id: Ie239400345da012d8fb8a731394f1687b8b62430 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Simplify uses of QSystemLocale::query()Edward Welbourne2020-07-152-61/+60
| | | | | | | | | | | | | | | QVariant::isNull() shall no longer return true when the variant does package an object, but that object's isNull() is true, so take care to catch QString-wrapping returns that contain an empty string, except where this is a valid return. Generally tidy code processing the returned value. At the same time, make the second argument of query() optional, since it's only used by a subset of the query types. Change-Id: I3dba9a59260f9f182ca277784c77277e2ea255e2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Simplify qlocale_win's getLocaleInfo() and its _int variantEdward Welbourne2020-07-151-32/+28
| | | | | | | | | | | | One of the former's overloads was a template; it and its _int variant took an optional maxlen; no caller passed maxlen, only three callers didn't over-ride the template's <QString> default return value to <QVariant>; so eliminate maxlen and have it simply return QVariant, using .toString() on it where needed. Change-Id: Icf3ff32f167ee96cfbb6412613ecd7f0886a2fe9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMouseEvent: Set QEventPoint globalPressPosition and globalLastPositionShawn Rutledge2020-07-151-1/+5
| | | | | | | | | | | | | | | | | Qt Quick's MultiPointTouchArea compares the delta since press against the drag threshold to determine whether a gesture has started, for example. Since it can be configured to handle both mouse and touch, this needs to be done for mouse events in a similar way as it's done in QGuiApplicationPrivate::processTouchEvent(). Storing one global cursor position is not OK for multi-mouse support, but that's a problem for another time; so we keep using QGuiApplicationPrivate::lastCursorPosition for now. Amends 4e400369c08db251cd489fec1229398c224d02b4 Change-Id: I242565c4548878878a67074877468e5fde84a490 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove linuxofonoFriedemann Kleint2020-07-157-635/+0
| | | | | | | | | The module appears to be unused. Task-number: QTBUG-83255 Change-Id: I0b6942734b8b4fcfd90515ba12d751ffccfad15c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix namespaced buildGiuseppe D'Angelo2020-07-151-2/+0
| | | | | | | | | No need of redeclare the function (wrongly, w/o the namespace), we have the declaration already from qpaintdevice.h. Change-Id: Iab37c1ac8f059b7d93de7f6c8f0a2eeef2314f35 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace emit with Q_EMIT in headerFabian Kosmale2020-07-141-1/+1
| | | | | | | This fixes tst_nokeywords.cpp in declarative Change-Id: Ia94c6c73a830a2eaac9288d9f73d43e63d7a5c17 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>