summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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>
* 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>
* Added capHeight() to QRawFont and QFontMetrics(F)Konstantin Tokarev2016-08-1516-0/+181
| | | | | | | | | | | | 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>
* 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-151-48/+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-155-14/+22
| | | | | | | | | | | | | | | | | | 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>
* QString: fix regression comparing null QString with null const char *Marc Mutz2016-08-051-1/+1
| | | | | | | | | | | | | | | | 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-051-1/+2
| | | | | | | | | | | | 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>
* 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-031-2/+6
| | | | | | | | | | | 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>
* Implement protocol upgrade for HTTP/2 enabled requestsTimur Pocheptsov2016-08-038-28/+149
| | | | | | | | | | | | | | Without ALPN/NPN (== without OpenSSL) we can negotiate HTTP/2 using the protocol upgrade procedure as described by RFC7540. Since there is no TLS handshake, after our http channel was connected we first send an 'augmented' HTTP/1.1 request - its header contains additional 'HTTP2-Settings' and 'Upgrade' (to 'h2c') fields. If we receive reponse 101 (switch protocol) we re-create a protocol handler and switch to HTTP/2. Task-number: QTBUG-50955 Change-Id: I36e9985e06ba76edaf7fdb22bb43770f8d593c61 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add std::nullptr_t as builtin type in QMetaTypeJędrzej Nowacki2016-08-032-1/+6
| | | | | | Change-Id: If6c484bc89a2610c6a9e3e7bd54ef85ef40a783f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Add QtAndroidPrivate::context()Alex Blasche2016-08-032-0/+11
| | | | | | | | This simplifies the retrieval of the correct Context object. Task-number: QTBUG-55102 Change-Id: I303bc5393a7900ceb4bde36e711938f3f49075c1 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Save QFont's style name if presentKonstantin Shegunov2016-08-031-2/+11
| | | | | | | | | | | | | | | | | | | Font style names are quite irregular and the simplistic matching implemented in QFontDatabase::styleString(const QFont &) is unable to properly resolve the style name when font is recreated from a string. This causes the fonts before and after serialization to be considered different, even though they are not. The from/toString methods were made to write and respect the exact font style. [ChangeLog][QtGui][Important Behavior Changes] QFont::toString() and QFont::key() were modified to save the font's style name if one is set, invalidating any stored font identifiers. QFont::fromString() was also adjusted to accommodate the change. Task-number: QTBUG-54936 Change-Id: Ibc7c54119acdd8f0950d6049cc89f859bf981504 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Fix some syntax issues in SCTP implementationAlex Trotsenko2016-08-033-5/+10
| | | | | | Change-Id: I718fd060e313d544a5470fa20183db04ef89b1ca Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QObject::connect: allow to disable narrowing of the connection argumentsGiuseppe D'Angelo2016-08-022-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of the good features of the new connection style is that implicit conversion is performed for the connection arguments. However, this is also a bad feature when it comes to the old C remnants in the C++ language: for instance, doubles implicitly convert to ints, possibly losing precision (and GCC/Clang do not even warn about those under -Wall, only MSVC does) or even triggering undefined behavior. For this reason, when using braced initialization, C++11 disables narrowing conversions or floating/integral conversions. Use this feature when checking the arguments of a PMF-style signal/slot connection. Technically this makes the program ill-formed, however GCC still accepts it (but at least warns under -Wall). Hence, add a way to disable these implicit conversions. This is a opt-in and guarded by a macro, as it's a source incompatible change. [ChangeLog][QtCore][QObject] The QT_NO_NARROWING_CONVERSIONS_IN_CONNECT macro has been added. When using the new connection syntax (PMF-based) this macro makes it illegal to narrow the arguments carried by the signal, and/or to perform floating point to integral implicit conversions on them. When the macro is defined, depending on your compiler a QObject::connect() statement triggering such conversions will now fail to compile. Change-Id: Ie17eb3e66ce0cd780138e60d8bb7da815a4ada83 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Cleanup canonical font name lookupAllan Sandfeld Jensen2016-08-021-77/+136
| | | | | | | | | | | Changes the lookup of the canonical "english" font name, so that also corresponding style-name and preferred names can be found. This patch does not use that extra information, and should not change any behavior. Change-Id: I40805f81e6b35dcc98f9459c5cf96f13a8d789f2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix grammar issues in SCTP documentationAlex Trotsenko2016-08-024-15/+15
| | | | | | Change-Id: I11bfb20dc3d4db98dccfd3bc680fb1ffbd522508 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/devLiang Qi2016-08-0261-424/+651
|\
| * Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-0161-424/+651
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure 5.7 now supports clang on android; but dev re-worked configure src/gui/kernel/qevent.h One side renamed a parameter of a constructor; the other added an alternate constructor on the next line. Applied the rename to both for consistency. tests/auto/tools/moc/tst_moc.cpp Each side added a new test at the end. .qmake.conf Ignored 5.7's change to MODULE_VERSION. configure.json No conflict noticed by git; but changes in 5.7 were needed for the re-worked configure to accommodate 5.7's stricter handling of C++11. Change-Id: I9cda53836a32d7bf83828212c7ea00b1de3e09d2
| | * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-0122-152/+240
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/itemviews/qabstractitemview.cpp src/widgets/itemviews/qabstractitemview_p.h Change-Id: I54589b1365103cb1749186af92aab03a49c94b64
| | | * Fix for race condition in signal activationDenis Kormalev2016-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a race condition between QObject::disconnect() and QMetaObject::activate() which can occur if there are multiple BlockingQueued connections to one signal from different threads and they connect/disconnect their connections often. What can happen in this case is: T1 is in activate() method and T2 is in disconnect() method T1 T2 locks sender mutex selects next connection unlocks sender mutex locks sender mutex sets isSlotObject to false creates QMetaCallEvent derefs connection posts event Two things can happen here: 1. Connection can still be valid, but it will have isSlotObject==false and callFunction will be used instead of slotObj 2. Connection can already be invalid To fix it mutex unlock should be moved after QMetaCallEvent creation. Also there is another case, when we don't disconnect but delete the receiver object. In this case it can already be invalid during postEvent, so we need to move mutex unlock after postEvent. Change-Id: I8103798324140ee11de5b4e10906562ba878ff8b Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | | * Fix gcc -Wsuggest-override warning on Q_OBJECTDavid Faure2016-07-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same reasoning as commit 3092bd5 (which was for Clang), but for gcc >= 5.1. Change-Id: I123b17670c1a64876b01fd39fb11648fa4e8b1fd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | | * Item delegates: show localized detailed tooltips and "What's this?" textsAlexander Volkov2016-07-284-78/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extract the common part from QItemDelegate and QStyledItemDelegate which uses QLocale to convert a value for Qt::DisplayRole to a string. Use this code to get the text for tooltips and "What's this?". [ChangeLog][QtWidgets][QAbstractItemDelegate] Show localized detailed tooltips and "What's this?" texts. Task-number: QTBUG-16469 Change-Id: I8618763d45b8cfddafc2f263d658ba256be60a15 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | | * xcb: Don't activate bypassed windows on mouse pressBłażej Szczygieł2016-07-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows with "Qt::BypassWindowManagerHint" flag can't be activated by mouse. They can be activated only from code calling "activateWindow()" or "requestActivate()" methods. The patch applies also for "Qt::ToolTip" and "Qt::Popup" windows which have implicit "Qt::BypassWindowManagerHint" flag. The patch fixes some major issues: - don't activate tooltips on mouse press - this causes that Qt "thinks" that original windows loses its focus causing e.g. that text cursor stops blinking, - don't activate X11 tray icon - this causes that the active window looses its focus by clicking tray icon. The patch restores the Qt4 behavior. Task-number: QTBUG-53993 Change-Id: I80b226f2f5ea0ebbfe8922c90d9da9f4132e8cce Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | | * QVector: fix crash on reserve(0)David Faure2016-07-281-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It crashed when d was equal to Data::unsharableEmpty(). Task-number: QTBUG-51758 Change-Id: If9f2a7d11892507135f4dc0aeef909f59b7478fc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
| | | * Handle device pixel ratio in QTreeWidget animationsDavid Edmundson2016-07-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we are rendering into a new paint device we need to copy the device pixel ratio from the widget. Task-number: QTBUG-50207 Change-Id: Ica99ae84fe04311edfef817ab719863d627faf64 (cherry picked from commit 49491dd678071661db2e34133c051cb176a83e0b) Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | * Windows QPA: Pass ExcludeUserInputEvents to QWSI::flushWindowSystemEvents()Friedemann Kleint2016-07-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | User Input events flushed out by those calls have been observed to cause crashes. Task-number: QTBUG-39842 Change-Id: I950b80f2863def5b28e9fe46ef2b73aa6db2592f Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | * Windows style: Scale native metrics per monitorFriedemann Kleint2016-07-274-19/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The native sizes returned by the metrics and theme functions refer to the primary monitor. They need adaption when showing on a secondary monitor with differing logical DPI. Introduce a helper function QWindowsStylePrivate::nativeMetricScaleFactor() to calculate the total factor. Task-number: QTBUG-49374 Change-Id: I34c843ff34108424e1ef0aafcf9f563d17ebbc89 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | * QAbstractItemViewPrivate: de-inline hasEditor()Marc Mutz2016-07-272-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is in preparation of fixing a design problem with indexEditorHash. Change-Id: I6045ad3f15cd3087a894b96e9e068e42af7a1dea Reviewed-by: hjk <hjk@qt.io>
| | | * Backwards compatibility fix: No default colormap for Mono QImagesEirik Aavitsland2016-07-271-22/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial revert of a4e2f2e687ca7aec88ecf82f72d42ac61e17a5b9. That fix tried to avoid the risk of a crash in pixel() by ensuring Mono QImages created with external data also got a default color table. However, that broke usable behavior in existing code that was painting in Mono QImages using color0/color1. This commit reverts to the old behavior, and instead expands on the checking in pixel() so that lacking color table is handled gracefully for all indexed formats. Task-number: QTBUG-54827 Change-Id: I9164198bed9d20c4b12cdba40a31c141bef3128d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | | * Fontengine: Avoid invalid alpha maps when antialiasing is offEirik Aavitsland2016-07-271-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When font antialising is disabled, the created alpha maps will be Mono format. Make sure that the created QImage is valid by ensuring that it has a color table of the right size. Issue was earlier handled by a4e2f2e687ca7aec88ecf82f72d42ac61e17a5b9, but that will be partially reverted because of compatibility break. Task-number: QTBUG-50745 Change-Id: I7c521288469ae94805a3326644771270d97ab979 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | | * HighDPI: Disable scrolling for non-integer deltasMorten Johan Sørvig2016-07-271-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable the scrolling optimization in QBackingStore and fall back to repainting for non-integer deltas. The existing rendered pixels are not re-usable in this case. The test is made on the delta, and not on the scale factor. This means that user code can cooperate and generate (logical delta, scale factor) combinations that result in integer pixel deltas (which _can_ be scrolled). Change-Id: I36eb5d9e00449428bc9095edd8732782b996db16 Task-number: QTBUG-52452 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>