summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qresource.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash when trying to register .rcc from resource systemJoni Poikelin2025-10-091-3/+3
| | | | | | | | | | | | _get_osfhandle crashes if invalid value is passed in as a file descriptor. Avoid trying to map if there is no valid file descriptor for a file. Fixes: QTBUG-138807 Pick-to: 6.10 6.8 Change-Id: I462b93d3665c1894fb966080d106839b9840a05b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move all Q_DECL_(PURE|CONST)_FUNCTION markers to the frontMårten Nordheim2025-09-191-1/+1
| | | | | | | | | While testing defining Q_DECL_PURE_FUNCTION for MSVC I discovered it cannot handle having the marker trailing, while GCC/clang can cope with either. Change-Id: Ic9dd088996c191263e2f2a43c2f6a16533bdb9c5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add security scores to qresource* filesMatthias Rauter2025-06-261-0/+1
| | | | | | | | | | | | | | QResources can be feed data from a file at runtime. This should really be trusted data but we cannot guarantee that, therefore the file that contains the parser, qresource.cpp, is marked security critical. All other files are marked with the default value security significant. QUIP: 23 Pick-to: 6.10 6.9 6.8 Task-number: QTBUG-135187 Change-Id: Ibff50dc744a5204233695794b82b87c82cd6a6b8 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QResource: try to survive being created during application shut downThiago Macieira2025-02-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to commit 12d4bf1ab52748cb84894f50d437064b439e0b7d, which was for QLocale. Like it, QResource can be used very late in the execution, like for example the logging system. For example (simplified): #9 0x00007ffff759d497 in resourceMutex () at /io/qresource.cpp:188 #10 0x00007ffff759d615 in QResourcePrivate::load (this=0x41c940, file=...) at /io/qresource.cpp:333 #11 0x00007ffff759dc19 in QResourcePrivate::ensureInitialized (this=0x41c940) at /io/qresource.cpp:386 #14 0x00007ffff75011a9 in QLibrarySettings::load() at /global/qlibraryinfo.cpp:80 #22 0x00007ffff7501756 in havePaths () at /global/qlibraryinfo.cpp:149 #23 0x00007ffff75028e3 in QLibraryInfoPrivate::paths (p=QLibraryInfo::DataPath, usageMode=QLibraryInfoPrivate::RegularUsage) at /global/qlibraryinfo.cpp:613 #26 0x00007ffff758e4f0 in QLoggingRegistry::initializeRules () at /io/qloggingregistry.cpp:309 #34 0x00007ffff758f007 in QLoggingRegistry::instance () at io/qloggingregistry.cpp:424 #35 0x00007ffff758c50b in QLoggingCategory::init () at io/qloggingcategory.cpp:188 #43 0x00007ffff758c6bb in QLoggingCategory::defaultCategory () at io/qloggingcategory.cpp:317 #44 0x00007ffff750ff8e in qt_message_print (msgType=QtWarningMsg, context=..., message=...) at global/qlogging.cpp:2036 #45 0x00007ffff7509515 in qt_message(msgType=QtWarningMsg, context=..., msg=...) at global/qlogging.cpp:360 #46 0x00007ffff750a712 in QMessageLogger::warning (this=0x7fffffffd8b0, msg=...) at global/qlogging.cpp:600 #47 0x00007ffff790e083 in QThreadStorageData::finish (p=0x41b588) at thread/qthreadstorage.cpp:160 #50 0x00007ffff78ed423 in QThreadPrivate::finish (this=0x41b5e0) at thread/qthread_unix.cpp:404 #51 0x00007ffff78ec8ed in destroy_current_thread_data (p=0x41b520) at thread/qthread_unix.cpp:154 #52 0x00007ffff78ec9ec in Cleanup::~Cleanup () at thread/qthread_unix.cpp:204 Task-number: QTBUG-133206 Task-number: QTBUG-133500 Pick-to: 6.9 6.8 Change-Id: I7b653afb1b41ef3c1c9afffdaa93e6558740016b Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QAbstractFileEngine: remove beginEntryList(QDir::Filters)Ahmad Samir2024-09-201-7/+0
| | | | | | | | | | | | | | | | | | | | It was kept so as not to break compilation of user code (overriding a function that doesn't exist in the base class). But as Marcus Tillmanns pointed out in a qtcreator code review, it can't work because QDirListing calls the virutal engine->beginEntryList(QDirListing::IteratorFlags). Removing beginEntryList(QDir::Filters) and getting a compile-timer error is better than the code failing silently in user code (all sub-classes of QAbstractFileEngine in qtbase have been already ported). QDir::entryList() isn't affected because it calls QAbstractFileEngine::entryList() which has an overload that works with QDir::Filters. Pick-to: 6.8 Change-Id: I3cb18402f602ac78a6b29be57e59febb2b9db7c0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QAFileEngine: let Private take charge of setting its own q_ptrEdward Welbourne2024-07-151-1/+4
| | | | | | | | | | | | | | The QAFE was always setting the q_ptr of the Private just after it was constructed, but it wasn't immediately obvious the QAFE(Private &) constructor wasn't stealing its d_ptr of some other QAFE by overwriting the q_ptr. Passing the file engine's this to the Private's constructor makes it all unambiguous and incidentally makes it possible to make clear that q_ptr is in fact const. Fixes a static analyzer's grumble about Private's constructor not setting q_ptr. Task-number: QTBUG-122619 Change-Id: Id532bbe628651ad691b7c4b058e01c5cc2e6e241 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* QDirListing: add flags to handle entries filteringAhmad Samir2024-06-271-0/+7
| | | | | | | | | | | | | | | | | | By extending IteratorFlag so that it replaces both QDir::Filter and QDirIterator::IteratorFlag enums, but with better defaults (based on how QDir/Iterator is used in 15-20 years worth of code in Qt and KDE). Make the QDirListing(QDir ~~) ctor private, also change it to use QDirIterator::IteratatorFlags; it will be used to port existing code. If QDir is ported to use QDirListing::IteratorFlags, instead of QDir::Filters, a public QDirListing(QDir) constructor can then be added. Pick-to: 6.8 Fixes: QTBUG-125504 Task-number: QTBUG-125859 Change-Id: Ide4ff8279f554029ac30d0579b0e8373ed4337f7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QResource: add support for duplicating mapped memory on macOSThiago Macieira2024-05-061-0/+22
| | | | | | | | | | | | | | | Similar to the Linux solution, this avoids allocating heap memory in the implementation of QFile::map() calls with MapPrivateOption. Unlike the Linux solution, the macOS one cannot duplicate resources present in read-only sections of binaries, only those loaded from files with mmap() (QResource::registerResource()), because the max_prot setting on the source does not have the VM_PROT_WRITE bit set and I could not find a way to reset it to force a copy-on-write. Change-Id: I6979d02a7395405cbf23fffd17c951949c71ec20 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QResource: add support for duplicating mapped memory on LinuxThiago Macieira2024-05-061-3/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | This makes QResourceFileEngine avoid allocating heap memory in the implementation of QFile::map() calls with MapPrivateOption. We do that by asking the kernel to duplicate the mapping to the same memory pages, which increases our virtual memory space but doesn't initially take up any more RAM. We have to be careful to ensure the resulting mapping is copy-on-write and that this setting is independent of the original map's. The former is easy: the mremap() system call with MREMAP_DONTUNMAP only works on private memory blocks, so by definition any private + writable block is copy-on-write. The latter is slightly more difficult: if the original block was already writable, then the kernel could give us a new map to the exact same pages[*], which isn't exactly helpful. Therefore, we need to check if the QResourceRoot points to a private, read-only block. [*] in those conditions, mremap() is documented to replace the original mapping with a zero page, which means we have a near certainty of crashing, instead of accidentally, silently corrupting memory. Change-Id: I6979d02a7395405cbf23fffd17c90fb1f1612ed7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QResource: add support for memory mapping on WindowsThiago Macieira2024-05-021-0/+16
| | | | | Change-Id: I6979d02a7395405cbf23fffd17c90b446cba1486 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QResource: re-factor the memory-mapping code into two helper functionsThiago Macieira2024-05-021-41/+47
| | | | | | | So I can more easily extend to Windows support and to reuse them later. Change-Id: I6979d02a7395405cbf23fffd17c90b32dbbddd94 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* QResource: move the internal classes to unnamed namespacesThiago Macieira2024-05-021-1/+6
| | | | | | | | | | So the compiler has more opportunities to inline and to not emit out-of- line copies. Pick-to: 6.7 Change-Id: I6979d02a7395405cbf23fffd17c9101b2b52472a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* QResource: obey the MapPrivateOption option to provide RW memoryThiago Macieira2024-05-021-1/+16
| | | | | | | | | | | | | | | | | | | | | The documentation says: The mapping will have the same open mode as the file (read and/or write), except when using MapPrivateOption, in which case it is always possible to write to the mapped memory. So obey it. This may cause high memory use by copying data we already have. This may be important because applications may want to memory-map resources which they intentionally didn't compress because those resources are large. Later commits will implement some workarounds. Fixes: QTBUG-124608 Pick-to: 6.7 6.6 6.5 Change-Id: I6979d02a7395405cbf23fffd17c8f03baf0ec00d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QResource: simplify map() to rely on the uncompressed data being thereThiago Macieira2024-05-021-7/+8
| | | | | | | | | We can only call map() if we've already called open() and that will decompress the data. Pick-to: 6.5 6.6 6.7 Change-Id: I6979d02a7395405cbf23fffd17c8f1f77ca92b2b Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* QResource: use qint64 for lastModifiedThiago Macieira2024-04-261-4/+4
| | | | | | | | We pass it to QDateTime::fromMSecsSinceEpoch, which is signed. Change-Id: I6979d02a7395405cbf23fffd17c992674c6321fc Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QResource: remove unnecessary mutable markersThiago Macieira2024-04-261-4/+4
| | | | | | | | | | | These are all modified by ensureInitialized() and ensureChildren(), which are const. However, ensureInitialized() does a const_cast<> on the object before calling non-const load(), which is where these are modified. Change-Id: I6979d02a7395405cbf23fffd17c992546ecbda49 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* QAbstractFileEngine: remove member FileTime and use QFile::FileTimeAhmad Samir2024-03-211-2/+2
| | | | | | | | | This is probably a remnant from when QAbstractFileEngine was public API since it's been changed to private API, just use QFile::FileTime. Pick-to: 6.7 Change-Id: I60d3d4ff811f95434b81d5ca115f5d43cfff8b15 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QAbstractFileEngine: add a path parameter to beginEntryList()Ahmad Samir2024-03-171-2/+3
| | | | | | | | | | | | | Change beginEntryList() to take a path parameter, which it passes on to the QAFEIterator constructor; setting the path at construction makes more sense, because typically the path isn't supposed to change during iteration, and this simplifies the code at the call site. Remove setPath(), the last usage in Qt repos was in QtCreator, and that has been ported away from it. Change-Id: I01baa688e0f9b582aacb63d7d98a794276e58034 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QAbstractFileEngine: make {begin,end}EntryList() return a unique_ptrAhmad Samir2024-03-171-4/+3
| | | | | | | | Makes ownership clearer. Change-Id: Ibb57ca900ef30b16d48964a977e997ba6705248b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QAbstractFileEngine: remove redundant endEntryList() overridesAhmad Samir2024-03-031-7/+0
| | | | | | | | QAFE sub-classes endEntryList() overrides returned nullptr, which is exactly what the base class implementation does. Change-Id: I2e901647cd087c3b8ba674db6e7b371e620af340 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDataStream & QResource: document their lack of security-hardeningThiago Macieira2023-12-211-0/+13
| | | | | | | | | Pick-to: 6.7 6.6 6.5 Fixes: QTBUG-120012 Task-number: QTBUG-119178 Change-Id: I6e2677aad2ab45759db2fffd17a06af730e320d6 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove remnants of Qt for Native Client (NACL)Tor Arne Vestbø2023-09-231-1/+1
| | | | | | | | | The project has been superseded by Qt for WebAssembly and was never supported in Qt 6. Pick-to: 6.6 6.5 Change-Id: I36682cfe3ce6adac76a307b0faba97dcb7c655cc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace {add,sub,mul}_overload with q{Add,Sub,Mul}OverloadMarc Mutz2023-06-121-1/+1
| | | | | | | | | | | | | | | | | | | These APIs started out as private APIs in qnumeric_p.h, but have since been made pseudo-public in qnumeric.h. The qnumeric_p.h versions just forward to the qnumeric.h ones, so just use the latter. This is in preparation of removing the {add,sub,mul}_overflow versions, which, despite being defined in the unnamed namespace, don't sport the q prefix, so potentially clash with global symbols. The change is a simple textual search and replace, manually excluding qnumeric_p.h. Picking to 6.5 to avoid cherry-pick conflicts going forward. Pick-to: 6.6 6.5 Change-Id: Ic0f7c92f7c47923317109e8a9dc06fa66bdff2c2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Replace ushort*/uint* with char16_t*/char32_t* in private API [1]Ahmad Samir2023-03-151-1/+1
| | | | | | | Task-number: QTBUG-110403 Pick-to: 6.5 Change-Id: Ie20a831f22212d56659cf3c6940d17134ab5f2c5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Misc: Fix qsizetype-related narrowing coversionsAhmad Samir2023-03-111-4/+4
| | | | | | Task-number: QTBUG-102461 Change-Id: I96757abc50fc45756bc1271a970f819a48021663 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove QResourceGlobalData::resourceSearchPathsEdward Welbourne2023-01-301-14/+4
| | | | | | | | | | | The means to add entries to this QStringList were deprecated in 5.13 and removed in Qt 6, so the list is always empty and the one place that still references it only needs to check the empty path it adds to the list. Pick-to: 6.5 6.4 6.3 6.2 Change-Id: Ie1b3f13b33c04458bd03a4a1e3db0e33a76e89f6 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Port from container.count()/length() to size()Marc Mutz2022-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-39/+3
| | | | | | | | | | | | | 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>
* QtCore: replace QLatin1String/QLatin1Char with _L1/u'' where applicableSona Kurazyan2022-03-251-26/+28
| | | | | | | | | | | As a drive-by, did also minor refactorings/improvements. Task-number: QTBUG-98434 Change-Id: I81964176ae2f07ea63674c96f47f9c6aa046854f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
* QAbstractFileEngine: Add permission argument to open()Ievgenii Meshcheriakov2021-12-041-1/+4
| | | | | | | | | The new argument allows atomic creation of files with non-default permissions. Task-number: QTBUG-79750 Change-Id: I4c49455b41f924ba87148302c8d0f77f5de0832b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QAbstractFileEngine: Remove useless method overridesIevgenii Meshcheriakov2021-11-031-65/+0
| | | | | | | | | | | | Remove useless overrides of QAbstractFileEngine methods from the derived classes. Also remove "This virtual function must be reimplemented by all subclasses" passages from the QAbstractFileEngine's documentation. There are pure virtual methods for such use cases. QAbstractFileEngine already contains useful defaults for classes not supporting all the functionality. Change-Id: Ia25965854f3809b15d7502da3749cc2f3414bbc3 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Doc: Fix broken formattingIvan Tkachenko2021-10-291-1/+1
| | | | | | | | Amends f25bc30d8d9d13fffd34213dfbf5e7373a18222a Pick-to: 6.2 5.15 Change-Id: Ia42c7639e4919de3f995d771bfc7d8237a8773d8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Avoid warnings when compiling bootstrap library without zstdUlf Hermann2021-10-211-0/+4
| | | | | Change-Id: Ic67cd2b582df0464a17f6181157ebbd47986114c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* corelib: Fix typos in documentationJonas Kvinge2021-10-121-1/+1
| | | | | | Pick-to: 5.15 6.2 Change-Id: I64d63af708bc6ddaabd12450eb3089e5077f849e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QDuplicateTracker: accept the number of elements to reserve as a ctor argumentMarc Mutz2021-07-141-2/+1
| | | | | | | | | | | | This prevents us from first reserve()ing Prealloc elements, and then possibly reserve()ing a larger number, which leaves the first bucket list's memory unused. Consequently, deprecate reserve(). Change-Id: Ifc0a5a021097f4589557e7b5e45d9d0892797ade Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Add the "Territory" enumerated type for QLocaleJiDe Zhang2021-04-151-5/+6
| | | | | | | | | | | | | | | | | | | The use of "Country" is misleading as some entries in the enumeration are not countries (eg, HongKong), for all that most are. The Unicode Consortium's Common Locale Data Repository (CLDR, from which QLocale's data is taken) calls these territories, so introduce territory-based names and prepare to deprecate the country-based ones in due course. [ChangeLog][QtCore][QLocale] QLocale now has Territory as an alias for its Country enumeration, and associated territory-based names to match its country-named methods, to better match the usage in relevant standards. The country-based names shall in due course be deprecated in favor of the territory-based names. Fixes: QTBUG-91686 Change-Id: Ia1ae1ad7323867016186fb775c9600cd5113aa42 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix broken link to Zstandard libraryAndreas Buhr2020-12-041-1/+1
| | | | | | | | | | | | The old link zstd.net is not working any more. Zstandard is now at http://facebook.github.io/zstd/. To ease maintenance in the future, those links now point to "Zstandard Site" which is maintained in external-resources.qdoc. Task-number: QTBUG-88533 Pick-to: 6.0 Change-Id: Ic8f067fd5d7ce1a088d0272797fca98fd506a26e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPEAndreas Buhr2020-11-301-1/+1
| | | | | | | | | | | | | | Q_MOVABLE_TYPE was conceived before C++ had move semantics. Now, with move semantics, its name is misleading. Q_RELOCATABLE_TYPE was introduced as a synonym to Q_MOVABLE_TYPE. Usage of Q_MOVABLE_TYPE is discouraged now. This patch replaces all usages of Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE in QtBase. As the two are synonymous, this patch should have no impact on users. Pick-to: 6.0 Change-Id: Ie653984363198c1aeb1f70f8e0fa189aae38eb5c Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Whitespace cleanup in corelib/iov6.0.0-beta2Allan Sandfeld Jensen2020-10-201-153/+152
| | | | | | | | | Selective application of clang-format to follow our coding style where it is significantly off. Change-Id: I0ff4ed146fe53922691d5473d0c236f31d478a04 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix warning: 'open' has superfluous mode bits; missing O_CREAT?Alessandro Portale2020-10-091-1/+1
| | | | | | | | Adding mode flags doesn't make sense if you don't create a file but only open if for reading. Change-Id: I9307b07cbbcddea565fff9258de7f7beb373a8ad Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix qdoc warnings from references to removed APIsVolker Hilsheimer2020-09-261-1/+1
| | | | | Change-Id: Id41052be0878715eda4879fcd3171a30ddd5a9a7 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Purge QResource of some deprecated APIEdward Welbourne2020-08-071-67/+0
| | | | | | | | Removed isCompressed(), deprecated since 5.15, and (since 5.13) addSearchPath() and searchPath(). Change-Id: I4b6fb8077c02bbe322334e474eaf0a2a7caf0004 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QList instead of QVector in corelib implementationJarek Kobus2020-06-291-1/+1
| | | | | | | | Omitting state machine and docs for now. Task-number: QTBUG-84469 Change-Id: Ibfa5e7035515773461f6cdbff35299315ef65737 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Port remaining usages of QStringRef in QtCore to QStringViewLars Knoll2020-06-121-1/+1
| | | | | | Task-number: QTBUG-84319 Change-Id: If77bc94c18e8d522b4577050091cd7d7aa941311 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QResource: Use some qUtf16Printable() instead of toLocal8Bit().data()hjk2020-06-081-6/+6
| | | | | Change-Id: Ia255052ea33e7d7fccb0627accd20315bbe5d393 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QResource: port a local QSet to QDuplicateTrackerMarc Mutz2020-05-051-7/+5
| | | | | | | | | Apart from a more fitting, minimal, API, QDuplicateTracker also transparently uses C++17 pmr::monotonic_buffer_resource to avoid, or at least reduce, memory allocations. Change-Id: If059f2ac66967168fe269cd62aaee9cfeb10f17e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-111-1/+1
|\ | | | | | | Change-Id: Ibee5acec72a1a1769d4bc5f23f56c7dc8d4cf3cb
| * Doc: Fix \sa link for QResource::uncompressedData()Kai Koehne2020-03-061-1/+1
| | | | | | | | | | | | | | | | No point in linking to itself. Change-Id: Id0bf3fa6878417e541ec0997d34758b0c59e99b3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | 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>