From fa33e42e22c5620d93411eb1770579890467ee2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Wed, 4 May 2022 19:10:18 +0200 Subject: [PATCH] Remove automatic conversion from path to QString. --- src/pybind11-qt/pybind11_qt_basic.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/pybind11-qt/pybind11_qt_basic.cpp b/src/pybind11-qt/pybind11_qt_basic.cpp index b8f19f1..c6a7cc6 100644 --- a/src/pybind11-qt/pybind11_qt_basic.cpp +++ b/src/pybind11-qt/pybind11_qt_basic.cpp @@ -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 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