summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Markdown: deal with horizontal rules (thematic breaks)Shawn Rutledge2019-05-082-1/+5
| | | | | Change-Id: I14d4bcfe1a6c3bd87d1328f0abb81b2138545e4e Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Markdown: fix several issues with lists and continuationsShawn Rutledge2019-05-084-27/+152
| | | | | | | | | | | | | | | | | | | | Importer fixes: - the first list item after a heading doesn't keep the heading font - the first text fragment after a bullet is the bullet text, not a separate paragraph - detect continuation lines and append to the list item text - detect continuation paragraphs and indent them properly - indent nested list items properly - add a test for QTextMarkdownImporter Writer fixes: - after bullet items, continuation lines and paragraphs are indented - indentation of continuations isn't affected by checkboxes - add extra newlines between list items in "loose" lists - avoid writing triple newlines - enhance the test for QTextMarkdownWriter Change-Id: Ib1dda514832f6dc0cdad177aa9a423a7038ac8c6 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Remove 3rdparty include from QTextMarkdownImporter header fileShawn Rutledge2019-05-082-47/+47
| | | | | | | | It's a private header; but to be able to use it in a test, it has to be as clean as a public header. Change-Id: I868372406e62acc24051a6523fee89bb911a61f9 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Deprecate conversion functions between QList and QSetLars Knoll2019-05-072-2/+2
| | | | | | | | | | Users should use range constructors instead to do the conversion. Keep conversion methods between QList and QVector as these will turn into a no-op in Qt 6, whereas forcing people to use range constructors would lead to deep copies of the data. Change-Id: Id9fc9e4d007044e019826da523e8418857c91283 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-05-0710-42/+234
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp src/corelib/kernel/qvariant.h src/corelib/tools/qlist.h Done-With: Milian Wolff <milian.wolff@kdab.com> Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io> Change-Id: I6803f7239aa137a51a7467fab7cc7a01302a848d
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-063-5/+7
| |\ | | | | | | | | | Change-Id: Iaad9509712c848ed42ada2c25065162a6fc5a930
| | * fix compilation with various -no-feature-* optionsNick Shaforostov2019-05-052-3/+5
| | | | | | | | | | | | | | | Change-Id: Ic1975db497613e3efe50be4246c167efe10d8e31 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * configure: skip Freetype/Fontconfig autodetection only on MSVCMassimo Callegari2019-05-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Windows there are package-based systems like MSYS2 that provide pkg-config for packages lookup. This change skips autodetection only for MSVC which doesn't provide the aforementioned feature. Task-number: QTBUG-57436 Change-Id: Iaed517e93031adbd2fd9dbf350764f76569b94ea Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-05-032-30/+208
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/pcre2/qt_attribution.json Change-Id: Ibae941cb12662f27bd6962ee02bc235971c59a15
| | * Only generate temporaries when it makes sensePaul Lemire2019-05-022-30/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Never for global inputs - Otherwise only if the temporary is referenced more than once -> meaning it's actually caching the result of some operation Tests updated accordingly. Change-Id: Ic76615370d23dee3965ca6350d5257a8be5a3e22 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-05-023-7/+16
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp Change-Id: I8ca1163a1fa8072dcd16ea4426c58219149599fd
| | * Use QPlatformTheme::TouchDoubleTapDistance for touch eventsAlexander Volkov2019-05-012-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and update the cached values on theme change. Modify tst_QWidget::touchEventSynthesizedMouseEvent() to avoid unexpected double click detection. Change-Id: I151c47e851ebba7550b1b09caca2781c28d7d3d9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * Don't pass scope args to _exit trace pointsMilian Wolff2019-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we trace a scope, then we pass the scope args to the _entry trace point. There is no need to do that also for the _exit trace points, it just blows up the trace data for no obvious gain. Any decent tracing consumer can easily find the args for the _exit call by matching it to its _entry call. Note that this is standard practice in trace points, and also done like this in the Linux Kernel trace points for example. Change-Id: I273293b0c7e799767acc1960b50ab675fc765a36 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Fix -Wdeprecated-copy warningsAllan Sandfeld Jensen2019-05-012-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implicit copy constructors or methods are considered deprecated for classes that has one of the two or a destructor. The warning is enabled with -Wextra in gcc 9 Change-Id: Ic9be654f2a142fb186a4d5a7d6b4f7d6f4e611d8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Fix minor compiler warning from ClangKevin Funk2019-05-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: .../qcolorspace_p.h:70:25: warning: explicitly defaulted copy assignment operator is implicitly deleted [-Wdefaulted-function-deleted] QColorSpacePrivate &operator=(const QColorSpacePrivate &other) = default; ^ .../qcolorspace_p.h:63:28: note: copy assignment operator of 'QColorSpacePrivate' is implicitly deleted because base class 'QSharedData' has an inaccessible copy assignment operator class QColorSpacePrivate : public QSharedData ^ Change-Id: I20d453279ec2cb8b9b9d1364762c6e560d6f843d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Prefix QTextStream operators with Qt::Lars Knoll2019-05-031-3/+3
| | | | | | | | | | | | | | | Change-Id: I128769cb78abb8168f0bf29cef8c693073793ced Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Custom color-space based on chromaticitiesAllan Sandfeld Jensen2019-05-024-28/+201
| | | | | | | | | | | | | | | Change-Id: I7fa6efa8993aa2b79ea60b6a21bf57c4f67a120f Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | QTextMarkdownImporter: Fix deprecation warningFriedemann Kleint2019-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use QTextCharFormat::setAnchorNames(), fixing: text/qtextmarkdownimporter.cpp:322:36: warning: 'void QTextCharFormat::setAnchorName(const QString&)' is deprecated: Use setAnchorNames() instead [-Wdeprecated-declarations] Amends 65314b6ce88cdbb28a22be0cab9856ec9bc9604b. Task-number: QTBUG-72349 Change-Id: I7f909d1fcc5c4045c738b5a5c491b2ac1de6eac5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Compile with Qt 6Lars Knoll2019-05-022-0/+12
| | | | | | | | | | | | | | | Change-Id: I2cd5f93d01b2a7645bf6bccede484fc301209007 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Compile with Qt 6Lars Knoll2019-05-021-0/+2
| | | | | | | | | | | | | | | Change-Id: Ie45f4dc6d44723c8992872e6c4c2e30d7257ca0c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Prefix textstream operators with Qt::Lars Knoll2019-05-0219-49/+49
| | | | | | | | | | | | | | | | | | | | | As the non prefixed variants are deprecated Change-Id: I2ba09d71b9cea5203b54297a3f2332e6d44fedcf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Remove handling of missing =delete and =default supportAllan Sandfeld Jensen2019-05-021-1/+1
| | | | | | | | | | | | | | | Change-Id: I006dfd0b7cfa3bda5e5ab01bcefa851f031dfe0e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add QTextMarkdownWriter::writeTable(QAbstractTableModel)Shawn Rutledge2019-05-022-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides the ability to write live data from a table to Markdown, which can be useful to load it into a text document or a wiki. But so far QTextMarkdownWriter is still a private class, intended to be used experimentally from QtQuick and perhaps later exposed in other ways. Change-Id: I0de4673987e4172178604e49b5a024a05d4486ba Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Render markdown task lists (checkboxes instead of bullets) in QTextEditShawn Rutledge2019-05-021-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | Checkboxes are right-aligned with any bullets that are in the same QTextList so that there is enough space to make them larger than bullets. But hopefully mixing bullets and checkboxes will be a rarely-used feature. Change-Id: I28e274d1f7883aa093df29eb4988e99641e87a71 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | Remove handling of missing Q_COMPILER_RVALUE_REFSAllan Sandfeld Jensen2019-05-0125-64/+0
| | | | | | | | | | | | | | | | | | | | | | | | Remove remaining handling of missing support for rvalue refs. Change-Id: I78bab8bccfeeb9c76f464f345874364a37e4840a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add QTextMarkdownWriter, QTextEdit::markdown property etc.Shawn Rutledge2019-05-017-4/+513
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A QTextDocument can now be written out in Markdown format. - Add the QTextMarkdownWriter as a private class for now - Add QTextDocument::toMarkdown() - QTextDocumentWriter uses QTextMarkdownWriter if setFormat("markdown") is called or if the file suffix is .md or .mkd - Add QTextEdit::toMarkdown() and the markdown property [ChangeLog][QtGui][Text] Markdown (CommonMark or GitHub dialect) is now a supported format for reading into and writing from QTextDocument. Change-Id: I663a77017fac7ae1b3f9a400f5cd357bb40750af Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-294-14/+6
|\| | | | | | | | | | | Change-Id: Ic712e8a84b01b212bb1121d7a2c9b85e0d2da9da
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-284-14/+6
| |\| | | | | | | | | | Change-Id: Ibce9bfef928ce39070183c488ce86ae32e5ea705
| | * Fix QOpenGLDebugLogger crash on ANGLEAlvin Wong2019-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The helper in QOpenGLDebugLogger did not account for the extra "KHR" suffix in the function names and results in a crash when ANGLE is being used. This commit fixes this issue. Change-Id: I439d8bfc53b010be5410286b86c090aff171aaef Fixes: QTBUG-62070 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | * Fix determination of OpenGL include paths on macOS, take 3Joerg Bornemann2019-04-272-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sysrootification of QMAKE_INCDIR_OPENGL on macOS must happen only once. Commit 49ef3773 addressed this but stored the sysrootified QMAKE_INCDIR_OPENGL in qt_lib_gui_private.pri. For installer packages, these paths are the paths of the build machine and most likely wrong on the user's machine. This reverts commit 4949ef377349ba4dae840c2d5caa36e2d516707baa and restores the sysrootification in sdk.prf. The original include paths are assigned to QMAKE_EXPORT_INCDIR_OPENGL and stored as QMAKE_INCDIR_OPENGL in qt_lib_gui_private.pri. Fixes: QTBUG-75374 Task-number: QTBUG-73736 Change-Id: I4c0f65866d60660c632363dba3adc7ea2e344bfc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| | * Fix page breaking with large imagesLars Knoll2019-04-261-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't go into an infinite loop breaking pages, when an image is about as large as the page. Correctly take top and bottom margins into account when calculating whether the image could fit on one page. Amends change 416b4cf685030114837bd375664fd12047895a62. Fixes: QTBUG-73730 Change-Id: Id311ddf05510be3b1d131702f4e17025a9861e58 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | QTextMarkdownImporter: insert list items into the correct listShawn Rutledge2019-04-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a bug when handling situations like 1. first 1) subfirst 2. second It was always inserting items into the list where the cursor already was, but it needs to insert the "second" list item into the list which is currently the top of m_listStack. Change-Id: Id0899032efafb2e2b9e7c45a6fb9f2c5221fc4df Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-273-1/+6
|\| | | | | | | | | | | Change-Id: I1c9449ab064deed1367a7e5dbedfcb489f28140e
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-263-1/+6
| |\| | | | | | | | | | Change-Id: I6ecf7074eda57ef4954fb3fdc7a6d1e8cd229340
| | * Fix aliased painting with non-uniform scalingEirik Aavitsland2019-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The full stroker does not produce good results for aliased lines thinner than 1 pixel. Avoid it by making sure that such thin lines are painted by the cosmetic stroker, even when they have non-uniform transformation. Fixes: QTBUG-73866 Change-Id: I7b5f0fa555903246e0c3fd92cd435cc8c0b15a24 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Avoid hanging on painting dashed lines with non-finite coordinatesEirik Aavitsland2019-04-252-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | The dash stroker did not check for inf/nan coordinates. Fixes: QTBUG-47887 Change-Id: I1e696cd15cc37d8fcb6a464cac3da33c3a8b95c2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | QLineF: add intersects() as a replacement for intersect()Christian Ehrlicher2019-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QLineF::intersect() does not follow the naming rules for functions. Therefore add a replacement function intersects() instead and also rename the return type from IntersectType to IntersectionType [ChangeLog][QtCore][QLineF] added QLineF::intersects() as a replacement for QLineF::intersect() Change-Id: I744b960ea339cb817facb12f296f78cca3e7d938 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
* | | Fix -Wc++11-narrowing error in qtextmarkdownimporterMårten Nordheim2019-04-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | error: non-constant-expression cannot be narrowed from type 'qt::QFlags::Int' (aka 'int') to 'unsigned int' in initializer list [-Wc++11-narrowing] Change-Id: Ic634a98d29a108741d41955da1fbf2c986e4a943 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-04-247-105/+205
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/util/qshaderformat.cpp src/gui/util/qshaderformat_p.h src/widgets/graphicsview/qgraphicsitem_p.h Change-Id: Idafd88eb9a0a15b4af29f6143d009c1ec8ceecca
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-242-101/+93
| |\| | | | | | | | | | Change-Id: I26da00aa71b0f0b91c9bfb4a9e8550345ee62875
| | * macOS: Clean up and deduplicate QMacCGContextTor Arne Vestbø2019-04-192-101/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | We now use QCFType to track the CGContextRef, instead of manually maintaining the lifetime of the context. A bunch of unused methods were removed, including completely broken ones like isNull(). Change-Id: Ib5a05aadbf8f228192e74c9a4c8919580b831497 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-04-165-4/+112
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qlocale.qdoc tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Done-with: Edward Welbourne <edward.welbourne@qt.io> Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io> Change-Id: I88e0757b2d020f0a244714c87844631df4b3fd13
| | * QOffscreenSurface: Suppress setting of a default geometry on the windowFriedemann Kleint2019-04-111-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When investigating the bug report, it was discovered that the offscreen window is assigned a default geometry by QPlatformWindow::initialGeometry(), causing subsequent resize events and flushing of event queues. Suppress that by making it a popup which is not subject to window title bar restrictions on Windows and setting the respective flags. Task-number: QTBUG-74176 Change-Id: I7f9c1a3bfd57072c8188a98124bde87491dd25eb Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * QShaderGenerator: don't generate temporary variables for global inputsPaul Lemire2019-04-101-2/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | Up until now, the QShaderGenerator would create temporary variables for uniform, attributes, const. This change makes it use the global inputs directly rather than relying on the intermediate properties. Change-Id: Ia9497367d61e536969fe87536606f309c286dbb2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * QShaderGenerator: fix substitution for attributes on GL2/ES2Paul Lemire2019-04-104-2/+44
| | | | | | | | | | | | | | | | | | | | | | | | GL2/ES2 expect it to be attribute and not in like later versions of OpenGL. Task-number: QTBUG-74829 Change-Id: Iddd22386ed315d6e6843d8225e49a4b73b6ad9ba Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | QRegExp include cleanupSamuel Gaist2019-04-195-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QRegExp includes can be found in several files where there's not even a use of the class. This patch aims to avoid needless includes as well as follow the "include only what you use" moto. This patch removes a QRegExp include from the QStringList header which means that there is likely going to be code breaking since QStringList is used in many places and would get QRegExp in. [ChangeLog][Potentially Source-Incompatible Changes] qstringlist.h no longer includes qregexp.h. Change-Id: I32847532f16e419d4cb735ddc11a26551127e923 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add QTextMarkdownImporterShawn Rutledge2019-04-177-2/+663
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides the ability to read from a Markdown string or file into a QTextDocument, such that the formatting will be recognized and can be rendered. - Add QTextDocument::setMarkdown(QString) - Add QTextEdit::setMarkdown(QString) - Add TextFormat::MarkdownText - QWidgetTextControl::setContent() calls QTextDocument::setMarkdown() if that's the format Fixes: QTBUG-72349 Change-Id: Ief2ad71bf840666c64145d58e9ca71d05fad5659 Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | tslib: use ts_setup() to find the deviceRolf Eike Beer2019-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This automatically searches for some default devices. This not only reduces the amount of code, it also makes sure that Qt will by default find the same input devices that tslib (e.g. ts_calibrate) will find. Fixes: QTBUG-74680 Change-Id: Ied3fff7e8ed9d6637d2b8cf32119660133d251a3 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Add Extended RGB model to QColorAllan Sandfeld Jensen2019-04-124-67/+229
| | | | | | | | | | | | | | | | | | | | | Can be used to represent wide-gamut and HDR colors. Change-Id: I1cca442069ce2f2c070f723fe930fe1f2f5580ad Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-04-114-133/+137
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qstyle_p.h Change-Id: I0e6e856bd6628da1135b3ba674dddffabbeb5c09