Remove automatic conversion from path to QString.

This commit is contained in:
Mikaël Capelle
2022-05-04 19:10:18 +02:00
parent 94bd8b82b4
commit fa33e42e22
-12
View File
@@ -39,19 +39,7 @@ namespace pybind11::detail {
PyObject* objPtr = src.ptr();
if (!PyBytes_Check(objPtr) && !PyUnicode_Check(objPtr)) {
#ifndef PYBIND11_QT_QSTRING_NOFS
// try converting from os.PathLike
type_caster<std::filesystem::path> path_caster;
if (!path_caster.load(src, implicit)) {
return false;
}
value = qstring_from_stdstring((*path_caster).native());
return true;
#else
// do not try to convert from os.PathLike
return false;
#endif
}
// Ensure the string uses 8-bit characters