Merge pull request #1345 from bhangart/fix/unreadable-element-test-windows

Skip tst_unreadableelement where a file cannot be made unreadable
This commit is contained in:
Laurent Trinques
2026-10-07 06:41:12 +02:00
committed by GitHub
+6
View File
@@ -89,6 +89,12 @@ private slots:
.contains(QStringLiteral("RESULT placed")));
QVERIFY(QFile::exists(embedded));
#ifdef Q_OS_WIN
// Qt cannot take read permission away on Windows: it only knows the
// read-only flag there, so this returns false. The check needs a
// file the user cannot read, which Windows cannot give it.
QSKIP("Windows cannot make the file unreadable through QFile");
#endif
QVERIFY(QFile::setPermissions(m_symbol, QFileDevice::Permissions()));
QFile probe(m_symbol);
if (probe.open(QIODevice::ReadOnly))