Commit Graph

1597 Commits (5ea248155654b58fcb52ef326dc4d94de83d0409)

Author SHA1 Message Date
Lucie Gérard 251a632dc4 Add copyright and licensing to .bat files missing them
Task-number: QTBUG-124453
Change-Id: I8bd48ab5d5b18197ef5bf9a46edf49da86374bee
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-05-08 13:09:40 +02:00
Tomasz Kozłowski c0c66a42ce Exclude sync() usage from VxWorks platform
This function is not available in VxWorks libraries and it is not
mandatory for proper qstorageinfo test execution.

Pick-to: 6.7
Task-number: QTBUG-115777
Change-Id: Ic503c776002087d461c32f890795c27be4b1ca34
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-05-07 17:30:37 +02:00
Thiago Macieira 62e0080a6a tst_QResourceEngine: use both ways of registering dynamic resources
So we test both the mmap()ed and non-mmap()ed versions. Will be
important in the next commit.

Change-Id: I6979d02a7395405cbf23fffd17c98f0e207477e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2024-05-06 14:32:55 -07:00
Even Oscar Andersen a99285c977 wasm: Enable qstandardpaths test
Also log if the entries does not exist in the filesystem

Change-Id: Id7d4dec1610af13869e645cf96b5bf6a1e26b956
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2024-05-06 16:01:28 +02:00
Lucie Gérard d6bc7613ac Add copyright and licensing to tools and utils files missing it
Task-number: QTBUG-124453
Change-Id: I7645bcd7a7559425659bc522530a25977d7b5c82
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-05-03 10:58:54 +02:00
Thiago Macieira 0cd5eb895c tst_QResourceEngine: move the resource path to the end in the row label
Otherwise, it's impossible to select those rows in the command-line,
because they start with a colon.

Change-Id: I6979d02a7395405cbf23fffd17c98f455a4cbdaa
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2024-05-02 17:12:37 -07:00
Thiago Macieira 39e156e639 QResource: obey the MapPrivateOption option to provide RW memory
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>
2024-05-02 17:12:27 -07:00
Even Oscar Andersen f9a994b86a wasm: Add qurl autotest
The testThreading test was deadlocking due to waiting for
threads to start. Rewritten the wait to use a QEventLoop

Change-Id: If1a864c054c1de1239694b201a4cf0e8186fc1d0
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2024-04-29 19:20:23 +02:00
David Faure ba2f794596 QSaveFile: don't reset fileEngine after commit()
[ChangeLog][QtCore][QSaveFile] Member functions such as fileTime() and
size() now continue to work after commit().

Fixes: QTBUG-66605
Fixes: QTBUG-77039
Change-Id: I0b17eae9493911d1a0828b589d762bd8eb344bce
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-26 18:19:39 +02:00
Thiago Macieira 0756cc1eae QTest: rip out qxp::function_ref from compare_helper()
[ChangeLog][QtTest] The QCOMPARE_xx macros can now only find
QTest::toString() expansions that are either found via Argument
Dependent Lookup on the type in question or are an instatiation of the
QTest::toString<T>() template. This matches the behavior of the
QCOMPARE() macro.

This changes the way how the toString() overloads are selected, so
we need to explicilty constraint the main QTest::toString() template
in order to pick the free functions when they exist.

Change-Id: Ie28eadac333c4bcd8c08fffd17c54e768c5cffd0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-26 18:19:36 +02:00
Even Oscar Andersen 9e57e523d3 wasm: qabstractfileengine test fails on wasm/windows
The test assumes either windows or unix line endings, however
wasm can run on either system, causing problem with
git config core.autocrlf=true
Fix the test so that on wasm we correct filesize if
necessary

Change-Id: Ieb86c5388aa931d8ca06822e1c09a2c55801de67
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2024-04-21 20:52:40 +02:00
Thiago Macieira 60bdf2b220 QProcess: fix startCommand() with whitespace-only strings
We'd end up trying to takeFirst() from an empty QStringList.

