]> git.lyx.org Git - features.git/blobdiff - src/support/os.cpp
Fix Qt6 deprecation warning (QString::fromUcs4(uint))
[features.git] / src / support / os.cpp
index 616b9c6936d4a16594f239fbb2dc1d2332db1358..6561fbca38316dad669fc63ad5d609386763a9d4 100644 (file)
 #include "support/debug.h"
 #include "support/filetools.h"
 #include "support/qstring_helpers.h"
-#include "support/regex.h"
 
 #include <QDir>
 
+#include <regex>
+
 #if defined(__CYGWIN__)
 #include "support/os_cygwin.cpp"
 #elif defined(_WIN32)
@@ -65,7 +66,7 @@ static string const python23_call(string const & binary, bool verbose = false)
        smatch sm;
        try {
                static regex const python_reg("\\((\\d*), (\\d*)\\)");
-               if (out.first < 0 || !regex_match(out.second, sm, python_reg))
+               if (!out.valid || !regex_match(out.result, sm, python_reg))
                        return string();
        } catch(regex_error const & /*e*/) {
                LYXERR0("Regex error! This should not happen.");
@@ -78,7 +79,7 @@ static string const python23_call(string const & binary, bool verbose = false)
                return string();
 
        if (verbose)
-               lyxerr << "Found Python " << out.second << "\n";
+               lyxerr << "Found Python " << out.result << "\n";
        // Add the -tt switch so that mixed tab/whitespace
        // indentation is an error
        return binary + " -tt";