summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | | QListWidget: mark (is|set)Item(Selected|Hidden) as deprecatedChristian Ehrlicher2018-12-042-45/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QListWidget::(is|set)Item(Selected|Hidden)() are deprecated for a long time but not marked as such. Therefore explicitly mark them as deprecated so they can get removed with Qt6. Change-Id: I4567e740f1ebb5841b2e5b50c601fb83a782950c Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.12' into dev" into ↵Liang Qi2018-12-04130-37900/+773
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-12-04130-37900/+773
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qdrawhelper.cpp Change-Id: I4916e07b635e1d3830e9b46ef7914f99bec3098e
| | * | macOS: Account for LC_BUILD_VERSION when checking SDK version and deployment ↵Tor Arne Vestbø2018-12-031-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | target The more modern LC_BUILD_VERSION load command was introduced in the 10.13 SDK to unify the various versions of the LC_*_VERSION_MIN command. When building with a deployment target of 10.14, the linker will use this load command instead. Change-Id: Ic3571fdbfdf4dfb9346128c6f6e75d1e06f86cd2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * | configure: actually resolve libraries into full filepathsOswald Buddenhagen2018-12-033-36/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this considerably speeds up failures, as no doomed build is attempted, and produces more reliable results, as no second lookup (which would be subject to environment changes) is done any more during the build. in principle, this also opens up possibilities like selecting specific variants of dependencies, automatically extracting rpaths, etc. qt_helper_lib.prf also needs to create fully resolved library names now. Change-Id: I65f13564b635433030e40fa017427bbc72d1c130 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * | ico image handler: check for out of range image sizeEirik Aavitsland2018-12-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the decoder fail early to avoid spending time and memory on attempting to decode a corrupt image file. Change-Id: I598db817c387867a449040f5be5427c8b8746483 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | Set correct vertical position for text following a very large imageLars Knoll2018-12-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the document is paged and contains an image spanning more than one page, correctly set the y position for everything following that image. Change-Id: I1c584c7a907c1728c2965f1dc3fdc56069ab3172 Fixes: QTBUG-59886 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * | Erase password data on QLineEdit destructionIvan Čukić2018-12-031-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The contents of a deleted QString can still remain in memory and can be accessible by tools that read the raw process memory. This means that a QLineEdit that serves as a password input field can leak the password after it is destroyed. With this patch, the contents of the m_text string member variable will be zeroed-out before the m_text is destructed. This is done only in the cases when the QLineEdit serves as a password field. [ChangeLog][QtWidgets][QWidgetLineControl/security] Zero-out the string that contains a password entered into the QLineEdit Change-Id: I8f88f952244bf8a0399c14acf0869439ca0a60ca Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * | QNetworkConfiguration: add missing timeout unit to setConnectTimeout docSamuel Gaist2018-12-011-0/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: I3738e989a41607244b55245222ec3c83dda68198 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| | * | Read font selection flags and use them when querying for metricsMårten Nordheim2018-11-302-6/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Certain fonts with multiple styles have the same family name. When loading these as application fonts we were not specific enough when querying for the text metrics. This meant that e.g. the bold version in a font family would get the metrics of the regular one. Fixes: QTBUG-67273 Change-Id: Ic988d62cddde0a1f77ddcaf2891cadc21c9b31e6 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * | Fix alignment of temporary QRgba64 buffers on win32Allan Sandfeld Jensen2018-11-301-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The alignment of long long on 32-bit windows is only 32-bits, but we should be safe to assume it is aligned at 64-bit. Since QRgba64 is a public type, we can't fix the alignment there without breaking ABI, so instead fix it where temporary buffers are allocated. At the same time be consistent about using QRgba64 so we can switch to it enforcing alignment in Qt6. Change-Id: Ie15c305bc867c62a13df8eb2b1678e92174e1f97 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | OpenSSL context (1.1) - make the if-fery/switch less uglyTimur Pocheptsov2018-11-301-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | no need in duplicating DTLS-specific cases. Change-Id: I475c6fb53daa44d60a5054bf3acc8474355b2186 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | CoreText: Define font smoothing gamma along with rest of relevant codeTor Arne Vestbø2018-11-303-1/+9
| | | | | | | | | | | | | | | | | | | | Change-Id: I57909603732de6c1a91c744a358968941e64acdf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | Android: Don't use blocking queued when suspending the applicationAndy Shaw2018-11-301-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the application gets suspended when a blocking queued connection is made then it will cause the application to hang when being resumed. Therefore a check is needed to still post the event to the other thread but in a non blocking manner so that it does not cause a hang on return. Fixes: QTBUG-72101 Change-Id: I6d53c97ed6d9d500559da2a9fd195226d1fc9905 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| | * | xcb: remove old work-around for building with util-wmGatis Paeglis2018-11-302-61/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commits that added this code: 7ce8491280990350162933a0716d1b014f65aeb6 and f005dee1b3692a09e47782dcff9b5b07aa659b51 I guess this was a work-around, before we started bundling XCB libs a year later in 21bd66e1ea06e466754ab06ee2c5f8b737bb4bd7 0.3.8 was released in 2011-04-26 and we are bundling 0.3.9, so it is safe to remove the include work-around as well. Change-Id: I5794f40d86e10ebdad984aa4b61311979aaadcf3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * | xcb: fix issue with dialogs hidden by other windowsGatis Paeglis2018-11-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a regression from Qt4, due to not setting the window group leader in WM_HINTS property. Qt4 did set this property. It was not obvious that something was missing because of the similarly named WM_CLIENT_LEADER property, which we do set. Testing revealed that setting WM_CLIENT_LEADER is sufficient on some DEs, e.g. KDE, Unity, but did not have the desired effect on e.g Gnome and XFCE. EWMH/ICCCM specs are known to be ambiguous, WM_CLIENT_LEADER is only mentioned in the section on the session management, so it is not surprising that there is this inconsistency between various WMs. This patch merely restores a lost WM hint. This solves the reported issues on major desktops. If we support calling show() on a dialog before its parent has been shown is still an open question, which should be handled in QTBUG-72040. Task-number: QTBUG-56829 Fixes: QTBUG-46626 Fixes: QTBUG-70756 Task-number: QTBUG-72040 Change-Id: Id2c575850e5f4f5af3e57963c577d33572e30b6e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * | CoreText: Base glyph fill color logic on font smoothing algorithmTor Arne Vestbø2018-11-301-25/+32
| | | | | | | | | | | | | | | | | | | | Change-Id: I22be1efb1f91048745008ea1b49186b39367d122 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | CoreText: Respect QFont::NoSubpixelAntialias when deciding glyph formatTor Arne Vestbø2018-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I846758bce2fd7536f9941b11f23fc0e5d5bc6f1b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * | Fusion style - avoid a warningTimur Pocheptsov2018-11-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... printed by QPainter when it gets a pixmap with one or both of dimensions equal to 0 (and a nullptr as a paintEngine). Task-number: QTBUG-71806 Change-Id: I978f56c843daab307042e34390fc33f338ce8cf5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * | CoreText: Remove handling of QFontEngineMulti's highByteTor Arne Vestbø2018-11-303-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a leftover from when the Cocoa plugin used QFontEngineMulti exclusively. Nowadays QFontEngineMulti will strip out the highByte before calling into the real engine. Left an assert just in case.. Change-Id: I6cb26d20a908d7c3aaf096297fca160805fdb85b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * | macOS: make QScreen::grabWindow() fast againMorten Johan Sørvig2018-11-301-45/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 17b73b0d2b8 regressed performance by grabbing the entire screen and then copying the grab region. Move back to grabbing a minimal rectangle instead. Also handle multi-screen grabs at different device pixel ratios. Multi-screen grabbing is handled by grabbing each screen individually, and then stitching together the result. The returned pixmap is created using the highest DPR available, upscaling lower resolution parts as needed. Change-Id: I9d45c5f7ec7b342360b745f49ef2939dc588f40b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * | src/3rdparty: remove xkbcommonGatis Paeglis2018-11-3076-37349/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only reason why we bundled this library ~6 years ago was because it was not available on distributions that we supported at the time, but library was a hard dependency for XCB plugin. See: 2122e731abdb619249df89642c0800640b2fa428 Later more and more projects started to depend on it (compose input context plugin, libinput, mir, wayland). The configuration had become too complex, because some projects used bundled and some used the version from the system. Having libxkbcommon in 3rdparty sources is not necessary anymore, after RHEL 6.6 was removed from the list of supported platforms for Qt 5.12. Ubuntu 16.04 - 0.5.0 Ubuntu 18.04 - 0.8.0 openSUSE 42.3 - 0.6.1 RHEL-7.4 - 0.7.1 This will also simplify further development, e.g. QTBUG-42181 Bumped the minimal required version 0.4.1 -> 0.5.0. The patch also contains a code marked with "TRANSITION HACK", which is temporary needed so we can update the dependent wayland module. [ChangeLog][Third-Party Code] Removed xkbcommon from bundled sources. This library is present on all supported platforms. The minimal required version now is 0.5.0. Task-number: QTBUG-65503 Change-Id: Iec50829bb6f8fbb19f3c4e4ad62e332beb837de5 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * | Fix gamma-correction in QCoreTextFontEngine with MojaveAllan Sandfeld Jensen2018-11-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code was previously assuming font-smoothing was only used with A32 font antialiasing, so the corresponding gamma-correction was not performed. Task-number: QTBUG-71075 Task-number: QTBUG-71946 Change-Id: I68d8304cf18638239d8bfac32c67333f16ccc7bd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | Doc: specifically list the QToolButton properties that actions affectMitch Curtis2018-11-291-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, add a note that explains that autoRepeat does not affect QToolButton's autoRepeat property. Change-Id: I9e95cef9e9d1b5ee6cb1114d0b9a9fad562db601 Fixes: QTBUG-48204 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | * | Fix compilation of qendian's qswap specializations on gcc 4.8Ville Voutilainen2018-11-291-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-71945 Change-Id: Icf2b75c72946f57ebffc880c9238531dea13ab5b Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | Implement mul_overflow for MSVC arm64Thomas Miller2018-11-291-48/+26
| | | | | | | | | | | | | | | | | | | | Change-Id: Ia7c79614e6ef21222fb9683b540ac51b45a77c49 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | Fix QPpdPrintDevice::isDefaultAlbert Astals Cid2018-11-293-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | How to test: * Have two printers * Use lpoptions -d to set the default printer to be one and then the other * Use lpstat -d to check setting the default printer worked * Use this simple test program and check the resulting values make sense qDebug() << "DefaultPrinter" << QPrinterInfo::defaultPrinter().printerName(); const QList<QPrinterInfo> list = QPrinterInfo::availablePrinters(); for(const QPrinterInfo &pi : list) { qDebug() << pi.printerName() << pi.isDefault(); } Fixes: QTBUG-70317 Change-Id: I535d11451c568630a374f5c37d8cac32cbb6d3ab Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | * | CoreText: Store glyphs in linear RGB when needed by blending algorithmTor Arne Vestbø2018-11-291-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of tying the linear-conversion to a specific function, we move it to imageForGlyph and base it on the premise for needing it. Change-Id: Ib8fc79ad419ef703abcb82785ac15d4c75fb98e6 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * | CoreText: Add font antialiasing and smoothing helper functionsTor Arne Vestbø2018-11-292-4/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The font smoothing helper in particular now takes into account whether or not we're dealing with color glyphs, in which case we shouldn't (or don't need to) smooth, and also makes sure the QFont::NoSubpixelAntialias style strategy doesn't affect font smoothing when we're dealing with non-subpixel-antialiased font smoothing, as on macOS 10.14. Change-Id: Ibd477158629402c55cafec31576b6d9901d184cf Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * | CoreText: Remove handling of the AppleAntiAliasingThreshold user defaultTor Arne Vestbø2018-11-293-24/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The setting is not relevant for modern macOS applications, and none of the applications shipped with macOS today are affected by it. The only code path in macOS that picks it up is +[NSFont initialize] in the UIFoundation framework, storing it for later so that -[NSFont screenFont] and -[NSFont screenFontWithRenderingMode:] can use it, but these APIs are deprecated and we don't use them in Qt. Other NSFont code paths will not hit these APIs unless screen font substitution is enabled, something it hasn't been since OSX 10.7. https://preview.tinyurl.com/yctpfnqp Removing handling of this setting allows us to simplify the reasoning for whether or not antialiasing and font smoothing is enabled for a given engine. Change-Id: Ie2809052a1a0815d9bddedd4a6236eb6c898f993 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * | Fix crash in QSimpleDrag when no platform windowVal Doroshchuk2018-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No need to return top level window if it was not created. It means no platform resources have been allocated. Events might not be delivered if the wrong window is returned. Fixes: QTBUG-70544 Change-Id: I43462974f70871470f7b7490dc2b3c08846f77b1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * | xcb: Use std::move and pass argument by rvalue referenceMikhail Svetkin2018-11-292-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It will avoid a creation of temporary object and avoid copying. Change-Id: Ifae5f6f9e36bcb07f4bacc31f151f8adcfa621a3 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| | * | CoreText: Rename argument to imageForGlyph to better reflect how it's usedTor Arne Vestbø2018-11-291-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'aa' argument doesn't unconditionally enabled antialiasing, it just overrides the check that the pointSize is larger than the antialiasing threshold. If the styleStrategy has QFont::NoAntialias we still end up without antialiasing. Change-Id: I7130e7c68d883c2443756242e96790264f583b0f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * | CoreText: Add helper function to determine if a font has color glyphsTor Arne Vestbø2018-11-292-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes for clearer code than looking at the glyph format. Change-Id: Id6dd2a7851aac2a42cc27d9e2fb408ce9a5345d3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * | CoreText: Modernize font smoothing and antialiasing threshold detectionTor Arne Vestbø2018-11-294-75/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way macOS does font smoothing has changed in Mojave, and we need to take both this new algorithm into account, as well as support users who set legacy preferences to revert back to subpixel font smoothing. As a followup to this patch we will tweak some of the existing logic to take the new font smoothing algorithm into account, so this is just a first step. Change-Id: If37014c18515f406b8bb8194c9df7a75c2eb10fc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * | macOS: Share code for resolving CGImage bitmapInfor for a QImageTor Arne Vestbø2018-11-284-47/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes assumptions about QImage format in a few places. Change-Id: I515701be53190429a48956c31986fa0804806406 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | CoreText: Use QCFType instead of manual release/retainTor Arne Vestbø2018-11-281-7/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: I4925ec0e563e784f542fd44706a214771c6abd2b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | macOS: Fix use of deprecated enum valueTor Arne Vestbø2018-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: Ibf979837e1adcadcbb100d059b06b1a48157eab6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | CoreText: Use QCFType to track CoreFoundation member variablesTor Arne Vestbø2018-11-283-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The operator T() function of QAppleRefCounted should be const so that the underlying type can be accessed from const member functions just like the naked underlying type could. Change-Id: I0819c5795d28442a6ff4db2732e211b183574f9f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | CoreText: Share code by using delegate constructorTor Arne Vestbø2018-11-282-6/+10
| | | | | | | | | | | | | | | | | | | | Change-Id: If3d5d533f98552335517ef61cb748d0117fe3053 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | CoreText: Simplify and share code for loading glyph advancesTor Arne Vestbø2018-11-282-40/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function doesn't need the flags argument, nor does it need the ctfont or fontdef arguments if it's a normal const member function. It can also be used from QCoreTextFontEngine::stringToCMap(), instead of duplicating the code. This was originally the case before b4aa5d97 which improved surrogate pair handling, but for some reason the change introduced the duplicate code instead of just changing the arguments in the function call slightly. The use of 0xff000000 to skip certain glyphs looks dubious, and is probably related to QFontEngineMulti's use of the high byte to indicate which engine the glyph came from, but the multi engine strips this away before calling out to the concrete engine so it could potentially be removed in a later patch. Change-Id: I6c693595616da1b69fdbe3d7a31e392a8443369d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | CoreText: Localize getTraitValue helper functionTor Arne Vestbø2018-11-281-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's only used in a single function (twice), so let's keep it closer to the call site. Change-Id: I7f8ceadc380171237eef3fa6b03ccd6bc89e99af Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | xcb: free leaking clipboard eventsKirill Burtsev2018-11-281-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The leak has been there since the beginnings of Qt 5.0. Change-Id: I238181dcc63cb4cf8a60b5c565b184d8278d0315 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| | * | QDBusConnection: prevent leaking connection/server on destroyKirill Burtsev2018-11-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends fix 68964b1023 Change-Id: I05816f4b4d2128ed0b669e124d9c9eef92122ec0 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | xcb: Fix leaking events on destroyKirill Burtsev2018-11-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch amends 243c3044b647357ca6df79ac1497ae43de957d31 Change-Id: Ieeebb1e2b94d7c191bf80a1f439c826c406a0c08 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| | * | Destroy QWindowContainer's fake parent window when not neededTor Arne Vestbø2018-11-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keeping the fake parent window around in a created state means we're wasting system resources such as native platform views/windows, and makes it harder to debug the lifetime of these resources. The fake window will be re-created if re-parented into at a later point. Change-Id: Ib82560e7e565af19d58afe121fd087669a6ffb95 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * | QWindowContainer: Fix warning triggered by QT_ASCII_CAST_WARNFriedemann Kleint2018-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends 52bd707f0d6a585c2f5da9565834eb91f1d3dbc8. Change-Id: Icc42edc7a943099b36bfa92fe7cd1a92db344991 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * | qobject_p.h: Use nullptr everywhereKevin Funk2018-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I605e44607cc09775548c1e6b781d476c1627c9c7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | Ensure alignment of image-dataAllan Sandfeld Jensen2018-11-281-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of relying on the return value of malloc having the correct alignment, use proper non-throwing new[] operators. Change-Id: I06c6c619e21c848f3d184bdb7cef8c5589c1c7ab Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | Fix calculation of the string tab size in QElfParserThiago Macieira2018-11-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First of all, we were using the wrong size variable: instead of the size of the section, found in the section header, we were using the size of each section entry in the section table. Since that's usually smaller, we weren't hitting a problem. Second, if the string table is the last thing in the file and there's nothing else after it, not even padding, then offset + section_size can be equal to the file size. In fact, the .shstrtab section is usually the last one, as it contains the section names themselves, so it stands to reason that it's the second to last thing written. For generic linkers, the last data in the file is the section table itself, so usually the file is larger by at least a kilobyte, which is why we haven't hit this bug. It could only manifest as deciding that certain specially-crafted but valid ELF files were invalid. I can't think of a way to trick it into thinking an invalid ELF is valid. That's another reason why this code needs to be rewritten with more modern coding styles and actually using <elf.h> Fixes: QTBUG-71443 Change-Id: I1bd327aeaf73421a8ec5fffd156162f2df5557b8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>