qt5base-lts/tests/auto/corelib/io/qstandardpaths
Friedemann Kleint 0e8a2788d8 Fix Windows: QStandardPath::findExecutable() to check suffixes.
Append the Windows executables suffixes from the PATHEXT
environment variable.

The previous code had a bug since the 'break' statement
bailed out of the inner loop only.

Factor search code out into a separate functions, avoiding
repeated invocations of list.constEnd() and variable
assignments in the old code.

Add a static function that is called on Unix and on Windows
for executable names with a suffix.

Call another function applying a candidate list of suffixes
in case an executable name without a suffix is passed.

Lower case the extensions from PATHEXT, streamline code.

Split up the test, add a _data() slot for clarity.

Task-number: QTBUG-27457
Change-Id: I2bf34de52aeadddd3b937ad1e22191c3c850fd26
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-10-08 17:21:35 +02:00
..
qstandardpaths.pro Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
tst_qstandardpaths.cpp Fix Windows: QStandardPath::findExecutable() to check suffixes. 2012-10-08 17:21:35 +02:00