summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io
Commit message (Collapse)AuthorAgeFilesLines
* Move QTextCodec support out of QtCoreKarsten Heimrich2020-06-203-2/+162
| | | | | | | | | | * Assume UTF-8 on all Unix like systems * Export some functions to be able to compile QTextCodec once moved to Qt5Compat. Task-number: QTBUG-75665 Change-Id: I52ec47a848bc0ba72e9c7689668b1bcc5d736c29 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove winrtOliver Wolff2020-06-0626-197/+90
| | | | | | | | | Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove deprecated QProcess methodsVolker Hilsheimer2020-05-271-180/+7
| | | | | | | | | | | | | Add default parameter for arguments in start, startDetached, and execute for better source compatibility with Qt 5.15. This has the risk of then hiding incorrect calls to the previous overload taking a single "command" strings if code is ported from pre-5.15 or ignores deprecation warnings. This is acceptable, given that the alternative is that all calls to these functions would require a default constructed QStringList as the second parameter. Change-Id: I1ba4df97ac4894d007da5083c8359015d784ddbb Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Get rid of some QTextCodec leftoversLars Knoll2020-05-143-3/+0
| | | | | | | There's no real dependency to QTextCodec in those files anymore. Change-Id: Ifaf19ab554fd108fa26095db4e2bd4a3e9ea427f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Get rid of QSettings::iniCodec()Lars Knoll2020-05-141-108/+5
| | | | | | | | | | | | | | | | | | Always encodee INI files as utf-8 in Qt6. This is mostly backwards compatible, as old ini files would encode all non ascii characters. [ChangeLog][Important behavioral changes] QSettings will now always encode INI files as utf-8 (and the iniCodec/setIniCode methods are removed). This is a change from Qt 5 and earlier, where QSettings would by default escape all non ascii characters. The behavior is equivalent to what you got in Qt5 by setting a utf-8 iniCodec on the settings object. Settings files written in Qt 5 will still be readable in Qt 6 (unless an iniCodec different from utf-8 was used), but to read Qt6 based ini files in Qt 5 applications, setting the iniCodec to utf-8 is required. Change-Id: Ic7dffcca17779bd5e3dae50d42ce633170289f6c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Port qt_punycodeEncoder() to QStringViewMarc Mutz2020-05-131-1/+1
| | | | | Change-Id: I264e67bc08413f8a39e2d16c774bfd2c76c320ac Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Port qt_check_std3rules() to QStringViewMarc Mutz2020-05-131-1/+1
| | | | | | | Also port its callees. These functions scream to the QStringView-ified... Change-Id: I13c95d65941eb8d02223306d80efd1437b4bd9b7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Port qt_urlRecode() to QStringViewMarc Mutz2020-05-121-6/+6
| | | | | | | It's about time :) Change-Id: I27e597516318382850d4c193fd5b66a35fb9c316 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Sweep of int-ish → char-ish types near calls to QString::fromU*()Marc Mutz2020-05-122-82/+82
| | | | | | | | | | | | The fromUtf16(ushort*) and fromUcs4(uint*) overloads are going to be deprecated. Use the newer fromUtf16(char16_t*) and fromUcs4(char32_t*) overloads. As a drive-by, use std::end()/std::size() where applicable. Change-Id: I5a93e38cae4a2e33d49c90d06c5f14f7cb7ce90c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Handle disk full situations by skipping QFile::moveToTrash testVolker Hilsheimer2020-05-071-3/+9
| | | | | | | | | | If any of the temporary directories and files can't be created, skip the test. Otherwise, the cleanup routine would recursively delete "/". Change-Id: I51f908a468be8fd2ebd523ff7ce27a7c78d1b4e2 Fixes: QTBUG-83863 Pick-to: 5.15 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QFile::moveToTrash: work with relative file paths on WindowsVolker Hilsheimer2020-05-071-8/+12
| | | | | | | | | | | | | | | | | | | | The system APIs expect an absolute "display name" of the file path, so make it absolute. The test was overly tolerant in accepting failure, as a QStorageInfo initialized with a file path that doesn't exist is invalid, and thus always different from the QStorageInfo of the home directory. Fix the test to compare only valid QStorageInfo objects, and postpone the check until the file we want to move has been created. [ChangeLog][QtCore][QFile] moveToTrash supports relative file paths on Windows Change-Id: I94c8cd40c60fde469e38f76a98f867f20c6a0b15 Fixes: QTBUG-84015 Pick-to: 5.15 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* tst_QProcess: create a more reliable crashingThiago Macieira2020-05-051-6/+25
| | | | | | | | | | | | | Turns out that crashing on purpose is more difficult than it seems. It should be easy, given how often we do it accidentally... Let the null pointer dereferencing be the fall back. Some compilers are too smart for their own good and remove the fault. Instead, let's rely on raise(SIGABRT) on Unix and on the UD2 instruction on Windows. Pick-To: 5.15 Change-Id: Ibdc95e9af7bd456a94ecfffd1603f1c9b73b167d Reviewed-by: Simon Hausmann <hausmann@gmail.com>
* tst_QResourceEngine: fix the order of arguments to QCOMPAREThiago Macieira2020-05-051-2/+2
| | | | | | | | Expected and actual were inverted. Pick-To: 5.15 Change-Id: Idc3fae4d0f614c389d27fffd15e9fa6a0a8f25e6 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Port more tests from qtbase/tests/auto/corelib/io/ to CMakeSona Kurazyan2020-05-0432-6/+528
| | | | | | Change-Id: I56427e3e1908047a0674c8c80c24eeda80e947c2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove QTextStream dependency from tst_qfileLars Knoll2020-05-011-15/+6
| | | | | | Change-Id: I83cb05da8c094185b50e9cedea2e705ad1c7f948 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Port test over to use QRegularExpressionLars Knoll2020-04-131-6/+6
| | | | | Change-Id: I7f69fbbdb9e327059cd978b0989eee2c75c5a24b Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-113-4/+12
|\ | | | | | | | | | | | | Conflicts: tests/auto/network/socket/platformsocketengine/platformsocketengine.pri Change-Id: I22daf269a8f28f80630b5f521b91637531156404
| * tst_QFileInfo: fix running with systems without /etc/passwdThiago Macieira2020-04-091-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Clear Linux containers running as root may have no /etc/passwd. But they'll have /etc/machine-id because systemd creates that. Also test /proc/version (a Linux-specific file) because that isn't writeable even by root. Take the opportunity to check with access() instead of assuming root and only root can write to the file. Change-Id: Ibdc95e9af7bd456a94ecfffd1603e8359604752b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * tst_QSaveFile: skip test that fails when run as rootThiago Macieira2020-04-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | FAIL! : tst_QSaveFile::retryTransactionalWrite() '!file.open(QIODevice::WriteOnly)' returned FALSE. () Loc: [/home/tjmaciei/src/qt/qt5/qtbase/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp(156)] strace reveals: access("/TEMPDIR/outfile.ro", W_OK) = 0 Change-Id: Ibdc95e9af7bd456a94ecfffd1603eb371aadb02b Reviewed-by: David Faure <david.faure@kdab.com>
| * QTemporaryFile/Linux: don't cut the root dir's slashThiago Macieira2020-04-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Normally people shouldn't create temporary files on /, but if you're running as root, why not? Caught when running tst_qtemporaryfile as root: openat(AT_FDCWD, "", O_RDWR|O_CLOEXEC|O_TMPFILE, 0600) = -1 ENOENT (No such file or directory) Change-Id: Ibdc95e9af7bd456a94ecfffd1603ebfc17cea220 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-081-2/+54
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/doc/src/cube.qdoc src/corelib/global/qlibraryinfo.cpp src/corelib/text/qbytearray_p.h src/corelib/text/qlocale_data_p.h src/corelib/time/qhijricalendar_data_p.h src/corelib/time/qjalalicalendar_data_p.h src/corelib/time/qromancalendar_data_p.h src/network/ssl/qsslcertificate.h src/widgets/doc/src/graphicsview.qdoc src/widgets/widgets/qcombobox.cpp src/widgets/widgets/qcombobox.h tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro tests/manual/diaglib/debugproxystyle.cpp tests/manual/diaglib/qwidgetdump.cpp tests/manual/diaglib/qwindowdump.cpp tests/manual/diaglib/textdump.cpp util/locale_database/cldr2qlocalexml.py util/locale_database/qlocalexml.py util/locale_database/qlocalexml2cpp.py Resolution of util/locale_database/ are based on: https://codereview.qt-project.org/c/qt/qtbase/+/294250 and src/corelib/{text,time}/*_data_p.h were then regenerated by running those scripts. Updated CMakeLists.txt in each of tests/auto/corelib/serialization/qcborstreamreader/ tests/auto/corelib/serialization/qcborvalue/ tests/auto/gui/kernel/ and generated new ones in each of tests/auto/gui/kernel/qaddpostroutine/ tests/auto/gui/kernel/qhighdpiscaling/ tests/libfuzzer/corelib/text/qregularexpression/optimize/ tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/ tests/libfuzzer/gui/text/qtextdocument/sethtml/ tests/libfuzzer/gui/text/qtextdocument/setmarkdown/ tests/libfuzzer/gui/text/qtextlayout/beginlayout/ by running util/cmake/pro2cmake.py on their changed .pro files. Changed target name in tests/auto/gui/kernel/qaction/qaction.pro tests/auto/gui/kernel/qaction/qactiongroup.pro tests/auto/gui/kernel/qshortcut/qshortcut.pro to ensure unique target names for CMake Changed tst_QComboBox::currentIndex to not test the currentIndexChanged(QString), as that one does not exist in Qt 6 anymore. Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
| * forkfd: fix forkfd_wait when FFD_USE_FORK was activeThiago Macieira2020-03-251-2/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we detected that the OS supports a version of system forkfd (Linux pidfd, FreeBSD procdesc), the forkfd_wait() function was using only the system waiting implementation, which of course can't work for file descriptors created with FFD_USE_FORK. So just detect EBADF and attempt again. If the file descriptor is neither one of our pipes nor a system forkfd, bad things will happen... Fixes: QTBUG-82351 Change-Id: I4e559af2a9a1455ab770fffd15f59fb3160b22eb Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* | Q{File,FileInfo,Dir}: add std::filesystem::path overloadsMårten Nordheim2020-03-247-0/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some overloads where (I thought) it makes sense for QDir and QFile to accept std::filesystem::path objects. Currently my thinking is to not add overloads for static functions where std::filesystem can already do the same job, e.g. create directory or file. Template and enable_if is needed due to both QString and std::filesystem::path being able to be constructed from string literals. The common shared code is currently in QFile because QDir had an implicit include of QFile, made explicit in this patch, and QFileInfo has an include to QFile as well. The QT_HAS_STD_FILESYSTEM macro is visible in user-code which I currently take advantage of in the tests, and users could too. Change-Id: I8d05d3c34c6c17e20972a6a2053862b8891d6c3c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | cmake: Remove APPLE prefix from platform namesTor Arne Vestbø2020-03-161-1/+1
| | | | | | | | | | | | | | None of the other platforms have it. Change-Id: Ib448c2c03ba03f711b507ef391977c0e6aa7c192 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-03-111-2/+5
|\ \
| * | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-111-2/+5
| |\| | | | | | | | | | Change-Id: Ibee5acec72a1a1769d4bc5f23f56c7dc8d4cf3cb
| | * QLoggingRegistry: use QStringView/QLatin1String moreMarc Mutz2020-03-051-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - QLoggingRule::parse() and the ctor take pattern as QStringView - parseNextLine takes lines as QStringView and produces the pattern as QStringView for QLoggingRule - (setContent has to wait for QStringTokenizer) - QLoggingRule::pass()'s first argument is always QLatin1String, so take it as one Use chopped() more, add a std::move(). Change-Id: Ic95ea77464a9922fef452846bc6d5053bd5de56e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | QtConcurrent::run: accept more then five function's argumentsVitaly Fanaskov2020-03-112-8/+8
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Potentially Source-Incompatible Changes] QtConcurrent::run has the following signatures: run(Function &&f, Args &&...args) and run(QThreadPool *pool, Function &&f, Args &&...args). If f is a member pointer, the first argument of args should be an object for which that member is defined (or a reference, or a pointer to it). See the documentation for more details. Fixes: QTBUG-82383 Change-Id: I18f7fcfb2adbdd9f75b29c346bd3516304e32d31 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-033-5/+5
|\| | | | | | | Change-Id: If36d96c0fef3de5ab6503977501c55c62a2ecc97
| * Core: Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-02-283-5/+5
| | | | | | | | | | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I446f9ddc8f8de4a0b79b09edb44f7c1496fbc33f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | QDebug::toString(): use nospace()Mitch Curtis2020-02-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The intended use cases for toString() are the situations where you can't use operator<<, such as QVERIFY2, Q_ASSERT_X, etc., which means that it will often be used as an argument to e.g. QString::arg(), where the user has control over the structure of the message. For that reason, adding an extra space to the end is not necessary and just gets in the way. This amends 658b9697f9d85d4ed294810b4f60bafdbdd8e247. Change-Id: I0695e6809026a0f92ed783899da80de4fa2a1684 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devLars Knoll2020-02-281-2/+3
|\| | | | | | | Change-Id: I469b0501cc65fc5ce4d797a69ae89405cc69c7f8
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-261-2/+3
| |\ | | | | | | | | | Change-Id: Iad459349ea8b4090d79b4771bfff8f656a8a8189
| | * tst_QSettings: Fix leaking registry keyFriedemann Kleint2020-02-251-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, the test was leaking a registry key HKEY_CURRENT_USER\Software\tst_QSettings_trailingWhitespace Fix by using .ini-Format in the temporary directory created by the test. Amends e66a878838f17a0626b0b10b340b1ca4dba56cc1. Task-number: QTBUG-22461 Change-Id: If141a9e72e8faebc3fc46b94dab7b4b728a75292 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add QDebug::toString()Mitch Curtis2020-02-221-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This template function streams the given object into a QDebug instance that operates on a string, and then returns that string. This function is useful for cases where you need the textual representation of an object for debugging, but cannot use operator<<. A good example of this is when writing tests where you want to provide a useful failure message involving details about an object, but must provide it in a string to e.g. QVERIFY2. [ChangeLog][QtCore][QDebug] Added static template toString() function, which streams the given object into a QDebug instance that operates on a string, and then returns that string. Fixes: QTBUG-82309 Change-Id: I8411394e899dedad19cec788d779a4515d52ba11 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Remove QUrl::topLevelDomainTimur Pocheptsov2020-02-202-58/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And move the actual implementation from corelib/io to network/kernel sub-module. Fixes: QTBUG-80308 Change-Id: I554b05bae3552c68e1e1a405c169366ee19120b2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | | Merge remote-tracking branch 'origin/wip/cmake' into devAlexandru Croitor2020-02-1316-17/+16
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/manual/rhi/hellominimalcrossgfxtriangle/CMakeLists.txt Hopefully final merge from wip/cmake, and then all cmake changes should target dev directly. Change-Id: I29b04c9b0284e97334877c77a32ffdf887dbf95b
| * | | Regenerate projects one last time before mergewip/cmakeAlexandru Croitor2020-02-1216-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia24cf56b79ca6dacd370a7e397024e9b663e0167 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-02-131-0/+140
|\ \ \ \ | |/ / / |/| / / | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/graphicsview/boxes/scene.h src/corelib/Qt5CoreMacros.cmake src/corelib/Qt6CoreMacros.cmake src/network/ssl/qsslsocket.cpp src/network/ssl/qsslsocket.h src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp src/testlib/CMakeLists.txt src/testlib/.prev_CMakeLists.txt tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp Disabled building manual tests with CMake for now, because qmake doesn't do it, and it confuses people. Done-With: Alexandru Croitor <alexandru.croitor@qt.io> Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io> Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152
| * | On Windows 7, fall back to SHFileOperation to avoid confirmation dialogsVolker Hilsheimer2020-02-071-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moving a file to the trash should preferably done via IFileOperation. However, the implementation on Windows 7 ignores the operation flags that request the shell not to show any confirmation dialogs or other UI elements. SHFileOperation is an old API that doesn't show any UI, but has the limitation that it doesn't report the location of the file in the trash after the move. So an application cannot restore the file, but the user can do so via Explorer. Overall, the better compromise is to not have dialogs at the expense of not being able to report the new path. This allows us to run the unit test on Windows 7 as well. Change-Id: Ib8e651a69e2c6750f668b52d2a70925d156cc8ae Fixes: QTBUG-81927 Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
| * | Add QFile::moveToTrash, which moves a file to the trashVolker Hilsheimer2020-02-051-0/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the nature of QFile just operating on a file path, this also works for paths that are actually directories. The test covers files from different locations on which this operation should typically succeed, but tries to handle the case where trashing files will fail because of the file system structure. On Windows 7, running the test will open a confirmation dialog as the implementation of IFileOperation doesn't respect the various flags. This might depend on the specific Windows 7 patch level, and the option to always use SHFileOperation on that platform needs to be evaluated further. [ChangeLog][QtCore][QFile] Introduce QFile::moveToTrash to allow applications to move files to the trash. Change-Id: I45019040c25b30f7db293b6933c63aca2f319514 Fixes: QTBUG-47703 Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
| * | Address failing test case for internal implementation of moveToTrashVolker Hilsheimer2020-02-042-174/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ammends 601ce9e08aa92b273f1a6daf0bdbc67dbf9b4e5f, which added a new test case for the internal Qt APIs. The test was not getting executed by coin as it wasn't included in the io.pro file, and trying to fix that generates link errors on Windows, since these internal APIs depend on other internal APIs. Short of bootstrapping much of QtCore into this test case, the only sensible option is to remove this test case again, and cover the testing when the public API is added in a follow up commit. At the same time, address those failures that were discovered on platforms that could build the test, and fix compilation on iOS platforms in Coin. Change-Id: Id31b43c9df9f205476c48bccb6b87c7a53ed15c5 Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
| * | Implement moving of a single file system entry to the trashVolker Hilsheimer2020-01-302-0/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements the operation for Windows, macOS, and Unix, for now only as a private API (since QFileSystemEngine is private). This adds the capability as a testable function; public API to be agreed on and added in a separate commit. The Unix implementation follows the freedesktop.org specification [1] version 1.0. [1] https://specifications.freedesktop.org/trash-spec/trashspec-1.0.html On macOS and Windows, native APIs are used, with each having some limitations: * on macOS, the file in the trash won't have a "put back" option, as we don't use Finder automation, for the reasons provided in the comments * on Windows, we might not be able to use the modern IFileOperation API, e.g. if Qt is built with mingw which doesn't seem to provide the interface definition; the fallback doesn't provide access to the file name in the trash The test case creates files and directories, and moves them to the trash. As part of the cleanup routine, it deletes all file system entries created. If run on Windows without IFileOperations support, this will add a file in the trash for each test run, filling up hard drive space. Task-number: QTBUG-47703 Change-Id: I5f5f4e578be2f45d7da84f70a03acbe1a12a1231 Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-01-291-90/+18
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/Qt5CoreConfigExtras.cmake.in src/corelib/Qt5CoreMacros.cmake src/dbus/Qt5DBusConfigExtras.cmake.in src/widgets/Qt5WidgetsConfigExtras.cmake.in Change-Id: Ib782f3b177c38b2cce83beebe15be9c0baa578f7
| * | | QProcess: remove deprecated signature of finished signalVitaly Fanaskov2020-01-281-90/+18
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-80906 Change-Id: Ic9852bc5031d357d23ff6c13a65d020a4b6ea3d6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | | Merge remote-tracking branch 'origin/dev' into merge-devLeander Beernaert2020-01-2416-47/+159
|\| | | | | | | | | | | | | | | Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
| * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-167-4/+95
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-157-4/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [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 devQt Forward Merge Bot2020-01-151-0/+28
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/network/access/spdy/tst_spdy.cpp Change-Id: I3196c5f7b34f2ffc9ef1e690d02d5b9bb3270a74
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-131-0/+28
| | |\| | | | | | | | | | | | | Change-Id: I50f70a789ab1438b40d4408be72c090fa00b801f