summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io
Commit message (Collapse)AuthorAgeFilesLines
* tst_QResourceManager: extend the test to cover open filesMarc Mutz2022-06-141-0/+9
| | | | | | | | | ... when unregistering. Task-number: QTBUG-86088 Change-Id: I11112142ef1d8c4b269089a0a82ca06a5e434f7e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
* tst_qfile: skip trash bin test on webOSJanne Juntunen2022-06-071-2/+2
| | | | | | | | | | Skipping moveToTrash() test is needed because WebOS does not implement a trash bin directory. Fixes: QTBUG-104053 Pick-to: 6.4 Change-Id: Id1d1595eb401d8ef3a403c915d95be1cd75368d2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QTestLib: rework QTest::compare_helper()Ivan Solovev2022-06-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QTestLib] QCOMPARE now evaluates toString() on its arguments lazily, speeding up the general case where the comparison doesn't fail. This is true for the QCOMPARE functionality provided by Qt. If you specialized qCompare() for your own types, then you need to change its implementation in line with Qt's own qCompare() specializations in order to enable this feature. [ChangeLog][QTestLib] QCOMPARE calls with nullptr argument(s) will now print the actual and expected values upon failure. Previously it was not like that because of the compareHelper() overload in qtestresult.cpp that treated the presence of nullptr-arguments as a reason to ignore formatFailMessage() call. New implementation does not have this check, and correctly executes formatFailMessage() for all arguments. Note that the qCompare() overloads that call QTestResult::compare() internally were not affected by this patch, because they already defer toString() invocation until the comparison fails. Some numbers, collected against shared release developer build. I checked how this change affects the test execution. The idea was to pick some tests for types that do not have a specific QTestResult::compare overload, so I picked a couple of QByteArray tests. The comparison is done by running a test 10 times and taking the average execution duration, as reported in the log. tst_qbytearrayapisymmetry: Before: 15.6 ms After: 14.2 ms tst_qbytearray: Before: 41 ms After: 36 ms The benefit is around 9% and 12% respectively. Fixes: QTBUG-98874 Change-Id: I7d59ddc760168b15974e7720930f629fb34efa13 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* tst_QUrlQuery: improve formatting of lists of pairs of stringsEdward Welbourne2022-06-031-30/+18
| | | | | | | | | | | | | | | | | | The compare() implementation made its actual and expected seem to have different types (using a typedef name for one, when the other was of the type that expands to) and the formatter it used was needlessly clunky. Use modern string literals and package a repeated null-or-quoted representation as a lambda, inline the resulting simplified prettyElement() into prettyPair(), which can now just take a pair rather than an iterator. Short-cut the empty list so that the comma-joined accumulation could initialize with the first entry and loop over the rest, always joining with a comma. Undo commit f776595cc10aaafc7162f382a8fa11afffb0e708's mistaken update to the copyright header and update correctly. Change-Id: I99258dafa01e79f9ec384d9b375a59376eb7fb53 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use SPDX license identifiersLucie Gérard2022-05-1663-1715/+140
| | | | | | | | | | | | | 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>
* Don't declare type 'id' in the global namespace in a public headerTor Arne Vestbø2022-04-272-0/+77
| | | | | | | | | | | It's not necessary, and it breaks the qttools build (where we have a global variable named 'id'), and thus will most certainly build a lot of existing user code. Amends e47c22480fe84c100019cd92d0296f0dd2a7f3f1. Change-Id: I97a91c2cb23fdae65143cf14c81570cf88d529d5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Clear tst_QSettings of deprecation warningsEdward Welbourne2022-04-262-7/+5
| | | | | | | | | | | Assorted QMetaType and QVariant methods deprecated in Qt 6 were still in use - the deprecation warnings were suppressed by setting QT_DISABLE_DEPRECATED_BEFORE=0 - fix them and clear that suppression. Change-Id: I1aa8f45dcb5a18449b060b346c80ad70536896ab Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* tst_QSettings::testVariantTypes(): modernize list initializationsEdward Welbourne2022-04-261-10/+6
| | | | | Change-Id: Ia84cd7590f9bcc95a790efb1e1dab46ab368cd2d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Convert tst_QSettings::testVariantTypes()'s macro body into a lambdaEdward Welbourne2022-04-261-13/+18
| | | | | | | | | Retain the macro, so as to automate checking QTest::currentTestFailed() after return from the lambda. Change-Id: If5873a533224ea3b809cef02255642a7d071d642 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Clean up tst_QSettings::testVariantTypes()Edward Welbourne2022-04-261-27/+26
| | | | | | | | | | | | | | | | | | | | | Give the macro and its parameters clearer names, wrap the macro body in do {...} while (0), use QCOMPARE() rather than QVERIFY()ing comparisons, convert the result type to QMetaType::Type rather than QVariant's deprecated equivalent, save one macro parameter by using decltype() on another. Simplify one check by pulling out a common sub-expression as a local variable. In the process, give the settings keys meaningful names rather than just "key" with a numeric suffix. Ideally this test would be reworked to be data-driven, instead of using macros, but the use of qvariant_cast<> to convert a read-back value, along with the variable type of the input value compared to the result of that cast, precludes this (as far as I can see). Change-Id: I4e083cd0dea14d723910873829352e15740006bd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Rearrange tst_QSettings::testVariantTypes()Edward Welbourne2022-04-261-24/+24
| | | | | | | | | | | | Move the large block unrelated to the macro-driven parts to before the macro is defined. This makes it clearer that it has nothing to do with the macro-driven part of the test. This is, in any case, a more basic test of behavior, so may as well go first. Rename the tested key in the process. Change-Id: I783fcd812e36320e9bb9765bab3ec09b56d6e6e6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Remove two unused resource files from tst_qsettingsEdward Welbourne2022-04-264-8/+0
| | | | | | Change-Id: Ia54fa1ffa6e739496667d1486ee7e5658cd6a74f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Inline a shared data-driven test table in tst_QSettingsEdward Welbourne2022-04-261-88/+23
| | | | | | | | | | | Move its static populateWithFormats to before the class is declared and make the _data() methods that call it (including one that did so via another) inline so that we can see which are this simple - and thus which aren't. Change-Id: I71863244ba0e4bd188424b6a3f8d86d5d9f635a9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Clean up includes involving tst_qmetatype_common.hEdward Welbourne2022-04-261-9/+4
| | | | | | | | | | | The functions it defines depend on many many types in QtCore for which it did not have a #include; both files that included it thus had to pull in QtCore to compile. Put that #include where it belongs and clean out many specific QtCore includes that it makes redundant. Change-Id: Ie9d9ec325d4879d771cb14baecb06fecbdaf62c5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Ensure that readAllStandardError() doesn't crash on assertJarek Kobus2022-04-091-0/+10
| | | | | | | | | | | Ensure that it's safe to call readAllStandardError() when process channel mode is set to MergedChannels. Pick-to: 6.3 6.3.0 Task-number: QTBUG-102177 Task-number: QTCREATORBUG-27196 Change-Id: I01073255d9347dee4654d602802a12d341372b73 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace uses of _qs with _s in testsSona Kurazyan2022-04-078-38/+54
| | | | | | Task-number: QTBUG-101408 Change-Id: If092a68828a1e8056259cf90d035d9a87989244b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QBuffer: fail early in seek() beyond QByteArray's max capacityMarc Mutz2022-04-051-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On 32-bit platforms, the range of qsizetype is smaller than the range of the qint64 used as a parameter in seek(). When seek()ing beyond the current buffer's size, the old code relied on a write() to fill the gap with NUL bytes. This has two problems: First, this may allocate a huge amount of memory just to find that it cannot write that much, possibly even taking the program down when the allocation in the QByteArray ctor fails, instead of returning false from seek(). Second, the QByteArray ctor to which we pass the gapSize only takes qsizetype, not qint64, so we were writing data of size gapSize mod (INT_MAX+1) on 32-bit platforms, which may succeed, just to find that that wasn't the number of bytes we expected to be written. By that time, however, the internal buffer has already been enlarged. Fix by checking whether the desired seek position is within the limits that QByteArray can contain early on, before attempting to construct such a large QByteArray. [ChangeLog][QtCore][QBuffer] Fixed silent data corruption on 32-bit platforms when seek() fails due to position > INT_MAX. Pick-to: 6.3 6.2 5.15 Fixes: QTBUG-102274 Change-Id: Ib63cef7e7e61ef8101a5f056c7b2198bb7baa228 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QBuffer: fix writing more than two GiB of dataMarc Mutz2022-04-041-0/+53
| | | | | | | | | | | | | | | | | | | | | In Qt 6, QByteArray can hold more than two GiB of data on 64-bit platforms, so QBuffer should be able to handle writes of more than two GiB, too. But the implementation didn't check for overflow and held sizes in int variables, so it happily reported success but wrote data only mod INT_MAX. Fix by carefully avoiding overflow and using size variables of proper type. [ChangeLog][QtCore][QBuffer] Fixed silent data truncation when writing more than two GiB at once on 64-bit platforms. Pick-to: 6.3 6.2 Fixes: QTBUG-102171 Change-Id: Ib666f9f7db24495b4ed64191a48b35edc410f7e9 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* tst_QIODevice::unget() without network: skip only the affected partMårten Nordheim2022-04-011-4/+7
| | | | | | | Instead of QSKIPing the whole test, ignoring what was already tested Change-Id: Iced928ce1bce92b447c8698a9942973cb78b6c15 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QSettingsPrivate: fold from/to parameters into the view they boundEdward Welbourne2022-03-301-2/+2
| | | | | | | | | | Two methods of the private class used to take a QByteArray with from and to indices into it, for where to start and stop a scan. Now that they take a QByteArrayView, those parameters can be used by the caller to shorten the view to the desired portion. Change-Id: Id1586afb87a9e8a189b69e485278375ff504fb7b Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* QFileSystemWatcher: Blacklist failing tests on macOS armIvan Solovev2022-03-291-0/+6
| | | | | | | | | | The tests started failing for some reason, so blacklist them to unblock the CI. Task-number: QTBUG-102095 Task-number: QTBUG-102096 Change-Id: I3e0667581bb1a9fd08dedcdab08878b1f738ac92 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CI: Add docker support for tst_qiodevice testPasi Petäjäjärvi2022-03-242-3/+14
| | | | | | | | | | | Currently test relies solely for external test server. This makes it not possible to run test successfully with environment where docker is used. Pick-to: 6.2 6.3 Change-Id: Idf7e99c19ab630065b651f2f6d957311f45f0db7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QSettings: port key processing to QAnyStringViewMarc Mutz2022-03-191-15/+12
| | | | | | | | | | | | | | | | | | | | | | | ... in preparation for replacing the QString keys in the public API with QAnyStringView ones. This removes the "important optimization" that avoids a detach in the common case where the input is the same as the output of normalization. But that optimization is beside the point, because it trades a memory allocation avoided in the library for O(N) allocations inserted into user code for each call to QSettings::value(), the vast majority of which are calls with string literals. With the public interface ported to QAnyStringView in the follow-up patch, we can then internally optimize memory allocations _in a central place_ (e.g. by returning std::u16string or QVarLengthArray<QChar> from normalizeKey() instead of QString). But first we need to get rid of all the unwarranted allocations in user code. Change-Id: I45fc83d972c552a220c9c29508001d3f172e1162 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Enable move semantics for QTemporaryDirLuca Di Sera2022-03-181-0/+55
| | | | | | | | | | | | | | | | | Add move constructor and move assignment operator. To allow for the the change to be implemented QTemporaryDir, the internal d_ptr was modified from a QScopedPointer, which is not movable, to a raw pointer. Add member + free swap implementations. Add tests. [ChangeLog][QtCore][QTemporaryDir] Enabled move semantics. Change-Id: I9f196a77c70b4ca0b7f0c06505d00fdd87a9785c Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Tests: Do not depend on transitive includesFabian Kosmale2022-03-174-0/+8
| | | | | Change-Id: Ibc6a948480a904913a5427e6408d4d296784fb4f Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* qDecodeDataUrl(): treat ";base64" marker as case-insensitiveMarc Mutz2022-03-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC2397 doesn't explicitly mention it, but references RFC2045, which, in Section 2, states: > All media type values, subtype values, and parameter names as > defined are case-insensitive. and goes on, in 6.1: > mechanism := "7bit" / "8bit" / "binary" / > "quoted-printable" / "base64" / > ietf-token / x-token > > These values are not case sensitive So regardless of whether "base64" is a parameter name, or a mechanism, we need to treat it case-insensitively. Use QLatin1String::endsWith() instead of QByteArray::endsWith(), because the former takes Qt::CaseInsensitive while the latter would need a toLower(). Add a test. As a drive-by, use the same trick for the existing case-insensitive comparison with "charset". As a further drive-by, fix inappropriate uses of QLatin1String (= where they don't prevent allocations). [ChangeLog][QtCore][QUrl] Now recognizes the ";base64" marker in "data:" URLs case-insensitively. Pick-to: 6.3 6.2 Change-Id: Ife6ba771553aaad3b7c119c1fa631f41ffa8f590 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Do not assume implicit string-ish → QColor conversionMarc Mutz2022-03-111-1/+1
| | | | | | | | We want to mark the corresponding QColor ctor(s) explicit. Use Qt::GlobalColor or the new QColor::fromString() instead. Change-Id: I68bf75a094e6821b97682de5a0ffd975834d22d0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Rewrite tst_qdataurl as a data-driven testMarc Mutz2022-03-111-30/+34
| | | | | | | | | | ... to make adding new test cases simpler. Pick-to: 6.3 6.2 5.15 Change-Id: I54d08cebc7ae4bea9f0397ba3eec1ef6308a5161 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Add QFileInfo::isAlias() to reflect whether the file is a macOS aliasTor Arne Vestbø2022-03-062-0/+62
| | | | | | Change-Id: I772066d0d8e69893f7c4aee1cd2305d46d5834c4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSettings: support reading UTF-8 keys in INI filesIvan Solovev2022-03-024-0/+62
| | | | | | | | | | | | | | [ChangeLog][QtCore][QSettings] The INI file reader now supports keys encoded with UTF-8, as well as the %-encoded format. Writing the keys back to the INI file is still done using %-encoded format. This change does not touch the way the *values* are handled - they are both read and written in UTF-8. Drive-by: remove misleading comments from the reading algorithm. Task-number: QTBUG-99401 Change-Id: I6a83cbf24d919a499540403688615f93cb195e93 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Repair tst_qfileinfo on AndroidAndreas Buhr2022-02-161-1/+8
| | | | | | | Pick-to: 6.2 6.3 Change-Id: I79e0236b90b8a6ca2618d7a9ddac34b26bbd5b5f Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Cleanup tests that add test data to resources explicitlyAlexey Edelev2022-02-112-40/+0
| | | | | | | | | | | | Remove Integrity and Android specific code that explicitly adds test data to the resource files. qt_internal_add_test functions implicitly adds test data to resources for Android and Integrity platforms by default. Change-Id: Ia1d58755b47442e1953462e38606f70fec262368 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Add BUILTIN_TESTDATA option to qt_internal_add_testAlexey Edelev2022-02-112-30/+20
| | | | | | | | | | | Multiple tests use qt_internal_add_resource that copies the functionality that is already implemented inside the qt_internal_add_test function. Simplify these test by replacing the qt_internal_add_resource call with the new BUILTIN_TESTDATA option. Change-Id: I18475b817d6f87264f0de53817d6c26c5ccab4e2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QProcess/Unix: ensure we don't accidentally execute something from CWDThiago Macieira2022-02-091-1/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unless "." (or the empty string) is in $PATH, we're not supposed to find executables in the current directory. This is how the Unix shells behave and we match their behavior. It's also the behavior Qt had prior to 5.9 (commit 28666d167aa8e602c0bea25ebc4d51b55005db13). On Windows, searching the current directory is the norm, so we keep that behavior. This commit does not add an explicit check for an empty return from QStandardPaths::findExecutable(). Instead, we allow that empty string to go all the way to execve(2), which will fail with ENOENT. We could catch it early, before fork(2), but why add code for the error case? See https://kde.org/info/security/advisory-20220131-1.txt [ChangeLog][Important Behavior Changes] When passed a simple program name with no slashes, QProcess on Unix systems will now only search the current directory if "." is one of the entries in the PATH environment variable. This bug fix restores the behavior QProcess had before Qt 5.9. If launching an executable in the directory set by setWorkingDirectory() or inherited from the parent is intended, pass a program name starting with "./". For more information and best practices about finding an executable, see QProcess' documentation. Pick-to: 5.15 6.2 6.3 Change-Id: I54f205f6b7314351b078fffd16cf7013c97ee9fb Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qresourceengine: use QFINDTESTDATA() to find correct pathJanne Juntunen2022-02-041-1/+1
| | | | | | | | | | | | Use alternative method for finding searchPath since QT_TESTCASE_SOURCEDIR did not point to a correct location on webOS QEMU test environment. Fixes: QTBUG-99954 Pick-to: 6.3 Change-Id: I05f95b4aa02027976036d0842ca564a602e01d0e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Blacklist tst_QFileSystemWatcher::signalsEmittedAfterFileMoved on all ↵Ivan Solovev2022-01-311-2/+1
| | | | | | | | | | | | | Windows versions The test was already blacklisted for Windows 10 and Windows 7. Now it is flaky on Windows 11 as well. Blacklist it for all windows platforms. Task-number: QTBUG-98478 Pick-to: 6.2 6.3 5.15 Change-Id: I870fb6ce80cfe244a76d08bf40677fdb6becab97 Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
* Remove unused .qrc filesJoerg Bornemann2022-01-179-103/+0
| | | | | | | | Task-number: QTBUG-94446 Change-Id: I136d8b4ab070a832866aa50b5701fc6bd863df8a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Exclude filesystem autotests for INTEGRITYTatiana Borisova2021-12-301-0/+4
| | | | | | | | | - There is no mounted partition, where we can create/delete files at runtime. Tests should be excluded for now. Pick-to: 6.2 6.3 Change-Id: I1c4db13d35da7d570c4bf787299d829e08951195 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows: Fix handling of childGroups() when fallbacks are disabledJeremie Graulle2021-12-271-0/+10
| | | | | | | | | | When fallbacks are disabled for QSettings then it should not be falling back to any child groups or keys that might exist in a fallback set of settings. Fixes: QTBUG-85295 Change-Id: I563999293a103702035c8d3b027b59b94ca43c0e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* tst_QIODevice: fix UB (precondition violation) in ↵Marc Mutz2021-12-161-3/+6
| | | | | | | | | | | | | | | | | | SequentialReadBuffer::readData() memcpy() mustn't be called with a nullptr, even if the size is zero. Fixes ubsan error: tst_qiodevice.cpp:561:15: runtime error: null pointer passed as argument 1, which is declared to never be null Even though ubsan only complained about one of them, fix all three occurrences of the pattern in the test. Pick-to: 6.3 6.2 5.15 Change-Id: I5c06ab4a20a9e9f8831392c46c6969c05248fdac Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNX: Cannot handle threads in given timePasi Petäjäjärvi2021-12-121-0/+4
| | | | | | | | Large amount of threads is unstable and do not finish in given time Pick-to: 6.2 Change-Id: I0ce4c8cd278d6611c9e9da7326048279ccc458fd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNX: inotify is supported, so enable testsPasi Petäjäjärvi2021-12-121-3/+3
| | | | | | | | | Also change usage of QDir::currentPath to QDir::tempPath instead as QNX tests are run on CI at qemu over NFS. Pick-to: 6.2 Change-Id: I2e1d6629299acd125117bcce90320c70eeb4a1a5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNX: Skip failing testPasi Petäjäjärvi2021-12-121-0/+3
| | | | | | | | | Seems to be bug in QNX itself Task-number: QTBUG-98561 Pick-to: 6.2 Change-Id: I525bd269b674e9e2b8c994bf778ab14b727df33f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNX: Remove not supported testcasePasi Petäjäjärvi2021-12-121-1/+3
| | | | | | | | | Still not implemented Task-number: QTBUG-40785 Pick-to: 6.2 Change-Id: I9bb89ccaff30a3d906bf5665bc6ef981717aa054 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNX: Limit maximum largefile sizePasi Petäjäjärvi2021-12-121-1/+6
| | | | | | Pick-to: 6.2 Change-Id: I4e43eaea98e893453c8c1356da63edb0c059f896 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNX: Successful check depends on user running testPasi Petäjäjärvi2021-12-121-1/+1
| | | | | | | | Modify similar like is used for Windows Pick-to: 6.2 Change-Id: I133a8dde2e78cc66aa9544246cd750a6543b4883 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFile: Add open() overload that accepts permissions argumentIevgenii Meshcheriakov2021-12-041-0/+52
| | | | | | | | | | | | | | | The new overload allows creation of files with non-default permissions. This is useful when files need to be created with more restrictive permissions than the default ones, and removes the time window when such files are available with less restrictive permissions. [ChangeLog][QtCore][QFile] Added QDir::open() overload that accepts permissions argument. Fixes: QTBUG-79750 Change-Id: Iddfced3c324e03f2c53f421c9b31c76dee82df58 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QAbstractFileEngine: Add permission argument to open()Ievgenii Meshcheriakov2021-12-041-1/+3
| | | | | | | | | 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>
* QDir: Add support for setting directory permissions to mkdir()Ievgenii Meshcheriakov2021-11-261-0/+47
| | | | | | | | | | | | | | This patch adds an overload of the QDir::mkdir() method that accepts permissions. This allows setting of the directory permissions at the time of its creation. [ChangeLog][QtCore][QDir] Added QDir::mdkir() overload that accepts permissions argument. Task-number: QTBUG-79750 Change-Id: Ic9db723b94ff0d2da6e0b819ac2e5d1f9a4e2049 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtBase: replace windows.h with qt_windows.hYuhang Zhao2021-11-234-4/+4
| | | | | | | | | | We have some special handling in qt_windows.h, use it instead of the original windows.h Change-Id: I12fa45b09d3f2aad355573dce45861d7d28e1d77 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>