summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add NEON optimization of rotated bilinear samplingAllan Sandfeld Jensen2016-08-191-0/+81
| | | | | | | | | SSE2 has had a vectorized code-path for rotated sampling for a long time, but the NEON version has been missing due to a bug in the original commit. This patch reintroduces the NEON optimization. Change-Id: I69d63b60faee9ebf5d69192acd680f35b9619a23 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Remove type-punned unionsAllan Sandfeld Jensen2016-08-181-30/+33
| | | | | | | | | | | Type punning even over a union is not legal C++, and also causes the compilers to produce poorly performing code. This has already been fixed for the SSE2 code in bilinear sampling but not for the NEON code. Change-Id: Id5e184051e0bd78db730d83ef0dda56ac3206e5b Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Use QStringRef to optimize memory allocationAnton Kudryavtsev2016-08-185-10/+10
| | | | | | | | Replace substring functions that return QString with corresponding functions that return QStringRef. Change-Id: I3c485f89352a1ee66076fba74fd486da9349c354 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Register fonts with their given style nameAllan Sandfeld Jensen2016-08-172-12/+16
| | | | | | | | Instead of guessing which styles we have available (always bold/italic) register the ones we actually find. Change-Id: I57380d0417411456a3037f8769440e7b43517e0e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* xcb: eradicate Q_FOREACH loopsMarc Mutz2016-08-172-1/+2
| | | | | | | | ... and mark the library with QT_NO_FOREACH. Change-Id: I4924f1419f470b5fa92bb2f3fdefa745b65957f7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* xcb: mark some types as movable/primitiveMarc Mutz2016-08-173-0/+8
| | | | | | | These are all held in Qt containers. Change-Id: Ie285887b285bbcc0b70962d9f9c52d22d213d022 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Standardize some "We mean it" commentsFriedemann Kleint2016-08-1743-125/+123
| | | | | | | Fix the occurrences where the wrong classes are mentioned. Change-Id: Ia291af77f0f454a39cab93e7376a110c19a07771 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QMimeData: use QStringBuilder moreAnton Kudryavtsev2016-08-171-1/+1
| | | | | | Change-Id: I5a6937545561c51add0d48a618b1921cf9201c4b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix qdoc warningsFriedemann Kleint2016-08-174-8/+9
| | | | | | | | | | | | qtbase/src/network/socket/qsctpsocket.cpp:506: warning: Undocumented parameter 'datagram' in QSctpSocket::writeDatagram() qtbase/src/network/ssl/qssldiffiehellmanparameters.cpp:129: warning: Undocumented parameter 'encoding' in QSslDiffieHellmanParameters::QSslDiffieHellmanParameters() qtbase/src/gui/opengl/qopengltextureblitter.cpp:540: warning: Undocumented parameter 'opacity' in QOpenGLTextureBlitter::setOpacity() qtbase/src/gui/opengl/qopengltextureblitter.cpp:522: warning: Undocumented parameter 'swizzle' in QOpenGLTextureBlitter::setRedBlueSwizzle() qtbase/src/testlib/qtestcase.qdoc:1124: warning: Cannot find 'createTouchDevice(...)' in '\fn' QTest::createTouchDevice() Change-Id: Ie8799aa5f63a4ea6c9fe309e2a627fbe3a13b685 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* QLinkedList: restore move special member functions for iteratorsMarc Mutz2016-08-171-4/+12
| | | | | | | | | | | | They were masked by the pointless user-defined copy special member functions, which we cannot remove because it would change the way the iterators are passed by value into functions, on some platforms. Add a reminder for Qt 6 to fix the issue for good. Change-Id: I039093894db4a4e5e4bbf94fb346fd90311316c0 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QString: clean upMarc Mutz2016-08-171-3/+6
| | | | | | | | | | | - add Q_DECLARE_TYPEINFO for types held in Qt containers (incl. QVariant) - port Q_FOREACH to C++11 range-for - port uses of inefficient QLists to QVector Fixes errors pointed out by my tree's static checks. Change-Id: I7176b4b12ed47ed23166857bd127c459ea2a48d5 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* tst_QStyleSheetStyle: Extract Method sample_widgets()Marc Mutz2016-08-171-28/+20
| | | | | | | | | | | | | | | | The only difference between the sample widget sets was: - widgets << new QLabel("TESTING TESTING"); + widgets << new QLabel("<b>TESTING TESTING</b>"); I chose the latter, because it's the more complex example and neither the hoverColors nor focusColors tests suggest the boldness of the text matters. Part of port away from Q_FOREACH. Change-Id: I9a928de4e781b96ad00a8c9515977c35ebfa6c24 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QColor: remove unused qt_get_rgb_val()Marc Mutz2016-08-172-13/+0
| | | | | | | | Defined out-of-line, not exported, not used anywhere in QtGui, so it can be removed. Change-Id: Ib049bad7d02e5412c063965cd81c8d95e1c1c183 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Don't hold MakefileGenerator::Compiler in QListMarc Mutz2016-08-161-1/+1
| | | | | | | | | | MakefileGenerater::Compiler is larger than a void*, so holding it in QList is horribly inefficient. Fix by using QVector instead. Change-Id: I9ea173271caf9b4995d311c3864c6967da049380 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* qmake: don't hold VCFilter in QListMarc Mutz2016-08-161-1/+1
| | | | | Change-Id: Ib10539187e0c8e4ffa2000dcad75715a7b931701 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* qmake: remove pointless ~VCProjectSingleConfig()Marc Mutz2016-08-161-3/+0
| | | | | | | | | | | It's empty, but non-trivial, thus preventing move special member functions from being generated by the compiler (now that qmake is compiled as C++11, too). The default ctor was also empty - removed, too. Change-Id: I714db524f681f1fc250d21926245757e97351e87 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* qmake: mark VCProjectSingleConfig as movableMarc Mutz2016-08-161-0/+1
| | | | | | | | Has a few too many fields for defining a member-swap (which would be required to mark it shared). Change-Id: Iecbeec9e60a9884cb4a984c58cb192918cef799d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Remove special case for color fonts from Freetype font engineEskil Abrahamsen Blomfeldt2016-08-161-21/+13
| | | | | | | | | | | | | | | | | | | When adding color font support to the Freetype engine, we added a special case to some functions based on the assumption that color fonts do not contain the latin alphabet. The reason for the assumption is that color fonts are currently most popular for emojis and the most popular ones on Linux did not contain the latin alphabet. But there is nothing special about color fonts making them less likely to contain latin characters than other fonts especially made for non-latin writing systems. If we want an additional fallback when the x character is not available, this should be implemented for all font engines and font types. Change-Id: I1c4aa28d49c38ba7a416c1cae50a1d1c09cbda41 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: jian liang <jianliang79@gmail.com>
* Fix alpha from qfontengine_ft to fit qdrawhelper expectationsAllan Sandfeld Jensen2016-08-161-5/+3
| | | | | | | | | | | | | | The short-cuts in qdrawhelper's qt_alphargbblit_argb32 expects the alpha value of the A32 glyphs to be 0xff. Since the alpha value is not otherwise used, set it to that. The reported image format is also changed to RGB32, matching coretext and windows fontengines, and expected by the OpenGL paintengine. Change-Id: I0873156d716566f7f1634249155b6c9983a3d0de Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* qmake: Mark MakefileGenerator::Compiler as Q_MOVABLE_TYPEMarc Mutz2016-08-151-0/+3
| | | | | Change-Id: I6469ffe3027c8519e80b71f5014f7bd9474e836b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* qmake: remove pointless ~VCConfiguration()Marc Mutz2016-08-151-1/+0
| | | | | | | | | It's empty, but non-trivial, thus preventing move special member functions from being generated by the compiler (now that qmake is compiled as C++11, too). Change-Id: I7e4b6d7f604020dd5e6da81f7a046202c8b78e09 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* qmake: remove pointless ~VCFilter()Marc Mutz2016-08-151-1/+0
| | | | | | | | | It's empty, but non-trivial, thus preventing move special member functions from being generated by the compiler (now that qmake is compiled as C++11, too). Change-Id: I9431311d24da802f147ce10e475936838bb85d41 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* qmake: replace a uint:1 with a boolMarc Mutz2016-08-151-2/+2
| | | | | | | | It doesn't save any memory, generates worse code, and prevents a member-swap from being added. Change-Id: Iddc0f1338478e465f34076857e266f1912fbaba6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Added capHeight() to QRawFont and QFontMetrics(F)Konstantin Tokarev2016-08-1519-2/+210
| | | | | | | | | | | | Cap height is an important metric of font, in particular it is required to make decent implementation of "initial-letter" CSS property in QtWebKit. Note that some fonts lack cap height metadata, so we need to fall back to measuring H letter height. Change-Id: Icf69d92159d070889085e20d31f2e397d796d940 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* tst_QRegularExpression: clean upMarc Mutz2016-08-151-12/+14
| | | | | | | | | | | | - port Q_FOREACH to C++11 range-for (incl. one case of iterating over QHash::keys()) - port uses of inefficient QLists to QVector - add Q_DECLARE_TYPEINFO for types held in Qt containers Fixes errors pointed out by my tree's static checks. Change-Id: I30eb432528fa3008240b5c217d5f2f9ddc3679be Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QMetaType: clean up #ifdefsMarc Mutz2016-08-151-7/+0
| | | | | | | | | We require Q_COMPILER_VARIADIC_TEMPLATES since Qt 5.7, so remove the non-variadic version which anyway has zero test coverage. Change-Id: I24dd22a798e11d797238f9209312802d1d84a672 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QFactoryLoader: clean up #ifdefsMarc Mutz2016-08-151-64/+0
| | | | | | | | | We require Q_COMPILER_RVALUE_REFS (implicitly used, but not explicitly checked for) and Q_COMPILER_VARIADIC_TEMPLATES since Qt 5.7, so remove the non-variadic version which anyway has zero test coverage. Change-Id: Ie3658ff6ae71a66df9d35100c3d6df41f2326c80 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QSharedPointer: clean up #ifdefsMarc Mutz2016-08-152-54/+0
| | | | | | | | | | | We require Q_COMPILER_RVALUE_REFS and _VARIADIC_TEMPLATES since Qt 5.7, so remove the non-variadic version which anyway has zero test coverage. Also drop #include <utility>, as that is included from qglobal.h already, and drop QSKIP from test. Change-Id: I1fc7f7068eac80ad6fd85e1d8f6d33c5c7bb67db Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Move QTriangulator and QTriangulatingStroker classes to paintingAndy Nichols2016-08-157-8/+13
| | | | | | | | | | | | | | Previously the private APIs for QTriangulator and QTriangulatingStroker were located in src/gui/opengl because they were used by the OpenGL paint engine. These API's are not actually specific to OpenGL however, and were not being built when QT_NO_OPENGL was defined. It makes more sense for these classes to belong in the painting subgroup. Aside from the OpenGL paint engine, these private APIs are used by QtLocation to triangulate polylines to be rendered by QtQuick. Change-Id: Idb4d1e5b2a51394d4c6bcdf9ab1ece99de23d4de Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Avoid synthesizing stretch on condensed font familiesAllan Sandfeld Jensen2016-08-157-16/+42
| | | | | | | | | | | | | | | | | | If an entire font family is condensed or stretched and we match by family name, the default stretch factor of 100 will make the font engine try to synthesize it back to medium stretched font. The existing code is already made to deal with a stretch of 0 that is no longer used. This patch reintroduces 0 stretch to indicate no specific stretch has been requested. Specifically setting stretch to 100 on a QFont will introduce the old behavior. [ChangeLog][QtGui][QFont] The default value of QFont::stretch() is now 0 to indicate any default stretch is acceptable. Task-number: QTBUG-48043 Change-Id: I574747f980fd4f9893df828818aae99a07b41623 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QTranslator: use const to avoid detach()'ingAnton Kudryavtsev2016-08-111-2/+1
| | | | | | Change-Id: Idbab696affed9486e9077d72ba14ce409b98174c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove unused legal.qdoc fileKai Koehne2016-08-081-35/+0
| | | | | | | This is most likely a left over from Qt 4. Change-Id: I5a13d31e815cf2047bcc064e9418c061ee82e58b Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* tests/auto/corelib/codecs: clean upMarc Mutz2016-08-061-7/+8
| | | | | | | | | | - port Q_FOREACH to C++11 range-for - port uses of inefficient QLists to QVector Fixes errors pointed out by my tree's static checks. Change-Id: Ica50f44d862f635df06cb8f09ce506b9d30fdfc5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* tst_utf8: use QScopedPointer, not QSharedPointerMarc Mutz2016-08-061-6/+6
| | | | | | | | | | | | There's no sharing, and the use of QSharedPointer(T*) triggers my tree's static analyzer. Easiest fix is to port to QScopedPointer, which is the correct smart pointer to begin with. Change-Id: I105c1a334c3d6712a475600c8394b0bebc420677 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tests/auto/corelib/global: clean upMarc Mutz2016-08-062-10/+10
| | | | | | | | | | | | - port Q_FOREACH to C++11 range-for (except in the Q_FOREACH tests :) - port uses of inefficient QLists to QVector - include QTest, not QtTest Fixes some errors pointed out by my tree's static checks. Change-Id: Ibb21a280537af74dda5679ec7c75d59477b6de55 Reviewed-by: David Faure <david.faure@kdab.com>
* tst_QPainterPath: clean upMarc Mutz2016-08-051-10/+11
| | | | | | | | | | - port uses of dynamic containers with static content to constexpr C arrays Fixes errors pointed out by my tree's static checks. Change-Id: I5e1cafa6e428500afae0d653ce48a7fb465c19ed Reviewed-by: David Faure <david.faure@kdab.com>
* QString: fix regression comparing null QString with null const char *Marc Mutz2016-08-052-1/+15
| | | | | | | | | | | | | | | | Commit 4a40c717f3cf1ae181df49c91261a12d5e33e5a4 optimized QString::compare_helper(QChar*, int, char*, int), but got the case wrong where the rhs is null, but the lhs is empty, not null (which is the case even with a null QString, as QString().constData() != nullptr). The correct result in this case is 0, since in Qt empty and null strings compare equal. Fix by checking the length of lhs, not its pointer. Task-number: QTBUG-55154 Change-Id: I3ec2cd25d9bdca90cf3f5568a875b1e52c779979 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QJsonValue::toVariant(): Differentiate between null and invalidChristian Kandeler2016-08-052-7/+8
| | | | | | | | | | | | Both were mapped to QVariant() before. Instead, use a null pointer QVariant for a null JSON value. [ChangeLog][QtCore][QJsonValue] QJsonValue(Null).toVariant() now returns a QVariant of type QMetaType::Nullptr instead of an invalid QVariant. Task-number: QTBUG-43077 Change-Id: Ife611f418583dbff542210bc8c5cd65201212a6e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QtPlatformSupport: Add QAbstractFileIconEngineFriedemann Kleint2016-08-0511-188/+347
| | | | | | | | | | | | | | Move the code from QtWidgets/QFileIconEngine into a new class with virtuals in QtPlatformSupport so that platforms can reuse it. Prototypically use the class in the Windows and macOS QPA plugins. Remove QPlatformTheme::fileIconPixmap() and change the type of the hint QPlatformTheme::IconPixmapSizes from QList<int> to QList<QSize> so that it fits better with the icon code. Change-Id: I580e936f3507218757565ca099272cd575b3a779 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QString: de-duplicate code of variants of lastIndexOf()Anton Kudryavtsev2016-08-041-69/+4
| | | | | | | | Re-use methods of QStringRef. Change-Id: I0f79ee6767653c694ac6a342263c046a5f5f3baa Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add XDG file icon support for UNIX themesFriedemann Kleint2016-08-042-0/+42
| | | | | | | | | | | | Add helper class XdgFileIconHelper using the icon theme engine to implement QPlatformTheme::fileIconPixmap(). [ChangeLog][QtPlatformSupport] KDE/Gnome themes now implement QPlatformTheme::fileIconPixmap(), showing file icons. Change-Id: I32a948ece08305053ebadb3ace6cbc6fbd339946 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Add QPlatformTheme::fileIcon()Friedemann Kleint2016-08-043-9/+36
| | | | | | | | | | | | Add a way to return an icon instead of a pixmap of a specific size for a file for usage by QFileIconProvider, etc. Fall back to fileIconPixmap() if fileIcon() returns a null icon. This allows for supporting XDG theme icons and Qt Quick applications accessing file icons. Change-Id: I9ffbd6602e1a6a490c0046d950636447c5127474 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QPolygon: prepare boundingRect() to be extracted as an algorithmMarc Mutz2016-08-041-7/+8
| | | | | | | That basically involves reformatting the loop to use iterators. Change-Id: Ie8e80e7f32b386eae50ab4520c62219e18d2a1bd Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* QPolygon: add a smoke-test for boundingRect()Marc Mutz2016-08-041-0/+77
| | | | | | | Nothing fancy, just a safety-net for a following refactoring. Change-Id: I5be87c86cd61e24bf96881d2485dd7560ea6184a Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Revert "Implement protocol upgrade for HTTP/2 enabled requests"Timur Pocheptsov2016-08-048-149/+28
| | | | | | | | | This reverts commit 12d71f4ea20415ff2274e1e90f9e4d5a8b935d7f. This change is breaking a build + incomplete as my test revealed. Will have to re-try later. Change-Id: I7ea089093a832aa5822caaaac56e62f5fda4df17 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Optimize QString::compare_helper(QChar*, int, char*, int, cs)Marc Mutz2016-08-041-3/+9
| | | | | | | | | | | | | | | | | | | | ... by using the recently-added QUtf8::convertToUnicode() and a QVarLengthArray instead of QString::fromUtf8(). Like elsewhere in QString, use a QVarLengthArray<ushort> instead of the more natural <QChar> to avoid instantiating another QVLA. Assume that length2 is usually set to a non-negative value. Not because that's necessarily the frequent case, but because a negative length2 leads to an expensive strlen, that usually dwarfs the additional branch cost. Check for data2 == nullptr early to avoid having to check it later twice. Change-Id: I04bda44ed857451efdf04c3283b5726480dd8c0d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add missing include in qeventloop_p.hJędrzej Nowacki2016-08-041-0/+1
| | | | | | | | The code depends on qApp to be visible in the scope Change-Id: Ibeb54c90f5a65f441e9eb90b848952b955c71f0d Reviewed-by: Jesus Fernandez <jesus.fernandez@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Cleanup QDBusVirtualObjectPrivateJędrzej Nowacki2016-08-041-2/+0
| | | | | | | | The class doesn't exist and should not be forward declared nor declared as private of QDBusVirtualObject Change-Id: Icf3ca2b2be5ae0a8111785af485a0b6601002a25 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix grayscale painting regression in 64-bit raster engineAllan Sandfeld Jensen2016-08-033-3/+44
| | | | | | | | | | | A new define for better vectorized compositioning had a mistake that caused some sources to be converted to grayscale when composited. Added two 10 bit per channel formats to the lancelot test to catch regressions in the future. Change-Id: I1c468e6b93d68185e517fc0d44c6c927f9f7135f Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Remove hiding of .main div in offline pagesKai Koehne2016-08-031-3/+0
| | | | | | | | | | | | The section got introduced in commit 93d35c07d06fcc, but was apparently ignored by browsers due to a non-blank space (0xc2 0xa0). In commit b3959b515fce the space was replaced, causing browsers to hide the content. Task-number: QTBUG-55115 Change-Id: I491f8721da5f2a964e450d4a0bee785a937ac7e4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>