summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextformat.h
Commit message (Collapse)AuthorAgeFilesLines
* Add QTextListFormat::start: html and markdown ordered list index offsetNicolas Werner2023-03-221-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | This is useful for a lot of applications that render text coming from sources which already support arbitrarily numbered lists (like chat applications for example). Application-side workarounds usually have significant overhead; and this feature has been requested multiple times. It should be possible to both read and write HTML with the <ol start="x"> attribute, and read and write Markdown with arbitrary numbers for the first item in a list. [ChangeLog][QtGui] QTextList now supports specifying a start index using the new QTextList::{setStart, start} functions. The HTML start attribute on ordered lists in rich text documents is now parsed and used when rendering a text list. Non-negative indices in markdown lists are now also parsed and written properly. This allows starting a list with a different number than 1. Fixes: QTBUG-30407 Fixes: QTBUG-65384 Task-number: QTBUG-107562 Change-Id: Ib35b9378d9134ffedaa2d92f728b0984793aa7c1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Do not use QTextFormat::FontFamily when building with ↵Ivan Solovev2022-07-211-0/+1
| | | | | | | | | | | | | | | | | | QT_DISABLE_DEPRECATED_BEFORE >= 0x060000 The QTextFormat::FontFamily enum is deprecated since Qt 6.0, however it is still used in the code. To retain backward compatibility with the old data stream formats, we introduce a new internal QTextFormat::OldFontFamily enum value, which has exactly the same value as QTextFormat::FontFamily, and use it instead. Task-number: QTBUG-104857 Pick-to: 6.4 6.3 6.2 Change-Id: Ibf5258b621c2b0aa507005dfe2c1e80c26ddb0d4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QtGui: compile-optimize inline swap functionsMarc Mutz2022-03-191-1/+1
| | | | | | | | | | | | | | | | | | Instead of using the overly-generic qSwap() monster, use - qt_ptr_swap() for swapping raw pointers - member-swap for swapping smart pointers - std::swap() for swapping scalars In QtCore, this has proven to give a nice reduction in compile time for Qt users, cf. b1b0c2970e480ef460a61f37fa430dc443390358. Pick-to: 6.3 6.2 Task-number: QTBUG-97601 Change-Id: I987ff95e8751a22a4f283655d8225dd16de21178 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QText*Format: future-proof by adding own QDataStream stream operatorsThiago Macieira2022-03-081-1/+11
| | | | | | | | | | | | | | These five classes add no members to QTextFormat, so their streaming must, by all means, be identical to QTextFormat. But should that change in the future, we don't want to accidentally slice the objects by calling the parent operators. Required by "Cause compilation errors if you forget to declare QDataStream operators" Pick-to: 6.3 Change-Id: Ic15405335d804bdea761fffd16d4a4193db28bc4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Miscellanea fixes for QT_TYPESAFE_FLAGS in our headersGiuseppe D'Angelo2022-03-071-4/+4
| | | | | | | | | | | | | | | | | | | | | In preparation for adding it to headersclean. Some remarks: * QStandardItemModel builds just fine (QFlags has comparison operators against literal zero); the warning we however get is about 0 converted to a null pointer constant. There's nothing we can do about that one (even <compare> gives such a warning). * Several code was depending on flags->int conversions. Add toInt(), but also cast again to the expected type to avoid warnings in case toInt() returns unsigned int. * Ported to explicit casts to bool rather than test(Any)Flag to minimize confusion for people unfamiliar with the test*Flag methods. Change-Id: I5be280ac33a0b38e2680096f0e79129fd55ba241 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QTextFormat: remove unnecessary namespace-scope stream op declarationsThiago Macieira2022-02-241-10/+0
| | | | | | | | These two pairs already exist as hidden friends inside the two classes. Pick-to: 6.3 Change-Id: Ic15405335d804bdea761fffd16d4a3bc633e6d53 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QTextImageFormat::setQuality: deprecate the default valueDavid Faure2021-10-011-2/+5
| | | | | Change-Id: Ia4532a7dd6eb6c0356aeea2dca0ae585ab9b1ffd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QTextImageFormat: add Qt7 TODO to remove the default valueDavid Faure2021-09-081-0/+1
| | | | | Change-Id: I8b60b302c9df7ce7c44b89fe45f813c4532b7bd6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QTextCharFormat: mark a couple of API mistakes to be fixed in Qt 7Giuseppe D'Angelo2021-07-221-0/+10
| | | | | | | | | | | | | | | The fontFamilies and fontStyleName have an asymmetric getter and setter. The setter takes QStringList, but the getter returns QVariant (?), for no reason whatsoever (the underlying QFont APIs take QStringList, and the docs say that they should return QStringList). It's not entirely obvious that we can fix this without introducing badly-named getters (getX) or somesuch, so for the time being, mark this to be fixed in Qt 7. Change-Id: I49706af00906a2c5d950ada4be3cbc76dbee432c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* Fix deprecated macrosVolker Hilsheimer2021-03-251-3/+3
| | | | | | | | | | | | | | The QTextCharFormat::fontFamily methods are deprecated as of Qt 6.1, not as of Qt 6.0. Mark them as obsolete in the documentation and point to the replacement there as well. Address API review comment. Pick-to: 6.1 Change-Id: Id71ea1ebab6f7a385c8c3f286a35f88ba1177857 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* QFont: Prefer setFamilies() over setFamily()Andy Shaw2020-11-201-4/+8
| | | | | | | | | | | | | | | | By depending on setFamilies() then we can be sure that font names with spaces, commas, quotes and so on are correctly handled without being misinterpreted. For now it will split on the comma when a string containing one is passed to setFamily. But from Qt 6.2 this will be removed to preserve the family string as a convenience function. [ChangeLog][QtGui][QFont] Indicated that setFamilies/families is preferred over setFamily/family to ensure that font family names are preserved when spaces, commas and so on are used in the name. Change-Id: Id3c1a4e827756a4c928fed461a4aafa5a0f06633 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix QDataStream compatibility for QTextFormat::TextUnderlineColorLars Knoll2020-11-031-0/+1
| | | | | | | | | The enum value of that property changed. Use the same mapping trick as with two other properties to ensure backwards compatibility in QDataStream. Change-Id: I01b36f9ecbcaf40e7c8523da33ea4c8f12821a63 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Remove dead codeLars Knoll2020-10-121-3/+0
| | | | | | | This code has been deprecated in Qt 5. Change-Id: Ia8e0bc791ac1f43df7124b4f30db3d0bb9966015 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Get rid of some #ifdef qt6Allan Sandfeld Jensen2020-09-301-1/+1
| | | | | | | | | None of this code is even compiled in qt6. Change-Id: I5891cc9459320083ad3908fcbf646f3ba75b8a4d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Allow arbitrary baseline shift in QTextCharacterFormatJordi Pujol Foyo2020-08-261-0/+18
| | | | | | | | | | | | | | | Added 6 new methods in QTextFormat and QTextDocument to allow setting/getting specific % positioning for baseline and super/ subscript. Modified QTextLayout to honor those new settings. [ChangeLog][QtGui][QTextLayout,QTextFormat,QTextDocument] Allow text layout modification based on baseline offset and super/subscript % height positioning Fixes: QTBUG-18260 Change-Id: I0796f18224aac8df6baf8359c35022fd98fe64ef Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Use QList instead of QVector in guiJarek Kobus2020-06-291-9/+10
| | | | | | | | Applied to headers only. Source file to be changed separately. Task-number: QTBUG-84469 Change-Id: Ic08a899321eaffc46b8461aaee3dbaa4d2c727a9 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Remove deprecated methods and address some ### Qt 6 comments in gui/textVolker Hilsheimer2020-06-091-10/+1
| | | | | Change-Id: If1ed58ecbb13df88bdb1d72caccfd01c14d42eac Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix distribution of font properties in QTextFormatEskil Abrahamsen Blomfeldt2020-03-101-3/+9
| | | | | | | | | | | | | | | | The area reserved for font properties was too small for the properties we needed, and as a result font properties were added outside of the area and special-cased (in the case of FontLetterSpacingType) or ignored (in the case of FontStretch) by conditions that check if the property is within the designated area. We reorganize the enum values now that we can, and allocate some more space for the font properties area. Fixes: QTBUG-65345 Change-Id: I8121ff7f72102d8022c6a6d2f8ed9c35dcdbb321 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Make QTextBlockFormat::MarkerType an enum classShawn Rutledge2019-10-101-1/+1
| | | | | | | This came up during API review. Change-Id: I9198e1eb96db0c21e46a226a032919bb62d3ca66 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QTextDocument: allow css-styling of table cell bordersNils Jeisecke2019-08-081-0/+110
| | | | | | | | | | | | | | | | | | | | This allows to set the width, style and color of each table cell's edge (left, right, top, bottom). Setting the table's border-collapse mode will disable explicit cell spacing. The basic CSS border collision rules are applied (wider border wins, vertical over horizontal). Setting the table's border width to a value >= 1 and enabling borderCollapse will now draw a simple and clean table grid (1px) with an outer border of the specified width and color. [ChangeLog][QtGui][QTextDocument] Added CSS style table cell border formatting with border-collapse mode. Change-Id: I324d82284802df4c88c13c5b902fec1f4768b67e Fixes: QTBUG-36152 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QTextMarkdownWriter: write fenced code blocks with language declarationShawn Rutledge2019-06-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MD4C now makes it possible to detect indented and fenced code blocks: https://github.com/mity/md4c/issues/81 Fenced code blocks have the advantages of being easier to write by hand, and having an "info string" following the opening fence, which is commonly used to declare the language. Also, the HTML parser now recognizes tags of the form <pre class="language-foo"> which is one convention for declaring the programming language (as opposed to human language, for which the lang attribute would be used): https://stackoverflow.com/questions/5134242/semantics-standards-and-using-the-lang-attribute-for-source-code-in-markup So it's possible to read HTML and write markdown without losing this information. It's also possible to read markdown with any type of code block: fenced with ``` or ~~~, or indented, and rewrite it the same way. Change-Id: I33c2bf7d7b66c8f3ba5bdd41ab32572f09349c47 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Markdown and HTML: support image alt text and titleShawn Rutledge2019-06-011-0/+2
| | | | | | | | | | | | | | | | | | | | | It's a required CommonMark feature: https://spec.commonmark.org/0.29/#images and alt text is also required in HTML: https://www.w3.org/wiki/Html/Elements/img#Requirements_for_providing_text_to_act_as_an_alternative_for_images Now we are able to read these attributes from either html or markdown and rewrite either an html or markdown document that preserves them. This patch does not add viewing or editing support in QTextEdit etc. Change-Id: I51307389f8f9fc00809808390e583a83111a7b33 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Markdown: blockquotes, code blocks, and generalized nestingShawn Rutledge2019-05-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Can now detect nested quotes and code blocks inside quotes, and can rewrite the markdown too. QTextHtmlParser sets hard-coded left and right margins, so we need to do the same to be able to read HTML and write markdown, or vice-versa, and to ensure that all views (QTextEdit, QTextBrowser, QML Text etc.) will render it with margins. But now we add a semantic memory too: BlockQuoteLevel is similar to HeadingLevel, which was added in 310daae53926628f80c08e4415b94b90ad525c8f to preserve H1..H6 heading levels, because detecting it via font size didn't make sense in QTextMarkdownWriter. Likewise detecting quote level by its margins didn't make sense; markdown supports nesting quotes; and indenting nested quotes via 40 pixels may be a bit too much, so we should consider it subject to change (and perhaps be able to change it via CSS later on). Since we're adding BlockQuoteLevel and depending on it in QTextMarkdownWriter, it's necessary to set it in QTextHtmlParser to enable HTML->markdown conversion. (But so far, nested blockquotes in HTML are not supported.) Quotes (and nested quotes) can contain indented code blocks, but it seems the reverse is not true (according to https://spec.commonmark.org/0.29/#example-201 ) Quotes can contain fenced code blocks. Quotes can contain lists. Nested lists can be interrupted with nested code blocks and nested quotes. So far the writer assumes all code blocks are the indented type. It will be necessary to add another attribute to remember whether the code block is indented or fenced (assuming that's necessary). Fenced code blocks would work better for writing inside block quotes and list items because the fence is less ambiguous than the indent. Postponing cursor->insertBlock() as long as possible helps with nesting. cursor->insertBlock() needs to be done "just in time" before inserting text that will go in the block. The block and char formats aren't necessarily known until that time. When a nested block (such as a nested quote) ends, the context reverts to the previous block format, which then needs to be re-determined and set before we insert text into the outer block; but if no text will be inserted, no new block is necessary. But we can't use QTextBlockFormat itself as storage, because for some reason bullets become very "sticky" and it becomes impossible to have plain continuation paragraphs inside list items: they all get bullets. Somehow QTextBlockFormat remembers, if we copy it. But we can create a new one each time and it's OK. Change-Id: Icd0529eb90d2b6a3cb57f0104bf78a7be81ede52 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Add QTextMarkdownImporterShawn Rutledge2019-04-171-0/+12
| | | | | | | | | | | | | | | | | 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>
* QtGui/Text: mark obsolete functions as deprecatedChristian Ehrlicher2019-01-281-0/+4
| | | | | | | | | | | Mark some long obsolete functions as deprecated so the can be removed with Qt6: - QTextFormat::setAnchorName()/anchorName() - QTextList::isEmpty() Change-Id: Ic1f5317980d116c846def3645d2a6cd61ba8679d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Support style name property in QTextCharFormatEskil Abrahamsen Blomfeldt2018-12-041-0/+6
| | | | | | | | | | | | | | | | The support for setting the style name in the QTextDocument API was never added, as revealed by the example in the linked bug report. The actual bug reported there (style names not working with some Helvetica Neue) is not reproducible anymore. [ChangeLog][QtGui][Text] Added support for setting the font's style name in QTextCharFormat. Task-number: QTBUG-22813 Change-Id: I8f4d12151c3611aa30965fd963bc93f7c4264e23 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Handle fonts that have commas/quotes in the family nameAndy Shaw2018-11-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Since the comma character was originally used as a separator, we need to extend QFont to have setFamilies() so that we can avoid joining the family strings together. This enables us to see the family name as a single string and for multiple family names, we have families(). Subsequently, this has added functions to QTextCharFormat to account for multiple font families too. So it is now possible to set a single one directly with setFontFamily() and multiple ones with setFontFamilies(). This also bumps up the datastream version to 19 as QFont now streams the families list as well. [ChangeLog][QtGui][QFont] Add setFamilies()/families() to aid using of font families with commas and quotes in their name. [ChangeLog][Important Behavior Changes] QDataStream version bumped up to 19 to account for changes in the serialization of QFont. Fixes: QTBUG-46322 Change-Id: Iee9f715e47544a7a705c7f36401aba216a7d42b0 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add image quality handling to QTextImageFormatDaniel Savi2018-04-221-0/+8
| | | | | | | | | | | | | | | | This patch enhances QTextImageFormat with a property for image quality. Default will be quality of 100. The user may set different values with setQuality(int). QTextODFexport will export images as png if quality is set to 100 and as jpg with the compression quality set to the given value if smaller than 100. [ChangeLog][QtGui][QTextImageFormat] Adds two new functions to the class: setQuality(int=100) and quality(). Is currently used by QTextODFWriter to determine the image type and quality when exporting images to ODT files. Change-Id: Iaa8ec0246aaba004d98c9e8c66609795101519a9 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* preserve HTML heading level in QTextBlockFormat; demonstrate in exampleShawn Rutledge2018-03-021-0/+6
| | | | | | | | | | | | | | | | | | When reading an HTML file with <H1> for example, we still set the font size as before (that's how it always was done), but now it remembers that it came from an H1 tag, so it writes <h1 ...><span font-size:xx-large ...> ... rather than <p ...><span ...> ... This will help with the upcoming Markdown format, where heading level is saved but the font is not. Now the style combobox in examples/widgets/richtext/textedit can set list item type, heading type or "standard" formatting, and also shows the current formatting of the line that has the cursor. It was always a shortcoming in this example that it only allowed setting the current line's block format but had no feedback to show the current format. Change-Id: I0a7849b74f23fea84d3375c487c3a6b9f43240c1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add qtguiglobal.h and qtguiglobal_p.hLars Knoll2016-07-031-0/+1
| | | | | | | | | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. A similar scheme and naming convention is already being used for many other modules (e.g. printsupport, qml, quick). That header will later on #include the configuration file for Qt Gui. For now it defines the Q_GUI_EXPORT macro for this library. In addition, add a private global header, qtguiglobal_p.h, that can later on include the private config header for Qt Gui for things we don't want to export to the world. Change-Id: Id9ce2a4f3d2962c3592c35e3d080574789195f24 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-061-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf config.tests/unix/nis/nis.cpp mkspecs/unsupported/freebsd-g++/qplatformdefs.h src/corelib/tools/qdatetime.cpp src/corelib/tools/qsimd.cpp src/corelib/tools/qsimd_p.h src/network/access/access.pri src/network/access/qnetworkreplynsurlconnectionimpl.mm src/network/access/qnetworkreplynsurlconnectionimpl_p.h src/plugins/platforms/cocoa/qnsview.mm src/plugins/printsupport/windows/qwindowsprintdevice.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp tests/auto/network/access/qnetworkreply/BLACKLIST tests/auto/widgets/widgets/qopenglwidget/BLACKLIST Change-Id: I4b32055bbf922392ef0264fd403405416fffee57
| * Fix bugs causing Thin font weights to be ignored or mishandled.Jake Petroules2016-06-011-2/+2
| | | | | | | | | | | | Task-number: QTBUG-53196 Change-Id: If12b3cab3d8de5e0e452fca844b0a484c29e9e86 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | QtGui: mark some more types as movable/primitiveMarc Mutz2016-03-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | These are already held in QVectors. Public API types need to wait until Qt 6, for BC reasons. Even though Q_RELOCATABLE_TYPE deals with most of them, we lack a way to mark a type as primitive, but still isStatic - for QList. Change-Id: I91392b01ae6f94cc847007636e12d4e64c43b2bc Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* QtGui: use Q_ENUM instead of Q_ENUMSOlivier Goffart2015-02-081-1/+3
| | | | | Change-Id: I92ac2ea218e9134aa36ecb179b8ae790a2dba56a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Remove TableFormat as FormatType from QTextFormatLars Knoll2014-02-061-0/+2
| | | | | | | | | | The enum value is unused, a QTextTableFormat is actually documented to have a FormatType of FrameFormat, and isTableFormat() etc. do the right thing. Task-number: QTBUG-35114 Change-Id: I2f3305630b92f117c1f89b85460457265e5af126 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Allow QTextCharFormat::setFont() to skip unresolved font propsKonstantin Ritt2014-01-311-1/+7
| | | | | | | | | This makes the font merging possible and solves an issue with the default font properties inheritance when used in conjunction with QTextFormatCollection. Change-Id: If8b543c011122dde9f086f5d696df3b042f7b90c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add convenience method QTextFormat::isEmpty()Konstantin Ritt2014-01-201-0/+1
| | | | | Change-Id: I30e74de6853908d1fec399131637848e3c2faabe Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-291-4/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Make letter spacing APIs in QTextFormat more consistentEskil Abrahamsen Blomfeldt2012-08-271-9/+7
| | | | | | | | | | | | Change d060b6f04f956ab3a6358f826dc6928b3353f5f7 introduced some new properties to QTextFormat which were unfinished and did not match the documentation in the same change. I've updated the API and docs to use the regular QFont enum for letter spacing type instead of introducing bools (which inhibits expansions later) or mutually exclusive properties in the text format. Change-Id: Ife44993b6746c413e421fdaf92ebaaab6ba95977 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QtGui: declare some classes as sharedMarc Mutz2012-07-101-0/+16
| | | | | Change-Id: I0ebb0ca8b8edcecc939021407d1755693f97e553 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* QtGui: add member-swap to shared classesMarc Mutz2012-07-031-0/+3
| | | | | | | Implemented as in other shared classes (e.g. QPen). Change-Id: I5b96d4a4795870d6252aa53de6fbaedde7c0095a Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-251-1/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>