summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextdocumentfragment.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QTextDocument: improve import of DIV tagsDavid Faure2017-04-101-3/+7
| | | | | | | | | | | | <div>1<br/></div>2 was inserting two newlines between 1 and 2, while all tested web browsers only insert one newline - as long as there is nothing between the <br/> and the </div>. This was the cause for extra newlines being inserted in KMail when replying to HTML emails, such as those generated by gmail. Change-Id: I5145d977701e68913264357bba22780e7cdd3f7d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix warning for -no-feature-texthtmlparserStephan Binner2017-04-041-2/+2
| | | | | | Change-Id: I6dd6e80a546a76ce3717855ebacb188254fe70d6 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Support C++17 fallthrough attributeAllan Sandfeld Jensen2016-08-191-1/+1
| | | | | | | | | Replaces our mix of comments for annotating intended absence of break in switches with the C++17 attribute [[fallthrough]], or its earlier a clang extension counterpart. Change-Id: I4b2d0b9b5e4425819c7f1bf01608093c536b6d14 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Optimize string usageAnton Kudryavtsev2016-07-151-1/+1
| | | | | | | | Use QStringBuilder more. Use QL1S directly, without QString construction. Change-Id: Iad844391367681fc1013b9725403d009e7c346e6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Gui: use const (and const APIs) moreAnton Kudryavtsev2016-06-011-3/+3
| | | | | | | For CoW types, prefer const methods to avoid needless detach()ing. Change-Id: I88d08d499e1be72c1f6d983fecdcee513df18aa2 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QtGui: eradicate Q_FOREACH loops [const-& returns]Marc Mutz2016-02-111-3/+6
| | | | | | | | | | | ... by replacing them with C++11 range-for loops. The function QObject::children() returns by const-reference, so they can be passed to range-for without further changes. Change-Id: I8cd2921165c45020914dd3a23b1f18b519fe7900 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QtGui: eradicate Q_FOREACH loops [needing qAsConst()]Marc Mutz2016-02-111-1/+1
| | | | | | | | | | ... by replacing them with C++11 range-for loops. To avoid detaches of these mutable Qt containers, wrap the container in qAsConst(). Change-Id: I90fd517ad542ef92034403c15ebb8300a56ac693 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* 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>
* 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>
* Restore -qt-block-indent on <li> elementsAllan Sandfeld Jensen2014-09-181-1/+1
| | | | | | Task-number: QTBUG-20877 Change-Id: If049065ed99eaf8ffc85c8ff54d3da892a095795 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Support empty inline elements in block tags in QTextDocumentEskil Abrahamsen Blomfeldt2014-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following case: <blockquote> <span />Foobar </blockquote> Qt would see the end of <span>, and consider the current block tag as closed, thus resetting the block format, thus losing the margin set for the current block (due to blockquote). If you do <blockquote> <span>Foo</span>Foobar </blockquote> instead, then the same would not happen, since hasBlock is set to false when we append text to the current inline node. [ChangeLog][QTextDocument] Add support for empty inline elements in block tags. Task-number: QTBUG-33336 Change-Id: Ic566edfec96cb8d44d1c02932bb195bc921d1580 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-1/+1
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.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>
* Get started with patching up the Qt GUI docsGunnar Sletta2012-06-281-0/+1
| | | | | | | | Primary goal, make the front page of the Qt GUI module a bit more clarifying and avoid downstream references inside the Qt GUI docs. Change-Id: Icbcfbb64b93963add889bf83711daa9575885c02 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Doc: Fix \sa usageMarius Storm-Olsen2012-05-111-1/+1
| | | | | | | | | Ensure comma between elements (757 missing), single space and curly- braces around title elements, etc. Change-Id: Id16c3fda7fc47a12a0682f8720214f4990609a97 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Casper van Donderen <casper.vandonderen@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>
* 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>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Merge QTextDocumentFragment::toHtml() overload per Qt 5 comment.Robin Burchell2011-12-271-10/+0
| | | | | Change-Id: Ic8850684c2298b996354e27cc96ad6486d7a3679 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fix empty lines in Qt HTML when displayed in external browsers (again)Eskil Abrahamsen Blomfeldt2011-06-201-2/+7
| | | | | | | | | | | | | | | | | This redoes f541c78e1bc5b293466b40e6f10496199a4a5d73 in a way which should be more compliant with different browsers. In particular, Outlook didn't support the CSS trick in the last fix, so we need the somewhat larger patch which adds an extra line break node to the tree and then ignores it when re-importing the document. Task-number: QTBUG-3669 Reviewed-by: Simon Hausmann (cherry picked from commit cb760eaef631abd49836ae5c8dc12a61ef5eff0d) Change-Id: Ia55bf39d52461aa9445a9a5d0bfb5b4c5bf1e9bd Reviewed-on: http://codereview.qt.nokia.com/492 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+1224
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12