diff --git a/CMakeLists.txt b/CMakeLists.txt index b5a50fb..2746410 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -179,11 +179,6 @@ set(CONFIGURATION_PACKAGE_SUFFIX find_package(c++utilities${CONFIGURATION_PACKAGE_SUFFIX} 5.0.0 REQUIRED) use_cpp_utilities() -# configure use of std::filesystem (so far only required on Windows) -if (WIN32) - use_standard_filesystem() -endif () - # include modules to apply configuration include(BasicConfig) include(QtGuiConfig) diff --git a/misc/desktoputils.cpp b/misc/desktoputils.cpp index 75b3e7f..cf26eb9 100644 --- a/misc/desktoputils.cpp +++ b/misc/desktoputils.cpp @@ -2,9 +2,8 @@ #include #include - #ifdef Q_OS_WIN32 -#include +#include #endif namespace QtUtilities { @@ -29,7 +28,7 @@ bool openLocalFileOrDir(const QString &path) tmp.replace(QChar('\\'), QChar('/')); // add a slash before the drive letter of an absolute path - if (std::filesystem::path(path.toStdString()).is_absolute()) { + if (QFileInfo(path).isAbsolute()) { tmp = QStringLiteral("/") + tmp; } url.setPath(tmp, QUrl::DecodedMode);