From f757ac642a0bf5195a611fdc5a927aa04d799d42 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Thu, 19 Jan 2023 22:36:51 +0000 Subject: [PATCH] Use dedicated function to convert QString to std::filesystem::path I noticed this while reviewing something else and trying to find the function to recommend using it. --- apps/launcher/datafilespage.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/launcher/datafilespage.cpp b/apps/launcher/datafilespage.cpp index eb8258c09d..3537ee30df 100644 --- a/apps/launcher/datafilespage.cpp +++ b/apps/launcher/datafilespage.cpp @@ -258,9 +258,7 @@ void Launcher::DataFilesPage::populateFileViews(const QString& contentModelName) } // deactivate data-local and global data directory: they are always included - const auto tmp = currentDir.toUtf8(); - if (currentDir == mDataLocal - || std::filesystem::path(Misc::StringUtils::stringToU8String(tmp)) == globalDataDir) + if (currentDir == mDataLocal || Files::pathFromQString(currentDir) == globalDataDir) { auto flags = item->flags(); item->setFlags(flags & ~(Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | Qt::ItemIsEnabled));