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.
7220-lua-add-a-general-purpose-lexical-parser
AnyOldName3 2 years ago
parent e575c25278
commit f757ac642a

@ -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));

Loading…
Cancel
Save