Core: Use FilePath::searchInPath to look for explorer

Not expecting remote windows anytime soon, but moving towards
FilePath as main/only entrypoint to filesystem functionality.

Change-Id: I1701471394900049084fc7258fc56f7f912402ea
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2023-05-30 09:10:35 +02:00
parent 4f1560666a
commit 326e20e8b9

View File

@@ -57,7 +57,7 @@ void FileUtils::showInGraphicalShell(QWidget *parent, const FilePath &pathIn)
const QFileInfo fileInfo = pathIn.toFileInfo(); const QFileInfo fileInfo = pathIn.toFileInfo();
// Mac, Windows support folder or file. // Mac, Windows support folder or file.
if (HostOsInfo::isWindowsHost()) { if (HostOsInfo::isWindowsHost()) {
const FilePath explorer = Environment::systemEnvironment().searchInPath(QLatin1String("explorer.exe")); const FilePath explorer = FilePath("explorer.exe").searchInPath();
if (explorer.isEmpty()) { if (explorer.isEmpty()) {
QMessageBox::warning(parent, QMessageBox::warning(parent,
Tr::tr("Launching Windows Explorer Failed"), Tr::tr("Launching Windows Explorer Failed"),