From c9d08ae246029ea06568c3cd02c7c1716deb40a4 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sun, 25 Dec 2011 14:22:42 +0100 Subject: Ported QString replace to boost::regex diff --git a/src/handle_dep.cc b/src/handle_dep.cc index 99a0df7..da95a67 100644 --- a/src/handle_dep.cc +++ b/src/handle_dep.cc @@ -1,10 +1,10 @@ #include "handle_dep.h" #include #include -#include #include // for system() #include #include +#include #include using namespace boost::filesystem; @@ -22,7 +22,7 @@ void handle_dep(const std::string &filename) } if (!exists(filepath) && make_command) { std::stringstream buf; - buf << make_command << " '" << QString::fromStdString(filename).replace("'", "'\\''").toUtf8().data() << "'"; + buf << make_command << " '" << boost::regex_replace(filename, boost::regex("'"), "'\\''") << "'"; system(buf.str().c_str()); // FIXME: Handle error } } -- cgit v0.10.1