1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-10 21:40:15 +00:00

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.
This commit is contained in:
AnyOldName3 2023-01-19 22:36:51 +00:00
parent e575c25278
commit f757ac642a

View File

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