summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Use QList instead of QVector in guiJarek Kobus2020-06-2978-410/+420
| | | | | | | | Applied to headers only. Source file to be changed separately. Task-number: QTBUG-84469 Change-Id: Ic08a899321eaffc46b8461aaee3dbaa4d2c727a9 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Use QList instead of QVector in corelib docsJarek Kobus2020-06-2915-864/+348
| | | | | | | Task-number: QTBUG-84469 Task-number: QTBUG-85221 Change-Id: Ieb0ba7d82409e3c053a5788a01e92ea495505643 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Move QAlertLevel and QAlertType enums into the namespace QSslTimur Pocheptsov2020-06-295-120/+122
| | | | | | | | | | Not to pollute the global namespace with rather generic names (especially in case QT_NAMESPACE is none); also drop the (now)redundant 'Q' prefix in the names. Change-Id: I57ea7e3996cced705f7ddbdbc1e0231191b31c43 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix QUrl::toDisplayString(PreferLocalFile) returning an encoded pathDavid Faure2020-06-292-5/+7
| | | | | | | | | | | | | It's supposed to return the same as toLocalFile(), for local files, which means passing QUrl::FullyDecoded just like QUrl::toLocalFile() does. But a few code paths were testing component formatting options without masking other FormattingOptions like RemovePassword, so this had to be fixed. Fixes: QTBUG-84594 Change-Id: I82f15148b6d93516200f9ad6258d474e7f10924a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove leftover QT_WARNING_POPTor Arne Vestbø2020-06-291-1/+0
| | | | | | | Amends ab1e0961d4718fb5e36e22c3b70dd98e776e0edd. Change-Id: I460d650e70dc5635cb377569aa976f11fc206d63 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QByteArray::operator[] no longer resizesAlbert Astals Cid2020-06-291-3/+2
| | | | | | | Fix the documentation Change-Id: I328d9dd9255f15225992502dc35ae8877fe206a1 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Use QList instead of QVector in corelib implementationJarek Kobus2020-06-2955-388/+334
| | | | | | | | Omitting state machine and docs for now. Task-number: QTBUG-84469 Change-Id: Ibfa5e7035515773461f6cdbff35299315ef65737 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Fix UITouch event handling on tvOSMike Krus2020-06-291-9/+23
| | | | | | | | | | | | | | | | | | | | | On tvOS touchesEnded: occasionally gets called with touches that have not been passed via the touchesBegan:. When this happens previously cached touch event (that HAVE been passed to touchesBegan:) are no longer valid. This causes a crash when testing if new touches contain old ones (since NSSet dereferences the needle which is no longer valid). Fix uses the unique (unsigned int) hash that UIKIT assigns to the UITouch instance so cached copies are never accessed. Furthermore, tvOS only supports single touch so now just clearing cache when touch has ended. Task-number: QTBUG-84383 Pick-to: 5.15 Pick-to: 5.12 Change-Id: I7592cdde74ce834285e7b14196171f6b57736cc8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Create a Find module wrapper for OpenGLAlexandru Croitor2020-06-293-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | Our .prl files embedded an absolute path to the OpenGL.tbd file. This obviously breaks their usage when used on another machine when no SDK exists. To fix that we need to use a "-framework OpenGL" linker flag instead of linking against the absolute path library. To convince CMake to do that, we have to create a wrapping OpenGL target which sets an appropriate INTERFACE_LINK_LIBRARIES property. So create a FindWrapOpenGL find module to do that on darwin platforms. Adjust helper.py and our build system to use it. This tangentially amends 38cd18384f6198c5bc3ea1da9ffc0158e960a778 because it recreates the FindWrapOpenGL module, but for a different purpose. Task-number: QTBUG-85240 Task-number: QTBUG-84781 Change-Id: I3498c19157ae31db5099e6edfb9d71490187f1d3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove some long-deprecated methods of QLibraryInfoEdward Welbourne2020-06-292-52/+0
| | | | | | Change-Id: If5e85f813921b44971ca8572858051b53e1127a8 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Sune Vuorela <sune@vuorela.dk>
* wasm: fix handling on int dead keys on macLorn Potter2020-06-291-12/+15
| | | | | | | | | Q_OS_MAC is not defined when building wasm on mac, so we need to use a runtime check. Pick-to: 5.15 Change-Id: I1e9c5ec4e11aae94c9d8e918b5f1f1526723c782 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: do not close QIODevice on errorLorn Potter2020-06-291-3/+0
| | | | | | | | | | | Closing it early means the user may get this message when reading data without checking for error: 'QIODevice::read (QNetworkReplyWasmImpl): device not open' Change-Id: I377fc3da68e9d9f14f8504ace5addbb4f8e3c539 Fixes: QTBUG-85176 Pick-to: 5.15 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: search emscripten key firstLorn Potter2020-06-291-8/+9
| | | | | | | | | This fixes key lookups with different keyboard layouts Pick-to: 5.15 Fixes: QTBUG-84494 Change-Id: I18f1643331961d9bfc1ac6977181f8959e76449d Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Remove pthread storage for thread local dataMike Achtelik2020-06-281-59/+21
| | | | | | | | | | | | | | | | | The thread specific QThreadData is currently referenced as a thread_local variable and using a thread specific value via pthread_setspecific. Having both is not necessary, as the pthread value is never directly accessed and only used in the pthread destructor. Using a holder, we can achieve the same and get rid of the pthread handling altogether. This also fixes a bug, where the thread_local currentThreadData is already null, when entering the pthread destructor. In this case it would lead to a new QThreadData being created, when finishing an adopted thread. Pick-to: 5.15 Change-Id: Ib23b840f804637e6b7cebd89016672a34a575380 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Make the path variables in Qt6CoreConfigExtras.cmake relativeJoerg Bornemann2020-06-281-13/+13
| | | | | | | | | | | | | To be consistent with the Qt6HostInfo package, we're providing paths without prefix in the variables like QT6_INSTALL_BINDIR. The full path can be easily obtained by combining the relative path with the QT6_INSTALL_PREFIX variable. Also, the value of QT6_INSTALL_SYSCONFDIR was wrong. It usually is located outside of the prefix. Change-Id: I0035633a8c1c865d86d5ffc8b36565ceb2e7ea25 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* macOS: Clean up modal sessions after each pass of processEvents()Richard Moe Gustavsen2020-06-271-0/+5
| | | | | | | | | | | The Qt macOS event dispatcher defers modal session cleanup until the next runloop pass. But as it stood, we never did do so for stand-alone qApp->processEvents() calls. The result was that a NSModalSession would be kept alive longer than necessary, which would impact the activation state of other QWindows. Change-Id: I054f3084132c9d20a29a3f5823c19b7123ef40bf Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QFileDialog: remove deprecated mode QFileDialog::DirectoryOnlyChristian Ehrlicher2020-06-262-53/+7
| | | | | Change-Id: Ia06e80c1bbed3e5bb80793aebd0a4780eb81a36b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QList: use =default for its default constructorGiuseppe D'Angelo2020-06-261-1/+1
| | | | | Change-Id: Id5270eac2464bf2d3810de18579d4dc295e98b38 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Improve deprecation message for QLine::angle(QLine)Eirik Aavitsland2020-06-261-1/+1
| | | | | | | | | | | | | | angleTo() always gives an answer measured ccw, so between 0 and 360 degrees. The deprecated angle() would give either cw or ccw, depending on which is smaller, so between 0 and 180 degrees. Help users porting by showing a simple way to achieve the angle() behavior in the deprecation message. Change-Id: I66f77d2b4e688562e443428209737aa3332a448f Pick-to: 5.15 Fixes: QTBUG-85087 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QImageIO: use the new allocation checker in the format handlersEirik Aavitsland2020-06-268-88/+45
| | | | | | Change-Id: I604d99ce476d4758a1e20b78257082911f1f1546 Task-number: QTBUG-85037 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Introduce a settable allocation limit on image loadingEirik Aavitsland2020-06-264-1/+80
| | | | | | | | | | [ChangeLog][QtGui][QImageReader] Introduced a settable allocation limit on image loading to limit resource usage from corrupt image files. Change-Id: Ibed7b0cac32798125a060e6db80b17ebc5e70759 Task-number: QTBUG-85037 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QList instead of QVector in openglJarek Kobus2020-06-2613-74/+62
| | | | | | Task-number: QTBUG-84469 Change-Id: I26c1cfab7f2d9aa5c71847ae02bfe0cf15c04a1b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* macOS: Close popups on mouse down using synchronous QPA deliveryTor Arne Vestbø2020-06-261-2/+1
| | | | | Change-Id: I5ccb5ca4f9b9f7a480c575c5a2710ec20361cf88 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* SSL configure test: Fix confusing warningFriedemann Kleint2020-06-262-3/+3
| | | | | | | | | | | | | | | Remove quote character, fixing: Performing C++ SOURCE FILE Test HAVE_openssl_headers succeeded with the following output: Run Build Command(s) src.cxx 8 88: warning: missing terminating ' character 8 | # error OpenSSL was reported as >= 1.1.1 but is missing required features, possibly it's libressl which is unsupported which makes one think the test failed. Change-Id: I0ac02deee4282ef7c953186b820a31309e82b5e1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix up QVulkanWindow docsLaszlo Agocs2020-06-261-0/+14
| | | | | | Pick-to: 5.15 Change-Id: I5a37a57245b8d859adf02810d3954e7532e4a475 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Use QList instead of QVector in networkJarek Kobus2020-06-2632-134/+126
| | | | | | Task-number: QTBUG-84469 Change-Id: I7827da68e73ca8ff1e599c836f2157894c452b63 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* rhi: Enable specifying just an adapter or phys devLaszlo Agocs2020-06-268-71/+153
| | | | | | | | | Required by OpenXR. A VkPhysicalDevice or an adapter LUID + feature level pair should be adoptable while leaving the rest (device, queue, etc. setup) to QRhi as normal. Change-Id: Iada0972671b037b4efb03e7831b7c9b8c5f2393d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Android: fix QDesktopServices::openUrl() error for file scheme pathAssam Boudjelthia2020-06-261-3/+5
| | | | | | | | | | | If the url is a "file:" scheme url don't check for permissions which the file won't have, and then disable StrictMode for API >= 24 to be able to pass the "file:" path to the openUrl intent. Pick-to: 5.15 Fixes: QTBUG-67877 Change-Id: Ia3fecc24a67069dc76f866455277bf8b929e7697 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Add explicit encode()/decode() methods to QStringConverterLars Knoll2020-06-262-4/+28
| | | | | | | | | The functional style interface is nice, but does feel alien in some contexts, so better also have explicit encode and decode methods. Change-Id: Ic07ced15f65cdb3a7f1cf044041e341d2ef87f79 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Unexport QModelIndexGiuseppe D'Angelo2020-06-261-1/+1
| | | | | | | It is entirely inline. Change-Id: I626d6e4f6338dabfcc1e34127c898ed13c5a513b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* macOS: Check that platform window is valid after delivering close eventTor Arne Vestbø2020-06-261-0/+2
| | | | | | | | Fixes: QTBUG-78814 Pick-to: 5.15 Change-Id: I551024c5d777999f7c79d21fd7b7de061c18f971 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QThread: Fix unnecessary stricter accesses to QThreadData::threadThiago Macieira2020-06-251-6/+6
| | | | | | | | | Commit ec6556a2b99df373eb43ca009340a7f0f19bacbd changed the member from a plain pointer to a QAtomicPointer. Not all accesses were caught. Pick-to: 5.15 Change-Id: I3d4f433ff6e94fd390a9fffd161b4ff25508c48d Reviewed-by: David Faure <david.faure@kdab.com>
* Use QList instead of QVector in dbusJarek Kobus2020-06-2514-67/+63
| | | | | | | | Omitted type replacement in qDBusParametersForMethod() for now. Task-number: QTBUG-84469 Change-Id: Ieb9fbb30b431c5e4183ad57acd35640e9556bf6c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QList instead of QVector in corelibJarek Kobus2020-06-2549-198/+166
| | | | | | | | | | Applied to headers only. Source file to be changed separately. Omitted statemachine for now to avoid conflicts. Omitted qmetatype.h for now - to be handled later. Task-number: QTBUG-84469 Change-Id: I317376037a62467c313467d92955ad0b7473aa97 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Use QList instead of QVector in other toolsJarek Kobus2020-06-2511-41/+42
| | | | | | Task-number: QTBUG-84469 Change-Id: I90d0e2e723bb4d205d7bf333b21cdf583fdf4ea0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QList instead of QVector in testlibJarek Kobus2020-06-253-6/+6
| | | | | | Task-number: QTBUG-84469 Change-Id: Icbc3c3130399296f6b5a7e9a313ad4737669de00 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* moc: Fix QProperty code generationFabian Kosmale2020-06-254-8/+15
| | | | | | | | | | | | | | | | This addresses two issues: 1. The generated code for QNotifiedProperty<T, ...> was broken when T is a pointer. Notably, const S* & is not a constant reference to S*. This is addressed by consistently using T const& instead of const T&. 2. The Q_PRIVATE_QPROPERTY approach assumed that the property name and the getter are equal. This does break when they are not, and we are unable to change either of them due to API compatibility concerns. An example of this would be QQuickItem's parent property with a parentItem getter. Therefore, we now allow the usage of NAME to override the name of the property. Change-Id: Idf2e85576c74371b5b0f6db15dbe6f2d17c5e33d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove QPropertyMemberChangeHandler againSimon Hausmann2020-06-251-23/+0
| | | | | | | | | | | | Adding support for a static notifier within QProperty itself - through a QProperty "sister" class - is more efficient in terms of memory consumption and run-time performance. The MemberChangeHandler permanently takes up at least three pointers, while the notified properties only cost one pointer in the binding. Change-Id: Ia1a8c2b66f1f3c2fe13ae0ad9f12cdb6bdcc35ef Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QNotifiedProperty: Add guard callbackFabian Kosmale2020-06-255-59/+104
| | | | | | | | | | | | | | | A guard callback is a predicate which takes the new value set by setValue or computed as the result of a binding expression. If it returns false, the value is discarded and the old value is kept. Note that due to lazyness, when setting a binding, we still notify everyone as the binding is only evaluated on demand, and the guard can thus only run when someone actually queries the value. Note further that a guard is allowed to modify the value that is passed to it (e.g. to clamp it to a certain range). Task-number: QTBUG-85032 Change-Id: I3551e4357fe5780fb75da80bf8be208ec152dc2a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QNotifiedProperty: pass old value to callback if requestedFabian Kosmale2020-06-255-30/+88
| | | | | | | | | Check at compile time whether the static callback takes an argument (which has to be of the same time as the type of the property). If so, retrieve the old value and pass it to the callback. Change-Id: Ib1c4c9e05b826b6be492b03f66fa72ad015963ee Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix QPropertyFabian Kosmale2020-06-251-0/+11
| | | | | | | | | | | | | | | | | This fixes two issues with QPropery: 1. QPropertyBindingPrivate::evaluateIfDirtyAndReturnTrueIfValueChanged calls a user provided evaluaton function. That one might actually destroy the binding and delete the QPropertyBindingPrivate instance. We need however to keep it alive until the function returns. 2. There was an infinite loop between QPropertyObserverPointer::notify and QPropertyBindingPrivate::markDirtyAndNotifyObservers. This can be observed when running tst_palette in qqc2. By returning early in markDirtyAndNotifyObservers if dirty is already set, the issue is avoided. Change-Id: I1f0df05a5a9fa98554183263a25e16747c4d2274 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Simon Hausmann <hausmann@gmail.com>
* Doc: Change docs from internal to reimpPaul Wicking2020-06-251-4/+4
| | | | | | | Pick-to: 5.15 Fixes: QTBUG-82357 Change-Id: I415ee03dd9d1ac02a435a24fb5ab94bf60c07331 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* cmake: Apply symbol visibility settings to Objective-C/C++ sourcesTor Arne Vestbø2020-06-251-0/+2
| | | | | | | | | | | | | | | Otherwise the Objective-C++ sources will be built with the default compiler visibility (visible), and then linked with moc-generated C++ sources that have the Qt overridden hidden visibility, resulting in linker warnings such as: ld: warning: direct access in function 'X' from file 'moc_foo.cpp.o' to global weak symbol 'Y' from file 'bar.mm.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility setting Change-Id: I22e15e7e181a74de8c0a22c73d06e600e582d7fd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Improve castingAllan Sandfeld Jensen2020-06-255-9/+9
| | | | | | | Make a handful of narrowing casts explicit Change-Id: I318e9778840f2437963377b6b97f269d569909dc Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Make qdoc generate usable docs for QVulkanInstanceLaszlo Agocs2020-06-251-0/+4
| | | | | | | | | | | It is not just that the unknown native types (e.g. VkInstance) lead to showing the type as 'int' in some functions, the bigger problem was that a number of functions were not present in the generated documentation at all. Pick-to: 5.15 Change-Id: Id71fe20c3a70a8d3b75bbc693a2a7ee94bb74642 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Remove QByteArray's methods taking QString and their usesSona Kurazyan2020-06-253-247/+0
| | | | | | | | | | [ChangeLog][QtCore][QByteArray] Remove method overloads taking QString as argument, all of which were equivalent to passing the toUtf8() of the string instead. Change-Id: I9251733a9b3711153b2faddbbc907672a7cba190 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Fix qmake mixing with static build and system_xcb_inputJoerg Bornemann2020-06-251-2/+3
| | | | | | | | | | | The .prl generation uses a very simple generator expression evaluator that cannot cope with the $<TARGET_EXISTS> expression used in src/plugins/platforms/xcb/CMakeLists.txt. Replace this genex with a conditional qt_extend_target call. Change-Id: Id17a230d66f701eb0938d10d6b6b7b680290b1c8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix pcre2 compilation with intelcet part 2Alexandru Croitor2020-06-252-0/+80
| | | | | | | | | | | | | I somehow forgot that we build the pcre2 sources not only as part of the bootstrap library and qmake, but also as separate library as well. Apply the flags to the bundled library. Amends 976fa5134aea52741df7b25a196fa36251dc932f Amends fa98adbd04de9d44ce921436b92589a41f285dcd Change-Id: Ia1db3a8bd731c7e3ee4d7109be8e2ef98c594070 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Avoid converting supersized QRectF to QRectAllan Sandfeld Jensen2020-06-251-3/+8
| | | | | | | | | | | Check that the sizes are even representable when checking if clipping is necessary. Fixes oss-fuzz 23630 Pick-to: 5.15 5.12 Change-Id: I95d6873d28b0e4f47aae7666f7ee96b745dc997b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Use QList instead of QVector in sqlJarek Kobus2020-06-2510-16/+16
| | | | | | Task-number: QTBUG-84469 Change-Id: I942aec7d949331a52d7f12fa2725d8d9707f605f Reviewed-by: Lars Knoll <lars.knoll@qt.io>