summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* QPushButton: fix text truncating when icon+text+menu is drawnChristian Ehrlicher2020-02-061-1/+2
| | | | | | | | | When a QPushButton has an icon, text and menu, the text is truncated. In RTL mode the menu indicator is also drawn on the wrong side. Fixes: QTBUG-81784 Change-Id: I27ecb67d12c68ac939540f0f836b2e2875706b4b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: QPersistentModelIndex cannot be stored in a QStandardItemVolker Hilsheimer2020-02-061-0/+3
| | | | | | | | | | | As discussed in the bug report, making sure that the reference counts are correct in such scenarios adds substantial complexity to the code, only to support a bad use-case for which QStandardItemModel was not designed. Change-Id: I663b490ed3471875386add17e7eadb7d8df50489 Fixes: QTBUG-78142 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* sqlite: Update to v3.31.1Andy Shaw2020-02-069-5724/+9005
| | | | | | | | | | Since the patches applied previously are no longer required, we have removed those too. [ChangeLog][QtSQL][sqlite] Updated to v3.31.1 Change-Id: Ia80c31683a8cf92cfd114b6da32460ddcf38d502 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* uic/Python: Add imports for Q(Date)Time, QKeySequenceFriedemann Kleint2020-02-062-8/+8
| | | | | | | | | Those types are used as properties of Q(Date)TimeEdit, QKeySequenceEdit. Fixes: PYSIDE-1215 Change-Id: I8b9ffebb8229fff447aa7dd6bee6e037d708333c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* tst_qnetworkreply: Print proxy warning to stderr instead of stdoutMorten Johan Sørvig2020-02-051-3/+3
| | | | | | | This way we produce valid xml also for the no-proxy case. Change-Id: I5a277255d22c3814fe463c0cd013c04ddc6ad919 Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Android: Fix native open fileDialog crash on AndroidAssam Boudjelthia2020-02-051-0/+1
| | | | | | | | Unregister the ActivityResultListener() after the result is handled. Fixes: QTBUG-78912 Change-Id: Ia2b45eca002e854492c409c70a3876fa8ce98de1 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Fix AndroidAbstractFileEngineBogDan Vatra2020-02-051-1/+4
| | | | | | | | | | "" it's the root folder of the assets, setting m_fileName = "" will make AndroidAbstractFileEngine::setFileName to fail and it will not set the proper flags. Fixes: QTBUG-81535 Change-Id: I0653f83b55ee790c8edf188889ccb30ef54584c0 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* widgets: Don't create winId when the widget is being destroyedVaL Doroshchuk2020-02-052-1/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QWidget is being destroyed, its winId is cleared, and a QEvent::WinIdChange is sent. If a listener of this event reacted by calling winId() again, we might crash. A crash can be observed when this child widget is destroyed in dtor of its parent. E.g. here is a hierarchy of widgets: 1:QWidget 2:QObject 3:QWidget 4:QWidget If a listener subscribed for WinIdChange events from (4), and there is a connection to destroy (4) when (2) is destroyed. This will lead to infinite loop: 1. QWidget::~QWidget 2. QWidget::destroy 3. QWidgetPrivate::setWinId(0) 4. QCoreApplication::sendEvent(q, QEvent::WinIdChange); 5. eventFilter 6. QWidget::winId 7. QWidgetPrivate::createWinId (this=0x555555957600) at kernel/qwidget.cpp:2380 8. QWidgetPrivate::createWinId (this=0x55555596b040) at kernel/qwidget.cpp:2387 9. QWidget::create (this=0x5555558f2010, window=0, initializeWindow=true, destroyOldWindow=true) at kernel/qwidget.cpp:1163 10. QWidgetPrivate::createWinId (this=0x55555596b040) at kernel/qwidget.cpp:2387 11. QWidget::create (this=0x5555558f2010, window=0, initializeWindow=true, destroyOldWindow=true) at kernel/qwidget.cpp:1163 12. QWidgetPrivate::createWinId (this=0x55555596b040) at kernel/qwidget.cpp:2387 Fixes: QTBUG-81849 Change-Id: Ib4c33ac97d9a79c701431ae107bddfb22720ba0d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix symbol resolving for OPENSSL_NO_NEXPROTONEGTimur Pocheptsov2020-02-051-4/+4
| | | | | | | | | | | | Our ALPN-related definitions were conditioned both on OPENSSL_NO_NEXTPROTONEG and OpenSSL version (since ALPN first was introduced in 1.0.2), but resolving was only under version check, not OPENSSL_NO_NEXTPROTONEG. This went unnoticed for many years, and was found only recently with OpenSSL built with no-nexprotoneg. Fixes: QTBUG-81762 Change-Id: I7afca0b2034a234a19b5bcdefd3ce26f4202cddb Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* uic/Python: Set form object name correctlyFriedemann Kleint2020-02-052-2/+2
| | | | | | | | Add missing "not" for the isEmpty() check. Fixes: PYSIDE-1210 Change-Id: I3798d483df9d077300ff69dc5d3a8d08812f534e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Coding style: put case bodies on separate lines from the case labelEdward Welbourne2020-02-051-12/+25
| | | | | | | | | While the single-line-case format is more readable when consistently applied through the whole switch, it works less well when several of the cases are too complex to fit on a single line. Change-Id: I6a84a3d3d1493dadddab103da0336a8ef860563c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Take care of NULL data from QStringView in QCollatorEdward Welbourne2020-02-055-5/+37
| | | | | | | | | | | | | Back-ends need to catch NULL data so as not to call system APIs with invalid pointers. [ChangeLog][QtCore][QCollator] Fixed a regression introduced in 5.14.0 that caused QCollator not to operate with default-constructed QStrings and print a warning on Windows. Fixes: QTBUG-81673 Change-Id: I2eafe1e188b436afcca3cf2ecdf98bba707c44c9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qfloat16: include the tables in AVX2 binaries regardlessThiago Macieira2020-02-031-1/+1
| | | | | | | | | | | | Having a QtCore build optimized for AVX2 does not imply all user binaries and libraries are optimized the same way. Most of them will actually have been built for the base platform, which means they require access to these tables to operate if they are using qfloat16. Introduced by 5e40d3d982d014cd01db4dbe6aecc6ea6baf840a. Change-Id: If79a52e476594446baccfffd15ee2da9e3693cce Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Enable system locale to skip digit-grouping if configured to do soEdward Welbourne2020-02-035-28/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | On macOS it's possible to configure the system locale to not do digit grouping (separating "thousands", in most western locales); it then returns an empty string when asked for the grouping character, which QLocale's system-configuration then ignored, falling back on using the base UI locale's grouping separator. This could lead to the same separator being used for decimal and grouping, which should never happen, least of all when configured to not group at all. In order to notice when this happens, query() must take care to return an empty QString (as a QVariant, which is then non-null) when it *has* a value for the locale property, and that value is empty, as opposed to a null QVariant when it doesn't find a configured value. The caller can then distinguish the two cases. Furthermore, the group and decimal separators need to be distinct, so we need to take care to avoid cases where the system overrides one with what the CLDR has given for the other and doesn't over-ride that other. Only presently implemented for macOS and MS-Win, since the (other) Unix implementation of the system locale returns single QChar values for the numeric tokens - see QTBUG-69324, QTBUG-81053. Fixes: QTBUG-80459 Change-Id: Ic3fbb0fb86e974604a60781378b09abc13bab15d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fall back to "+" if MS returns empty string for positive signEdward Welbourne2020-02-031-1/+11
| | | | | | | | | | | MS's documentation says empty means "+" here, so implement that fallback (which shall over-ride whatever the CLDR has given us for the fallbackUiLanguage's positive sign). Task-number: QTBUG-81530 Change-Id: Ic3f10dd061d0c46d1433f29b8065988da94c38e6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qlocale_win.cpp: distinguish empty QString from null QVariantEdward Welbourne2020-02-031-26/+29
| | | | | | | | | | | | | | | | | An empty string, when packaged as a QVariant, is non-null (as a QVariant); and QSystemLocale::query()'s callers care about the difference. Some callers of the internal getLocaleInfo(LCTYPE type, int maxlen) need an actual QString return, while others are what query() returns, so need to return a QVariant; where the former want an empty string, the latter need a null QVariant. So make that getLocaleInfo() into a template, so callers can chose QString or QVariant as return type, only affecting the failure returns. Change-Id: I7b9a698badedc0e0d8aef8c6e85c22931c33297a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Markdown importer: properly set hyperlinksGiuseppe D'Angelo2020-02-034-2/+104
| | | | | | | | The "title" in markdown is the tooltip, not the name attribute of a link. Also, tell the char format that it's an anchor. Change-Id: I2978848ec6705fe16376d6fe17f31007cce4b801 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Markdown importer: use Unicode decodingGiuseppe D'Angelo2020-02-033-6/+7
| | | | | | | | | | | | | | | Given we feed UTF-8 data into the importer, it must be able to cope with Unicode. Build md4c with UTF-8 support, advertise it at usage site, and change a couple of broken decodings. Driveby: the textedit example used the wrong codec to decode a Markdown file. While the Markdown spec doesn't deal with encodings, using the default one for HTML is certainly wrong. Port the loading of both markdown and plaintext to UTF-8, as that what _saving_ via QTextDocumentWriter would use by default. Change-Id: I51c6214cfe45ebfc5a67a7366f7866a5328366ec Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Android: use the correct string resources for ok and cancelAssam Boudjelthia2020-02-031-2/+2
| | | | | | Fixes: QTBUG-76942 Change-Id: I0c0ccad4980a458ab291ca8ee533fadbedc90456 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Win: work around (estimated) 32k char limit for OutputDebugStringOliver Wolff2020-02-021-5/+25
| | | | | | | | | | | | Reaching a certain number of characters, OutputDebugString will just eat the string and not give any output. As there is no way of handling that error properly we divide the string into usable chunks. Fixes: QTBUG-80996 Change-Id: Ic7ef34c48c212cbaec3a03790d1020506b7b4319 Reviewed-by: Miguel Costa <miguel.costa@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Bump versionAlexandru Croitor2020-02-021-1/+1
| | | | Change-Id: I5ded7891d0d371b2fa8a38d7c6fba765268eb1ce
* Fix 'the the' typo in commentsLinus Jahn2020-02-0216-20/+20
| | | | | Change-Id: I00fcb1c2374e7ca168b6240f9d41c0323fb0867c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Sql driver doc: fix typoChristian Ehrlicher2020-02-011-2/+2
| | | | | | | | Fix a small typo in the link to vcredist.exe Change-Id: I8b2724bd01889ac439bcd1a762a7c74df9882492 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Check for (__ARM_FP & 2) to verify 16-bit FP supportAllan Sandfeld Jensen2020-02-011-1/+1
| | | | | | | | | | | | It appears __ARM_FP16_FORMAT_IEEE is sometimes incorrectly set, and we need to double-check that 16-bit floating point is available in the __ARM_FP macro as well. Task-number: QTBUG-68314 Fixes: QTBUG-81461 Change-Id: I878d6b286aa31e21271163dc6c8f8038b9534c76 Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Pass QDate and QTime by value in various static and local functionsEdward Welbourne2020-01-315-11/+11
| | | | | | | They're value types, so pass them as such. Change-Id: I0dc46c63a3a0e6d859b821362f71390f0148b64c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Pass QDate and QTime by value in manual calendar test codeEdward Welbourne2020-01-312-4/+4
| | | | | | | They're value types, pass them as such. Change-Id: I78e93165d431ac4eff145f47a9385d6bf5cd0c15 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* glgen: Fix compile errorJohan Klokkhammer Helsing2020-01-311-1/+1
| | | | | | | Fixes compile error introduced in ff2b2032a08. Change-Id: Iee1016f7cf05638db575475c5c0d632f8edb3a8c Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* wasm: fix QWasmString::toQString assertion for emscripten 1.39.4Alexandra Cherdantseva2020-01-311-2/+3
| | | | | | | | | | In emscripten 1.39.4 `maxBytesToWrite` argument is required for function `stringToUTF16(str, outPtr, maxBytesToWrite)` Fixes: QTBUG-81728 Change-Id: I634134a30454ae09a9a05593428397b40464b31f Reviewed-by: jian liang <jianliang79@gmail.com> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Handle exceptions when accessing android clipboardMike Achtelik2020-01-311-50/+78
| | | | | | | | | In some circumstances android throws an exception or returns null, when trying to access the clipboard. Fixes: QTBUG-80689 Change-Id: I92c134e2a002fc648ff966e15a19eb3307c428a1 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Doc/Printsupport: misc fixesChristian Ehrlicher2020-01-313-12/+23
| | | | | | | | | - use new signal/slot syntax - fix includes - adjust style Change-Id: Icdc9b33e72e24c39cc6e96b4f2cafa78e179efbf Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Examples: fix compile without printsupportChristian Ehrlicher2020-01-3110-11/+11
| | | | | | | | | | | Checking for QT_CONFIG(printdialog) is not enough when printsupport is completely disabled since then the macro will throw an error. Therefore add an additional check 'defined(QT_PRINTSUPPORT_LIB)' before using the QT_CONFIG macro. Fixes: QTBUG-81626 Change-Id: Ie9898f057cdd6bf9daf4ba9135987cb6e901e7bf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QLockFile: Disable flock() on QNXThiago Macieira2020-01-301-1/+2
| | | | | | | | | | | | | | It appears it's not implemented. [ChangeLog][QtCore][QLockFile] Suppressed the warning on QNX that said 'setNativeLocks failed: "Function not implemented"'. There is no difference in behavior: Qt will continue not to be able to apply an OS- level file lock, which means the lock could be accidentally stolen by buggy software. Correct software using QLockFile should not be affected. Fixes: QTBUG-81701 Change-Id: If79a52e476594446baccfffd15ee35bbac6c6e47 Reviewed-by: David Faure <david.faure@kdab.com>
* Fix flawed logic in QSystemLocalePrivate::getLocaleInfo()Edward Welbourne2020-01-301-3/+3
| | | | | | | | | | | If the first call to GetLocaleInfo() returned non-zero, then GetLastError()'s return has nothing to do with GetLocaleInfo(), since it didn't fail. The check for ERROR_INSUFFICIENT_BUFFER as last error needs to happen in the branch where GetLocaleInfo() failed, returning zero. Change-Id: Idb6eaad1515a003133c787998aff0c265ef98251 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add function for initializing plugin resources for static buildsJoerg Bornemann2020-01-302-34/+46
| | | | | | | | | | Also move the setting of default RCC_DIR into qtFlattenResources as we need a valid RCC_DIR there. Fixes: QTBUG-81699 Fixes: QTBUG-81713 Change-Id: I7558d99f3aca75d2e9cad0ec89fbb0aa0758dcc7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix NEON support on Android armeabi-v7aAllan Sandfeld Jensen2020-01-302-2/+2
| | | | | | Task-number: QTBUG-81461 Change-Id: Ic3e8367aee990291fc676204b9299530953fc87a Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Doc: Update out dated QImage::constScanLine documentationJoni Poikelin2020-01-301-1/+3
| | | | | Change-Id: I0c09a9a6168422c7e41ded289a3e5ba39b84b0ee Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Blacklist failing tests on macOS 10.14Morten Johan Sørvig2020-01-302-0/+3
| | | | | | | | | These tests fail locally, and have been reported to fail on the CI system. Change-Id: Ia76bb15c288af4171ebe47b3c30f3651a63df3f2 Task-number: QTBUG-75786 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Windows style: Fix wrong color of non-editable combo boxFriedemann Kleint2020-01-301-1/+1
| | | | | | | | | | | Use QPalette::Button instead of Base as does QFusionStyle so that style sheets specifying colors for the non-editable case work correctly. Fixes: QTBUG-81573 Change-Id: I84cecb38a48a1450c82498558aa350f3e60a5df6 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Change examples and snippets to pass QDate and QTime by valueEdward Welbourne2020-01-308-21/+22
| | | | | | | They're value types, so we should show them being used as such. Change-Id: If9f0c366fac66306b7861f04e2f047540d444acc Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Simplify textdate/datestring #if-eryEdward Welbourne2020-01-301-20/+8
| | | | | | | | Since datestring implies textdate, we don't need to check the latter inside the #if-ery of the former. Change-Id: I01e648245bc7707db024eac925092ed816173781 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Convert two QDateTime::toString() usages to QLocale::toString()Edward Welbourne2020-01-302-2/+2
| | | | | | | | | | | Qt::LocalDate has been deprecated for ages as an alias for Qt::SystemLocaleDate, which we intend to remove at Qt 6; and all use of them can (and should) be converted to use QLocale::toString(). So do that. Task-number: QTBUG-80441 Change-Id: I0a40fa287cb347c704ec3673d17ef18381063f7f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Add see also link to QScreen::handle()Paul Wicking2020-01-301-0/+2
| | | | | | | | | As the method returns a pointer to a private type (QPA), add see also with link to QPA docs. Fixes: QTBUG-76978 Change-Id: If59670ca0a9a47b42b6441baa23525eb20f92979 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix line ending in custom build steps of vcxproj filesJoerg Bornemann2020-01-301-1/+1
| | | | | | | | | | | We must use Windows line endings in .vcxproj files to separate command lines of custom build steps. This amends commit f65cfadd. Fixes: QTBUG-81553 Change-Id: I8d257f3846af7006df7f8d462b8f44efdce6a1fd Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* Fix qt5_make_output_file macro for file base names with dotsJoerg Bornemann2020-01-301-1/+8
| | | | | | | | | | | | | The qt5_make_output_file macro returns the wrong outfile for infiles containing multiple dots in the file name, e.g. 'foo.bar.h'. To fix this we need to use get_filename_component(... NAME_WLE) which is available since CMake 3.14. Re-implement the NAME_WLE functionality for older CMake versions by using multiple get_filename_component calls. Fixes: QTBUG-80295 Change-Id: Ib8e11a69a41ba7f6739eb3d5541ce8f6f59dc18c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add missing \since for QTextEdit::markdownFriedemann Kleint2020-01-301-0/+1
| | | | | | | | | The property was introduced by 23c2da3cc23a2e04a0b3b3c8ad7fa9cc6126ff23. Task-number: PYSIDE-1208 Change-Id: I2b9c5f116ffb154458de88d0efa0ac81f625121b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Don't use libpng allocated buffer to store ICC profile dataAllan Sandfeld Jensen2020-01-301-1/+1
| | | | | | | | The data becomes invalid by the next PNG read or write. Fixes: QTBUG-81671 Change-Id: I738f5c2abbeebf2c9080d64fef7e66cc082afe89 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Doc: Add since version to enum value documentationPaul Wicking2020-01-302-16/+17
| | | | | | Fixes: QTBUG-80980 Change-Id: I707c4f45d45cb088fb7419038a448d29a2e8dbf5 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Doc: Specify install path for Vulkan examplesTopi Reinio2020-01-305-0/+5
| | | | | | | | | | Vulkan examples, although part of the Qt GUI documentation project, live under their own directory under /examples. Mark the correct install path for these using the \meta command. Fixes: QTBUG-81360 Change-Id: I0b98a19bf56d5b1953dbd90c0d5103be9041689a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QGraphicsProxyWidget: fix handling of proxy focusGiuseppe D'Angelo2020-01-292-1/+71
| | | | | | | | | | | If a widget inside a QGPW has a proxy focus, the code would keep sending focus in events to the proxy even if the proxy was already focused. Amend the check in place to prevent this from happening. Change-Id: Id28d3bfe4f396da5c9477df713441ca7d506662f Fixes: QTBUG-51856 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Doc: Fix copy-paste error in QOpenGLTexture::Target docsLeena Miettinen2020-01-282-2/+9
| | | | | | | | Add a link to https://www.khronos.org/opengl/wiki/Array_Texture. Fixes: QTBUG-49802 Change-Id: Ic740dd758c41a8f3e471a503bd2d02f6d3096f50 Reviewed-by: Paul Wicking <paul.wicking@qt.io>