summaryrefslogtreecommitdiffstats
path: root/src/gui/text
Commit message (Collapse)AuthorAgeFilesLines
* Centralize the implementation of move assignment operatorsGiuseppe D'Angelo2020-10-037-16/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment we have two main strategies for dealing with move assignment in Qt: 1) move-and-swap, used by "containers" (in the broad sense): containers, but also smart pointers and similar classes that can hold user-defined types; 2) pure swap, used by containers that hold only memory (e.g. QString, QByteArray, ...) as well as most implicitly shared datatypes. Given the fact that a move assignment operator's code is just boilerplate (whether it's move-and-swap or pure swap), provide two _strictly internal_ macros to help write them, and apply the macros across corelib and gui, porting away from the hand-rolled implementations. The rule of thumb when porting to the new macros is: * Try to stick to the existing code behavior, unless broken * if changing, then follow this checklist: * if the class does not have a move constructor => pure swap (but consider ADDING a move constructor, if possible!) * if the class does have a move constructor, try to follow the criteria above, namely: * if the class holds only memory, pure swap; * if the class may hold anything else but memory (file handles, etc.), then move and swap. Noteworthy details: * some operators planned to be removed in Qt 6 were not ported; * as drive-by, some move constructors were simplified to be using qExchange(); others were outright broken and got fixed; * some contained some more interesting code and were not touched. Change-Id: Idaab3489247dcbabb6df3fa1e5286b69e1d372e9 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Get rid of some #ifdef qt6Allan Sandfeld Jensen2020-09-302-5/+1
| | | | | | | | | None of this code is even compiled in qt6. Change-Id: I5891cc9459320083ad3908fcbf646f3ba75b8a4d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFontEngine: Do not call getSfntTable with uninitalized valueChristoph Schleifenbaum2020-09-251-2/+2
| | | | | | | | | | On FreeType font engine this results in a call to FT_Load_Sfnt_Table with a pointer to an uninitialized value passed in as FT_ULong* length, crashing. Instead initialize value to 0. Change-Id: I50d6df3b2296a05640d939e862bc50adb0fec921 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit e041f5459660eaa7108fa5888e77e64f7d1b3d1d)
* Fix Qt6 todo in qcssparserAllan Sandfeld Jensen2020-09-231-3/+6
| | | | | | | | Colors with wrong number of elements are now invalid. Change-Id: I32c934894de86095d9790baa5f0d2001d76bcd3c Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix some qdoc warnings: function parameter namesVolker Hilsheimer2020-09-222-9/+12
| | | | | | | In QTextDocument and QTextFormat, standardize language a bit. Change-Id: I7c81ecc7a32e36ec32214e6b5386a2827cfcbc3f Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Include harfbuzz header files without harfbuzz/ parent directoryDimitrios Apostolou2020-09-162-2/+2
| | | | | | | | | | | | | | | | | | | | | This is in accordance to the examples from harfbuzz docs: https://harfbuzz.github.io/ch03s03.html The fix is because `pkg-config --cflags harfbuzz` returns the subdirectory as include path, for example: -I /usr/local/include/harfbuzz and this caused the system-harfbuzz not to be found when /usr/local/include was not included by default (recent change on macOS) and the code was doing #include <harfbuzz/hb.h>. Fixes: QTBUG-85568 Change-Id: I12a34638e8ad5e3085768828457f0bfa1a2c68ad Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Windows: Fix clang error about copy on loopKai Koehne2020-09-141-1/+1
| | | | | | | | | | | clang on Windows shows an error: qtbase/src/gui/text/windows/qwindowsfontdatabase_ft.cpp:122:25: error: loop variable 'key' of type 'const QString' creates a copy from type 'const QString' [-Werror,-Wrange-loop-construct] for (const auto key : keys) { ^ Change-Id: Icdfa5e2a6753450213dcb96df70247c5a71c2293 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Make QStringList an alias to QList<QString>Lars Knoll2020-09-122-2/+0
| | | | | | | | | | | | | | | | | | Fix our API, so that QStringList and QList<QString> are the same thing. This required a bit of refactoring in QList and moving the indexOf(), lastIndexOf() and contains() method into QListSpecialMethods. In addition, we need to ensure that the QStringList(const QString&) constructor is still available for compatibility with Qt 5. Once those two are done, all methods in QStringList can be moved into QListSpecialMethods<QString>. Change-Id: Ib8afbf5b6d9df4d0d47051252233506f62335fa3 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Rename QLibraryInfo::location() to path()Lars Knoll2020-09-121-1/+1
| | | | | | | | As per ### Qt6 comment. Also rename the LibraryLocation enum to LibraryPath. Change-Id: I556025a19c5bcdf2ff52598eaba32269522d4128 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove Qt6 related commentLars Knoll2020-09-111-1/+0
| | | | | | | | We can't unexport the class, as it's being used by the OpenGL paint engine in QtOpenGL. Change-Id: I74c1bef0e4720a82679a329462e80571f0583a84 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Port from devicePixelRatioF() to devicePixelRatio()Morten Johan Sørvig2020-09-101-2/+2
| | | | | | | This ports all of QtBase. Change-Id: If6712da44d7749b97b74f4614a04fac360f69d9e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove deprecated method QTextList::isEmpty()Marcel Krems2020-09-082-20/+0
| | | | | Change-Id: I7acc0bb110c2bed55374576f59c24451afa7742a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Clean up QTextBoundaryFinder and qunicodetoolsLars Knoll2020-09-071-3/+2
| | | | | | | | | | | Make QTBF ready for Qt6 by using qsizetype in the API and use QStringView where it makes sense. Change the exported API of qunicodetools to use QStringView as well and use char16_t internally. Change-Id: I853537bcabf40546a8e60fdf2ee7d751bc371761 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* When finding the engine for a fallback font, then clear the familiesAndy Shaw2020-09-051-0/+1
| | | | | | | | | | | If it is a fallback font, then it should just have family set to that font so it does not get interference from what the families were originally set to. Fixes: QTBUG-85560 Change-Id: I6232f3d2ae12052fa3b0b3bc0e7f106e239a585d Pick-to: 5.15 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Mark obsolete QPrinter functions as deprecated from 5.15 onVolker Hilsheimer2020-09-031-2/+2
| | | | | | | | | | | Some of the methods are overrides of virtuals in QPagedPaintDevice, so document and mark those as obsolete as well. Adjust code that calls those APIs to use the recommended replacement. Change-Id: I3cd1980609ea20808d17379a5f97ca595e869875 Pick-to: 5.15 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QTextHtmlParserNode: Fix warnings flood about setting negative pixel sizeFriedemann Kleint2020-09-021-1/+2
| | | | | | | | | | | Exclude the default value (-1) from the check. Amends 0bd770fb875d5391dd78df95542c25bd15051938. Pick-to: 5.12 5.15 5.15.1 Change-Id: Ib98ae166fd5fdab546c5d4212ce78345b5c9b583 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Qpagedpaintdevice: Use marginsF instead of internal struct marginsPeng Wenhao2020-09-011-3/+6
| | | | | | | resolve remaining Qt6 TODOs Change-Id: Iad659a09ddfe136bdc545bc0635b4c695540c58b 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>
* Remove QUnicodeTools::DefaultOptionsCompatEdward Welbourne2020-08-281-6/+9
| | | | | | | | | | 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>
* Avoid overflows in variantHash()Robert Loehning2020-08-281-2/+2
| | | | | | | Fixes: oss-fuzz-24702 Pick-to: 5.12 5.15 Change-Id: I876bac9e2c276693e59802dfeeea2229a873ee34 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTextHtmlParserNode: Avoid extreme values for font's pixelsizeRobert Loehning2020-08-281-0/+1
| | | | | | | | | | They currently cause an integer-overflow in variantHash(). Fixes: oss-fuzz-24702 Pick-to: 5.12 5.15 Change-Id: Ibee4413ca766c8ade9aeff2f2052b82cb9f7d213 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Compile textdocument-end snippetsPaul Wicking2020-08-281-1/+1
| | | | | | | | | | | | * Extend GUI snippet compilation with textdocument-end snippet. * Rename the snippet file and replace main() with wrapper(). * Dedent the snippet itself. * Update documentation that includes the snippet. Done-with: Nico Vertriest <nico.vertriest@qt.io> Task-number: QTBUG-81486 Change-Id: Id5e5b284587da1e7fdfd00baa9c899626832a113 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Compile qfontdatabase snippetsPaul Wicking2020-08-281-2/+1
| | | | | | | | | | | | * Extend GUI snippets by adding the qfontdatabase project. * Rename the snippet file and replace main() with wrapper(). * Minor adjustments of the snippet itself. * Update documentation that includes the snippet. Done-with: Nico Vertriest <nico.vertriest@qt.io> Task-number: QTBUG-81486 Change-Id: Id23aff01a4c919c5264f7059971cb63398c2298c Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Fix documentation warnings for Qt GUITopi Reinio2020-08-289-27/+16
| | | | | | | | | | | | * Drop deprecation warnings for now-dropped items * Use the 'qt6' define and a new \nothing doc macro to conditionally document items on Qt 6 * Add a custom module header for docs that pulls in also Vulkan headers * Add \internal command for internal classes/functions * Move QtGUI-related code snippets from widgets to gui docs Change-Id: Ieb386b96631a49568d09059906d307c45c01d93a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Remove "internal" parameter in QTextLine::draw()Jonas Karlsson2020-08-282-6/+13
| | | | | | | | | | The method is split up into a private and public version, where the parameter is moved into the private method. Fixes: QTBUG-84210 Change-Id: I79e9e02c9b4cc25d31db066e5a9567fdb9bc9fd0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Use OpenType font weightsJonas Karlsson2020-08-2817-103/+141
| | | | | | | Task-number: QTBUG-42248 Change-Id: Icdb301b27d6699c2b842c4563fbef9df73c23cbc Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Allow arbitrary baseline shift in QTextCharacterFormatJordi Pujol Foyo2020-08-266-5/+194
| | | | | | | | | | | | | | | Added 6 new methods in QTextFormat and QTextDocument to allow setting/getting specific % positioning for baseline and super/ subscript. Modified QTextLayout to honor those new settings. [ChangeLog][QtGui][QTextLayout,QTextFormat,QTextDocument] Allow text layout modification based on baseline offset and super/subscript % height positioning Fixes: QTBUG-18260 Change-Id: I0796f18224aac8df6baf8359c35022fd98fe64ef Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Rename confusingly named QFont/QPalette::resolve overloadsVolker Hilsheimer2020-08-253-7/+7
| | | | | | | | | | | | | | | Having three methods with the same name doing different things is unnecessarily confusing, so follow the standard naming convention in Qt and call the getter of the resolve mask resolveMask, and the setter setResolveMask. These methods were all documented as internal. The publicly documented resolve() method that merges two fonts and palettes based on the respective masks remains as it is, even though 'merge' would perhaps be a better name. Change-Id: If90b1ad800834baccd1dbc38fc6b861540d6df6e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QTextLayout: Remove deprecated methodsMarcel Krems2020-08-252-37/+0
| | | | | Change-Id: I7991428fb3526e48c0ceda0dcc46ea8a0918cb95 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Remove the QPF2 font engineEskil Abrahamsen Blomfeldt2020-08-246-942/+7
| | | | | | | | | | | | | | | The QPF2 font engine has been kept around for compatibility reasons in Qt 5.x, and it is time for it to retire for now. If we want something like this in the future, we can revive it with hardware acceleration / Qt Quick as one of the primary use cases, but for now, it seems that Freetype and our existing caching is sufficient also for low-end use cases. [ChangeLog][QtGui][Text] Removed support for the legacy QPF2 font format as well as the makeqpf tool used to generate those files. Change-Id: Id43039c92fe5bd95b628cd769e045c029f39a350 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QMetaType in QMetaCallEventLars Knoll2020-08-241-2/+2
| | | | | | | And don't use int based type mapping anymore. Change-Id: I456e76d1933ef646a7bd39ce565886b89e938a44 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Clean up int based convert() APILars Knoll2020-08-241-2/+2
| | | | | | | Pass QMetaType instances instead. Change-Id: I07366cea566fdebf5bb793aa8087f8109216ec0c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFont: Extend the string description to include the missing elementsAndy Shaw2020-08-221-4/+17
| | | | | | | | | | This extends to/fromString to include style strategy, capitalization, letter and word spacing and stretch. QFont::fromString() keeps compatibility with strings from earlier versions as well. Fixes: QTBUG-67687 Change-Id: I5e95a58f1cd850214af2a7d8906a214facd4e661 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix a number of qdoc warningsFriedemann Kleint2020-08-201-0/+1
| | | | | | | | | | | - Remove obsolete functions and enumeration values - Remove QObject * parameter from QMetaProperty accessors - Fix renamed enumerations in QSsl - Fix list items to be \li - Fix function signatures and variable names Change-Id: I37c7e6bf2c8ff92bc7b82620bae0a27796f866ab Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Remove 'less than' comparison methodJonas Karlsson2020-08-171-7/+0
| | | | | | Change-Id: Ief52da4f9176216ba45d4dc9df5bb341987cb585 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Remove QVariant(int type, void *data, ...) constructorLars Knoll2020-08-152-3/+3
| | | | | | | | It was marked internal anyway. Use the constructor taking a QMetaType instead. Change-Id: I15b9cd0911aac063a0f0fe0352fa2c84b7f7c691 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Replace Qt CONSTEXPR defines with constexprAllan Sandfeld Jensen2020-08-141-2/+2
| | | | | | | | Both normal and relaxed constexpr are required by our new minimum of C++17. Change-Id: Ic028b88a2e7a6cb7d5925f3133b9d54859a81744 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* QtFontStyle: Add missing const to non-mutable operatorsKonstantin Ritt2020-08-121-3/+3
| | | | | | | | and once I touch these lines anyways, either add noexcept ;) Fixes-up 8bdbb7f2267 Change-Id: Ibfaedcff82c041293220408ab7ae739b3cbd2a4f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Long Live QMap as a refcounted std::map!Giuseppe D'Angelo2020-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and QMultiMap as std::multimap. Just use the implementation from the STL; we can't really claim that our code is much better than STL's, or does things any differently (de facto they're both red-black trees). Decouple QMultiMap from QMap, by making it NOT inherit from QMap any longer. This completes the deprecation started in 5.15: QMap now does not store duplicated keys any more. Something to establish is where to put the QExplictlySharedDataPointer replcement that is in there as an ad-hoc solution. There's a number of patches in-flight by Marc that try to introduce the same (or very similar) functionality. Miscellanea changes to the Q(Multi)Map code itself: * consistently use size_type instead of int; * pass iterators by value; * drop QT_STRICT_ITERATORS; * iterators implictly convert to const_iterators, and APIs take const_iterators; * iterators are just bidirectional and not random access; * added noexcept where it makes sense; * "inline" dropped (churn); * qMapLessThanKey dropped (undocumented, 0 hits in Qt, 1 hit in KDE); * operator== on Q(Multi)Map requires operator== on the key type (we're checking for equality, not equivalence!). Very few breakages occur in qtbase. [ChangeLog][Potentially Source-Incompatible Changes] QMap does not support multiple equivalent keys any more. Any related functionality has been removed from QMap, following the deprecation that happened in Qt 5.15. Use QMultiMap for this use case. [ChangeLog][Potentially Source-Incompatible Changes] QMap and QMultiMap iterators random-access API have been removed. Note that the iterators have always been just bidirectional; moving an iterator by N positions can still be achieved using std::next or std::advance, at the same cost as before (O(N)). [ChangeLog][Potentially Source-Incompatible Changes] QMultiMap does not inherit from QMap any more. Amongst other things, this means that iterators on a QMultiMap now belong to the QMultiMap class (and not to the QMap class); new Java iterators have been added. Change-Id: I5a0fe9b020f92c21b37065a1defff783b5d2b7a9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make QFontDatabase member functions staticEskil Abrahamsen Blomfeldt2020-08-062-41/+65
| | | | | | | | | | | | | | | | | | | | | | | | | QFontDatabase is a singleton and all instances would share a single, mutex-protected global data pointer. But some functions were implemented as non-static functions. This caused a lot of code on the form QFontDatabase().families(...) since there was no static access. Other functions were implemented as static. To consolidate, we make all functions static. This should be source-compatible, but not binary compatible. [ChangeLog][QtGui][Fonts] Some functions in QFontDatabase were in principle static, but previously not implemented as such. All member functions have now been made static, so that constructing objects of QFontDatabase is no longer necessary to access certain functionality. Fixes: QTBUG-83284 Change-Id: Ifd8c15016281c71f631b53387402c942cd9c43f6 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Another round of 0->nullptr cleanupAllan Sandfeld Jensen2020-07-317-9/+9
| | | | | Change-Id: Ic8db7dc252f8fea46eb5a4f334726d6c7f4645a6 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Sanitize lengthValue in CSS parserRobert Loehning2020-07-271-5/+4
| | | | | | | | | | Limit the LengthData to the integer range before rounding it, taking into account that qRound() substracts 1 from negative values. Fixes: oss-fuzz-23220 Pick-to: 5.15 5.12 Change-Id: I1b4383f3c33aac22746831002b2c74fc134faf77 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QWindowsFontDatabaseBase: Fix unused parameter errorKai Koehne2020-07-231-0/+2
| | | | | Change-Id: Ifa2cc45c1bf4326a1273a713e3db950846d2ca14 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix some MSVC int conversion warningsFriedemann Kleint2020-07-172-9/+9
| | | | | | | | | | | | | | | | | | | | | | | kernel\qmetaobjectbuilder.cpp(1279): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data kernel\qmetaobjectbuilder.cpp(1432): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data sax\qxml.cpp(1275): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data text\qfontsubset.cpp(920): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qfontsubset.cpp(920): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data text\qtextengine.cpp(2664): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qtextengine.cpp(2665): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qtextengine.cpp(2706): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qtextengine.cpp(2707): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data itemviews\qbsptree.cpp(60): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) kernel\qprintengine_win.cpp(1558): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data qsql_odbc.cpp(804): warning C4267: 'argument': conversion from 'size_t' to 'SQLINTEGER', possible loss of data qsql_odbc.cpp(822): warning C4267: 'argument': conversion from 'size_t' to 'SQLINTEGER', possible loss of data qsql_odbc.cpp(1585): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data qsql_odbc.cpp(1602): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data qwindowsmime.cpp(770): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data windows\qwindowsmime.cpp(770): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data Change-Id: I04fbe17b9782f4c2704933fc005449b1e992475e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Avoid warnings regarding bit-field signednessDimitrios Apostolou2020-07-162-2/+2
| | | | | | | | | | | Up to (including) C++11, integral bitfields of unspecified signedness have implementation dependent signedness. Detected by LGTM.com static analyzer. Pick-to: 5.15 Change-Id: Ibaa0fdc6e443495a3cd40330c4573c9cc6ccdf5b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Don't flatten link color in QTextHtmlParser::declarationsForNodeTor Arne Vestbø2020-07-141-2/+2
| | | | | | | | | | | It's still flattened in the next step, when the parser calls QTextHtmlParserNode::applyCssDeclarations, but this at least makes it clear where the problem is. Task-number: QTBUG-85567 Change-Id: I1ecc7d808c58297f40f6cf8de86dfa7035e167c9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* QVariant::setValue(): enable move semanticsGiuseppe D'Angelo2020-07-131-1/+1
| | | | | | | | | | | | Given we optimize for the case where the new value is of the same type of the one already stored in the variant, enable move assignment for that case. As a drive-by, avoid a path to detach() for data() if we know we're detached. Change-Id: I9abbdc10637ce77ebb747b49d83e1ef914d997bb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use QList instead of QVector in gui implementationJarek Kobus2020-07-0724-179/+178
| | | | | | | Task-number: QTBUG-84469 Change-Id: I366e845249203d80d640355a7780ac2f91a762f1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix rendering error in some glyphsPengfei Zhang2020-07-071-1/+1
| | | | | | | | | | | Caused by a spelling mistake in the calculation. Pick-to: 5.15 Pick-to: 5.12 Change-Id: I69445fcd8a45b60c34d51aa09d778d4fee447065 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-07-076-19/+19
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>