summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qresource.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-161-62/+154
|\ | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qshortcut.cpp tests/auto/network/access/spdy/tst_spdy.cpp Change-Id: If76c434beac2c0a393440aa365f89f77439774ce
| * QResource: Add API to get the decompressed contentThiago Macieira2020-01-151-62/+154
| | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QResource] Added uncompressedSize() and uncompressedData(), which will perform any required decompression on the data, prior to returning (unlike data() and size()). Change-Id: Ief874765cd7b43798de3fffd15aa053bc505dcb1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-01-041-2/+4
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvector.h Make QVector(DataPointer dd) public to be able to properly merge 5b4b437b30b320e2cd7c9a566999a39772e5d431 from 5.15 into dev. src/widgets/kernel/qapplication.cpp tests/auto/tools/moc/allmocs_baseline_in.json Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-271-0/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/platforms/xcb/qxcbscreen.cpp src/widgets/accessible/qaccessiblewidget.cpp Change-Id: Ib3138e61ba7981610940509a7ff02ba2dd281bf0
| | * Doc: Add since Qt 5.8 info for QResource::lastModified()Leena Miettinen2019-12-181-0/+2
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-80856 Change-Id: I2f2b562ad2b262c6dfa236a43589129186589ed7 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-161-2/+2
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket.cpp src/widgets/kernel/qapplication.cpp Change-Id: Ib7421cc2df59d0969f89b3fbd65a17ea76ffef3b
| | * Doc: Fix qdoc compilation errors qtbaseNico Vertriest2019-12-121-2/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-79824 Change-Id: I6557de598de1931fc30556951d35783d02b83abe Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-091-3/+3
|\| | | | | | | | | | | Change-Id: Ia24cc8b86def0d9d9c17d6775cc519e491b860b1
| * | Tidy nullptr usageAllan Sandfeld Jensen2019-12-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-251-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qhash.h src/gui/kernel/qevent.h src/widgets/kernel/qshortcut.cpp src/widgets/kernel/qshortcut.h Change-Id: If61c206ee43ad1d97f5b07f58ac93c4583ce5620
| * | Deprecate constructing QFlags from a pointerAllan Sandfeld Jensen2019-11-201-1/+1
| |/ | | | | | | | | | | | | | | | | This was used to support QFlags f = 0 initialization, but with 0 used as a pointer literal now considered bad form, it had been changed many places to QFlags f = nullptr, which is meaningless and confusing. Change-Id: I4bc592151c255dc5cab1a232615caecc520f02e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* / Simplify code guarded by QT_USE_MMAPTobias Hunger2019-10-011-8/+2
|/ | | | | | | | | QT_USE_MMAP is true only on systems with a defined Q_OS_UNIX, so there is no need to have code for windows in a section guarded by QT_USE_MMAP. Change-Id: I33d4ad596cc96f8f2e41374742fd5ec15b9e91a2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QResource: port from QMutexLocker to qt_scoped_lockMarc Mutz2019-08-131-13/+13
| | | | | Change-Id: I483e4765ef83d13e81bb830c9f48421410c5718b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QResource: consistently cache resourceList()Marc Mutz2019-08-011-8/+10
| | | | | | | | | | | | | | | | | | Each call to reourceList() uses atomic operations to check whether resourceGLobalData has not expired, yet. Some functions already cached the value, but then went on to use the function directly afterwards. In some cases, this was due to the cached value being a pointer-to-const and the function later deciding to mutate the list. But all the code is safe from detaches, so this distinction need not be made. Standardize on caching, and using the cached value, except in functions which call it only once. Change-Id: I79780b990da539bf7beaa8104e13cb8187f84812 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-301-2/+4
|\ | | | | | | | | | | | | Conflicts: qmake/generators/win32/mingw_make.cpp Change-Id: I2f790bc8572bd22fea01edf7ca74595b29f063eb
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-291-2/+4
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qresource.cpp Change-Id: I54917f72444a621bd08aeaa15f5d17415993144d
| | * QResource: fix nullptr-check gone tautologicalMarc Mutz2019-07-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends 136c5b9338f71775eb42528cfc7c23b2b4e5dff9. Before that change, each of the three members was a separate Q_GLOBAL_STATIC, so checking resourceList() for nullptr was the correct thing to do to find out whether the static was already destroyed. After the change, the resourceList() function will never return nullptr. Either resourceGlobalData.isDestroyed(), in which case dereferencing it asserts, or it isn't, in which case resourceList() returns a valid pointer. An explicit isDestroyed() check was added to the unregister function, but the register one was also checking resourceList() for nullptr, and this was left unprotected. Add the check and remove the now-tautological checks for nullptr resourceList(). Change-Id: I41fe66939ce858a77802b8af04c1de6e4fafe048 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QResource: deprecate isCompressed()Thiago Macieira2019-07-161-16/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current codebases assume isCompressed() implies ZlibCompression, since there was no compressionAlgorithm() getter. In order to force codebases to change, deprecate isCompressed() and force handling of the algorithm. The replacement API is being introduced in 5.14, which is why the warning is being emitted in 5.15 only. Change-Id: Ief874765cd7b43798de3fffd15a9f5d978951ea5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Port some trivial cases from QMutex to QRecursiveMutexMarc Mutz2019-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | | In all of these cases, the effect of the change is local to one file. Change-Id: I3bda3aadee3b42e7797183c2330183390b92d1f2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Move away from using 0 as a pointer constantAllan Sandfeld Jensen2019-06-071-8/+10
|/ / | | | | | | | | | | | | | | | | Cleans up most of corelib to use nullptr or default enums where appropriate. Change-Id: Ifcaac14ecdaaee730f87f10941db3ce407d71ef9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix some qdoc warningsFriedemann Kleint2019-03-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/corelib/itemmodels/qtransposeproxymodel.cpp:166: (qdoc) warning: Unknown command '\details' src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp:102: (qdoc) warning: '\brief' statement does not end with a full stop. src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp:233: (qdoc) warning: Undocumented parameter 'index' in QConcatenateTablesProxyModel::flags() src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp:165: (qdoc) warning: Undocumented parameter 'proxyIndex' in QConcatenateTablesProxyModel::mapToSource() src/corelib/io/qresource.cpp:275: (qdoc) warning: Can't link to 'isCopressed()' src/corelib/io/qresource.cpp:555: (qdoc) warning: Can't link to 'compressionType()' src/network/ssl/qocspresponse.cpp:47: (qdoc) warning: '\brief' statement does not end with a full stop. src/network/ssl/qocspresponse.cpp:47: (qdoc) warning: Can't link to 'QSslSocket::ocspResponse()' src/gui/image/qimage.cpp:2247: (qdoc) warning: Undocumented parameter 'f' in QImage::convertTo() src/gui/image/qimage.cpp:2247: (qdoc) warning: No such parameter 'format' in QImage::convertTo() src/gui/text/qtextformat.cpp:1420: (qdoc) warning: Undocumented parameter 'styleName' in QTextCharFormat::setFontStyleName() src/gui/text/qtextformat.cpp:1420: (qdoc) warning: No such parameter 'style' in QTextCharFormat::setFontStyleName() src/widgets/dialogs/qdialog.cpp:151: (qdoc) warning: Unknown command '\p' src/widgets/dialogs/qdialog.cpp:167: (qdoc) warning: Unknown command '\p' src/widgets/dialogs/qdialog.cpp:167: (qdoc) warning: Unknown command '\p' src/widgets/dialogs/qdialog.cpp:168: (qdoc) warning: Unknown command '\p' Change-Id: Ide52b70f8e72d53767d489ce1a413cf4c2dce7df Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | QtCore: replace 0 with \nullptr in documentationChristian Ehrlicher2019-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | Replace 0 with \nullptr in the documentation. As a drive-by also replace some 0 with nullptr in the corresponding code. Change-Id: I101a61f5fad71cadb73bba9a8fd5dce6cc0836d0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | QtCore: mark obsolete functions as deprecatedChristian Ehrlicher2019-01-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark the following obsolete functions as deprecated so they can be removed with Qt6: - QDataStream::unsetDevice() - QDir &QDir::operator=(const QString &path) - QDir::addResourceSearchPath() - QResource::addSearchPath() - QResource::searchPaths() - QSettings::setSystemIniPath() - QSettings::setUserIniPath() Change-Id: I5edfb2b4ce1ad843fa5fcd5b4c475ab9352b05f7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Resources: reject compressed content we can't decompressThiago Macieira2018-12-121-3/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This solution is composed of two features: 1) C++ code generated by RCC uses two symbols exported from QtCore that are only present if the feature was compiled in. If the feature was not compiled in, this will cause a linker error either at build time or at load time (if they were functions, the error could be at runtime). 2) Binary files generated by RCC have a new header field containing flags. We're currently using two flags, one for Zlib and one for Zstandard. This means we now have binary RCC format version 3. Change-Id: I42a48bd64ccc41aebf84fffd156545fb6a4f72d9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QResource: quick refactor of registerSelf for files to support LFSThiago Macieira2018-12-111-39/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds sufficient support for large files in resources, but not completely because the rest Qt is not ready for it (and not tested). We've had the QT_MMAP macro in qplatformdefs.h for a while, so let's use it and use qsizetype where we can. This also the check that the file existed before opening it (you can only open it if it exists), plus a few nullptr updates. Change-Id: I42a48bd64ccc41aebf84fffd15653ffdabb0e66b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QResource: de-inline registerSelf for filesThiago Macieira2018-12-111-53/+55
| | | | | | | | | | | | | | | | | | No other changes, aside from the coding style update to make sure the coding style bot won't complain. Change-Id: Iae320a2868db402a993dfffd15689a8a6ac202e8 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | QResource: add support for resources compressed with ZstandardThiago Macieira2018-12-111-18/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See next commit for details on why this is a good idea. [ChangeLog][Important Behavior Changes] The Qt resource system now supports compressing content using the Zstandard (https://zstd.net) algorithm. Compared to zlib, it compresses better for the same CPU time, so this algorithm is the default. QResource::isCompressed() returns true for either compression algorithm. Use QResource::compressionAlgorithm() to find out which algorithm to decompress. QFile will automatically decompress using the correct algorithm. Change-Id: I343f2beed55440a7ac0bfffd1562e9a8f94933a7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-11-221-4/+14
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qdir.cpp src/corelib/kernel/qtimer.cpp src/corelib/kernel/qtimer.h Done-With: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I683d897760ec06593136d77955f8bc87fdef3f9f
| * QResourceFileEngine: fix use of mapped files after close()Thiago Macieira2018-11-191-1/+0
| | | | | | | | | | | | | | | | | | QFile::map() is documented to continue working after the QFile is closed, so this should work for the resource file engine too. Change-Id: I343f2beed55440a7ac0bfffd1563243a3966441f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * QResourceFileEngine: fix map() for compressed filesThiago Macieira2018-11-191-3/+14
| | | | | | | | | | | | | | | | | | We were returning a pointer to the compressed data and comparing to the compressed data size. Change-Id: I343f2beed55440a7ac0bfffd1563232d557c9427 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-11-101-1/+4
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/serialization/qcborcommon.h src/corelib/tools/qlocale_data_p.h tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: Ibed987f6d77a0294f78f67d78625237616082416
| * QResource: catch signed integer overflow (just in case)Thiago Macieira2018-11-081-1/+4
| | | | | | | | | | Change-Id: I343f2beed55440a7ac0bfffd156321748e4d6048 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix a few overrides in Qt CoreAlessandro Portale2018-09-251-3/+3
|/ | | | | | | | | | | | | | | | This change removes redundant 'virtual' from function declarations. Clang Tidy's modernize-use-override check reports: warning: 'virtual' is redundant since the function is already declared 'override' CppCoreGuidelines say: C.128: Virtual functions should specify exactly one of virtual, override, or final Change-Id: I9a4bdd6cc041d46ae64b25597ba4f7268ac4c2b7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* Add qbswap for a memory regionThiago Macieira2018-07-041-6/+4
| | | | | | | | | | | | The compiler was generating some vectorized code for qresource.cpp but it wasn't very efficient. So improve upon it and make use in other places where we read UTF-16BE strings. [ChangeLog][QtCore] Added an overload of q{To,From}{Big,Little}Endian that operates on a memory region. Change-Id: I6a540578e810472bb455fffd1531fa2f1d724dfc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Improve performance of QResource::load()Lars Knoll2018-04-131-12/+8
| | | | | | | | | | | Avoid creating a QDateTime in the resource that will almost never get used. Constructing the date time is expensive as we convert the time stamp to local time. Task-number: QTBUG-65713 Change-Id: I3638e108a8fbd237cd93e98aa2adc0ca2127822c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tuukka Turunen <tuukka.turunen@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-021-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Improve readability of code that uses the Qt signed size typev5.10.0-rc2Simon Hausmann2017-11-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the container BoF session at the Qt Contributor Summit 2017 the name of the signed size type became a subject of discussion in the context of readability of code using this type and the intention of using it for all length, size and count properties throughout the entire framework in future versions of Qt. This change proposes qsizetype as new name for qssize_t to emphasize the readability of code over POSIX compatibility, the former being potentially more relevant than the latter to the majority of users of Qt. Change-Id: Idb99cb4a8782703c054fa463a9e5af23a918e7f3 Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: David Faure <david.faure@kdab.com>
* | Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-191-3/+3
|/ | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-07-191-1/+2
|\ | | | | | | | | | | | | | | Conflicts: src/corelib/io/qwindowspipewriter.cpp src/widgets/styles/qcommonstyle.cpp Change-Id: I0d33efdc4dc256e234abc490a18ccda72cd1d9e6
| * Convert improper uses of qt_error_string() to QSystemError::stdString()Thiago Macieira2017-07-181-1/+2
| | | | | | | | | | | | | | | | | | On Windows, qt_error_string() returns the string corresponding to the Win32 API, not an errno. Replace those uses for a function that works for errno values. Change-Id: I1eba2b016de74620bfc8fffd14ccce6162bafdca Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QAbstractFileEngine: make setFileTime not a pure virtualThiago Macieira2017-07-071-7/+0
| | | | | | | | | | | | | | | | Most engines just had to override the virtual to return false. So do it in the base class. Change-Id: I8d96dea9955d4c749b99fffd14cd738a48aa818c Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | QFileDevice/QFileInfo: Add fileTime() and setFileTime()Nikita Krupenko2017-04-271-0/+7
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QFileDevice] Added fileTime() and setFileTime(). [ChangeLog][QtCore][QFileInfo] Added fileTime(). Task-number: QTBUG-984 Change-Id: I84dfb05b9454a54e26b57b78edee5773dc4c5c3c Initial-patch-by: Raphael Gozzo <raphael.rg91@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Port QResourceRoot::mappingRootSubdir() to QStringSplitterMarc Mutz2017-03-301-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code here performs a std::mismatch() on the normalized parts of 'root' and 'path', returning whether 'path' is a prefix of 'root'. If 'path' is a proper prefix of 'root', returns the first 'root' part after 'path', in '*match'. Instead of using QString::splitRef(), perform the splitting as we go, using this class' own tool, QStringSplitter. The goal here is to avoid the heap allocation caused by the QVector return of splitRef(), of course. But even though using QStringSplitter means the splitting is now purely inline, text size in optimized GCC 7 Linux AMD64 builds increases by only 24B. Change-Id: I396cc6a30306940220c9e783c31506e6ac17b784 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QResource: use QStringViewMarc Mutz2017-03-301-10/+8
|/ | | | | | | | Saves 240B in QtCore text size on optimized GCC 7 Linux AMD64 builds. Change-Id: Ifa7b8735027575fbe381896dce608b80ec458ee9 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
* Merge several Q_GLOBAL_STATICs in qresource.cpp into oneThiago Macieira2017-02-091-4/+18
| | | | | | | | | Since they are all used in a typical application, this reduces the number of memory allocations (thus, the overhead) as well as the state-keeping in the libc atexit() functions. Change-Id: Ifaee7464122d402991b6fffd14a0e59457ad9cb7 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Clean up the resource reading codeSimon Hausmann2016-11-231-45/+24
| | | | | | | | Instead of doing the conversion from the big-endian data by hand, let's use the convenience functions from qendian.h. Change-Id: If3966ca94428afabb1f5c922967fb9970f976622 Reviewed-by: hjk <hjk@qt.io>
* Fix missing last modification time stamp in qrc contentSimon Hausmann2016-11-221-13/+52
| | | | | | | | | The time stamp is added at the end of the node information and consequently this also bumps the version. Task-number: QTBUG-57182 Change-Id: Ia10e006f28c0b168b2bcd74ed8b7098f84d10af3 Reviewed-by: hjk <hjk@qt.io>
* CoreLib: use QStringRef to optimize memory allocationAnton Kudryavtsev2016-07-021-2/+2
| | | | | | | | | | | Replace substring functions that return QString with corresponding functions that return QStringRef where it's possible. Create QString from QStringRef only where necessary. Change-Id: Id9ea11b16947220cd27787c0b529de62d10b6c26 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Decompress QResources only when needed.Volker Krause2016-04-301-9/+18
| | | | | | | | | | In particular, just creating a QFileInfo (or a QDirIterator, which uses QFileInfo internally) no longer triggers decompression. This doubles the performance when using a QDirIterator/QFile combo for loading a bunch of files. Change-Id: I7f53354e890ad6360693b7848d21a0cd5d595628 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-131-2/+4
|\ | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/testlib/qtestcase.cpp src/testlib/qtestcase.qdoc Change-Id: Ied3c471dbc9a076c8de33d673bd557e88575609d