tst_qmimedatabase: extend checks of 'ls' binary on more Unix OSes

The "ls" binary is part of POSIX/Unix systems, so it makes sense to
extend the checks for it to more Unix OSes.

Explicitly exclude any Darwin-based OS (macOS & other Apple OSes)
following the feedback of David Faure.

Change-Id: I14ddfc10582781cde237f4c48d8e70c1a9aa2fd3
Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
Pino Toscano 2024-10-14 10:46:33 +02:00
parent 175569e1ec
commit 3b6138b1fb

View File

@ -221,7 +221,7 @@ void tst_QMimeDatabase::mimeTypeForName()
QCOMPARE(doesNotExist.comment(), QString());
QCOMPARE(doesNotExist.aliases(), QStringList());
#ifdef Q_OS_LINUX
#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN)
if (m_hasFreedesktopOrg) {
QString exePath = QStandardPaths::findExecutable(QLatin1String("ls"));
if (exePath.isEmpty())