summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Make util/lexgen/ mention itself in its auto-gen lineEdward Welbourne2018-11-011-424/+423
| | | | | | | | | | | | | In the process, update the README's e-mail address for Simon and mention all recognized command-line options in the usage message. The generated CSS scanner was also out of sync with our source, so update it. Also fixed handling of FileHeader to cope with running from a shadow build by handling paths relative to __FILE__; and revised the CSS3 config to use the same copyright header as was already in use by the existing generated file. Change-Id: I918ff84dbdc95d0478fd6aa4ea74e9a221d1a476 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-11-012-3/+25
|\ | | | | | | Change-Id: I6f8d3abd3247dc980dc7834801a017a89c8f4286
| * Fix docJarek Kobus2018-10-311-1/+1
| | | | | | | | | | Change-Id: I75386b948763bbe784fc36abe7e69696bc04219d Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * Fix painter opacity being ignored when rendering to PDFAndre de la Rocha2018-10-301-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | The opacity set on a QPainter was being ignored for drawImage()/drawPixmap() calls when rendering to a PDF file through QPdfWriter/QPrinter. This change fixes it for PDF files v1.4 (default version) or v1.6. For PDF/A-1b files, opacity will remain ignored to ensure compliance with the specification. Task-number: QTBUG-70752 Change-Id: I4280e898698e0367dfb4c6ac2cd14ca2bf98850e Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Gui: Q_GADGET is missing in qlayoutpolicy_p.hTobias Hunger2018-10-311-0/+1
| | | | | | | | | | Change-Id: I1244c507da7e4afeb16093112f52b191fd16fb0d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.12' into dev" into ↵Liang Qi2018-10-2648-458/+879
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-10-2548-458/+879
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/animation/qpropertyanimation.cpp src/gui/image/qicon.cpp tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp Change-Id: I3698172b7b44ebb487cb38f50fd2c4a9f8a35b21
| | * qtriangulator: Remove a bunch of dead codeIvan Komissarov2018-10-221-22/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no sense in testing the 'm_array' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. Task-number: QTBUG-71156 Change-Id: Ib76d16d38d2b0b0c4c9fae3d8d5bdd86af0d08ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Extend PDF engine to allow the generation of PDFs with huge pagesAndre de la Rocha2018-10-225-11/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt's PDF engine previously supported only the PDF v1.4 standard, which only allows pages of up to 200x200in (about 5x5m). This patch optionally enables the generation of PDF v1.6-compliant files that allow the redefinition of user space units, so that pages of up to 381x381km are now possible. By default, generated files are compliant to v1.4 spec. v1.6 compliance must be enabled by, e.g., calling QPrinter::setPdfVersion() with QPrinter::PdfVersion_1_6. PDF v1.6-compliant files require Adobe Reader 7.0 or newer (also worked with the built-in viewers in current versions of Chrome, Firefox and Edge). Task-number: QTBUG-69386 Change-Id: I21708e0d465d5d7d9e46ff06dd04acfe1dfb0858 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * qimagescale: Get rid of the memset callIvan Komissarov2018-10-212-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to call a memset as long as class is initialized with new and default-constructor will initialize values. Change-Id: I02f9ec524e32cb72713f6b5e37b60f3dec72fb28 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * QMovie: use rvalue moreAnton Kudryavtsev2018-10-211-2/+2
| | | | | | | | | | | | | | | | | | Change-Id: Idf052436190bf225662ff6c1d4b7b8e3c0c84685 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-10-214-14/+21
| | |\ | | | | | | | | | | | | Change-Id: Iaf28977e7ecf566b28b9406dcb005d48621169c2
| | | * QPicture: fix crash for malformed pictureEirik Aavitsland2018-10-181-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A file with the correct QPicture magic bytes, but shorter than a full QPicture file header, could cause the header decoder to access memory out of bounds. Add a size check to avoid. As a driveby, generally harden the parsing against malformed files. [ChangeLog][QtGui][QPicture] Fix crash reading malformed picture file Task-number: QTBUG-71208 Change-Id: I86eb1f915ca9b3a4b91c7433036d76ed6061e2f0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | * Fix enum passed to QFontDatabase::findFontAllan Sandfeld Jensen2018-10-162-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The script taken here is a QChar::Script, not a QFontDatabase::WritingSystem. This means it was passing QChar::Unknown. Change-Id: I919ae7187ba277346a7719116a94776dce24dd84 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | | * Fix pdf printing in static buildsEirik Aavitsland2018-10-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pdf engine uses a resource file, but Q_INIT_RESOURCE() was lacking. Task-number: QTBUG-71070 Change-Id: I685961b3f2eea0ffe6b5313c72d504a8ad9a98e5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | qpainterpath: Fix Q_ASSERT typoMikhail Svetkin2018-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-71156 Change-Id: Id1669f72a684171ad8c72badad56e72ee20ee625 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-10-174-9/+7
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platformthemes/platformthemes.pro src/printsupport/kernel/qplatformprintdevice.cpp Change-Id: Iac01729ad954bb1c7af5867d982eb243b2139ee6
| | | * Modernize the "mimetype" featureLiang Qi2018-10-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I9b67c2cbc0891a38ece18d521c86fbc7344dce7a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | | * Modernize the "animation" featureLiang Qi2018-10-123-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ibc164b3df3cf87db569ef4813de458a9067b7f7d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * | Fix wrong keyword in configure.jsonTobias Hunger2018-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'description' is used only once in all configure.json files, so I assume that was meant to be 'purpose'. Change-Id: I66e9d9196c27d2f2131c2d57ea03895e8f5ce754 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * | Drop cached shaders when arch is differentLaszlo Agocs2018-10-161-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to reports Intel on Windows gets confused when feeding program binaries retrieved from x86 and x64 builds into each other. Task-number: QTBUG-64697 Change-Id: Ia7748f532ad06942a92c6fbfc4c9d1ad16bc785a Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | * | Don't drop update requests when closing and reopening windowsUlf Hermann2018-10-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before commit 4d15f393a76cfcc4d54f311884fedac5bf0f72ee update requests were handled by a timer on QWindow. Therefore they survived the closing and re-opening of platform windows. Now, as the timer was moved to QPlatformWindow, it gets reset when you close the QWindow, and any pending update requests are lost. However, we do set the updateRequestPending variable on QWindow when requesting an update. Therefore, we can also restore the update timer on the platform window when creating it. Change-Id: I23b00f24a46706beac7d1455edd8a5623db46b22 Fixes: QTBUG-70957 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * | xcb: respect QEventLoop::ExcludeUserInputEvents in native event handlersGatis Paeglis2018-10-163-4/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a regression from Qt 4. Before this patch, we supported filtering events only at QWindowSystemInterface level, but to properly support filtering in QAbstractEventDispatcher::filterNativeEvent, we have to filter the events earlier. Now it is possible to enable/disable this feature for platforms that support native event filtering. The mapping of which events are user input events were taken from QWindowSystemInterfacePrivate::EventType. Task-number: QTBUG-69687 Change-Id: I9a5fb9f999451c47abcdc83fdcc129b5eeb55447 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * | Doc: Move literal code block to a separate fileCristian Maureira-Fredes2018-10-1518-363/+677
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to override this snippet for the documentation we generate for Qt for Python, and it is easier to have it on a separate file. Task-number: PYSIDE-801 Task-number: PYSIDE-691 Change-Id: Ideb5b6af25024279f167137d3b65660bb9c96a7e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| | * | Improve support for QImages in QDataStream read transactionsEirik Aavitsland2018-10-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QImage's operator>>(QDataStream&) did not set an error mode on the stream on read failures. That would break QDataStream transactions. Since the current QImage serialization cannot differentiate between truncated and corrupted data, we set the ReadPastEnd error as expected by the transaction system. Also specify the expected file format on decoding QImage from stream, to avoid all the format handlers' canRead() being invoked. This is necessary since some of them may call ungetChar(), which fails when the stream is in a transaction. Also add testing of this feature to the QDataStram transaction autotest. That required a slight rewrite of the fake sequential QIODevice subclass. The previous implementation had incorrect behavior of peek(), which is required by QImage decoders. Task-number: QTBUG-70875 Change-Id: If3f1ca7186ad1e6ca0e6e8ea81d2b2fbece6ea01 Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | wasm: fix wasm shader compileLorn Potter2018-10-152-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes qopenglwindow shader in the triangle Task-number: QTBUG-67338 Change-Id: I8552183bf9ca45e9b56760b340d014ddd34c21f4 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * | QImageReader: add tracepoints for image loadingGiuseppe D'Angelo2018-10-142-1/+16
| | | | | | | | | | | | | | | | | | | | Change-Id: I5fe25793eeda01a4fa1658091890af23f66b7089 Reviewed-by: Rafael Roquetto <rafael@roquetto.com>
| | * | QImageWriter/QPNGHandler: Quality option should be CompressionRatioAlexandra Cherdantseva2018-10-141-19/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wrong option was used to set zlib compression level for png setCompression with negative value uses default compression setCompression with value between 0-100 converts to zlib compression level 0-9 setCompression with positive value overrides Quality option Change-Id: Ic4b048a1e30d6940019c2a00a6c24d0c11e3f821 Reviewed-by: Alexandra Cherdantseva <neluhus.vagus@gmail.com> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * | QCss: properly parse functions which contains additional spacesChristian Ehrlicher2018-10-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there were additional spaces between the function definition and the first parameter, the parser failed to parse it when it contained another function (e.g. 'qlineargradient(... rgb() ...)'). The reason for this was that ::until() needs the function at index-1 so it can correctly count the opening parenthesis. Fixes: QTBUG-61795 Change-Id: I992f556e7f8cd45550f83bc90aa8de2b4e905574 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | Add support for generating PDFs with losslessly encoded imagesAndre de la Rocha2018-10-254-7/+20
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the QPainter::LosslessImageRendering flag to QPainter::RenderHints and allows QPdfEngine to recognize it and encode images using a lossless data compression algorithm provided by zlib instead of using lossy JPEG compression, which can produce artifacts with some images. Task-number: QTBUG-54809 Change-Id: If9e2bc64da3bf3afcd5d6c74f0ee82336ef05a19 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Qt Style Sheets: fix range of hue in hsl/hsv functionsChristian Ehrlicher2018-10-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hue parameter in hsl/hsv was treated the same way as a the other parameters although it's range is from 0-359 and not from 0-255. Fix it by extending the maximum range for the first parameter when parsing a color value given in hsv or hsl. [ChangeLog][QtGui][CSS] Fix the range of the hue parameter when parsing a color given in hsl or hsv Fixes: QTBUG-70897 Change-Id: I9ffa65a89c0abcca62bae35777ca1cbde3375180 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Qt Style Sheets: add support for hsl(a) colorsChristian Ehrlicher2018-10-181-7/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Qt stylesheets color property did not support hsl or hsla although CSS 2.1 does support it. Since QColor natively supports this color model only the color parsing needed to be adjusted. This also adds some stricter checks for a valid css color definition and prints a warning about the issue. [ChangeLog][QtGui][CSS] Added support for hsl/hsla colors Fixes: QTBUG-58804 Change-Id: Ief65a36a7e0ed0d705dc1fe5a8658e8d07fe9a13 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-10-135-32/+174
|\| | | | | | | | | | | Change-Id: I2715ee7c694e5579bcedc7bab0ae68e79d5fd0b6
| * | QPixmap: use rvalue moreAnton Kudryavtsev2018-10-101-3/+2
| | | | | | | | | | | | | | | Change-Id: Ifb8c014abf6e02dc782fab2d653e4edfc4972125 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | Add missing null checks after detachAllan Sandfeld Jensen2018-10-101-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | A few places we didn't check if detach() succeeded including in reinterpretAsFormat(), where it can be undone. Task-number: QTBUG-70785 Change-Id: Ibcc8e26e2961f6288eb7a045ae1cb28e59213a49 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * | Add NEON optimized ARGB32 unpremultiply routinesAllan Sandfeld Jensen2018-10-093-27/+158
| | | | | | | | | | | | | | | | | | | | | | | | Mirroring similar routines recently added for SSE4.1 Change-Id: Ibb9d10cc34655ce1dc0e97fdff4e4f6a81d47d05 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Remove GPU_BLACKLIST support from QTestEdward Welbourne2018-10-121-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts 4fe68ffbe5c93244562f2b56292d4ecf5ce39f56, 1dfc16f6dad1cfbd843af5ca91bbb8e02774930d and 9545bee98a2431d4ef4c3449631a5fcb8d9bd57a; this feature has not been in use for some time, so is just dead code. [ChangeLog][QtTestLib] Removed support for GPU_BLACKLIST files. Reimplementations or equivalents of QTEST_MAIN() should remove their uses of QTEST_ADD_GPU_BLACKLIST_SUPPORT and its _DEFS; they are still vacuously defined, but serve no remaining purpose and shall be undefined in due course. Change-Id: I94ffd5c37ce4e1f7cf25d3c7ae8d40696b74c911 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Add support font-kerning CSS3 propertyAllan Sandfeld Jensen2018-10-123-0/+20
| | | | | | | | | | | | | | | Change-Id: Ie3894481ded40d20091bd0103ac426c1086f943f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Deprecate QFont::lastResortFamily() and QFont::lastResortFont()Eskil Abrahamsen Blomfeldt2018-10-092-39/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These functions have not been used by the font selection algorithm in Qt 5. Calling lastResortFamily() always gave you "helvetica" and lastResortFont() would actually crash. Since we cannot remove them before Qt 6, we deprecate them for now and update the documentation to give a more accurate description of how the font matching works in Qt 5. Note that in the non-native QFontDialog, it tries to implement its own font matching algorithm and therefore was calling lastResortFamily(). Since fixing QFontDialog is not within the scope of this patch, I have just replaced the call by "helvetica" directly, so that it will continue to behave the same. [ChangeLog][QtGui][Text] Deprecated QFont::lastResortFamily() and QFont::lastResortFont() which are not in use in Qt 5 and did not provide any useful information. Task-number: QTBUG-60813 Change-Id: Id8fe7bfdd427292ef86bc8405de03cb466b9b62a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-10-091-8/+6
|\| | | | | | | | | | | Change-Id: I5cbfd39cf728036bbdfdeec8e8739568e0a3025b
| * | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-10-081-8/+6
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qtimezoneprivate.cpp Change-Id: Icbb5999d378711ce3786a4fe0aba176a45ac702c
| | * fix HTML subset documentation is not very readable on smaller screensAndrew O'Doherty2018-09-301-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When viewing "Supported HTML Subset" documentation in Qt Creator (in QTextBrowser), the first table that lists all tags is quite unreadable (see images). It happens because there is a code snippet in Comment column for tag "meta" that uses pre-formatted text. Because it should not be wrapped automatically, it ends up pushing first 2 columns into their minimum size, which mostly makes them take a single letter per row. Task-number: QTBUG-64126 Change-Id: I08bf6f61806d52e7a2f47bdbed1b5950825ce739 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-10-081-34/+122
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qstylesheetstyle.cpp Change-Id: I3a503b44ae413fbc0a90f4af70b8f84daffd86ad
| * | Optimize gamma-table lookup on SSE2 and NEONAllan Sandfeld Jensen2018-10-051-34/+122
| | | | | | | | | | | | | | | | | | | | | Speeds up gamma-corrected text rendering. Change-Id: I38c12ff52f4601853c3f3524de2761a932111160 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | ppmhandler: Fix undefined overflow behaviorAlbert Astals Cid2018-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | image/qppmhandler.cpp:260:53: runtime error: signed integer overflow: 44444444 * 255 cannot be represented in type 'int' #0 0x4cbc8a in read_pbm_body(QIODevice*, char, int, int, int, QImage*) /src/qt/qtbase/src/gui/image/qppmhandler.cpp:260:53 #1 0x4ca3d8 in QPpmHandler::read(QImage*) /src/qt/qtbase/src/gui/image/qppmhandler.cpp:514:10 #2 0x4b238d in QImageReader::read(QImage*) /src/qt/qtbase/src/gui/image/qimagereader.cpp:1253:22 #3 0x4b1b61 in QImageReader::read() /src/qt/qtbase/src/gui/image/qimagereader.cpp:1201:12 #4 0x486f66 in QImage::fromData(unsigned char const*, int, char const*) /src/qt/qtbase/src/gui/image/qimage.cpp:3624:37 #5 0x486cd8 in QImage::loadFromData(unsigned char const*, int, char const*) /src/qt/qtbase/src/gui/image/qimage.cpp:3590:13 #6 0x434b2e in LLVMFuzzerTestOneInput /src/qimage_fuzzer.cc:28:7 #7 0x44b167 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/libfuzzer/FuzzerLoop.cpp:570:15 #8 0x44a535 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool*) /src/libfuzzer/FuzzerLoop.cpp:479:3 #9 0x44c428 in fuzzer::Fuzzer::MutateAndTestOne() /src/libfuzzer/FuzzerLoop.cpp:707:19 #10 0x44d1b5 in fuzzer::Fuzzer::Loop(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, fuzzer::fuzzer_allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) /src/libfuzzer/FuzzerLoop.cpp:838:5 #11 0x440a29 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/libfuzzer/FuzzerDriver.cpp:764:6 #12 0x434bf8 in main /src/libfuzzer/FuzzerMain.cpp:20:10 #13 0x7fe01697282f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #14 0x409bb8 in _start (/out/qimage_fuzzer+0x409bb8) Change-Id: Ibc5df6db52639f12319910b927f6443d927206d8 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | qppmhandler: Fix undefined overflow behaviorAlbert Astals Cid2018-10-051-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | image/qppmhandler.cpp:77:25: runtime error: signed integer overflow: 10 * 300000000 cannot be represented in type 'int' #0 0x4cecb5 in read_pbm_int(QIODevice*) /src/qt/qtbase/src/gui/image/qppmhandler.cpp:77:25 #1 0x4cb1ac in read_pbm_body(QIODevice*, char, int, int, int, QImage*) /src/qt/qtbase/src/gui/image/qppmhandler.cpp:271:29 #2 0x4ca3d8 in QPpmHandler::read(QImage*) /src/qt/qtbase/src/gui/image/qppmhandler.cpp:509:10 #3 0x4b238d in QImageReader::read(QImage*) /src/qt/qtbase/src/gui/image/qimagereader.cpp:1253:22 #4 0x4b1b61 in QImageReader::read() /src/qt/qtbase/src/gui/image/qimagereader.cpp:1201:12 #5 0x486f66 in QImage::fromData(unsigned char const*, int, char const*) /src/qt/qtbase/src/gui/image/qimage.cpp:3624:37 #6 0x486cd8 in QImage::loadFromData(unsigned char const*, int, char const*) /src/qt/qtbase/src/gui/image/qimage.cpp:3590:13 #7 0x434b2e in LLVMFuzzerTestOneInput /src/qimage_fuzzer.cc:28:7 #8 0x44b167 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/libfuzzer/FuzzerLoop.cpp:570:15 #9 0x44a535 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool*) /src/libfuzzer/FuzzerLoop.cpp:479:3 #10 0x44c428 in fuzzer::Fuzzer::MutateAndTestOne() /src/libfuzzer/FuzzerLoop.cpp:707:19 #11 0x44d1b5 in fuzzer::Fuzzer::Loop(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, fuzzer::fuzzer_allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) /src/libfuzzer/FuzzerLoop.cpp:838:5 #12 0x440a29 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/libfuzzer/FuzzerDriver.cpp:764:6 #13 0x434bf8 in main /src/libfuzzer/FuzzerMain.cpp:20:10 #14 0x7fba939a082f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #15 0x409bb8 in _start (/out/qimage_fuzzer+0x409bb8) Change-Id: I9ad78afc4ea9c5c8b7530aa17013abe91202e84b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | QIcon::addFile: don't use QMimeDatabase for every PNG being loadedDavid Faure2018-10-041-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 710ff392d9 introduced this fallback code for the case where the extension was empty. Let's make it happen only in that case, so that the much more common case of "foo.png" doesn't go through iconEngineFromSuffix twice, nor through QMimeDatabase (which has to load and parse an XML file in order to determine preferredSuffix(), unfortunately). Found using heaptrack. Change-Id: Iab6b71e1fa23916029c9e2ba25447a12d70f88a5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Allow to prevent blocking of native dialogs by a proxy Qt dialogAlexander Volkov2018-10-022-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When native dialogs become visible, their invisible proxy Qt dialog blocks input to Qt windows. It is intended for native dialogs which can't block Qt windows themselves, e.g. on Android. But this behavior is incompatible with native dialogs which are implemented as in-process Qt windows, because the proxy dialog blocks them as well. This change introduces QPlatformDialogHelper::DialogIsQtWindow style which allows to detect such cases and prevent blocking. Change-Id: I8f1f741e05d09f2c27192890bcec35fdd2e8f074 Task-number: QTBUG-58116 Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: David Faure <david.faure@kdab.com>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-10-013-15/+19
|\| | | | | | | | | | | Change-Id: Ic8cdb1c2b7c0a786b1313b6c3a3bf7e9ec288712
| * | QLineEdit: Disable input methods for password unless IME supports hidden textFriedemann Kleint2018-09-293-15/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the checking logic from QGuiApplicationPrivate::_q_updateFocusObject() to QInputMethodPrivate::objectAcceptsInputMethod(), which is also called from QWidget::updateMicroFocus() via QInputMethod::update(). Fixes: QTBUG-56767 Change-Id: Ia4cce5e7e766008df891537048d5daf739c010ff Reviewed-by: Alex Blasche <alexander.blasche@qt.io>