summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate and remove uses of AA_DisableHighDpiScalingTor Arne Vestbø2020-08-3113-68/+15
| | | | | | Change-Id: Ibadce68775858c524b998aacad310905ba2c2e8e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Remove unused exported functions from QWSITor Arne Vestbø2020-08-311-17/+0
| | | | | Change-Id: If85231373bc0ec9a9259f628cd0c62a3a75b813b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove QWSIPrivate::EventType::FrameStrutMouseTor Arne Vestbø2020-08-311-1/+0
| | | | | Change-Id: I66eb05ae7ed58ff3375b756c29a96d5067251cc3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Deprecate and remove all uses of AA_UseHighDpiPixmapsTor Arne Vestbø2020-08-3110-81/+17
| | | | | | | High-DPI pixmaps are always enabled, and cannot be disabled. Change-Id: I01a006b404e5431582b64ef812974c1c022b39ae Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QTextStream: purge deprecated APIEdward Welbourne2020-08-312-74/+0
| | | | | | | All deprecated in 5.15, for removal in 6.0 Change-Id: I40415d388cfcf3e428bce3327297a775ec756eeb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QWeakPointer: purge deprecated APIEdward Welbourne2020-08-314-238/+0
| | | | | | | | Since 5.0: assignment/construction from QObject pointer Since 5.14: data() to recover the packaged pointer Change-Id: I5d6ab561ce39bc0d9d3e5035eb2ca38139cd76b6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Make snippets Qt Gui compilable - textdocument-charformatsNico Vertriest2020-08-313-3/+9
| | | | | | Task-number: QTBUG-81486 Change-Id: I460917c979eb9bd90b9ab7694c0928ab252adae9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Make snippets Qt Gui compilable - textdocument-blocksNico Vertriest2020-08-313-9/+15
| | | | | | Task-number: QTBUG-81486 Change-Id: I663c53d11e4bd3086c4afee0c994d00ecc0c7cad Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Remove obsolete/removed snippet codePaul Wicking2020-08-318-482/+4
| | | | | | Task-number: QTBUG-81486 Change-Id: Ifc6ac9203a046b6b5da6140931c59875f0dc08c3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: rename qfontdatabase snippet project filePaul Wicking2020-08-311-0/+0
| | | | | | | | | | The project isn't included as a subdir of the parent because the project file name doesn't follow proper convention. Fix by renaming the project file. Task-number: QTBUG-81486 Change-Id: Ie32aaa587cdaa6802644588d6631b14e61558ae2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Make Qt Gui snippets compilable - clipboardNico Vertriest2020-08-314-11/+16
| | | | | | Task-number: QTBUG-81486 Change-Id: I41b0c5f021ea9fbbe384f224443608f4397dec24 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Fix documentation warnings in Qt NetworkTopi Reinio2020-08-313-6/+13
| | | | | | Pick-to: 5.15 Change-Id: I3653977a4511aa5c296a3954399342d98ac71586 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix documentation warnings for Qt XMLTopi Reinio2020-08-311-28/+12
| | | | | | | | | Content for the deprecated SAX interface was removed, remove rest of the linking as well. Pick-to: 5.15 Change-Id: Idd233a821139837b779e551aeba914114500e39e Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix alignment of QVariant::Private::data on 32bit systemsLars Knoll2020-08-301-2/+3
| | | | | | | | | We want a suitable alignment to hold a double even on 32bit systems. Change-Id: I35145ded9320c147d4fcd7a04c4b3630912cc00a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Nodir Temirkhodjaev <nodir.temir@gmail.com>
* rhi: gl: Correctly report WideLines for OpenGLLaszlo Agocs2020-08-302-2/+3
| | | | | | | | In core profile contexts a line width other than 1 may not work as expected since it is deprecated in the core profile. Change-Id: I3fc33cf90c65156aa87d04f08518c9ddcfb62625 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: Work around qsizetype fallout in manual testsLaszlo Agocs2020-08-302-2/+2
| | | | | Change-Id: I9f0e210caacc6eefe5ed1ee6fa97574ad5e9edcc Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: vulkan: Enable features on the deviceLaszlo Agocs2020-08-301-2/+17
| | | | | | | | | | | The silly fine-grained enabling of features on the VkDevice seems to be ignored in practice by the implementations, but wideLines becomes relevant because the validation layers warns if a line width is set on the pipeline without enabling the feature on the device. So to play nice, enable the features we care about. Change-Id: I0c64a0d10a8279fe43d899118b0d6f0e4f875d41 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: gl: Also try GLSL 140 and 130Laszlo Agocs2020-08-301-9/+13
| | | | | Change-Id: I21e3ca92d62f20f3ec608bef54c68f9bd09a207f Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* QSqlError: Remove unused members, kept for binary compatibilityMarcel Krems2020-08-302-16/+3
| | | | | | | Also optimize the construction of QSqlErrorPrivate. Change-Id: I791ebe0b66fab43e74093186a798ef9656f97dbd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix text issues when using typographic namesEskil Abrahamsen Blomfeldt2020-08-302-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | By default, only the legacy family names are populated on Windows, since we are using GDI to do the population. The actual typographic names are added later as aliases when the font is loaded. This can cause us to fail matching a font against its typographic name before it has been loaded and e.g .in Qt Quick we will cache the glyph indexes for a fallback font instead. If the font is later loaded and aliases are populated, we will use the cached glyph indexes and get seemingly random glyphs displayed. We reuse the mechanism invented for CoreText to do lazy population of aliases. The population will now happen when the first non-match occurs, and a second attempt will be made after we populate aliases. [ChangeLog][Windows] Fixes an issue where fonts would sometimes not fail to work when selected using typographic names. Fixes: QTBUG-84786 Pick-to: 5.15 Change-Id: Ic7b65cde26ddcbf1a257f1673b9af37154660c2f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Display combobox popup on the correct screenMorten Johan Sørvig2020-08-303-12/+40
| | | | | | | | | | | Display QCompoBox popups on the correct screen, also when the parent window spans multiple screens. In this case, QWidget::screen() will return the main screen for the window, which will not necessarily be the screen at the combobox popup position. Change-Id: Ib8a8163a757f7b849883b833fbde27a1e01af49a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QAbstractItemView: make clipboard copy less constrainedSamuel Gaist2020-08-291-1/+1
| | | | | | | | | | | | | | | | Currently when copying from an item view, only QString value types are considered. This severely limits the usefulness of the feature as it does not even allow to copy number nor dates that can be translated to text. This merge request changes that by checking if the content being copied can be converted to a string rather that just being a string. This will also allow for custom types to be handled. Fixes: QTBUG-86166 Pick-to: 5.15 Change-Id: If57c986ef5831d59eeb59f9c4b900fa126ec31ea Reviewed-by: David Faure <david.faure@kdab.com>
* Remove QStyleOptionProgressBar::orientation memberVolker Hilsheimer2020-08-2912-51/+36
| | | | | | | | | Address ### Qt 6 comment; the information is already stored in the state variable, using the QStyle::State_Horizontal bit. Change-Id: I61d143ba057776f9d622793a0592b5dd4726f25d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Move the data for QTimer into the d-pointerLars Knoll2020-08-292-36/+75
| | | | | | | We shouldn't expose it inline in the header file. Change-Id: I400d805fd0769f788f257bbf78311fe1fb56df79 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix comparison of QVariants that contain pointers to QObjectsLars Knoll2020-08-291-0/+26
| | | | | | | | | | | Allow comparing variants of different types, if both types are pointers to related objects. Amends change 4a69cd7f72140c8f4c83f986b3366f7bd9ba69a3 Change-Id: Ib52b17781b0b7f60cfd5da42fce733faacfa0ae8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Inline some methods that only forward to another overloadLars Knoll2020-08-292-24/+16
| | | | | Change-Id: Iba74962d20c00de8996834f0a003f38c2d2cc3e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use checked string iteration in case conversionsEdward Welbourne2020-08-296-7/+40
| | | | | | | | | | | | | | | | | | The Unicode table code can only be safely called on valid code-points. So code that calls it must only pass it valid Unicode data. The string iterator's Unchecked Unchecked methods only provide this guarantee when the string being iterated is guaranteed to be valid UTF-16; while client code should only use QString, QStringView and friends on valid UTF-16 data, we have no way to be sure they have respected that. So take the few extra cycles to actually check validity in the course of iterating strings, when the resulting code-points are to be passed to the Unicode table look-ups. Add tests that case mapping doesn't access Unicode tables out of range (it'll trigger the new assertion). Added some comments to qchar.h that helped me understand surrogates. Change-Id: Iec2c3106bf1a875bdaa1d622f6cf94d7007e281e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove remaining traces of deprecated QtMsgHandlerMarcel Krems2020-08-293-30/+2
| | | | | Change-Id: I28aecb444eb9bc9e26e6ff8998904dbf28419f25 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* qarraydataops: Fix compiler warnings under MSVC 2019.7Marcel Krems2020-08-291-25/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | qarraydataops.h(444): warning C4127: conditional expression is constant qarraydataops.h(444): note: consider using 'if constexpr' statement instead ... qabstractitemmodel.h(261): note: see reference to class template instantiation 'QList<int>' being compiled qarraydataops.h(1209) : warning C4702: unreachable code qarraydataops.h(1104): warning C4913: user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used src/corelib/kernel/qobjectdefs_impl.h(96): note: could be 'void QtPrivate::operator ,<std::reverse_iterator<QTypedArrayData<T>::iterator>>(std::reverse_iterator<QTypedArrayData<T>::iterator>,const QtPrivate::ApplyReturnValue<void> &)' with [ T=QTextEdit::ExtraSelection ] qarraydataops.h(1104): note: while trying to match the argument list '(std::reverse_iterator<QTypedArrayData<T>::iterator>, std::reverse_iterator<QTypedArrayData<T>::iterator>)' with [ T=QTextEdit::ExtraSelection ] ... codeedit.cpp(84): note: see reference to class template instantiation 'QList<QTextEdit::ExtraSelection>' being compiled Change-Id: I3c5007e40f709c28bc8b3b3bec5ea98ea5f34e5a Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove MSVC workaround for QPolygonMarcel Krems2020-08-295-70/+2
| | | | | Change-Id: I62f7c6da7629dcdfda653a136d3bcd483359c86c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QLocalSocket: Print value OperationError on debug outputMarcel Krems2020-08-291-0/+3
| | | | | | Pick-to: 5.15 Change-Id: Ib3e38e8c0a46b2070eca1e65f081b2d6d2774020 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Remove obsolete snippet codePaul Wicking2020-08-293-181/+0
| | | | | | | | | Obsolete code that is unused/not referenced from documentation - get rid of it. Task-number: QTBUG-81486 Change-Id: I82ee65b6e827666f88fa8ecf6d87ae736c893cc3 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Make Qt Gui snippets compilable - draganddropNico Vertriest2020-08-294-6/+14
| | | | | | Task-number: QTBUG-81486 Change-Id: I0a10e4d353f864e295833ff7d4f47950c5199a21 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Make Qt Gui snippets compilable - brushPaul Wicking2020-08-294-50/+29
| | | | | | | | Remove unused code in snippet files not referenced from anywhere. Task-number: QTBUG-81486 Change-Id: I80b46c013bde99e1aea86311d3579ccc922b8fd7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: rename snippet project filePaul Wicking2020-08-291-0/+0
| | | | | | | | | | The project file name is wrong, so the project won't become part of the parent subdirs project. Rename the project file to correct this. Task-number: QTBUG-81486 Change-Id: I069004caa5e7bdeecc0550fafe78f8977fbf7a87 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Prepend optimize QStringAndrei Golubev2020-08-293-59/+203
| | | | | | | | Added prepend optimization to QString Task-number: QTBUG-84320 Change-Id: Iaa8df790a10c56ecceb06f7143718fb94874ce76 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Support GrowsBackwards in QByteArrayAndrei Golubev2020-08-292-57/+92
| | | | | | | | | | | | | | | Updated main QByteArray operations to support prepend-optimization path There are still many things to consider especially algorithms that use QByteArray::data() or do raw memory operations (e.g. memcpy) regardless of the underlying memory layout, which was somewhat valid before but will likely break now given free space > 0 at the beginning of the byte array memory. Looked at existing cases in the scope of QByteArray, they seem to be OK. Hopefully, CI would find missed violations if any Task-number: QTBUG-84320 Change-Id: I7990cda165b8e77a397e41df4e145468e7a86be0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Reserve extra space for '\0' in QArrayData::allocateAndrei Golubev2020-08-291-0/+30
| | | | | | | | | | | Added implicit space reservation for '\0' in allocation functions used by containers. In current setting, this means sizeof(char16_t) bytes extra memory is allocated each time and implicitly exists. The extra memory is uninitialized by default Task-number: QTBUG-84320 Change-Id: Ia3cc268183c00ea24ea9d326db3f392f71868d52 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Port QtBase to the new QIcon::pixmap() APIMorten Johan Sørvig2020-08-295-57/+44
| | | | | | | | | | | | | | The target devicePixelRatio can now be passed to the pixmap() function, instead of a QWindow pointer. This allows us to remove some usage of the QWidget pointer in the styles, since the DPR is accessible from the passed in painter. The QWidget pointer is still used in places where we don't have a painter. Task-number: QTBUG-85885 Change-Id: Ifecc669f5bad655e289a936d71bafe02605f21a4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Deprecate QIcon API which take a QWindow pointerMorten Johan Sørvig2020-08-292-0/+15
| | | | | | | | | | | - pixmap(QWindow * ...) Use pixmap(size, dpr) instead - actualSize(QWindow *, ...) Use actualSize(size) instead Task-number: QTBUG-85885 Change-Id: Ia2d73eec9f040cd659f39c854463e3cd3ba72b93 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QPixmapIconEngine: port to new virtual functionsMorten Johan Sørvig2020-08-292-24/+16
| | | | | | | | | Add availableSizes() override function and move the implementation out of virtual_hook(). Task-number: QTBUG-85885 Change-Id: Ida3575b25e9bca6167b5be97d6a8f0f624559602 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QIconLoader: port to use new virtual functionsMorten Johan Sørvig2020-08-292-45/+40
| | | | | | | | | Add override functions and move the implementation out of virtual_hook(). Task-number: QTBUG-85885 Change-Id: I35ed81a3483dd85d49474b78572d5302b0e5b608 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Port tst_qiconhighdpi to the new QIcon::pixmap() APIMorten Johan Sørvig2020-08-291-31/+20
| | | | | | | | | | | | Port the high-dpi icon test to use the new pixmap() API which takes the target devicePixelRatio as an argument. This means we can run the fromTheme test at dpr = {1,2,3}, instead of at the current global devicePixelRatio only. Task-number: QTBUG-85885 Change-Id: Iec7b21e04ed760e48964307d2048eaec1976ffe2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add const to some methodsLars Knoll2020-08-283-8/+8
| | | | | Change-Id: I60e93e0c9b57468ef4188bdb60a32fb9ac9046e1 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Use build-system to declare tests that are low-DPITor Arne Vestbø2020-08-2812-22/+11
| | | | | Change-Id: I6da7204683b3c46232cfc542ed5e28131a82e87d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove QUnicodeTools::DefaultOptionsCompatEdward Welbourne2020-08-282-8/+10
| | | | | | | | | | Used in only one place, declared in a private header with a comment saying to remove it. All callers of the one function that had it as default parameter value are passing a value for the parameter. Task-number: QTBUG-85700 Change-Id: Ic72e4df730740a4023b0a43be6bf7acf33a3166b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Convert QStringView::toWCharArray() to return qsizetypeEdward Welbourne2020-08-282-4/+4
| | | | | | | | As requested in a ### Qt6 comment. Task-number: QTBUG-85700 Change-Id: I28a02bf49f4a6455a21a6032179318ce2915b8ca Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Inline QString's conversions to integral types, except long long onesEdward Welbourne2020-08-282-39/+18
| | | | | | | | As requested by a ### Qt6 comment. Task-number: QTBUG-85700 Change-Id: I7c2813c0d8fbc38bcd2f7229de3a9d8e1b8b1f03 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLatin1String: finish up the qsizetype conversionEdward Welbourne2020-08-281-2/+2
| | | | | | | | | Correct one QString::lastIndexOf() whose return and parameter had been changed, but body and comment hadn't. Task-number: QTBUG-85700 Change-Id: Icbcd049f72346f0e696e6b22fe0893f6de5a2646 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use qsizetype for the size of QByteArray's raw data methodsEdward Welbourne2020-08-281-7/+2
| | | | | | | | | A ### comment said to use int in setRawData(), which took a uint; but the underlying QArrayDataPointer::fromRawData() takes a qsizetype, so propagate that all the way. Change-Id: Iba1f8d020c509b33f5c202c22c6a9bf85b3bab7f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>