From dbfc0b47b6e31a60cdd0e58fb854b9573b0ea290 Mon Sep 17 00:00:00 2001 From: Thomas Gimpel Date: Sun, 16 Mar 2025 13:11:15 +0100 Subject: [PATCH] App: reverted commit 8ff4b1b and improved comments in order to fix the MacOS build (#20068) --- src/App/Application.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/App/Application.cpp b/src/App/Application.cpp index 4904750e9c..6c7c5222d5 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -1159,8 +1159,8 @@ std::string Application::getUserMacroDir() std::string Application::getResourceDir() { #ifdef RESOURCEDIR - // #6892: Conda may inject null characters => remove them - auto path = std::string(RESOURCEDIR); + // #6892: Conda may inject null characters => remove them using c_str() + std::string path = std::string(RESOURCEDIR).c_str(); path += PATHSEP; QDir dir(QString::fromStdString(path)); if (dir.isAbsolute()) @@ -1174,8 +1174,8 @@ std::string Application::getResourceDir() std::string Application::getLibraryDir() { #ifdef LIBRARYDIR - // #6892: Conda may inject null characters => remove them - auto path = std::string(LIBRARYDIR); + // #6892: Conda may inject null characters => remove them using c_str() + std::string path = std::string(LIBRARYDIR).c_str(); QDir dir(QString::fromStdString(path)); if (dir.isAbsolute()) return path; @@ -1188,8 +1188,8 @@ std::string Application::getLibraryDir() std::string Application::getHelpDir() { #ifdef DOCDIR - // #6892: Conda may inject null characters => remove them - auto path = std::string(DOCDIR); + // #6892: Conda may inject null characters => remove them using c_str() + std::string path = std::string(DOCDIR).c_str(); path += PATHSEP; QDir dir(QString::fromStdString(path)); if (dir.isAbsolute())