summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | Un-blacklist QElapsedTimer::elapsed testVolker Hilsheimer2020-03-041-3/+0
| | | | | | | | | | | | | | | | The test was fixed and metrics show no flaky failures anymore. Task-number: QTBUG-58713 Change-Id: I50c0844db099f45bb5b7ca51a510bf0318554c44 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QLibrary: introduce a mutex to protect non-atomic internalsThiago Macieira2020-03-035-52/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And make pHnd atomic. The majority of the variables is updated in QLibraryPrivate::load_sys and updatePluginState(), which get the mutex protection. QLibraryPrivate::unload_sys() doesn't need a mutex protection because we have the refcounting. [ChangeLog][QtCore][QLibrary & QPluginLoader] Fixed a number of race conditions caused by having two QLibrary objects pointing to the same library being operated in different threads. Fixes: QTBUG-39642 Change-Id: I46bf1f65e8db46afbde5fffd15e1a5b3f5e74ea4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QLibrary: stop setting errorString after resolve()Thiago Macieira2020-03-033-13/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | resolve() is technically thread-safe if the library has been loadaed. We don't promise that, but it's there. More importantly, because QLibraryPrivate is shared among QPluginLoader and QLibrary that point to the same file, we can't thread-safely set the error string. [ChangeLog][Important Behavior Changes] QLibrary::resolve() will no longer set or clear the error string based on the success of finding the symbol. The error string will reflect the result of loading the library. Change-Id: I46bf1f65e8db46afbde5fffd15e1a4f4c2713c17 Reviewed-by: David Faure <david.faure@kdab.com>
* | QPluginLoader: rework the loading and the caching of instanceThiago Macieira2020-03-033-22/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a race condition in accessing the cached instance factory member, so rework loadPlugin() to return the cached or newly discovered instance, with proper, atomic caching. Because I had to change that, I took the opportunity to fix the QFactoryLoader code that calls loadPlugin(). Note that QLibraryPrivate::loadPlugin() returns non-nullptr now if the instance is known, which means the last return in QPluginLoader::load() will convert to true, not false, if the instance got cached between the earlier check and the call to loadPlugin(). That's probably what was intended. Task-number: QTBUG-39642 Change-Id: I46bf1f65e8db46afbde5fffd15e1a42d2b6cbf2c Reviewed-by: David Faure <david.faure@kdab.com>
* | Add the include for QPointer to avoid MSVC compilation errorShawn Rutledge2020-03-031-0/+1
| | | | | | | | | | | | | | | | It has been reported that 7447e2b337f12b4d04935d0f30fc673e4327d5a0 needs amending to build on MSVC 2019, although it was OK in CI. Change-Id: Id22c2a3608529abebd66c0e8f401bc6f26f45e18 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | QDom: use correct precision when converting float/double valuesChristian Ehrlicher2020-03-032-10/+21
| | | | | | | | | | | | | | | | | | | | | | | | d7cb21ac085117f879a8aa1d7727b2ca52d3353d change the way a double is converted which resulted in less precision. Fix it by explictily setting the precision in QString::setNum() Task-number: QTBUG-80068 Change-Id: I1fd9d00837155ceb707e84bfeb9deff03b5ab57e Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | xcb: Fix logic for minimized stateJiDe Zhang2020-03-035-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When _NET_WM_STATE_HIDDEN is not contains in the _NET_WM_STATE window property, the window should not be considered to be minimized According to https://specifications.freedesktop.org/wm-spec/1.3/ar01s05.html _NET_WM_STATE_HIDDEN should be set by the Window Manager to indicate that a window would not be visible on the screen if its desktop/viewport were active and its coordinates were within the screen bounds. The canonical example is that minimized windows should be in the _NET_WM_STATE_HIDDEN state. Pagers and similar applications should use _NET_WM_STATE_HIDDEN instead of WM_STATE to decide whether to display a window in miniature representations of the windows on a desktop. For mutter/GNOME Shell, without _NET_WM_STATE_HIDDEN, window manager will not reply XCB_ICCCM_WM_STATE_ICONIC settings in WM_CHANGE_STATE client message. Task-number: QTBUG-76147 Task-number: QTBUG-76354 Task-number: QTBUG-68864 Done-With: Liang Qi <liang.qi@qt.io> Change-Id: Ic9d26d963979b7f0ef4d1cf322c54ef8c40fa004 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | uic: Add pass to empty functionsCristián Maureira-Fredes2020-03-031-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | When there are no translations on the UI file, the function was left empty but without a 'pass' statement, generating a SyntaxError, this change includes it to avoid problems while using the generated Python file. Fixes: PYSIDE-1234 Change-Id: I30482a95c95fb4b4f4456531946a79c960d76318 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Try again to make QDeadlineTimer test robust against context switchesVolker Hilsheimer2020-02-281-16/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | Instead of comparing to absolute values, compare the result from QDeadlineTimer with the reference clock types from std::chrono. Pass the test as long as we are within 10% of that reference. In addition, handle the case where QTest::qSleep sleeps for more than 10% longer or shorter than what is requested, and if so, abort the test. Change-Id: If8b77aea55a8c5c53e96427b2fff2f78281d0f82 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix geometry handling for native child windowsFriedemann Kleint2020-02-284-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | Don't move the native child window position for native child windows. Initial-patch-by: Błażej Szczygieł <spaz16@wp.pl> Task-number: QTBUG-82312 Fixes: QTBUG-79166 Change-Id: I117ef08da13c8e90ff60cf034126c9efdc17b836 Reviewed-by: Błażej Szczygieł <mumei6102@gmail.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | QTextMarkdownImporter: fix use after free; add fuzz-generated testsShawn Rutledge2020-02-286-3/+38
|/ | | | | | | | | | | | | | It was possible to end up with a dangling pointer in m_listStack. This is now avoided by using QPointer and doing nullptr checks before accessing any QTextList pointer stored there. We have 2 specimens of garbage that caused crashes before; now they don't. But only fuzz20450 triggered the dangling pointer in the list stack. The crash caused by fuzz20580 was fixed by updating md4c from upstream: 4b0fc030777cd541604f5ebaaad47a2b76d61ff9 Change-Id: I8e1eca23b281256a03aea0f55e9ae20f1bdd2a38 Reviewed-by: Robert Loehning <robert.loehning@qt.io>
* Android: Don't recurse into directories inside the assets when iteratingAndy Shaw2020-02-271-20/+5
| | | | | | | | | When iterating, it should only return what is in the specified path and not the contents of the sub-directories inside the given path in addition. Change-Id: Iad56f075c22fdf1c633582e37444e26520c24a73 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Windows: Enable closing the system tray menu when clicking outside of itAndy Shaw2020-02-271-1/+5
| | | | | | | | | | In order for the system to close a menu when clicking outside of it or outside of the controlling window for the system tray then it needs to be at the foreground right before the menu is tracked. This makes it act like other system tray menus then. Change-Id: I663670c506cfd1e2ba59cd3e75b12e1f8ba17c33 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* uic: handle header tag for python importsCristián Maureira-Fredes2020-02-271-0/+2
| | | | | | Fixes: PYSIDE-1233 Change-Id: Id2b6e2a8b833da6ea4417d06643b2f7b045515a9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix flaky QElapsedTimer::elapsed test caseVolker Hilsheimer2020-02-271-17/+30
| | | | | | | | | | | | | | | | | Much of this test case was testing that the machine it runs on didn't take more than an expected amount of time, which is an assumption that won't hold in a virtual environment where the hypervisor might decide to not allocate any CPU time to the machine at certain times. Instead, take the samples that we want to compare with once, then use them as reference for further comparisons. Also, split the test in two, with the comparison operators and msecsTo test moved into a separate test function. Change-Id: I7db12b8e02552f4d63af933c1b0fee9d62b591eb Fixes: QTBUG-58713 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* qwindowswindow: Fix screen changes between different DPI screens for native ↵Oliver Wolff2020-02-271-3/+1
| | | | | | | | | | | | | | | | | windows When asynchronous events are used for notifications about screen changes it is possible that we run into a race condition where the scale factor has not yet been updated for the new screen. This results in a wrong geometry being set for the window that is moved between the screens. We do not have that problem with synchronous events. Change-Id: I4eb6d2a7cb49517d271901b479f973e273a0926a Amends: 7eed1e40d4d3b6a066bac52995eed7e75d17de2d Task-number: QTBUG-65580 Fixes: QTBUG-82312 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Stabilize task255529_transformationAnchorMouseAndViewportMarginsVolker Hilsheimer2020-02-271-1/+3
| | | | | | | | | | | This test doesn't test whether window activation works, so there is no reason to fail the test if it doesn't. Instead, abort the test, so that we can record it as a skipped test. Change-Id: Ia44308ef17f110d40c6455d7ee85d90914face4f Fixes: QTBUG-22455 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Levon Sargsyan <levon.sargsyan@qt.io>
* Fix a quadratic behavior in the BiDi algorithmLars Knoll2020-02-271-2/+1
| | | | | | | | Reset the lastETPosition after we changed DirET to DirEN, to avoid iterating over the same set of characters many times. Change-Id: Ib4113d0ba87ad70fc6bb386632eb094f943c080d Reviewed-by: Robert Loehning <robert.loehning@qt.io>
* Fix bounding box of zero-width entities in QFontEngineFTAllan Sandfeld Jensen2020-02-273-0/+30
| | | | | | | | | | | | Freetype can give us non empty bounds for zero-width characters, this change just makes us skip metrics of characters already found to not contribute to text advance. The coretext and windows font-engines already uses the already calculated advance. Change-Id: I82b3521a4fb92614be509be5982cd5ab9c1eb7de Fixes: QTBUG-58854 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* MinGW: Fix debug-and-release configurationKai Koehne2020-02-272-2/+2
| | | | | | | | | | Make sure that, if Qt was configured with -debug-and-release, winmain and user apps are generated by default in debug-and-release mode, too. This amends 9b4ec1393fde2af7deb39b9a2f98bcc93635603f . Change-Id: I0f169d63ca98c9bde41114225004a0844425db33 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* wasm: fix texture leak when window is destroyed in a different contextAlexandra Cherdantseva2020-02-275-9/+36
| | | | | | | | | | Reproduce: Show first window in first canvas; Show second window in second canvas; After screens are rendered destroy first window in first canvas Change-Id: Ifbeb4824c1fdedecf24d5d20e58613d15c066420 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Doc: List alternative ways to get the MySQL C ConnectorSze Howe Koh2020-02-271-9/+12
| | | | | | | | | The C Connector does not appear to be offered as a component in the MySQL 8.0.19.0 installer. Task-number: QTBUG-82187 Change-Id: I4b1ef83cca68e7bf6dd032ba35c0784354d7fed3 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Document the behavior of QLineEdit::inputMask correctlyVolker Hilsheimer2020-02-261-14/+18
| | | | | | | | | | | | | | | | QLineEdit is unicode, and uses QChar::isLetter and QChar::isNumber to evaluate whether an input character is valid. There is no test for ASCII ranges, or converting of input characters to ASCII, so the documentation was wrong. [ChangeLog][QtWidgets][QLineEdit] the inputMask property has allowed any Letter or Number category character for the respective mask characters, not just ASCII. The documentation has been updated accordingly. Change-Id: Ied93cf6ddd334ac91bfbc275107a8eb83d231d80 Fixes: QTBUG-82291 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Make QDeadlineTimer test more resilient against VM starvationVolker Hilsheimer2020-02-261-4/+19
| | | | | | | | | | | | | | | Flaky fails in this test suggest that the VM on which the test is executed does not get CPU resources allocated for enough time to make this test pass. This change makes the test more resilient by taking the measurements as quickly as possible. In addition, use a sanity-check based on std::chrono APIs to abort the test completely if we see that the clock has advanced too far to make the following tests meaningful. Change-Id: Ie6ac4ffb52f20e7774014f8222c9cd8f54d8a263 Fixes: QTBUG-64517 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Documentation: correctly use see-also tags to link to related membersVolker Hilsheimer2020-02-261-4/+5
| | | | | Change-Id: I764eb4730067cd704866191516dc4e8dd1820760 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
* QObject: treat T* -> bool conversions as narrowingMarc Mutz2020-02-262-0/+10
| | | | | | | | | | | | | | | | | | | | Following wg21.link/LWG3228, it was found that a proper variant fix requires that T* -> bool conversions be treated as narrowing conversions in subclause wg21.link/dcl.init.lst. wg21.link/P1957R2 was accepted in Prague 2020 as a DR and retroactively applies to older C++ standards. Since we hard-code the algorithm of [dcl.init.lst], we can and must add this manually. [ChangeLog][QtCore][QObject] For the purposes of QT_NO_NARROWING_CONVERSIONS_IN_CONNECT, pointer (incl. pointer-to-member) to bool conversions are now considered narrowing. This matches the resolution of a defect report in C++ itself. Change-Id: Ifa9a3724c9c8ccd3dd6614928dbbe37477591dc1 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* tst_QSettings: Fix leaking registry keyFriedemann Kleint2020-02-251-2/+3
| | | | | | | | | | | | On Windows, the test was leaking a registry key HKEY_CURRENT_USER\Software\tst_QSettings_trailingWhitespace Fix by using .ini-Format in the temporary directory created by the test. Amends e66a878838f17a0626b0b10b340b1ca4dba56cc1. Task-number: QTBUG-22461 Change-Id: If141a9e72e8faebc3fc46b94dab7b4b728a75292 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use QT_DEPRECATED_X instead of Q_DECL_DEPRECATED_XThomas Sondergaard2020-02-253-12/+12
| | | | | | | | | Allow deprecation warnings to be controlled with QT_NO_DEPRECATED_WARNINGS. Fixes: QTBUG-82424 Change-Id: I6df55ee2abaf4c141ac9b0e7661e46ba3706b20e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* tests/xcb: fix tst_QWidget::updateWhileMinimized() on mutter/GNOME ShellLiang Qi2020-02-252-6/+11
| | | | | | Task-number: QTBUG-68862 Change-Id: I6247867ae4ec126ab0549741f2d2d491a7f2e8a0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Delay the processing of the doc features to the endAndy Shaw2020-02-251-1/+4
| | | | | | | | | | | By delaying it to the end we can be sure that all the Qt modules have their INCLUDEPATHs set and as a result we can avoid long command lines on Windows. Change-Id: I9068f7bf66fe138aad1a633191677a57dfd08d6e Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Set the size of the buffer so it is big enough to hold the contentsAndy Shaw2020-02-251-1/+1
| | | | | | | | | | This will prevent a crash later on when it tries to assign to an index in a QString that has not been allocated. Fixes: QTBUG-81950 Change-Id: Ia0b5648a18f15594eeca07d234bedadcfeb266ac Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove misplaced backslash from documentationVolker Hilsheimer2020-02-251-1/+1
| | | | | | | | A \c{} section is already rendered using monospace, no need to escape the \nullptr keyword explicitly. Change-Id: I004a409892809e968c7a73c68a5b3c54a4680425 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QAbstractItemView: Make sure to update the editor geometriesChristian Ehrlicher2020-02-232-1/+5
| | | | | | | | | | QAbstractItemView::setIndexWidget() does not trigger a relayouting when a new widget is set. This results in a wrong editor geometry under some circumstances. Fix it by triggering a delayed relayout. Fixes: QTBUG-81763 Change-Id: I75d0e19bd5e56d63effe4990d782d202fb39e3e6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix wrong DPI used by QStyle::pixelMetric()Friedemann Kleint2020-02-2222-59/+74
| | | | | | | | | Pass on the option or the widget in order to ensure usage of the correct DPI for High DPI scaling. Task-number: QTBUG-82356 Change-Id: I5df903a83f88adebd143e514e2fead367d39f015 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* tst_qtcpsocket::bind - amend the recent fixTimur Pocheptsov2020-02-221-3/+24
| | | | | | | | | | | | | | | | | | 0. The recent patch fixed the case when we can suddenly (meaning from a particular version of Darwin) bind on a port number 1. Unfortunately, it's not the case for IPv4 and while fixing one test case, the patch broke another - so this patch addresses this. 1. Unfortunately, binding on a fixed port 1 on macOS made the test flaky - we run this 'bind' several times and sometimes OS thinks port is already bound (because of the previous test case) - closing the connection seems to fix this problem (thus this patch do this also). 2. As a bonus a proper resource management added (aka RAII) where we would previously leak a socket in case some QCOMPARE failed. Fixes: QTBUG-81905 Change-Id: I90c128a332903bb44ab37de4775ca00d390dc162 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Stabilize QFileSystemModel::dirsBeforeFiles testVolker Hilsheimer2020-02-221-10/+18
| | | | | | | | | | | | | | | | | | | | Make the test operate in its own temporary directory, so that entries left behind by other test functions don't impact this test. Also, call QFileSystemModel::sort explicitly; it would otherwise only be done once through a single-shot timer, and the test processes events until the model is populated, which might not process that delayed sorting. Since dirsBeforeFiles tests the sorting algorithm and not the sorting logic, best to do this explicitly. In case of sort failure, print diagnostics. Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io> Fixes: QTBUG-75452 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 4e796e0b0dcf4c0848044471021db3afce16ee5d) Change-Id: I144b68a17280a38cc7d6daf7ec343eea4453623d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Detect double timer during single timeout in registerTimer test, and skipVolker Hilsheimer2020-02-221-5/+17
| | | | | | | | | | | | | | | | | We observe this happening on macOS in the CI system, and it might happen if a VM doesn't get CPU cycles for long enough time so that two timers time out. Then event processing will process two timer events, and we overwrite the timerIdFromEvent with the second event. Instead, skip the test when this happens. This is an ammendment to 5c520f4b0ad4b539dc0184c764ca9f12c98730d9 Fixes: QTBUG-71751 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 67491e2df5357706dbf88ddaf1f030ff095b4528) Change-Id: I30eef8cfc94988e6cad500dd5e6722488c2985be
* Discover the conditions under which registerTimer is flaky, and skipVolker Hilsheimer2020-02-221-0/+22
| | | | | | | | | | | On macOS, the registerTimer test case fails frequently, and blocks valid integrations. With this change we try to detect the condition and skip the test. Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 5c520f4b0ad4b539dc0184c764ca9f12c98730d9) Change-Id: I97644b5b4654b4c96fbc99858bbf191e6edb5977 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Update md4c to 0.4.3Giuseppe D'Angelo2020-02-223-235/+386
| | | | | | | | | | Fixes important bugs. [ChangeLog][Third-Party Code] md4c was updated to 0.4.3. Change-Id: Ifed7939b7bd67e3f0a7776b4f4b1132d80141033 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QStyle: Use primary screen DPI as default DPIMorten Johan Sørvig2020-02-211-0/+6
| | | | | | | | | | | | | | | | | Change d603ee68 made the default DPI be 96, for cases where a style option is not provided. This causes inconsistencies, since there are in fact several cases where QStyle API is called without a style option. Restore historical Qt behavior of using the primary screen DPI. Single-screen systems should now be consistent, as before. Task-number: QTBUG-82356 Change-Id: I849934ca2e5604b9fb2f045ed4f6058f3e0426ff Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Replace usage of std::result_of with decltypeMårten Nordheim2020-02-211-1/+1
| | | | | | | | It's slated for removal in c++20 Fixes: QTBUG-82240 Change-Id: I7b35c151413b131ca49b2c09b6382efc3fc8ccb6 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QShaderGenerator: Allow more expressions in input nodesNicolas Guichard2020-02-202-6/+53
| | | | | | | | | | | | | | | | | | Currently QShaderGenerator will crash when encountering some expressions in input nodes. For example, this node prototype would make it crash: "VERTEX_COLOR": { "outputs": ["color", "alpha"], "rules": [ "headerSnippets": ["in vec4 vertexColor;"], "substitution": "vec3 $color = vertexColor.rgb; float $alpha = vertexColor.a;" ] } Change-Id: I37abb8099d376843a4cb13228140467dc1b8f60c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QShaderGenerator: Don't crash when a node has multiple outputsNicolas Guichard2020-02-202-28/+112
| | | | | | | | | | | | | | | | | | | | | | It was already possible to declare a node prototype with multiple outputs, but trying to assign to all those outputs was not possible and instead resulted in a crash. It is now possible to declare nodes like this without crashing: "SEPERATE_XYZ": { "inputs": ["vector"], "outputs": ["x", "y", "z"], "rules": [ { "substitution": "float $x = $vector.x; float $y = $vector.y; float $z = $vector.z;" } ] } Change-Id: I748e77e84c9120dc688c573eee33dc13c6bfbace Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QString: Add missing number() crosslinks to setNum()Andre Hartmann2020-02-201-0/+6
| | | | | | Change-Id: I22a4c86034b399782115bb078c298b211095476a Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Update description of QTextDocument::characterCountPaul Wicking2020-02-201-0/+3
| | | | | | | | | | | | A QTextDocument always contains a QChar::ParagraphSeparator, so characterCount() will always return actual count + 1. The tests confirm this behavior, make it explicit in the docs. Fixes: QTBUG-80597 Change-Id: I91040fb6eb2c4fae5235458c695110f8f15bdfea Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* QShaderGraph: don't generate statements with undefined inputsNicolas Guichard2020-02-192-8/+51
| | | | | | | | | | | | | | | This fixes the shader generation for graphs like this one: Function0 ------> Output0 (with unbound input) Input ------> Function1 ------> Output1 With those graphs, createStatements will not return any statement for nodes Function0 and Output0. Change-Id: Iec32aa51623e176b03ae23e580f06d14df80a194 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix QShaderGenerator crashing when a node port name prefixed another oneNicolas Guichard2020-02-192-3/+109
| | | | | | | | | | | | | | QShaderGenerator didn't handle substitutions like `vec4 $color = mix($color1, $color2, $fac);` Note that `$color` is a prefix to `$color1` and `$color2`. For the substitution `QByteArray::replace` was used so if `$color` was handled first and replaced by `v1`, `$color1` and `$color2` were never correctly replaced and instead became `v11` and `v12` which caused a crash later on. Change-Id: Idaf800fdac468f33c323eb722701da5f8eb918d6 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix RollEffect misplacements in High DPI setupsFriedemann Kleint2020-02-181-5/+11
| | | | | | | | Pass the correct screen as parent of the roll effect widget. Fixes: QTBUG-82011 Change-Id: I25c163cb2e4c038e60ceced702a1ea6c18aa5424 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Make libmd4c a private dependency of Qt GUIDmitry Shachnev2020-02-181-1/+1
| | | | | | | | | Otherwise, when Qt is built with system libmd4c, all applications using Qt GUI have to link with it, even if they do not use it. Change-Id: I662dfd4caf29bb692b62c20cef0e99148a87a99a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QMacStyle - fix tab buttonsTimur Pocheptsov2020-02-181-0/+13
| | | | | | | | | | | not to have arrows under some conditions. NSPopUpButton had a needed color, except it also has arrow(s). Which looks quite confusing on an inactive window on a tab button. Fixes: QTBUG-82122 Change-Id: I40c57abe9ccae48fa906d592169c412f5f89f712 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 0e643bf7830949ade66e76a6eefa99b4b24c422b)