[ChangeLog][QtCore][QProcess] Fixed a bug that would cause
startCommand() to crash if passed a string that was empty or contained
only whitespace characters.

Fixes: QTBUG-124512
Pick-to: 6.5 6.6 6.7
Change-Id: I455fe22ef4ad4b2f9b01fffd17c7689095c39272
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-04-19 20:24:42 -07:00
Ahmad Samir d691872b86 QSaveFile: unittests: use strlen() instead of hardcoded numbers
DRY with respect to string literals.

Change-Id: I606a4cbd502efb0f0f7d12176f4253fb2cd5eaa4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2024-04-20 04:29:31 +02:00
Edward Welbourne a256e574f1 Disable copy and move of QAbstractFileEngineHandler
They're not wanted and Axivion (SV71) grumbles about the lack of copy
and move operators and constructors otherwise. Do the same in all
derived classes.  Some of these needed their default constructors made
overt as a result.  Similar for QAbstractFileEngineHandlerList.

Task-number: QTBUG-122619
Change-Id: Iff016940f8c4884bd65dd781354b9bcda9b7cdd8
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-04-19 13:56:35 +02:00
Even Oscar Andersen 1319101ece wasm: Enable fileselector test
Also add test files for emscripten platform to build

Change-Id: Ief03e44a4e3f3339a65453469a7ae0a6969f2252
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2024-04-18 12:31:17 +02:00
Ahmad Samir 60f15da3ca tst_qstandardpaths: check the return value of QFile::open
If QFile::open() fails in any of the these helper functions, the test
should fail.

Task-number: QTBUG-123623
Change-Id: I3e4d65eccd3be32eed673d9607ef468ddc0fd6e5
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-04-13 14:47:14 +02:00
Even Oscar Andersen c0fdd4b451 wasm: Add auto test for qfile
Problems:
* mmap of size 0 works, add test in QFSFileEnginePrivate::map to
  make sure wasm platform behaves as the other platforms
* qwe// is a valid filename on wasm, QSKIP test
* applicationFilePath does not exist on wasm.
* /dev/zero does not exist on wasm, file bug, skip test
* blocking pipes do not exist on wasm, QSKIP test
* socketpair does not exist on wasm, QSKIP test

