summaryrefslogtreecommitdiffstats
path: root/src/corelib/xml
Commit message (Collapse)AuthorAgeFilesLines
* Reapply 403343039d07812c0beee9260b291f86e14d8ac4 on 5.11Liang Qi2018-02-231-1966/+0
| | | | | | | | | | | This change amends 305dd1b61f657474d751cc3b24f58249ec21b61b, which lost 40334303 and brought src/corelib/xml/qxmlstream_p.h back. In a6b697ca13945a174cff9f3e9b1af1cf61c0bea5, it was moved to src/corelib/serialization/qxmlstream_p.h in 5.11. Change-Id: Ia1e9841b866ff49f7274b1b13fd224c0a20a017e Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-141-0/+1966
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/animation/qvariantanimation.cpp src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/corelib/io/qprocess_win.cpp src/corelib/json/qjsonarray.cpp src/corelib/tools/qsimd_p.h src/corelib/tools/qtimezoneprivate_p.h src/corelib/xml/qxmlstream_p.h src/gui/kernel/qsimpledrag.cpp src/gui/kernel/qsimpledrag_p.h src/plugins/generic/generic.pro src/plugins/platforms/cocoa/qcocoamenu.mm src/widgets/styles/qmacstyle_mac.mm tests/auto/concurrent/qtconcurrentmap/BLACKLIST tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qmessagebox/BLACKLIST Change-Id: I508d686cf20f7f8cc6a7119b9bc7c3bbb505c58e
| * Suppress GCC 8 warning about realloc() non-trivially-copyable typesThiago Macieira2018-02-041-1/+2
| | | | | | | | | | | | | | | | | | | | But they are movable. qxmlstream_p.h:654:32: error: ‘void* realloc(void*, size_t)’ moving an object of non-trivially copyable type ‘struct QXmlStreamPrivateTagStack::Tag’; use ‘new’ and ‘delete’ instead [-Werror=class-memaccess] Change-Id: I41d006aac5bc48529845fffd150e8115eb852034 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Create corelib/serialization and move existing file formats into itThiago Macieira2018-01-269-8920/+0
| | | | | | | | | | | | | | | | | | This is in preparation to adding CBOR support. We don't need yet another dir for CBOR and placing it in src/corelib/json is just wrong. Change-Id: I9741f017961b410c910dfffd14ffb9d870340fa6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-021-1/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sc/corelib/io/qfsfileengine_p.h src/corelib/io/qstorageinfo_unix.cpp src/platformsupport/eglconvenience/qeglpbuffer_p.h src/platformsupport/input/libinput/qlibinputkeyboard.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/ios/qiosscreen.h src/plugins/platforms/ios/qioswindow.h src/plugins/platforms/ios/quiview.mm src/printsupport/dialogs/qpagesetupdialog_unix_p.h src/printsupport/dialogs/qprintpreviewdialog.cpp src/printsupport/widgets/qcupsjobwidget_p.h src/widgets/widgets/qmenu.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-12-301-1/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/win32-g++/qmake.conf src/corelib/global/qglobal_p.h src/corelib/global/qoperatingsystemversion_p.h src/corelib/io/qfilesystemengine_win.cpp src/network/bearer/qbearerengine.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qfusionstyle.cpp tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
| | * Allow empty namespace URIPaul Olav Tvete2017-12-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | W3C Namespaces Standard states that "The attribute value in a default namespace declaration MAY be empty" (secion 6.2). Analysis and fix thanks to Eugenio Rustico. Task-number: QTBUG-63538 Change-Id: Icd8d4df639b9737d8e0d215bf2bea56fe1e161ac Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | QXmlStreamWriter: Avoid writing invalid charactersUlf Hermann2017-09-131-22/+57
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some valid UTF-16 characters cannot be expressed in XML 1.0 and a QString may contain invalid unicode. In both cases we should not write the respective data to the output stream, as that generates invalid XML, which then cannot be read back by QXmlStreamReader. In addition we should report an error if we encounter them. The change filters the incorrect strings from the output and introduces an "encodingError" flag which is reported from hasError(). [ChangeLog][Important Behavior Changes] Characters invalid in XML, such as 0x0 or 0xfffe, as well as strings containing unmatched UTF-16 surrogates are now suppressed from the output of QXmlStreamWriter and cause the error flag to be set. Task-number: QTBUG-63150 Change-Id: Ia29bab768fed9681dd68e8934da2a7e3fcdfc3cd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QXmlStream: resolve puzzle in translatable stringsOswald Buddenhagen2017-07-311-22/+15
| | | | | | | | | | | | | | Task-number: QTBUG-60159 Change-Id: I4cc83f50d38205eb2996d4122d487d07cc3d8677 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: GunChleoc <fios@foramnagaidhlig.net>
* | QXmlStream: don't create QStrings just to look up entities in a hashMarc Mutz2017-05-303-39/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | Move the entity's name into the Entity struct and use a QStringView into Entity::name as the hash key, instead of a QString. This avoids having to create a QString from QStringRefs every time an entity is looked up. Only costs 280B in text size on optimized GCC 6.1 Linux AMD64 builds. Change-Id: I8dbd04c90c1ff684b794685025204abc89f68a84 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QXmlStream: optimize PrivateTagStack::addToStringStorage()Marc Mutz2017-04-193-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | De-duplicate the QString/Ref code paths by using QStringView instead. Keep the old overloads so we can centrally apply the qToStringView- IgnoringNull() optimization. Replace insert(p, ..) where p = size() with append(..). The code ensures in the lines before that the insertion position is the end of the string. Port the few QLatin1String arguments to addToStringStorage() to QStringViewLiteral. I also considered adding a QLatin1String() overload, but the test size increased, so the function wasn't pulling its own weight. This version saves 360B in text size on optimized GCC 6.1 Linux AMD64 builds. Change-Id: I4b759fddc38b1f97a7218954e756cc19400922e9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QXmlStream: update qxmlstream.g to match qxmlstream_p.h againMarc Mutz2017-04-151-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many changes over the last years didn't update qxmlstream.g: ecceaec8581886e5215ab10c8f5c702e315cb397 6f4160042226be86276fa9264663c2942413fc8d 9f888d2fde9c5413e5519e0914e9b13638760985 59c3670b63b6e97dac6115a0819e6c412d3f7888 a7885c9756d423042bd0670d82d78d8dffe9be54 817800ad39df10ca78e2c965a61d4d2025df622b 342c99ff45c1e6ef524b6045571900fd7408d635 These changes are all included now. Change-Id: I9dd56ec12ae6505edaf8238d48c5a5f78b5e8779 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QXmlStream: remove more unneeded toString() callsMarc Mutz2017-04-152-14/+14
| | | | | | | | | | | | | | | | | | Some are enabled by the recent addition of QStringView, but some were wrong already before. Change-Id: I3f900a80c47011af4c0370e32acb7478404b4867 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-071-0/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/linux-icc/qmake.conf mkspecs/macx-icc/qmake.conf mkspecs/win32-icc/qmake.conf src/gui/painting/qgrayraster.c Change-Id: Ib08c45ea3215be05f986ecb3e1f4b37d209aa775
| * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-061-0/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp src/platformsupport/fontdatabases/freetype/qfreetypefontdatabase.cpp src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp src/widgets/widgets/qtabbar.cpp Change-Id: Iaa9daee5f7a6490d56257a3824730a35751ceb05
| | * GCC 7: fix -Werror=implicit-fallthroughGiuseppe D'Angelo2017-04-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | More fallthrough-are-errors fixed. Change-Id: I9a6cb6efe988400ed3f9cb95d1e426dac317e6c4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Port internal class QXmlUtils to QStringViewMarc Mutz2017-04-064-28/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and adapt callers. In one case, port a use of QString::toLatin1() to QStringRef:: toLatin1() so together with this change and the addition of QString::arg(QStringView) we can drop one more QStringRef::toString(). Change-Id: Iba898af8cc2a9e1a811e271789359395f595ad32 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QString: add QStringView/QLatin1String overload of (non-multi) arg()Marc Mutz2017-04-061-4/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new overload directly in QXmlStream*. Saves 129B in QtCore text size on optimized GCC 6.1 Linux AMD64 builds, even though we added two more functions. [ChangeLog][QtCore][QString] Added arg(QStringView), arg(QLatin1String) overloads. Change-Id: Idf7236dcab763824593f34182e4e0b16b5ed4321 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* / Do not assume QStringRef(const QString*) to be implicitMarc Mutz2017-03-141-1/+1
|/ | | | | | | | It won't be for very much longer. Change-Id: I30e3e0cd8c8ecf0833f759557382a3ded7bdea34 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-161-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/common/linux-android.conf src/gui/opengl/qopengl.h src/network/socket/qnativesocketengine_winrt.cpp src/network/socket/qnativesocketengine_winrt_p.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/eglfs/api/qeglfsintegration.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp sync.profile Change-Id: If70aaf2c49df91157b864cf0d7d9513546c9bec4
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-11-151-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/plugins/platforms/eglfs/qeglfsintegration.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp Change-Id: Id2da7c775439adb62646d5b741ee7c638042b34b
| | * Correct a Q_CHECK_PTR()'s parameterEdward Welbourne2016-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | Someone cut-and-pasted but forgot one of the changes. Change-Id: I647dc8117ebfe8ce3d4b26d468b80c15d4e533e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Support C++17 fallthrough attributeAllan Sandfeld Jensen2016-08-192-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-011-0/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure 5.7 now supports clang on android; but dev re-worked configure src/gui/kernel/qevent.h One side renamed a parameter of a constructor; the other added an alternate constructor on the next line. Applied the rename to both for consistency. tests/auto/tools/moc/tst_moc.cpp Each side added a new test at the end. .qmake.conf Ignored 5.7's change to MODULE_VERSION. configure.json No conflict noticed by git; but changes in 5.7 were needed for the re-worked configure to accommodate 5.7's stricter handling of C++11. Change-Id: I9cda53836a32d7bf83828212c7ea00b1de3e09d2
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-261-0/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qtemporarydir.cpp One side encapsulated a repeated piece of #if-ery in a local define; the other added to the #if-ery. Made its addition to the other's. src/corelib/kernel/qeventdispatcher_unix_p.h One side moved some members into a struct; this collided with a #undef check that neither side now has. Discarded the #undef part. src/gui/opengl/qopengltexturehelper_p.h 5.7 deleted a bunch of methods; not clear why merge got confused. src/tools/moc/moc.cpp One added a name to the copyright header; another changed its URL. Change-Id: I9e9032b819f030d67f1915445acf2793e98713fa
| | * QtCore: Fix QXmlStreamReader for invalid characters in XML 1.0Luca Bellonda2016-07-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The XML parser uses fastScanLiteralContent() to read a block of text. The routine was not checking the range of valid characters as defined in the XML standard: https://www.w3.org/TR/2008/REC-xml-20081126/#NT-Char A check has been added to stop reading the bad character. Note that the characters are legal in XML 1.1, but QXmlStreamReader is a well-formed XML 1.0 parser [ChangeLog][QtCore][QXmlStreamReader] Fixed a bug in the XML parser that prevented to load XML that contained invalid characters for XML 1.0. Change-Id: I10aaf84fbf95ccdaf9f6d683ea7c31925efff36d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Make sure all private headers in Qt Core include qglobal_p.hThiago Macieira2016-06-252-0/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | The rule was: - if the header included qglobal.h, turn that into qglobal_p.h - otherwise, insert the #include after the "We mean it" warning qglobal_p.h currently only includes qglobal.h. Change-Id: Ib056b47dde3341ef9a52ffff13ef677e471674b7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-101-4/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-ios-clang/features/default_pre.prf mkspecs/macx-ios-clang/features/sdk.prf mkspecs/unsupported/freebsd-g++46/qplatformdefs.h src/widgets/styles/qgtkstyle.cpp tests/auto/corelib/io/qdiriterator/qdiriterator.pro tests/auto/corelib/io/qfileinfo/qfileinfo.pro Change-Id: Ia943555d1e59234a66f7dc65bdfda838e40001b5
| * Add support for 8bit encodings not ASCII compatible in QXMLStreamWriter.Luca Bellonda2016-06-081-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a 8 bit encoding to write a file, a test discovers if the encoding is really ASCII compatible by examining a letter and one of the XML reserved characters. EBCDIC, in the current base, was not well handled. [ChangeLog][QtCore][QXmlStreamWriter] Fixed a bug that prevented the generation of valid XML files when using encoding with 8 bit per character but not ASCII compatible. QXMLStreamWriter generated XML markup using always ASCII in this case. Change-Id: I9c86a122dd91b2290d50c358638442f99777d4ae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QXmlStreamWriter: don't call virtual QTextCodec::name() twiceAnton Kudryavtsev2016-06-031-2/+4
| | | | | | | | | | | | | | Just cache and reuse result. Change-Id: I2ada2eced7c272c041013d35b59eeb176ed04659 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QVector: preserve capacity in clear()Marc Mutz2016-02-291-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is what std::vector implementations usually do, because it minimizes memory fragmentation and useless allocations since no user will call clear() unless she intends to append new data afterwards. Fix calls to resize(0) that show how existing code tried to work around the issue. Adjust test. Port from QVERIFY(==) to QCOMPARE as a drive-by. [ChangeLog][QtCore][QVector] clear() now preserves capacity. To shed capacity, call squeeze() or swap with a default-constructed QVector object, see the documentation for an example. Change-Id: I9cebe611a97e027a89e821e64408a4741b31f1f6 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QXmlStream*: make nothrow move assignable and -constructibleMarc Mutz2016-02-121-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately, we cannot rely on Q_DECL_EQ_DEFAULT, so I needed to code the special member functions by hand. The 'reserved' field is pretty useless, since the existing ctors didn't initialize it, but just in case someone finds a way how to store information in there, deal with the field in the usual way: set to nullptr in the move ctor and swap in the move assignment operator. Also schedule all this for removal again come Qt 6 (then without the reserved field). This amends a83be780aecd78bf8b2b76dab722097f74663d74, which only dealt with QXmlStreamAttribute. Change-Id: I6898e5d0423c9519f7c07d23e2c6d2700508151e Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Get rid of the QRegExp dependency in qxmlutils.Lars Knoll2016-02-051-9/+14
| | | | | | | | | | | | | | | | | | This makes the XML parser 100% independent of having regexp support enabled. Change-Id: I73004b0fb71e8086618995c71a985a86c292df3d Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Updated license headersJani Heikkinen2016-01-157-98/+140
| | | | | | | | | | | | | | | | | | | | | | 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>
* | QXmlStreamStringRef: overload ctor from QString with an rvalue versionMarc Mutz2015-11-291-1/+4
|/ | | | | | | | | | | The only tricky part here is to take the size of the moved-to member, not the moved-from parameter QString object. To avoid accidents, give the lvalue version the same structure. Change-Id: Ic68bb896f1d817c21d913feab43522235c51029b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QXmlStreamStringRef: unbreak move special member functionsMarc Mutz2015-11-191-1/+16
| | | | | | | | | | | | | | | The QXmlStreamAttribute move operations expect QXmlStreamStringRef to have move special member functions, but in fact the non-trivial QXmlStreamStringRef dtor prevented them from being generated by the compiler. We can't remove the dtor, because it's exported :( So provide all the move special member functions by hand, and since their presence in turn prevents the copy special member functions from being generated, provide those too. Change-Id: I494aea24981cdb661abe33a96976a363cfe7ef1b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QXmlStreamStringRef: mark as shared-not-movable-until-qt6Marc Mutz2015-11-192-0/+16
| | | | | | | | | | | | | Requires adding member swap. Member-swap is also necessary to fix the deleted move-assignment operator of this class, on which QXmlStreamAttribute heavily relies for its own move assignment operator. That's why it's not proposed for dev, but 5.6. Change-Id: Id7d0823d44fc6e55ada7c096ae95444f6bb50963 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QtCore: don't convert single characters to QString for QTextCodec::fromUnicode()Marc Mutz2015-10-111-1/+2
| | | | | | | | | Use the fromUnicode(QChar *, int size) overload instead. Saves 0.5KiB text size on Linux GCC 4.9 AMD64 release builds. Change-Id: I1a1081e09bff4c2116288b8c2616e1bb7ee2bb42 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.5' into devFrederik Gladhorn2015-08-061-0/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/global/qt-cpp-defines.qdocconf src/3rdparty/forkfd/forkfd.c src/corelib/codecs/qtextcodec.cpp src/corelib/kernel/qmetatype.cpp src/corelib/tools/qset.qdoc src/gui/accessible/qaccessible.cpp src/gui/image/qpixmapcache.cpp src/opengl/qgl.cpp src/tools/qdoc/generator.cpp src/widgets/kernel/qwidget.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
| * Doc:added doc to undocumented functionsNico Vertriest2015-07-221-0/+6
| | | | | | | | | | | | Task-number: QTBUG-36985 Change-Id: Ic358682b276d67ef804f727bcf14191718613469 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | QXmlStreamAttribute: make nothrow move assignable and -constructibleMarc Mutz2015-07-221-0/+22
|/ | | | | | | | | | | | | | | Unfortunately, we cannot rely on Q_DECL_EQ_DEFAULT, so I needed to code the special member functions by hand. The 'reserved' field is pretty useless, since the existing ctors didn't initialize it, but just in case someone finds a way how to store information in there, deal with the field in the usual way: set to nullptr in the move ctor and swap in the move assignment operator. Change-Id: I15a5f61807cb67deb6e979d4f3e5a260384b20ab Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fixed license headersJani Heikkinen2015-02-171-1/+1
| | | | | Change-Id: Ibebe1318d1c2de97601aa07269705c87737083ee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-117-80/+64
| | | | | | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-102-25/+28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro src/gui/image/qimage_conversions.cpp src/gui/opengl/qopenglextensions_p.h src/gui/text/qtextengine.cpp src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/eglfs/qeglfshooks_stub.cpp src/plugins/platforms/eglfs/qeglfsscreen.cpp src/plugins/platforms/eglfs/qeglfswindow.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp src/plugins/platforms/windows/qwindowsnativeinterface.cpp src/plugins/platforms/windows/qwindowsscreen.cpp src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/windows/qwindowswindow.h src/plugins/platforms/xcb/qxcbdrag.h src/widgets/itemviews/qabstractitemview.cpp src/widgets/kernel/qwidget.cpp src/widgets/util/qsystemtrayicon_p.h tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp Thanks to Friedemann Kleint for resolving the qwindowsfontdatabase.cpp conflicts. Change-Id: I937232c30523d5121c195d947d92aec6f129b03e
| * Merge remote-tracking branch 'origin/5.4.1' into 5.4Frederik Gladhorn2015-01-292-25/+28
| |\ | | | | | | | | | Change-Id: Idadb5639da6e55e7ac8cc30eedf76d147d8d5d23
| | * Fix QXmlStreamReader parsing of files containing NULsThiago Macieira2015-01-242-25/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to a flaw in the internal API, QXmlStreamReader's internal buffering would mistake a NUL byte in the input stream for EOF during parsing, but wouldn't set atEnd == true because it hadn't yet processed all bytes. This resulted in an infinite loop in QXmlStreamReaderPrivate::parse. So, instead of returning zero (false) to indicate EOF, return -1 (but in unsigned form, ~0, to avoid ICC warnings of change of sign). In turn, this required enlarging a few variables to avoid ~0U becoming 0xffff, which is a valid QChar (could happen if the input is a QString, not a QIODevice). Task-number: QTBUG-43513 Change-Id: If5badcfd3e4176b79517da1fd108e0abb93a3fd1 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-211-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| * | Doc: Fix typosSze Howe Koh2015-01-191-2/+2
| |/ | | | | | | | | Change-Id: I29d5576902a5d1ea25558e980081952d9157f7f0 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* / Remove Q_NO_USING_KEYWORDThiago Macieira2014-12-202-14/+0
|/ | | | | | | | | | | | | | | | | | | There's a lot of code now requiring it. Any compiler that doesn't support the keyword is too old for Qt now. The last time anyone asked about this macro was for QTBUG-27393 and we don't know which compiler that was. As a necessity, this patch contains a reversal of a0c3a57aed5cde37017733e7cf5e41cc6a1174aa [ChangeLog][Compiler Specific Changes] Qt 5.5 now unconditionally uses the "using" keyword. Compilers that do not support this keyword are deprecated and will not be able to build Qt. Previous versions of Qt may or may not compile, as no testing was done to ensure it worked. Change-Id: Ief042f34aba555a095d1f342a0ee7ee9feadf42d Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>