summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Disable some tools and plugins if regularexpression feature is disabledMitch Curtis2021-11-122-2/+2
| | | | | | | | There are still more failures, but these are low-hanging fruit. Pick-to: 6.2 Change-Id: I3d3a1dc9e754bd4865c850cc1549b0b6fd6fa2f8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QLineEdit: always process an input method eventRichard Moe Gustavsen2021-11-121-4/+0
| | | | | | | | | | | | | | | | | | | | | If a line edit is read-only, it only means that the _user_ should not be able to change the text. Qt itself (or the application, by e.g calling setText()) should not have this restriction. For the QPA plugins to be able adjust the current selection from selection handles, we should always process input method events. It's the callers responsibility to ensure that the focus object supports the actions it sends to the focus object (like ImReadOnly, or ImhNoPredictiveText), and not QLineEdit. This patch will therefore remove the check for shouldEnableInputMethod() before processing the event. This will allow us to adjust the selection from the QPA plugin (iOS/Android). Task-number: QTBUG-91545 Change-Id: Id664ac3605a3fa0bf207635ed31d24c045d29a07 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QWidget: always handle IM queriesRichard Moe Gustavsen2021-11-121-2/+1
| | | | | | | | | | | | | | | | | A widget (e.g QLineEdit) will set WA_InputMethodEnabled to false if it's read-only. But it can still contain selected text (e.g from a mouse drag). In many cases, it therefore makes sense to be able to query the focus object for what that selection is, e.g to be able to show selection handles from the QPA plugin (iOS/Android). Therefore, remove the check if a widget has WA_InputMethodEnabled, and always process the query. The caller can always check this flag himself (or Qt::ImEnabled) before sending the query, if needed. Task-number: QTBUG-91545 Change-Id: Ia3dfa289283b5c157ba47cf0b508f9fddadd2861 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Avoid overflow for date-time in the first (partly) representable dayEdward Welbourne2021-11-111-2/+10
| | | | | | | | | | | | | | Computing the start of the first day's number of milliseconds since the epoch overflows, but adding enough seconds within the day would have brought us back inside the representable range. So, for days before the epoch, add a negative number of milliseconds from the end of the next day instead of a positive number of milliseconds from the (possibly unrepresentable) start of the target day. This is another a follow-up to commit 2b26dea51b26fff2ea955ad2b50c2c20194f0103 Change-Id: I2e0c68d7012db85dfe7da4a8a20ba95368178ed1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Replace enum with constexpr qint64 variablesEdward Welbourne2021-11-111-7/+5
| | | | | | | It's the modern recommended way to do it. Change-Id: I10db128348014b316c1772d18396f272b0a2b766 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix QMultiHash::operator== crashAndreas Buhr2021-11-111-3/+3
| | | | | | | | | | QMultiHash::operator== crashes when comparing two unequal objects. This patch fixes it. Pick-to: 6.2 Fixes: QTBUG-98265 Change-Id: Ibf9fef3372a2b4581843be5f25e65cc9a55ef64d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QDuplicateTracker: add clear()Thiago Macieira2021-11-111-0/+5
| | | | | | | | I'll need it in QFactoryLoader. Pick-to: 6.2 Change-Id: Ice04365c72984d07a64dfffd16b47f68d25252b4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QLibrary/QPlugin/QFactoryLoader: convert to category loggingThiago Macieira2021-11-114-68/+46
| | | | | | | | | | | | | | | | | | | | | | | | This adds three categories: - qt.core.library - qt.core.plugin.loader - qt.core.plugin.factoryloader plus the "qt.core.plugin.elfparser" category (only available in developer builds). All three use the new Q_LOGGING_CATEGORY_WITH_ENV_OVERRIDE technique which enables their debugging if the QT_DEBUG_PLUGINS=1 variable is set. As a consequence, some warnings were downgraded to debug messages. I've only left as warnings situations where a real problem occurred, since they now get printed by default: failures to open or mmap a file, corrupt plugin metadata (but not scan of non-plugins), use of QPluginLoader with a static build of Qt. Drive-by update of some messages to make them prettier and/or use qUtf16Printable(). Change-Id: I3eb1bd30e0124f89a052fffd16a752acfe89c19e Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* QFileDialog: Fix adding default suffix when file path contains dotAlexander Volkov2021-11-121-3/+8
| | | | | | | | | | Check that a file name, not the full path, contains a dot. Fixes: QTBUG-59401 Pick-to: 5.15 6.2 Change-Id: I193b2ae457a3ac6a460524dbf200786eb3461cef Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Windows QPA: Set SWP_NOCOPYBITS during resize to avoid jitterYuhang Zhao2021-11-121-1/+6
| | | | | | | | | | | | | Allowing Windows to re-use parts of the client area when resizing might result in jitter. See discussion in: https://stackoverflow.com/questions/53000291/how-to-smooth-ugly-jitter-flicker-jumping-when-resizing-windows-especially-drag Fixes: QTBUG-97774 Pick-to: 6.2 Change-Id: Idc8f0d1953dd0a8b329312d8a9fd0509cc24d81f Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QInputMethod: check if focusobject supports the "new" IM function before ↵Richard Moe Gustavsen2021-11-111-6/+10
| | | | | | | | | | | | | | | calling it We use QMetaObject to invoke the "queryFocusObject" function. But if the current focus object doesn't implement this function, we get a "QMetaObject::invokeMethod: No such method" warning. This patch will add a check if the focus object supports IM queries before trying to call "queryFocusObject", to avoid the warning. Task-number: QTBUG-91545 Change-Id: I3aa8bd2d4bf57bd42c2d77ed71174ec4f9951f81 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QIOSTextInputOverlay: listen for selection changes, also for Qt::ImReadOnlyRichard Moe Gustavsen2021-11-111-4/+28
| | | | | | | | | | | | | The focus object can emit selection updates (e.g from mouse drag), and accept modifying it through IM when dragging on the handles, even if it doesn't accept text input and IM in general (and hence return false from inputMethodAccepted()). This is typically the case for read-only text fields. So we should listen for selection changes and enable handles also for this case (unless the IM hints tells us explicitly not to use handles/edit menu). Fixes: QTBUG-91545 Change-Id: I2855505fc229e954b2c43f5e11374e64bba7eb4e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QIOSInputContext: use QIOSResponder when the focus object is Qt::ImReadOnlyRichard Moe Gustavsen2021-11-111-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | In Qt, Qt::ImEnabled means that the focus object accepts text input from input method (IM) events. But the IM API also contains API for dealing with text selections. Text input and text selections are logically two different operations, but since IM makes use of selections to implement text input (like selecting a word to suggest a spelling correction), it's understandable that they are combined into to same API. So when a focus object reports Qt::ImEnabled to be false, it only means that it doesn't accept input. E.g a TextArea in QML with "readOnly:true" will set Qt::ImEnabled to false. At the same time, it can have "selectByMouse:true", which lets you select text with the mouse. This behavior is consistent in Qt, for both Quick, Controls 2 and Widgets. Since we want to support any selections done in controls/widgets on iOS with selection handles and edit menus, regardless if the focus object accepts input or not, this patch will set the QIOSResponder (with read-only actions) as first responder when we detect a focus object with Qt::ImReadOnly. This means that if a query for Qt::ImReadOnly returns "true", we take that to mean that it implements the IM API, but without accepting input. Task-number: QTBUG-91545 Change-Id: I07349909a3bca81f484a2e9af9672428dca62c49 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QIOSTextInputResponder: factor out the "read-only" part to a ↵Richard Moe Gustavsen2021-11-115-136/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | QIOSTextResponder base class QIOSTextInputResponder has two responsibilities; It takes care of handling text input from UIKit, and to implement first responder actions related to the edit menu, like copy and paste. Currently the responder offers both writable (paste) and readable (select, copy) actions. Because of the former, it means that it can only be used for focus objects that accepts text input. Since we also want to be able to show an edit menu for selections done on a read-only input field, this patch will factor out the read-only actions we want for that case into a QIOSTextResponder base class. An instance of this class can be used as first responder for a focus object that has read-only text, but otherwise doesn't support text input. This part is implemented in a subsequent patch. The remaining set of writeable actions, together with input method handling, will continue to be in the QIOSTextInputResponder subclass. Task-number: QTBUG-91545 Change-Id: I1c215bb509eb7820c6c60f7ad806f61a5de02ded Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QSlider: Always set the sunken state and the active controlVolker Hilsheimer2021-11-111-6/+7
| | | | | | | | | | | initStyleOption should initialize the state based on which controls are pressed or hovered, not only when painting but also when calling other style APIs. Pick-to: 6.2 Task-number: QTBUG-98093 Change-Id: I482793b7de38657aa36a20d0abab8845155ad0e9 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* wasm: fix native timer update for the no-timer caseMorten Johan Sørvig2021-11-111-2/+10
| | | | | | | | | | | | | QTimerInfoList::timerWait() does not update the timespec out argument if there are no active timers, which caused the current code to calculate an arbitrary toWaitDuration. Instead use the timerWait() return value, and clear any native timers if there are no active Qt timers. Pick-to: 6.2 Change-Id: I7d5ec4c2930000bece6f6ea6c63e76f4df543b04 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* wasm: make timers work for the new event dispatcherMorten Johan Sørvig2021-11-111-3/+0
| | | | | | | | | | Don’t exit from the timer callback if there is no main thread event dispatcher, since it could be that the main thread event dispatcher is of the old event dispatcher type. Pick-to: 6.2 Change-Id: Ibb7a34a99e2001b52d2a985022f5baa7cd2152bf Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Fix not respected qt.conf settingsMichal Klocek2021-11-111-6/+13
| | | | | | | | | | | | | | | | Change 6fb569af951 introduces reloadOnQAppAvailable for QLibrarySettings, however it is missing a reload check for hasPaths, this breaks essentially reading custom qt.conf Add missing check. Fixes: QTBUG-97382 Fixes: QTBUG-97383 Fixes: QTBUG-97947 Pick-to: 6.2 Change-Id: I28379d9dd38357c290edd44b93d3bea489b9cefe Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Doc: Fix qdoc warningsVenugopal Shivashankar2021-11-112-2/+5
| | | | | | | | | | In addition, added the missing warninglimit entry to a few doc configs. Change-Id: I51b9d2ad66123a2a9673a3b42870662641375e6b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Add missing qt namespace in qthreadstorage.hAlexey Edelev2021-11-111-0/+4
| | | | | | | | | | | Wrap 'else QT_CONFIG(thread)' block in qthreadstorage.h with qt namespace Pick-to: 6.2 Fixes: QTBUG-98085 Change-Id: Ica1817fa6beeaf9e4883edaa8738f042b29f0c5e Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qmetatype.cpp: provide missing initializer for const variableThiago Macieira2021-11-101-1/+1
| | | | | | | | qmetatype.cpp(1565): warning #854: const variable "metatypeHelper" requires an initializer -- class "struct <unnamed>" has no user-provided default constructor Change-Id: I2bbf422288924c198645fffd16a9b868ff7adcb9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix 32-bit builds broken by mul_overflow() on qint64Martin Storsjö2021-11-101-1/+1
| | | | | | | | | Use std::integral_constant to avoid instantiating QIntegerForSize<16>, caused by 2b26dea51b26fff2ea955ad2b50c2c20194f0103 Change-Id: Ia6f49a1dcd82835c7e76200a650767fc519eab90 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Q{XcbGl,EglFSDevice}IntegrationFactory: remove unused extra plugin pathThiago Macieira2021-11-104-51/+6
| | | | | | | | | | Cargo-cult copied this from somewhere, unnecessarily. This just made the code bigger for no reason. Task-number: QTBUG-97950 Pick-to: 6.2 Change-Id: Ice04365c72984d07a64dfffd16b48520d42c7043 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QGuiApplication: properly decode path command-line argumentsThiago Macieira2021-11-101-2/+2
| | | | | | | | | Using QFile::decodeName, not QString::fromLocal8Bit. Pick-to: 6.2 Change-Id: Ice04365c72984d07a64dfffd16b47dcbfee23341 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QFileSystemEngine: Don't use _?W suffixesIevgenii Meshcheriakov2021-11-101-7/+7
| | | | | | | | | We don't use W suffix for most of the Windows API so there is no need to use it here either. Also remove W suffix for variables of type TRUSTEE (was TRUSTEE_W). Change-Id: Id67b772ba5d3232f882841a1e581fb1bbd392fa4 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Use nullptr to represent null pointersIevgenii Meshcheriakov2021-11-101-39/+36
| | | | | | | Replace occurrences of NULL and 0 when used for pointers. Change-Id: I485e73d22a1a85d1303f3e0967cd4e8f10ff5d33 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QFileSystemEngine: Fix some code style issues in Windows backendIevgenii Meshcheriakov2021-11-101-55/+113
| | | | | | | | | | | Wrap lines at column 101 so that it is easier to edit the file and review the changes in Gerrit. Move comments when they cannot be easily wrapped. Add curly braces to `if` statements if they became multiline. Run `git clang-format` on the file afterwards. Change-Id: Ib21afd65147a7b202e031d4a865b5f615e5ad6d8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Move toMode_t() from qfilesystemengine_unix.cpp to qfiledevice_p.hIevgenii Meshcheriakov2021-11-102-28/+37
| | | | | | | | | | The function is needed in multiple files to implement QDir::mkdir() and QFile::open() methods that accept a permission argument on Unix. Task-number: QTBUG-79750 Change-Id: Ib0853f7d12bcb5d6f1116b43ec1aa07b6554bb93 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Clean up exports from qlocale_p.hEdward Welbourne2021-11-101-2/+3
| | | | | | | | | | | | Explain why QSystemLocale needs to be an export. Unexport QLocaleId::fromName() now that qttools no longer uses it. QLocalePrivate was only Q_CORE_EXPORT for the sake of one use in tst_QLocale, that can now be replaced by a call to a public QLocale method. Change-Id: I1efe8ee03488acfc6e1c36661f6e956a86e191c3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QPushButton: emit released signal when mouse dragged out of boundsChunLin Wang2021-11-101-0/+2
| | | | | | | | | | | | After special processing for hover, QPushButton::mouseMoveEvent() needs to call the base class function, like every virtual override should, to continue processing other logic. Amends 3310e13a17d2249a86fa533e350744c5593be54f Fixes: QTBUG-97937 Pick-to: 6.0 6.2 Change-Id: Ic2e111d6c38371e0aa04423f5fb26c52717bf5fb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove useless blocksIevgenii Meshcheriakov2021-11-101-38/+34
| | | | | | | Don't put the code inside two blocks for no reason. Change-Id: I54b8d6fbfab50a26ddcd8ec07ba689e5094bcad3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Add QGregorianCalendar::yearSharingWeekDays()Edward Welbourne2021-11-102-0/+27
| | | | | | | | | | | When fixing up problems on system APIs with limited date ranges, we need a year, inside the supported date range, in which Gregorian dates fell on the same days of the week as a given year outside the range. A year with the same last two digits makes handling of two-digit year formats easier. Change-Id: If64ee27e829f9dcfd5504ed8ba51f72c36297242 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Improve unicodeForDigit()'s commentsEdward Welbourne2021-11-101-2/+3
| | | | | | | | | I'd typo'd the Suzhou one-digit. Record that our CLDR scanner verifies this is the only number system with non-contiguous digits, rather than merely recording a (now old) CLDR version in which that was true. Change-Id: I6f5b5d1f0a5aa1cd0557f62f296777b90b603087 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Bump WINVER, _WIN32_WINNT and _WIN32_IE to _WIN32_WINNT_WIN10 (0x0A00)Yuhang Zhao2021-11-108-52/+23
| | | | | | | | | | | And bump NTDDI_VERSION to 0x0A00000B (NTDDI_WIN10_CO) at the same time, to unblock the developers from accessing the latest Windows APIs. Pick-to: 6.2 Change-Id: Ifbc28c8f8b073866871685c020301f5f20dc9591 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* rhi: Expose the maximum uniform buffer range limitLaszlo Agocs2021-11-108-1/+62
| | | | | | | | Pick-to: 6.2 Task-number: QTBUG-97715 Change-Id: I7f0a52c410b9b77f735fb3b7fd33141674bb0cda Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Remove unreachable breaksDavid Skoland2021-11-101-5/+0
| | | | | Change-Id: I0e005964624125d3ab12f77c94fd393802547a13 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add additional grapheme, word, and sentence break class tests from tr29Øystein Heskestad2021-11-101-4/+0
| | | | | | | | | | | Stop turning THAI CHARACTER SARA AM into a grapheme boundary because it breaks a test and chromium does not consider it to be a separate grapheme. Fixes: QTBUG-88545 Change-Id: Ib1aea8dbb66ac42b2129cf9fe04c39f5f76eeb36 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFactoryLoader: unconditionally provide toJsonFabian Kosmale2021-11-101-2/+0
| | | | | | | | | | | Amends c0a8cfe1677f55daec4bc8626aced41c7ebeb1c4. The StaticPluginLoader needs it, too, and that one is available in non-library configurations. Change-Id: I5d396e78abe7358a5df5ef816cfe92137d3ae4b5 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLocale: Add support for Kaingang and Nheengatu languagesIevgenii Meshcheriakov2021-11-106-8/+77
| | | | | | | | | | Update the locale generation script to support Kaingang and Nheengatu languages. These are new in CLDR v40. Regenerate the locale data. Task-number: QTBUG-94358 Change-Id: I5195d5161d8c4d9f17129bbcfde39dfd3fcf1cd5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Update CLDR-derived data to newly-released v40Ievgenii Meshcheriakov2021-11-106-4805/+4835
| | | | | | | | | | | | | Update tst_qlocale to take into account "narrow" day representation change for Russian locales. This version of CLDR changes narrow forms to one letter. Previously those forms were identical to short forms (two letter). The new representation is consistent with other languages and so does not appear to be a bug. Fixes: QTBUG-94358 Pick-to: 6.2 Change-Id: I9724c281a250685da8232e5c05c9c375a8c79253 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* locale_database: Add entry for 'South Sudan Standard Time'Ievgenii Meshcheriakov2021-11-101-172/+174
| | | | | | | | | | | | This timezone is new in CLDR 40, Olson database calls it Africa/Juba. The offset is UTC+2. Reference: https://techcommunity.microsoft.com/t5/daylight-saving-time-time-zone/2021-time-zone-updates-for-republic-of-south-sudan-now-available/ba-p/2234981 Task-number: QTBUG-94358 Pick-to: 6.2 Change-Id: Ib70dbd9b472eb9cf8cb62a0eb5e241199148c077 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Capture full logcat output in Android unit testsAndreas Buhr2021-11-091-1/+69
| | | | | | | | | | | | | | | Previously, when running unit tests on Android, the log presented to the user was the log as known to the Qt logging system. This does not include log messages generated by Java code using e.g. Log.d("message"). Neither does it include log messages by system libs. This patch changes androidtestrunner to capture the full logcat output for the unit test. This improves the developer experience when working with unit tests. Fixes: QTBUG-93438 Change-Id: I580f728349041eb8a84a32d187754b7b5448f512 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* QTestLog: Properly own the loggersUlf Hermann2021-11-093-10/+12
| | | | | | | | | | | | | | | Previously, the loggers would leak if the application failed to call stopLogging(). Now they are owned by the global static which will delete them in that case. Also, since we have to adapt loggerCount() to the fact that std::vector uses size_t, recognize that we only ever want to know whether the number of loggers is 0. Change the method to only provide that information rather than the actual number. Change-Id: Ieb2e185048d573ec7f36373ad49bb2a0ca391ce3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QDomDocument::setContent: Open device if necessaryFabian Kosmale2021-11-091-0/+16
| | | | | | | | | | | | This restores the Qt 5 behavior in Qt 6, but prepares for disabling it in Qt 7. We want to deprecate the current behavior, as it makes it unclear who is responsible for calling close. Fixes: QTBUG-97747 Pick-to: 6.2 Change-Id: I2c99eb96667e784576d8850085068ca334d75b16 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add compatible weak pointer move operationsAllan Sandfeld Jensen2021-11-091-1/+18
| | | | | | | We have those on QSharedPointer, so adding them for consistency. Change-Id: Iab5eddc79206605a4bcce46f63e0fb685aed40ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix internal mimetypes db on Windows when compressed by an external toolHannah von Reth2021-11-091-0/+1
| | | | | | | | | Ensure to use binary encoding when handling the output of the compression tool. With out this change \r are dropped and the compressed file is corrupted. Change-Id: Iaf9b1fc015a376682f793aff079f45d03b201aec Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Avoid painting outside boundaries when printing QGraphicsProxyWidgetEirik Aavitsland2021-11-091-0/+4
| | | | | | | | | | | Implement clipping to widget geometry when rendering to other paintdevices. Fixes: QTBUG-98026 Pick-to: 6.2 5.15 Change-Id: I5652bdb8cc052ae34f05ea7963943d2b5b28e220 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Don't quit application if we're not in execTor Arne Vestbø2021-11-081-0/+3
| | | | | | | | | | | | | | | | The documentation states that the function will not have any effect before control enters the main event loop. Prior to 0c02f133f3daee1 this was incidentally true due to QCoreApplication::exit just setting quitNow to true and exiting all the event loops (which before exec were none), and exec() setting quitNow to false explicitly. But now that we plumb the quit down to the platform we can't rely on this incidental behavior, and need to check explicitly. Fixes: QTBUG-98088 Pick-to: 6.2 Change-Id: I54cece3630e39e4456abc3b372839c0b5c4c4713 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* qoperatingsystemversion_win: fix thread raceMårten Nordheim2021-11-081-3/+4
| | | | | | | | | | | | If two threads call the function at the same time before the static is initialized one of them may end up with a half-written object. Amends 3fe89eec61e2c819bb54a5d3dfe4bc29dba49ff3 Pick-to: 6.2 Change-Id: Ie08970f9ee283fd75292a8b44a1fca89de4b04eb Reviewed-by: Yuhang Zhao <2546789017@qq.com> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Draw QTableView grid lines centered between table cellsTor Arne Vestbø2021-11-081-3/+5
| | | | | | | | | | | | | | | | We were reserving space between table cells corresponding to one logical pixel, which on retina screen results in two device pixels. By drawing the grid line with a cosmetic pen, we were only filling one of these pixels, leaving space for leftover pixel dust from earlier blits. By drawing with a non-cosmetic pen of size 1, and ensuring that the grid line is drawn at the center of the grid, we end up filling the entire grid line, without overdrawing the table cells. Pick-to: 6.2 Change-Id: I7f4d2b27380e5a3d221e265a25f7531fdc4a02b3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>