Change-Id: I1705c543782cbcb92a7ebed2fc2792613524c686
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2024-04-13 11:32:17 +01:00
Giuseppe D'Angelo c68f8db62b Tests: make some QFile::open calls fail
In some cases calls to QFile::open are made outside of a testfunction
(so we can't use QVERIFY), or even in standalone executables that are
executed by tests. Make them fail "visibly".

Change-Id: Iec4d56f6d874be16aa2e9ad6974eeec2a98caa3f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-13 01:36:06 +02:00
Giuseppe D'Angelo 8414a0aa2c Tests: check the output of QFile::open
Wrap the call in QVERIFY.

tst_QTextStream::read0d0d0a was also faulty as it *never* opened
the file because of a broken path. Fix it with QFINDTESTDATA.

Change-Id: I61a8f83beddf098d37fda13cb3bfb4aaa4913fc5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-03-27 04:24:11 +01:00
Ahmad Samir fd295f4bf6 QAbstractFileEngine: remove member FileTime and use QFile::FileTime
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>
2024-03-21 19:05:02 +02:00
Ahmad Samir 3c50ad8288 QFileSystemEngine: make factory functions return unique_ptr<QABFE>
This makes the ownership of the returned pointer clearer. It also
matches reality, some call sites were already storing the pointer in a
unique_ptr.

Also shorten the function name to "createLegacyEngine", you have to read
its docs anyway to figure out what it does.

Drive-by changes: less magic numbers; use sliced(); return nullptr
instead of `0`.

Change-Id: I637759b4160b28b15adf5f6548de336887338dab
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-03-21 19:05:02 +02:00
Ahmad Samir d34a9067c2 tst_qdir: optimize setPath() test
On Linux "../" is /tmp, which is more likely to cause issues with the
dir.entrylist() below used in that test; /tmp could have a lot of
temporary files, any of them can be gone in a jiffy. Noticed this test
occasionally falking out when running tests in parallel (`ctest -R
"foo|bar" -j3`).

This may be an unintentional side effect of
b3e9e80719, which changed the code to use
a temporary dir for testing instead of creating/deleting dirs in the
source dir ("../" from the source dir has a more stable entries count
than /tmp).

Change-Id: I98da86223792bc9f34c173fc02cc84049ed699ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-03-21 06:26:28 +02:00
Ahmad Samir 56ef55eda0 tst_qtemporarydir: refactor a test
Instead of using ~/Downloads, which we have no control over (OK for
the CI, but not locally), create a parent temp dir, then another temp
dir inside it.

Also rename it to nestedTempDirs, the issue from the bug report wasn't
tested because it relied on a dir being created, then failing to set
permissions on it. The code has changed a lot since then.

Pick-to: 6.7 6.6 6.5 6.2
Change-Id: I2b03d5d761117aaf436041c13c0dc394b106bf89
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-03-21 05:49:54 +02:00
Ahmad Samir ceeaf1b657 QAbstractFileEngineIterator: add `bool advance()` virtual method
And remove hasNext/next() methods. This remodels QAFEI to be like
QFileSystemIterator. This better fits the logic in the newly added
QDirListing class (which uses STL-style iterators).

QFSFileEngineIterator:
Initialize the internal nativeIterator in the constructor; also replace
the advance() private method with an override for the advance() method
inherited from the base class.

QResourceFileEngineIterator:
Override currentFileInfo(), with a QResouces the QFileInfo is created
on demand if/when this method is called.

This is the backend/private API, and QDirListing is the public API that
can be used in a ranged-for to iterate over directory entries.

Change-Id: I93eb7bdd64823ac01eea2dcaaa6bcc8ad868b2c4
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-03-20 21:49:59 +02:00
Ahmad Samir b3e9e80719 tst_qdir: don't use the source dir for testing
Copy test dirs from the source dir to a QTemporaryDir,
this way each run starts with a clean slate.

Also on some setups the source dir could be read-only.

Task-number: QTBUG-117449
Change-Id: Iea5fd661b66dd3cbae0b663bb504b14c8ccbe491
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-03-19 15:52:48 +02:00
Even Oscar Andersen 7071010880 wasm: Add qdiriterator test + minor runtime fixes
There was a runtime feilure in that we try to create
directories until it fails. This does not fail on wasm
so added a hardlimit of 20480

Change-Id: I6ef65f7be277fc8775879733f969d2ce008a439a
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2024-03-19 10:28:06 +01:00
Ahmad Samir 886eb76aea QAbstractFileEngine: add a path parameter to beginEntryList()
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>
2024-03-17 17:49:33 +02:00
Ahmad Samir e146d835a6 QAbstractFileEngine: make {begin,end}EntryList() return a unique_ptr
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>
2024-03-17 14:30:33 +02:00
Ahmad Samir a2136a073e QDir{Iterator,Listing}: fix unittest
QEXTRACTTESTDATA returns a QSharedPointer<QTemporaryDir>, so the member
variable has to be of that type so that all code paths work.

Amends 986b5b4f47 (QDirIterator) and
c39a0d1e89 (QDirListing).

Change-Id: Ie4b76687125f0506a2c899acca222123f0b1c44a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-03-16 16:41:03 +02:00
Even Oscar Andersen 49329ae227 wasm: Add corelib/io/largefile
The test does not run just like that it is necessary to:
  set maxSizeBits to 28
  mapOffsetOverflow: Settings copied from Linux

Change-Id: Idc276a7e2d777a9a6ad0c0e90d729fb4646a38b6
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2024-03-16 10:35:13 +01:00
Thiago Macieira 0f56502fb6 QProcess/Unix: fix close() on invalid file descriptor
Commit 90bc0ad41f ("QProcess/Unix: add
failChildProcessModifier()") added this line that set childStartedPipe
so that the failChildProcess() callback had something to write to. But
we left it set on exit from QProcessPrivate::startDetached(), which
caused the QProcess destructor to try and close it.

Noticed when debugging the issue for QTBUG-123083.

Pick-to: 6.7 6.7.0
Task-number: QTBUG-123083
Change-Id: I6818d78a57394e37857bfffd17bbc41c8400270f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-03-12 22:21:13 -07:00
Thiago Macieira 025c45d628 tst_QStorageInfo: try harder to make the free space change
This merges the tempFile and caching tests, which had been updated in
commit ae03ffaffd to attempt other
filesystems than APFS and btrfs.

Instead of adding yet another item to the list (xfs), let's insist by
writing more and flushing the OS buffers. Local testing says that btrfs
usually updates after the first write(), no later than the second, and
that APFS and XFS "just works" now (without the fsync() even).

Pick-to: 6.7
Fixes: QTBUG-123151
Change-Id: I6818d78a57394e37857bfffd17bbe7427307efc4
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-03-12 14:34:32 -07:00
Ahmad Samir d7340d5c31 tst_qfile: fix GCC 13.2.1 compiler warning [-Wenum-compare]
By using "wt" for all OS's; according to Thiago the 't' is ignored
everywhere except on Windows.

tests/auto/corelib/io/qfile/tst_qfile.cpp:2846:70: warning: comparison
between ‘enum QOperatingSystemVersionBase::OSType’ and ‘enum
QOperatingSystemVersion::OSType’ [-Wenum-compare]
2846 |     const char *openMode = QOperatingSystemVersion::current().type() != QOperatingSystemVersion::Windows
|                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Amends 3446313c7a

Pick-to: 6.7 6.6 6.5 6.2
Change-Id: I310d7d6ce3833756ffdc47b000e052ef3afdfdef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-03-12 23:28:34 +02:00
Rym Bouabid 8103d29e94 QUrl: Use new comparison helper macros
The class had operator==(), operator!=() and operator <() defined as
public member functions, so use QT_CORE_REMOVED_SINCE and
removed_api.cpp to get rid of these methods and replace them with hidden
friends.

Use QT_TEST_ALL_EQUALITY_OPS macro in unit-tests.

Use new \compares command in the documentation to describe the
comparison operators provided by QUrl.

Task-number: QTBUG-120303
Change-Id: Ic4fa2335292cc4b75ad2373832c0b89d768f529c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-03-06 11:09:21 +01:00
Lucie Gérard 8741e4a60c Correct license for files
According to QUIP-18 [1], all tests file should be
LicenseRef-Qt-Commercial OR GPL-3.0-only

[1]: https://contribute.qt-project.org/quips/18

Task-number: QTBUG-121787
Change-Id: Iee9f4fca676e77ab9d8ed485a28ce5ea8803be15
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-05 14:39:33 +01:00
Ahmad Samir c39a0d1e89 Add QDirListing, an STL-style iterator for directory entries
This class offers a forward-only const_iterator, that matches the system
low-level functions' logic (e.g. readdir()/dirstream logic). This
iterator is a std::input_iterator_tag.

QDirIterator uses Java-style iterators that have a couple of issues:
- They don't fit the logic of the underlying native system functions
  (readdir()/__dirstream and co.), there is no way to know if there is a
  next entry except by advancing the iterator (calling readdir()) first
- As a consequence of the above, two QFileInfo objects, current and next,
  had to be used to fit that paradigm; and the code always
  iterated/stat'ed an extra entry past the one we want, e.g. when
  filtering

The next step is porting QAbstractFileEngineIterator and its subclasses
to be like QFileSystemIterator, i.e. replace hasNext()/next() with a `bool
advance()` virtual method. This is easier to reason about than the
Java-style iterators, and is more in-line with the new class.

Discussed-on: https://lists.qt-project.org/pipermail/development/2023-December/044745.html
Change-Id: I8e696cefdca18d8c78f803efdb83a73dd43eb720
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-29 16:35:57 +02:00
Ahmad Samir 78c33a7741 Copy QDirIterator.{cpp,h} to QDirListing.{cpp,h}
To make it easier to follow the history in git.

Change-Id: I094056c1ec130aeef77aa2d20289ab766bc25083
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-29 16:35:57 +02:00
Rym Bouabid cd67684c89 QUrlQuery: Use new comparison helper macros
QUrlQuery had operator==() and operator!=() defined as public member
functions, so use QT_CORE_REMOVED_SINCE and removed_api.cpp to get
rid of these methods and replace them with a hidden friend.

Use QT_TEST_ALL_EQUALITY_OPS macro in unit-tests.

Use new \compares command in the documentation to describe the
comparison operators provided by QUrlQuery.

Task-number: QTBUG-120303
Change-Id: I083487a134887010ebbb78906d2c1982f2ad41b5
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-23 19:46:02 +01:00
Rym Bouabid 3275050df4 QStorageInfo: Use new comparison helper macros
Replace operator==() and operator!=() private friends with
comparesEqual().

Use QT_TEST_ALL_EQUALITY_OPS macro in unit-tests.

Use new \compares command in the documentation to describe the
comparison operators provided by QStorageInfo.

Task-number: QTBUG-120303
Change-Id: I6434dc8382f6554b9e60840bac4abaeb95b70db6
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-22 13:37:42 +01:00
Rym Bouabid 22ebe86f15 QProcessEnvironment: Use new comparison helper macros
QProcessEnvironment had operator==() and operator!=() defined as public
member functions, so use QT_CORE_REMOVED_SINCE and removed_api.cpp to
get rid of these methods and replace them with a hidden friend.

Use QT_TEST_ALL_EQUALITY_OPS macro in unit-tests.

Use new \compares command in the documentation to describe the
comparison operators provided by QProcessEnvironment.

Task-number: QTBUG-120303
Change-Id: I4c57f6cfb9589e82a37eea6993e079212b34cecd
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-22 13:37:41 +01:00
Rym Bouabid 760043ea8c QDir: Use QT_TEST_EQUALITY_OPS macro in unit-tests
Replace QTestPrivate::testEqualityOperators() helper function with
QT_TEST_EQUALITY_OPS macro to get a reasonable debug output in case of
failure.

Task-number: QTBUG-120303
Change-Id: I1ca23cabfe62ab78e012cf95fd2add631fc88a64
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-15 14:51:37 +01:00
Rym Bouabid fec4984dc9 QFileInfo: Use new comparison helper macros
QFileInfo had operator==() and operator!=() defined as public member
functions, so use QT_CORE_REMOVED_SINCE and removed_api.cpp to get
rid of these methods and replace them with a hidden friend.

Use QT_TEST_ALL_EQUALITY_OPS macro in unit-tests.

Task-number: QTBUG-120303
Change-Id: Ie290df230b0f608a0965dccba9184382291cad8e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-14 21:47:29 +01:00
Ahmad Samir 2956b84332 QFilesystemWatcher: speed up the unittests
The only backend that requires longer wait times is
QPollingFileSystemWatcherEngine; lower the interval of the polling
engine for the unittests (using the same objectName() trick that is used
to force using a specific watcher engine).

Remove the comment about FAT32 filesystems, there is no where on the CI
where this test fails so far.

Before:
Totals: 23 passed, 0 failed, 0 skipped, 0 blacklisted, 127027ms

After:
Totals: 23 passed, 0 failed, 0 skipped, 0 blacklisted, 666ms

Change-Id: I96378f810463fa5c4ebdc13946ea23810e80f144
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-14 17:57:03 +02:00
Rym Bouabid 39505c86cc QDir: Use new comparison helper macros
QDir had operator==() and operator!=() defined as public member
functions, so use QT_CORE_REMOVED_SINCE and removed_api.cpp to get
rid of these methods and replace them with a hidden friend.

Use QTestPrivate::testEqualityOperators() helper function in unit-tests.

Task-number: QTBUG-120303
Change-Id: I86c2ba18b8b114efd9f62fc2fd628bc9065b04b2
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-13 15:58:42 +01:00
Ievgenii Meshcheriakov b2764f7802 QUrl IDNA: Update to Unicode 15.1
Unicode 15.1 (more spcifically UTS #46, revision 31) changes how
host names are processed. The initial Unicode host name mapping
is done without validity checking. That check was used in the past
to mark QUrl's invalid. This patch inserts simplified validity
check later. This check is similar to one performed before
conversion to unicode, but does not include BiDi check to keep
names starting with xn-- valid.

Additional complication is that U+1E9E LATIN CAPITAL LETTER SHARP S
must be mapped to "ss" with transitional processing.

It is not possible anymore to predict whether Qt implementation
considers a URL valid by using only error codes in the tests
vectors file. The test was adjusted to expect an empty string
(indicating invalid QUrl) or string matching the entry in vectors
file if there are any processing errors specified for that entry.

Unblacklist tst_QUrlUts46::idnaTestV2.

Task-number: QTBUG-121529
Change-Id: Iad5dadd1a6695fa54b432e35000b350cd6e06341
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-02-08 17:43:58 +01:00
Ievgenii Meshcheriakov bfd09ec38c unicode: Import version 15.1 (UCD version 32)
Add enumerator for the new Unicode version to QChar::UnicodeVersion.

Remap new line breaking classes to their Unicode 15.0 values:
* AK, AP and AS to AL,
* VI and VF to CM.
These are classes for new line breaking support for Indic scripts
that require more work.

Blacklist failing tests for now:
* tst_QUrlUts46::idnaTestV2
* tst_QTextBoundaryFinder::lineBoundariesDefault
* tst_QTextBoundaryFinder::graphemeBoundariesDefault

Regenerate the source files.

Task-number: QTBUG-121529
Change-Id: I869cc9fbaa53765d8ae6265c22cdbef9f19d05bf
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-02-08 16:43:58 +00:00
Tasuku Suzuki bd6d7d4d74 Remove extra semi-colons
Change-Id: I92fddb36cd136fd1bd627955f15d0559b9942d7e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-02-06 20:17:18 +09:00
Ahmad Samir d887e34b49 tst_qdiriterator: add a test for QFsFileEngineIterator
As a baseline for subsequent commits.

Change-Id: Ifac026848e92817b08a75ceafee6d06e0a8f399d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-04 14:04:18 +02:00
Lucie Gérard ff1039c217 Change license for tests files
According to QUIP-18 [1], all tests file should be
LicenseRef-Qt-Commercial OR GPL-3.0-only

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I9657df5d660820e56c96d511ea49d321c54682e8
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2024-02-04 09:56:42 +01:00
Ahmad Samir 986b5b4f47 QDirIterator: don't create test dirs/files in the source dir
This is cleaner as the test dirs/files are created in a QTemporaryDir
that is cleaned up automatically, so less manual cleanup in the
unittest.

This also fixes issues for build environments where the source dir is
read-only.

entrylist dir in the source dir is only needed for the construction of
the QResource in the CMakeLists.txt.

Task-number: QTBUG-117449
Change-Id: I3e6389ff730c3a617854e85318f80838e012f2c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-01 16:28:55 +02:00