mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 03:39:55 +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:
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…
x
Reference in New Issue
Block a user