summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix read-only pseudo-state in QTextEdit/Browser stylesheetEirik Aavitsland2021-01-131-0/+13
| | | | | | | | | | Was implemented for QLineEdit but not QTextEdit. Fixes: QTBUG-83056 Change-Id: I1e67ad0f1c230a062a1e12e8bc0b209c5289dc32 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 2054f451b1fc182fb3f53976b8f1e0026cfcd89a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Fix build with GCC and ltcgChristophe Giboudeaux2021-01-131-13/+18
| | | | | | | | | | | | The porting script could not handle this special case. To achieve the same thing, we'll use an intermediate 'OBJECT' library which will get the '-fno-lto' build flag if the conditions are met. Fixes: QTBUG-89426 Change-Id: Ied62502ce9c7f7fd6b89fab166f7bccfcd6e7433 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 2d4a40f93fd3f0fd31110ef7d19a12fc56c00967) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QComboBox: fix select all columns in the viewChristian Ehrlicher2021-01-131-2/+4
| | | | | | | | | | | | | | | When the QComboBox gets a custom view with multiple columns, only the first one is selected even the selection mode of the view is SelectRows. The selection changes afterwards properly honor the mode though. Therefore check for the selection mode and call setCurrentIndex() with the appropriate flags. Fixes: QTBUG-86776 Change-Id: Ieba7b9e009358e7b6e802b7847640161ec776c64 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit b3b28faf2627aad3a0c47fb4c7c711e0d19984aa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix warning in generated test wrappersAlexey Edelev2021-01-131-1/+2
| | | | | | | | | | | | | | Since test command variable may contain quotes, there is a warning in generated test wrappers related to 'message(FATAL_ERROR', that should display full command in log in case of error. To avoid any complicated quoting of command to only display it, join command into single string in wrapper script and pass resulting variable to 'message(FATAL_ERROR'. Change-Id: Ie990fc0b0bf2c19b119c7c4e2aeec092e5200103 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 7582f7b03d52103c5299812aed8705d21d4f8b9b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Use -ffat-lto-objects for static libraries with ltcg and GCCChristophe Giboudeaux2021-01-131-0/+8
| | | | | | | | | | | | | | | CMake <= 3.19 adds the '-fno-fat-lto-objects' compiler flag unconditionally when CMAKE_INTERPROCEDURAL_OPTIMIZATION is enabled. This is fine for shared libraries but static ones need the opposite compiler flag. Task-number: QTBUG-89426 Change-Id: Ie5f48178803a270f6d94408f7a8e85d379eb123c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 9563be2870b85309e163db950fefcb9200cac6f4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* macOS: Add more padding to width of non-editable comboboxesVolker Hilsheimer2021-01-131-2/+2
| | | | | | | | | | | | | | | | The width of the combobox took the space for the checkmark and the contents into account, but didn't provide any padding on the right side, resulting in the text hitting the right side of the combobox popup. Add another 12 pixels padding to the sizeFromContents implementation, which results in a symmetrical padding on both sides of the text. Fixes: QTBUG-88715 Change-Id: I811da73d11ce935c1fb83efabbe799f9a882e1d7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit ee409a536e7e1e4da28e235c4979a31cf40bb3c4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Windows font engine: Silence warnings about not being able to enumate font ↵Friedemann Kleint2021-01-131-2/+2
| | | | | | | | | | | | families Turn the warning into a qCDebug() statement and add explanatory comment. Fixes: QTBUG-85683 Change-Id: I2a6a7a089a660294f3e9c3096299c75635b3b215 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 29b2387587fe2ed2a73bdcbfa928acb755537284) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove QtDBus includesDavid Skoland2021-01-1351-252/+369
| | | | | | | | | | | | | | Per the discussion of QTBUG-88831, we determined that module-wide imports are unfortunate, especially for compile times. Following this, all QtDBus includes have been replaced with the headers for the classes actually used in each file. Additionally, some cleanup of header file order and format has been performed in the changed files. Change-Id: I62c1b75682a48422f0ba1168dd5d7bd0952808ac Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 9e09677c1dd4da92735736a0fbcb703416bf4d6d)
* rhi: gl: Reset tracked state upon a buffer update or readbackLaszlo Agocs2021-01-131-33/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...encountered in the command list. Move all, previously local, tracking variables into a struct. This allows creating helper functions to reduce error-prone repetition in the executeCommandBuffer() function body. The only real change in the patch is in the handling of Command::BufferSubData and Command::GetBufferSubData: here, instead of calling glBindBuffer directly, use a helper function that also resets the relevant state tracking variables. A subsequent Command::BindVertexBuffer or BindIndexBuffer will therefore correctly rebind the appropriate buffers. This is particularly relevant with certain command stream patterns exercised by some Qt Quick 3D scenes: - A View3D renders a mesh, - another View3D has some 2D Qt Quick content, as well as a model with the same mesh. When both View3Ds use the default Offscreen render mode, the resulting command list consists of segments along the lines of: 1. prepare resources for first View3D 2. render content for first View3D - this binds the vertex and index buffers for the mesh (state is tracked; all 1-4 steps are within the same command list, processed by a single call to executeCommandBuffer()) 3. prepare the content for the "inline" 2D Qt Quick scene - this may update vertex and index buffers, that may lead to adding BufferSubData commands to the list (tracked state (last vertex/index buffer) may need invalidation/updating - and that's where our problem lies) 4. the second View3Ds 3D content is rendered: a model with the same mesh as the last (Quick)3D draw call, so same vertex and index buffers. If #3 did not invalidate and/or update the tracked state, the glBindBuffer calls are (incorrectly) skipped. Fixes: QTBUG-89780 Change-Id: Icc933252f3993b8727d192e7ba4aa0f842bab51e Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 5f8efb259774040303f37d00b6307afd22857af2) Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Revert "Windows QPA: Call QWSI::flushWindowSystemEvents() from WM_PAINT for ↵Morten Johan Sørvig2021-01-131-3/+2
| | | | | | | | | | | | | | | | | | | | full update only" This reverts commit a81dfb32d6f9e7a407567511c20b59e537f6a063. Paint immediately on WM_PAINT in all cases in order to avoid flicker on resize. The cases mentioned in commit a81dfb should no longer apply: - QTBUG-38327: QGLWidget is not supported in Qt 6. - QTBUG-39842: Fixed by using ExcludeUserInputEvents. Fixes: QTBUG-89688 Change-Id: If82cf7703d6663982769048e86a7060223730ce7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 9f894788dda8407c6221aaa1491cd54a5a2b4cb7)
* Set the PlaceholderText color in the palette from the stylesheet as wellAndy Shaw2021-01-122-0/+17
| | | | | | | | | | | The color should be used across the board, so the PlaceholderText color should also be respecting the one passed for Text and so on. Fixes: QTBUG-89815 Change-Id: I2accb3db35488f95a1c8ebacf2316a08ee416fac Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit bb00b63dee85bfe77bd721dd962c768e62c1b1e3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Add details to QFont::toStringPaul Wicking2021-01-121-1/+20
| | | | | | | | | | Add details that explain the return value. Fixes: QTBUG-81467 Change-Id: Ifad407a27259711fc9abe1bacc7ba9db105bdcc0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 8c395a20eddc15ae923b7658f275fa87c8d33db9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* macOS: Don't try to close already-closed/closing file dialogTor Arne Vestbø2021-01-121-1/+7
| | | | | | | | | | | | | | | | | | Doing so results in a warning about "modalSession has been exited prematurely - check for a reentrant call to endModalSession:", and on Big Sur will also result in the file failing to save because the return code from runModal will no longer be NSModalResponseOK. This would happen when the completion handler for beginSheetModalForWindow would call QNSOpenSavePanelDelegate_panelClosed, resulting in calls to QDialog::done(), which in turn tries to hide the dialog, via QCocoaFileDialogHelper::hideCocoaFilePanel(). Fixes: QTBUG-89959 Change-Id: I048afe3dcc7fe62e0d0273f12b4b2c0237abb052 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 163d9c7cc46aa9174fdaaac8d64d8050f05c0a1f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use design metrics when adding text to QPainterPathEskil Abrahamsen Blomfeldt2021-01-121-0/+5
| | | | | | | | | | | | | | | | | | | | | When we add text to QPainterPath, we will add the design metrics (unhinted glyphs) and scale these down to match the target font size. But the glyph positions we pass in are based on the hinted metrics, samples at the target font size. Thus, on fonts/systems with hinting, these do not match the scaled design metrics outlines. To fix this issue, we make sure the text layout uses design metrics when determining the glyph positions. [ChangeLog][QtGui][Text] Fixed an issue where QPainterPath::addText() would get inconsistent kerning for smaller font sizes when hinting is enabled. Fixes: QTBUG-20900 Change-Id: I651997d1a6a86e6271557438afa2cdad078a83ca Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 6a3f8cbc3ad47d8585aac25d3775ed2350afe20c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Windows QPA: Fix crashes when using screen reader with Q(Plain)TextEditFriedemann Kleint2021-01-121-2/+6
| | | | | | | | | | Make sure the search start with valid values. Task-number: QTBUG-89354 Change-Id: I5b5100db89c62f23748b5c88e9188cfe3811e6e8 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 7b7dda654acda884b8ebf6e7f2bfed315a566801) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: exclude failing tests for tst_QPlainTextEdit on AndroidAssam Boudjelthia2021-01-121-0/+10
| | | | | | | | | | | | The Android tests were marked insignificant for some days, due to an emulator issue, these tests slipped during that time. Exclude them now to bring Android tests. Task-number: QTBUG-89402 Change-Id: I96d0f87b36975b7e2c83956b04b6569a03a781a9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit a0ee0118651d97381f892e24b789ac392a2d8be7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: exclude tst_QFile::moveToTrash on AndroidAssam Boudjelthia2021-01-121-0/+3
| | | | | | | | | | | | The Android tests were marked insignificant for some days, due to an emulator issue, these tests slipped during that time. Exclude them now to bring Android tests back. Task-number: QTBUG-89398 Change-Id: Ia65a0ae8d7474fd2554dda299a60371dbbc9dddb Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit b036ca33475a45298e383aa0d42f072d21e5a9df) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QSslCertificate: Guard against accessing empty QByteArrayRobert Loehning2021-01-111-1/+3
| | | | | | | | | Fixes oss-fuzz issue 29276. Change-Id: I57b0c26e5377bd6b82d9f044ae1d1d13acec996a Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit ce90248882b73b4b816a8550710279e3e55ab64c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Explain how boundingRect handles null QRectFPaul Wicking2021-01-111-1/+3
| | | | | | | | Fixes: QTBUG-87107 Change-Id: Ib7f9bd58b0f3454167dc61f95e0d8e6dec52a5ed Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit 149ad1e615bf0974e52a681af73e9fb04bc1c762) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* UndoFramework example: make the background visibleIvan Solovev2021-01-111-0/+0
| | | | | | | | | | | | | Existing background image was not displayed correctly due to scaling (see the description in related Jira task). This commit increases the thickness of the lines, so that the grid is displayed correctly Task-number: QTBUG-89896 Change-Id: Iaa8218a5e9852adbc40715e86862ac3b34e1fbec Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 9b1d769fd0497677ea026c76b8ad65aafacac692) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Generalize timer docsKai Köhne2021-01-111-3/+3
| | | | | | | | | The snippets do not talk about Qt Widgets specifically. Change-Id: Icc4f243c93189f08124074e4918d535aa37e6560 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> (cherry picked from commit 1f53189c29f80c736877333631338670a06ac439) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Link to correct locationPaul Wicking2021-01-111-4/+4
| | | | | | | | | | Reflow text to fit style while at it, to satisfy git clang-format. Fixes: QTBUG-89709 Change-Id: Iab2bf09399adf2cb0f0219ab40978bb238825ae8 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit 713829b718e3842cec3266838d5692f754582de6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Add partial documentation for CMake API (tech preview)Craig Scott2021-01-115-1/+608
| | | | | | | | | | | | | | | There are still other parts of the CMake API that are not yet documented. This change only addresses qt_add_executable() and the Android-related commands it uses. Fixes: QTBUG-88839 Task-number: QTBUG-84482 Change-Id: I761b5ce908d1f62284baabe2d414cd37a0efe83d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 0be2ecee37ee76f04ff73f782014108c15a5831f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QPdfWriter: fix embedding fonts in pdf filesChristian Ehrlicher2021-01-091-1/+1
| | | | | | | | | | | | | The container size change from int32_t to int64_t created a subtle error during font serialization. The size of a QByteArray was serialized without a proper cast and therefore now 8 bytes instead 4 bytes were written to the stream. Fixes: QTBUG-89727 Change-Id: If9255a5a3124038356bc5053810f98c7c88f8a01 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 05706bd2b005dd159be34107cc43c92e7f12eb35) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove redundant .qch from installed docsAlexey Edelev2021-01-081-1/+3
| | | | | | | | | | | Use upper-level document build directory for generated .qch files. This avoids copying of .qch with html documents and duplicating them in the installation directory. Change-Id: I63b2de0047005419d352ea259dec6f17a826a477 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 4d34314679598078d11508f540fe75f51a879046) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QDir/QFileInfo: add doc notes about paths starting with ':'Ahmad Samir2021-01-082-7/+27
| | | | | | | | | | | | | | This is an addendum to commit 0da5726a43b; making the note about paths starting with ':' being treated as absolute paths by the underlying QFileSystemEngine, more visible, so that users of the class don't hit that pitfall. Add similar docs to QFileInfo. Change-Id: Ib34d066d31bb673d340ec41422ed4daf911765b8 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 138fa9f2f4445832769a126a8ea72686b3687933) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: improve FindMySQL.cmakeLi Xinwei2021-01-081-10/+9
| | | | | | | | | | | | | | | | On Windows, Qt should libmysql.lib instead of mysqlclient.lib. Add support for mariadb. Re-indent FindMySQL.cmake. Fixes: QTBUG-88661 Fixes: QTBUG-89775 Change-Id: I6bdf195b8976c59230a12af335a838af55df0caf Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 0c7042defaf3a2a97aebc6f652b4d34229093a5a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Send Qt::Key_MediaTogglePlayPause for VK_MEDIA_PLAY_PAUSEAllan Sandfeld Jensen2021-01-081-1/+2
| | | | | | | | | | | Speculative fix to get the right keys in WebEngine Fixes: QTBUG-89915 Change-Id: I79519b715a1415dccfc4601aae5025b3222a79ae Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit d5a980df97051dea4b952a1f7c9558316454ccf0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove irrelevant test row, fix compiler warningVolker Hilsheimer2021-01-081-1/+0
| | | | | | | | | | | | | | | With the introduction of QKeyCombination, the result of |'ing together a set of modifiers and a key goes always through the same QKeySequence constructor, no matter the order. The implicit conversion through int when the wrong order is used causes a compiler warning as that conversion is deprecated. So remove that test case. Change-Id: I04e27bcd51723ee0efc77e52e45ca3eb8bac5fc7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 9963aaacdb8b79ed079baf6425cef3d0347c2c8f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add newline to the end of the config.summaryAlexey Edelev2021-01-081-0/+1
| | | | | | | | | Amends 94b6bec01f250065b28d5528ea9239bafd5253e5 Change-Id: I0d4be9c7f9aff071468a66d7940d6cd2488136ca Reviewed-by: Cristian Adam <cristian.adam@qt.io> (cherry picked from commit 7f5429f2f45bdfb20ea67ebc9a75891bc5ee6549) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QProperty docs: update macro nameAndreas Buhr2021-01-081-4/+5
| | | | | | | | | | | Use Q_OBJECT_BINDABLE_PROPERTY instead of non-existing ones. Follow-up to 50e1976437f645e9d6571d4498e9d44388e59c19. Task-number: QTBUG-85520 Change-Id: I138f0775d9804029f2ecd6bd3594ab47b247392e Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 618dd6b5a7ed3e9933b3f3a8bf3429caf2506319) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PSQL: Fix the QSqlDatabase testAndy Shaw2021-01-071-5/+15
| | | | | | | Change-Id: Ic7956b556f1f0f10574fd79f5cbd283208240353 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> (cherry picked from commit dce43106e2944e14ac86cf3bc7e624795d2c51cb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Revert "Fix invalid text layout data when a full layout run is interrupted"Frederik Gladhorn2021-01-071-5/+2
| | | | | | | | | | | | | | | | This reverts commit 09ee4282e5eedf5b44245e8b28b223339f87ddfa. The commit made the layouting time go from linear to quadratic, which is problematic when rendering big documents impractical. I wrote an alternative fix for QTBUG-20354 which will come as separate change since it approaches the problem in a different way. Fixes: QTBUG-89599 Task-number: QTBUG-20354 Change-Id: Ie450332f06ee40e60c8e4c6c7d10834bff1acf74 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit a62fa9b7cc520f3548356182bf5d6642c05be204) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix qch install pathAlexey Edelev2021-01-071-1/+1
| | | | | | | | | | Exclude qch_file_name from install DESTINATION Fixes: QTBUG-89769 Change-Id: I8dba13a0a2c2c92d6b2d6aa438c295b42a04156b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 0f38f69d4493d44ef65c4e1ab52f990241139c6a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QTestlib: Fix custom toString() implementations for QList comparisonFriedemann Kleint2021-01-071-11/+11
| | | | | | | | | | | | | d25589e0529732996e405aaff8d6c46b012e1601 mistakenly changed the code to use toString() from the QTest namespace. Call toString() unqualified and move the compareSequence() helper out of the internal namespace. Fixes: QTBUG-89737 Change-Id: I8452a0aead7771ad13a5b95438b54e202ccce76b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit fca3ea040c9d05f112c6fc018f0c8e8c68892642) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix segmentation fault in QObject::dumpObjectInfoAndreas Buhr2021-01-071-1/+1
| | | | | | | | | | | | | There was a check "if (cd && cd->signalVectorCount())" in the code which was faulty because "signalVectorCount()" could return -1 to indicate that no signalVector is available. This patch fixes the problem. Fixes: QTBUG-89846 Change-Id: I12c512ff8d889ba2bd298789ab6081930f739089 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 6a664d0660911173c7e85c60b9af195a0ef4f110) Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix missing repaints with QOpenGLWidget in a QDockWidgetLaszlo Agocs2021-01-061-1/+6
| | | | | | | | | | | | | | | | | | | When AA_ShareOpenGLContexts is not set, docking or undocking will lead to changing the associated top-level window. This leads to changing the OpenGL context, and tearing down and then recreating all OpenGL resources (assuming a well written application). The problem is, there are no paint events after the Show, meaning the user code's paintGL is often not invoked, which leads to showing an empty QOpenGLWidget until something else triggers a paint event. To remedy this, send a paint event upon Show, which should be harmless enough, while fixing the case of docking/undocking. Fixes: QTBUG-89812 Change-Id: I3c4560f8f069d86645a6314bf7ad1b4ee8e2c716 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 3ce5128d8062b7eca4925454610bd1df9db9d77a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Skip already closing widgets when checking whether application can quitTor Arne Vestbø2021-01-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | QApplication tries to close all windows on quit using closeAllWindows, but closeAllWindows skips windows that are already closing. This can happen when calling quit() from a close event for example. QApplication then tries to verify that all windows have been closed, and that logic should skip the same kind of windows as closeAllWindows does. The fact that these two logics diverge was identified earlier in 5af73cd9db52, but aligning them required further work. As that commit notes, the right fix to align them is building on top of tryCloseAllWidgetWindows(), which already returns true/false based on whether it could close all windows or not. But, unlike the existing logic in QApplication::event(), it doesn't skip Popups or Dialogs, so that discrepancy needs further research. Fixes: QTBUG-89580 Change-Id: I87bff56f2eb8a539f1c859c957f5f239dc1eb93d Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit e7370d0583ea8a50b0d5c15bb2b1afee2efc6a7e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Improve QMap, QMultiMap descriptionKai Köhne2021-01-062-4/+2
| | | | | | | | | | | | | | Make it clear that the fast lookup is by key, not by value. See also discussion in https://forum.qt.io/topic/121907/misleading-documentation-of-qhash-qmap/ Change-Id: I396297e0e4674e0a1f889f4138ab52ff224c0ee2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 05146a77fce7f080eefad3f82a14e60c8e3ec464) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Change QLineF::setLength() to work whenever length() is non-zeroEdward Welbourne2021-01-063-18/+18
| | | | | | | | | | | | | | | | | Previously it only worked when isNull() was false, which is true for very short lines, even though length() may be non-zero. [ChangeLog][QtCore][QLineF] QLineF::setLength() will now set the length if the line's length() is non-zero. Previously, it was documented to only set the length if isNull() was false; this is a fuzzy check, so isNull() could be true for a line with non-zero length(). Fixes: QTBUG-89569 Change-Id: I803e622ad09c85815dde25df8dd3ba6dfcba0714 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 6974737695eae5a41bc8a3f344a4f1f199006f21) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove superfluous OpenGL_GL_PREFERENCE assignmentJoerg Bornemann2021-01-061-2/+0
| | | | | | | | | | | | | | | We did set this variable, however after src/gui/configure.cmake was loaded (it is early-loaded in src/CMakeLists.txt), meaning the assignment had no effect. Also, what this assignment tried to achieve is covered by our global CMake policies now. Task-number: QTBUG-89754 Change-Id: Ie7aeee1505d112d799455b2915acbfa7e9a12a64 Reviewed-by: Cristian Adam <cristian.adam@qt.io> (cherry picked from commit 36b1e03ecdaac40aaae5fa42ee9a5b3b50991ea3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Use correct include for QtFuture namespacePaul Wicking2021-01-061-0/+1
| | | | | | | | Fixes: QTBUG-89766 Change-Id: I20c5d3c12490a5eed7bb4e267b2edb5d45dbaadf Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit 32a46a1dcf7c06fac4da2a4e6e549e81d0be98f9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* android: Generate deployment settings file with correct qml-import-pathsCraig Scott2021-01-061-2/+7
| | | | | | | | | | | | | | | | | | The qt6_android_generate_deployment_settings() command had been creating deployment settings files with the wrong key name for qml import paths. This resulted in the QT_QML_IMPORT_PATH target property having no effect. The QT_QML_IMPORT_PATH property can also potentially hold a list, not just a single value. This change now handles the list case as well, previously qt6_android_generate_deployment_settings() was assuming it always held a single path if it was set. Fixes: QTBUG-89628 Change-Id: Ibdd74ec8d130f160433a60a14a0a9f496f496a1b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit ae91e3365b775789fd323301a28ed48619953369) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QMultiHash::equal_range crashesZhang Yu2021-01-062-0/+10
| | | | | | | | | | | | | QMultiHash::equal_range crashes when called in a const member function. The Data `d` is a NULL pointer when calling equal_range() before inserting data into an empty QMultiHash. Then calling`d->find` crashes. Fixes: QTBUG-89687 Change-Id: I10c3d196cbc72aed8c8c922ef16534bba51037b7 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 22416ecaaf58619c716229b71cdca558fda0a861) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* TableView: Trigger the resizing of editors resizing a row/columnAndy Shaw2021-01-051-0/+4
| | | | | | | | | | | | If there is an editor in the table then this needs to be updated as the resize happens, otherwise it will not adapt to the new size correctly and can appear drawn over other cells. Fixes: QTBUG-85484 Change-Id: I918c37f1ee1b0614c03c6b38f95f0f8b35a571f2 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> (cherry picked from commit 9d36ee1904114a91a5c08b18ccfb72cd1d33d58f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update shared-mime-info to the 2.1 release, adjust implementationDavid Faure2021-01-055-7061/+8888
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The spec hasn't changed, but I made the same mistake in xdgmime (the reference implementation) and in Qt: when multiple globs match, and the result from magic sniffing is unrelated to any of those globs, then I used the magic result, but that's wrong, globs have priority and one of them should be picked up. This is now fixed in xdgmime (https://gitlab.freedesktop.org/xdg/xdgmime/-/merge_requests/3) and in the expected results in shared-mime-info (https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/99) which this commit is also tested against. This change also optimizes QMimeBinaryProvider::addFileNameMatches to have the same logic as xdgmime for glob matching: literals > extensions > other globs As soon as one category matches, we can stop there. This makes no difference in the overall results, in practice. The user bug report (against the Qt implementation, actually) is https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/138 as well as https://bugs.kde.org/show_bug.cgi?id=411718 Change-Id: Ia0a34080427daff43c732609443ee6df8f41447c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 0cbbba2aa5b472241d45b4be6959a792062fbc30) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QInputControl: accept surrogate category characterLiang Qi2021-01-052-0/+49
| | | | | | | | | | See also https://unicodebook.readthedocs.io/unicode_encodings.html#utf-16-surrogate-pairs . Fixes: QTBUG-89184 Change-Id: I04eff7f42f0030346603a7b31e4ac854a477030c Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit e688b99995b8c624dbcea296c99fb89262d29e15) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Add proactive check of generator multi-config capabilitiesAlexey Edelev2021-01-051-0/+10
| | | | | | | | | | | Add explicit error, if multi-config build is requested, but selected generator doesn't support it. Fixes: QTBUG-88287 Change-Id: I6dba589bb59ad69fa07221c657df272ec75c359b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 52e1603e33db9ef29fe1eff8c689d38166d393f1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Fix missing report entriesAlexey Edelev2021-01-051-2/+2
| | | | | | | | | | | Increment command_count correct way. Fixes: QTBUG-88054 Change-Id: I0769814ed75ee12db1cab3b1f85635b4d7ee0605 Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 01708a44de2c9fe83e554099528b9c2f0a30d731) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Handle maxImageCount 0 in QVulkanWindowLaszlo Agocs2021-01-052-4/+6
| | | | | | | | | | Take the logic we use in QRhi's Vulkan backend. Fixes: QTBUG-85791 Change-Id: Ifdc2b3d351af71fbc86e20abcede902303e41fc4 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit f6cb24f4c0f1f48f9010ba78670577ff5643132f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>